mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
remove trailing whitespace
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1068 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
6f2c9a8d98
commit
0f78b34604
@ -73,9 +73,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
int timeStampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
|
||||
Columns[ColumnIndexStart].Width = timeStampWidth;
|
||||
Columns[ColumnIndexEnd].Width = timeStampWidth;
|
||||
Columns[ColumnIndexDuration].Width = (int)(timeStampWidth * 0.8);
|
||||
Columns[ColumnIndexDuration].Width = (int)(timeStampWidth * 0.8);
|
||||
}
|
||||
|
||||
|
||||
SubtitleListViewResize(this, null);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
switch (e.ColumnIndex)
|
||||
{
|
||||
case ColumnIndexNumber:
|
||||
case ColumnIndexNumber:
|
||||
Configuration.Settings.General.ListViewNumberWidth = Columns[ColumnIndexNumber].Width;
|
||||
break;
|
||||
case ColumnIndexStart:
|
||||
@ -155,7 +155,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
int restWidth = (lengthAvailable / 2) - 15;
|
||||
Columns[ColumnIndexText].Width = restWidth;
|
||||
Columns[ColumnIndexTextAlternate].Width = restWidth;
|
||||
Columns[ColumnIndexTextAlternate].Width = restWidth;
|
||||
}
|
||||
}
|
||||
else if (!IsAlternateTextColumnVisible && !IsExtraColumnVisible)
|
||||
@ -744,7 +744,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Columns[ColumnIndexText].Width = -2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Columns[ColumnIndexNumber].Width = 45;
|
||||
Columns[ColumnIndexEnd].Width = 80;
|
||||
|
@ -667,7 +667,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
|
||||
{
|
||||
if (_subtitle.Paragraphs[i].Text.Contains("<"))
|
||||
{
|
||||
{
|
||||
string text = _subtitle.Paragraphs[i].Text.Replace(beginTag.ToUpper(), beginTag).Replace(endTag.ToUpper(), endTag);
|
||||
string oldText = text;
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_refreshTimer.Stop();
|
||||
_refreshTimer.Start();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_refreshTimer.Start();
|
||||
|
@ -2608,7 +2608,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void ToolStripButtonSaveClick(object sender, EventArgs e)
|
||||
{
|
||||
ReloadFromSourceView();
|
||||
bool oldChange = _changeSubtitleToString != _subtitle.ToText(new SubRip()).Trim();
|
||||
bool oldChange = _changeSubtitleToString != _subtitle.ToText(new SubRip()).Trim();
|
||||
SaveSubtitle(GetCurrentSubtitleFormat());
|
||||
|
||||
if (_subtitleAlternate != null && _changeAlternateSubtitleToString != _subtitleAlternate.ToText(new SubRip()).Trim() && Configuration.Settings.General.AllowEditOfOriginalSubtitle && _subtitleAlternate.Paragraphs.Count > 0)
|
||||
@ -7277,7 +7277,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else if (_mainMergeDialogue == e.KeyData && inListView)
|
||||
{
|
||||
MergeDialogues();
|
||||
e.SuppressKeyPress = true;
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainListViewToggleDashes == e.KeyData && inListView)
|
||||
{
|
||||
@ -8381,8 +8381,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private bool IsUnicode
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
var enc = GetCurrentEncoding();
|
||||
return enc == Encoding.UTF8 || enc == Encoding.Unicode || enc == Encoding.UTF7 || enc == Encoding.UTF32 || enc == Encoding.BigEndianUnicode;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
public int MergeLinesShorterThan { get; set; }
|
||||
public string MusicSymbol { get; set; }
|
||||
public string MusicSymbolToReplace { get; set; }
|
||||
public string UnicodeSymbolsToInsert { get; set; }
|
||||
public string UnicodeSymbolsToInsert { get; set; }
|
||||
public bool SpellCheckAutoChangeNames { get; set; }
|
||||
public bool SpellCheckOneLetterWords { get; set; }
|
||||
public bool OcrFixUseHardcodedRules { get; set; }
|
||||
@ -369,7 +369,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
SmallDelayMilliseconds = 500;
|
||||
LargeDelayMilliseconds = 5000;
|
||||
|
||||
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;"; // matroska/mp4/m4v files (can contain subtitles)
|
||||
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;"; // matroska/mp4/m4v files (can contain subtitles)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1007,7 +1007,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
settings.Tools.MusicSymbolToReplace = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("UnicodeSymbolsToInsert");
|
||||
if (subNode != null)
|
||||
settings.Tools.MusicSymbolToReplace = subNode.InnerText;
|
||||
settings.Tools.MusicSymbolToReplace = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("SpellCheckAutoChangeNames");
|
||||
if (subNode != null)
|
||||
settings.Tools.SpellCheckAutoChangeNames = Convert.ToBoolean(subNode.InnerText);
|
||||
@ -1651,7 +1651,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
textWriter.WriteElementString("MergeLinesShorterThan", settings.Tools.MergeLinesShorterThan.ToString());
|
||||
textWriter.WriteElementString("MusicSymbol", settings.Tools.MusicSymbol);
|
||||
textWriter.WriteElementString("MusicSymbolToReplace", settings.Tools.MusicSymbolToReplace);
|
||||
textWriter.WriteElementString("MusicSymbolToReplace", settings.Tools.UnicodeSymbolsToInsert);
|
||||
textWriter.WriteElementString("MusicSymbolToReplace", settings.Tools.UnicodeSymbolsToInsert);
|
||||
textWriter.WriteElementString("SpellCheckAutoChangeNames", settings.Tools.SpellCheckAutoChangeNames.ToString());
|
||||
textWriter.WriteElementString("SpellCheckOneLetterWords", settings.Tools.SpellCheckOneLetterWords.ToString());
|
||||
textWriter.WriteElementString("OcrFixUseHardcodedRules", settings.Tools.OcrFixUseHardcodedRules.ToString());
|
||||
|
@ -754,10 +754,10 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
fs.WriteByte(0);
|
||||
fs.WriteByte(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// write four bytes time code
|
||||
string highPart = string.Format("{0:00}", timeCode.Hours) + string.Format("{0:00}", timeCode.Minutes);
|
||||
string highPart = string.Format("{0:00}", timeCode.Hours) + string.Format("{0:00}", timeCode.Minutes);
|
||||
byte frames = (byte)MillisecondsToFrames(timeCode.Milliseconds);
|
||||
string lowPart = string.Format("{0:00}", timeCode.Seconds) + string.Format("{0:00}", frames);
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
Number,
|
||||
TimeStart,
|
||||
TimeEnd,
|
||||
Text
|
||||
Text
|
||||
}
|
||||
|
||||
public override string Extension
|
||||
@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
sb.AppendLine(line);
|
||||
string s = sb.ToString();
|
||||
if (!s.Contains("[HEADER]") || !s.Contains("[BODY]"))
|
||||
return false;
|
||||
return false;
|
||||
|
||||
var subtitle = new Subtitle();
|
||||
LoadSubtitle(subtitle, lines, fileName);
|
||||
@ -100,7 +100,7 @@ DIGITAL_CINEMA=YES
|
||||
if (RegexNumber.IsMatch(line))
|
||||
{
|
||||
if (paragraph != null)
|
||||
subtitle.Paragraphs.Add(paragraph);
|
||||
subtitle.Paragraphs.Add(paragraph);
|
||||
paragraph = new Paragraph();
|
||||
expecting = ExpectingLine.TimeStart;
|
||||
}
|
||||
|
@ -1002,7 +1002,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "en_US":
|
||||
count = GetCount(text, "we", "are", "and", "you", "your", "what");
|
||||
if (count > bestCount)
|
||||
{
|
||||
{
|
||||
if (containsEnGb)
|
||||
{
|
||||
int usCount = GetCount(text, "color", "flavor", "honor", "humor", "neighbor", "honor");
|
||||
@ -1015,7 +1015,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
else
|
||||
{
|
||||
languageName = shortName;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "en_GB":
|
||||
|
@ -286,7 +286,7 @@ namespace Test
|
||||
Assert.AreEqual(target._subtitle.Paragraphs[0].Text, "The clock is 12 a.m.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user