mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Formatting (whitespace only)
This commit is contained in:
parent
9ef97b0fc1
commit
f9a41fe4b5
@ -741,7 +741,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
double diff = prev.EndTime.TotalMilliseconds - p.StartTime.TotalMilliseconds;
|
||||
if (!prev.StartTime.IsMaxTime && !p.StartTime.IsMaxTime && diff >= 0 && !(canBeEqual && diff == 0))
|
||||
{
|
||||
|
||||
int diffHalf = (int)(diff / 2);
|
||||
if (!Configuration.Settings.Tools.FixCommonErrorsFixOverlapAllowEqualEndStart && p.StartTime.TotalMilliseconds == prev.EndTime.TotalMilliseconds &&
|
||||
prev.Duration.TotalMilliseconds > 100)
|
||||
@ -1578,7 +1577,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
AddFixToListView(p, fixAction, oldText, p.Text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (missingSpaces > 0)
|
||||
{
|
||||
@ -1771,7 +1769,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
p.Text = oldText;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
UpdateFixStatus(noOfFixes, fixAction, _language.XMissingQuotesAdded);
|
||||
@ -1899,7 +1896,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
match = match.NextMatch();
|
||||
@ -1985,7 +1981,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
missigPeriodsAtEndOfLine++;
|
||||
AddFixToListView(p, fixAction, oldText, p.Text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3830,7 +3825,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
fixCount++;
|
||||
AddFixToListView(p, fixAction, oldText, p.Text);
|
||||
}
|
||||
|
||||
}
|
||||
UpdateFixStatus(fixCount, _language.FixSpanishInvertedQuestionAndExclamationMarks, fixCount.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
@ -3938,7 +3932,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
p.Text = p.Text.Remove(j, markIndex - j + 1).Insert(j, speaker + st.Pre + temp + st.StrippedText + st.Post);
|
||||
markIndex += addToIndex;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4052,7 +4045,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void Next()
|
||||
{
|
||||
|
||||
RunSelectedActions();
|
||||
|
||||
buttonBack.Enabled = true;
|
||||
@ -4139,7 +4131,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
GoToNextSynaxError();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void GoToNextSynaxError()
|
||||
@ -4203,7 +4194,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private static string[] MakeDiffHtml(string before, string after)
|
||||
{
|
||||
|
||||
before = before.Replace("<br />", "↲");
|
||||
after = after.Replace("<br />", "↲");
|
||||
before = before.Replace(Environment.NewLine, "↲");
|
||||
@ -4829,7 +4819,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (deSelectedFixes.Contains(item.SubItems[1].Text + item.SubItems[2].Text + item.SubItems[3].Text))
|
||||
item.Checked = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -4898,7 +4887,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else if (subtitleListView1.SelectedItems.Count == 2 &&
|
||||
subtitleListView1.SelectedItems[0].Index == subtitleListView1.SelectedItems[1].Index - 1)
|
||||
{
|
||||
|
||||
mergeSelectedLinesToolStripMenuItem.Visible = true;
|
||||
toolStripSeparator1.Visible = true;
|
||||
}
|
||||
|
@ -37,14 +37,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
comboBoxSubtitleFontSize.SelectedIndex = 10;
|
||||
|
||||
}
|
||||
|
||||
internal void Initialize(NOcrDb _nOcrDb)
|
||||
{
|
||||
if (_nOcrDb != null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +87,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var charactersLearned = new List<string>();
|
||||
foreach (ListViewItem item in listViewFonts.Items)
|
||||
{
|
||||
|
||||
if (item.Checked)
|
||||
{
|
||||
_subtitleFontName = item.Text;
|
||||
@ -128,7 +125,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
NOcrChar match = nOcrD.GetMatch(list[0].NikseBitmap);
|
||||
if (match == null)
|
||||
{
|
||||
|
||||
pictureBox1.Image = list[0].NikseBitmap.GetBitmap();
|
||||
this.Refresh();
|
||||
Application.DoEvents();
|
||||
@ -237,4 +233,4 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2080,7 +2080,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return oc;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tryItalicScaling)
|
||||
@ -2630,7 +2629,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return oc;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tryItalicScaling)
|
||||
@ -2686,7 +2684,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// return c;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -3826,7 +3823,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (index + 1 < list.Count && list[index + 1].NikseBitmap != null) // only allow expand to EndOfLine or space
|
||||
{
|
||||
|
||||
index++;
|
||||
expandSelectionList.Add(list[index]);
|
||||
}
|
||||
@ -3864,7 +3860,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
matches.Add(new CompareMatch("*", false, 0, null));
|
||||
}
|
||||
_italicCheckedLast = _vobSubOcrCharacter.IsItalic;
|
||||
|
||||
}
|
||||
else if (item.NikseBitmap == null)
|
||||
{
|
||||
@ -4199,7 +4194,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void SaveNOcr()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
_nOcrDb.Save();
|
||||
@ -4328,7 +4322,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (index + 1 < list.Count && list[index + 1].NikseBitmap != null) // only allow expand to EndOfLine or space
|
||||
{
|
||||
|
||||
index++;
|
||||
expandSelectionList.Add(list[index]);
|
||||
}
|
||||
@ -4375,7 +4368,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
matches.Add(new CompareMatch("*", false, 0, null));
|
||||
}
|
||||
_italicCheckedLast = _vobSubOcrNOcrCharacter.IsItalic;
|
||||
|
||||
}
|
||||
else if (item.NikseBitmap == null)
|
||||
{
|
||||
@ -5118,7 +5110,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
bitmap.Dispose();
|
||||
p.Result = GetStringWithItalicTags(matches);
|
||||
|
||||
}
|
||||
|
||||
private void ImageCompareThreadRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
@ -5597,7 +5588,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_mainOcrIndex++;
|
||||
_mainOcrTimer.Start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LoadNOcrWithCurrentLanguage()
|
||||
@ -6214,7 +6204,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
unItalicText += "!";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (line.EndsWith('?') && !unItalicText.EndsWith('?') && !unItalicText.EndsWith("?</i>"))
|
||||
@ -6818,7 +6807,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
using (var formVobSubEditCharacters = new VobSubEditCharacters(comboBoxCharacterDatabase.SelectedItem.ToString(), null, _binaryOcrDb))
|
||||
{
|
||||
|
||||
formVobSubEditCharacters.Initialize(name, text);
|
||||
DialogResult result = formVobSubEditCharacters.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
@ -7281,7 +7269,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
current.Text = old.Text;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
subtitleListView1.Fill(_subtitle);
|
||||
@ -7490,7 +7477,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
/// </summary>
|
||||
static EncodingTools()
|
||||
{
|
||||
|
||||
List<int> streamEcodings = new List<int>();
|
||||
List<int> allEncodings = new List<int>();
|
||||
List<int> mimeEcodings = new List<int>();
|
||||
@ -65,7 +64,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
// all singlebyte encodings
|
||||
foreach (EncodingInfo enc in Encoding.GetEncodings())
|
||||
{
|
||||
|
||||
if (!enc.GetEncoding().IsSingleByte)
|
||||
continue;
|
||||
|
||||
@ -155,7 +153,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
return enc;
|
||||
}
|
||||
@ -182,7 +179,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
|
||||
private static Encoding DetectOutgoingEncoding(string input, int[] preferredEncodings, bool preserveOrder)
|
||||
{
|
||||
|
||||
if (input == null)
|
||||
throw new ArgumentNullException("input");
|
||||
|
||||
@ -234,7 +230,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
Marshal.Copy(pDetectedEncs, theResult, 0, theResult.Length);
|
||||
result = Encoding.GetEncoding(theResult[0]);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -252,7 +247,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
|
||||
public static Encoding[] DetectOutgoingEncodings(string input, int[] preferredEncodings, bool preserveOrder)
|
||||
{
|
||||
|
||||
if (input == null)
|
||||
throw new ArgumentNullException("input");
|
||||
|
||||
@ -304,9 +298,7 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
// get the encodings for the codepages
|
||||
for (int i = 0; i < detectedCodepages; i++)
|
||||
result.Add(Encoding.GetEncoding(theResult[i]));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -353,7 +345,6 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
/// <returns>an array of Encoding with assumed encodings</returns>
|
||||
public static Encoding[] DetectInputCodepages(byte[] input, int maxEncodings)
|
||||
{
|
||||
|
||||
if (maxEncodings < 1)
|
||||
throw new ArgumentOutOfRangeException("maxEncodings", "at least one encoding must be returned");
|
||||
|
||||
@ -477,9 +468,7 @@ namespace Nikse.SubtitleEdit.Logic.DetectEncoding
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
return new StreamReader(stream, detectedEncoding);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -183,7 +183,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
size++;
|
||||
}
|
||||
|
||||
}
|
||||
if (size > 2)
|
||||
{
|
||||
@ -198,7 +197,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
parts.Add(new ImageSplitterItem(0, startY, bmp.CopyRectangle(new Rectangle(0, startY, bmp.Width, size + 1))));
|
||||
}
|
||||
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
@ -243,7 +241,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
size++;
|
||||
}
|
||||
|
||||
}
|
||||
if (size > 2)
|
||||
{
|
||||
@ -295,7 +292,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
size++;
|
||||
}
|
||||
|
||||
}
|
||||
if (size > 2)
|
||||
{
|
||||
@ -355,7 +351,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
x < bmp.Width - 2 &&
|
||||
!IsVerticalLineTransparent(bmp, ref tempY, x + 1))
|
||||
{
|
||||
|
||||
//Add space?
|
||||
if (lastEndX > 0 && lastEndX + xOrMorePixelsMakesSpace < startX)
|
||||
{
|
||||
@ -751,7 +746,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
else if (x < bmp.Width - 1 && y == bmp.Height - 1 && bmp.GetAlpha(x + 1, y) == 0 && bmp.GetAlpha(x + 1, y - 1) == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user