remove trailing whitespace

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@945 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
XhmikosR 2012-01-23 10:43:24 +00:00
parent 30af04ca37
commit 8f434b9252
8 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
@ECHO OFF
SETLOCAL
SET "VERSION=3.2.3"
SET "VERSION=3.2.4"
SET "SEVENZIP_PATH=%PROGRAMFILES%\7-Zip\7z.exe"
CD /D %~dp0

View File

@ -268,7 +268,7 @@ namespace Nikse.SubtitleEdit.Controls
{
Items[i].UseItemStyleForSubItems = false;
if (_settings.Tools.ListViewSyntaxColorDuration)
{
{
double charactersPerSecond = Utilities.GetCharactersPerSecond(paragraph);
if (charactersPerSecond > Configuration.Settings.General.SubtitleMaximumCharactersPerSeconds + 7)
Items[i].SubItems[ColumnIndexDuration].BackColor = System.Drawing.Color.Red;
@ -319,7 +319,7 @@ namespace Nikse.SubtitleEdit.Controls
Items[i].SubItems[ColumnIndexText].BackColor = Color.Red;
}
}
if (_settings.Tools.ListViewSyntaxMoreThanTwoLines &&
if (_settings.Tools.ListViewSyntaxMoreThanTwoLines &&
Items[i].SubItems[ColumnIndexText].BackColor != Color.Orange &&
Items[i].SubItems[ColumnIndexText].BackColor != Color.Red)
{
@ -327,7 +327,7 @@ namespace Nikse.SubtitleEdit.Controls
if (newLines == 3)
Items[i].SubItems[ColumnIndexText].BackColor = Color.Orange;
else if (newLines > 3)
Items[i].SubItems[ColumnIndexText].BackColor = Color.Red;
Items[i].SubItems[ColumnIndexText].BackColor = Color.Red;
}
}
}

View File

@ -320,7 +320,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private static Color GetOutlineColor(Color borderColor)
{
{
if (borderColor.R + borderColor.G + borderColor.B < 30)
return Color.FromArgb(200, 75, 75, 75);
return Color.FromArgb(200, borderColor.A, borderColor.R, borderColor.B);

View File

@ -94,11 +94,11 @@ namespace Nikse.SubtitleEdit.Logic
emphasis2Buffer[0] = (byte)emphasis2.B;
emphasis2Buffer[1] = (byte)emphasis2.G;
emphasis2Buffer[2] = (byte)emphasis2.R;
emphasis2Buffer[3] = (byte)emphasis2.A;
emphasis2Buffer[3] = (byte)emphasis2.A;
for (int i = 0; i < _bitmapData.Length; i += 4)
{
int smallestDiff = 10000;
{
int smallestDiff = 10000;
byte[] buffer = backgroundBuffer;
if (backgroundBuffer[3] == 0 && _bitmapData[i + 3] < 10) // transparent
{

View File

@ -969,7 +969,7 @@ namespace Nikse.SubtitleEdit.Logic
settings.Tools.ListViewSyntaxColorLongLines = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("ListViewSyntaxMoreThanTwoLines");
if (subNode != null)
settings.Tools.ListViewSyntaxMoreThanTwoLines = Convert.ToBoolean(subNode.InnerText);
settings.Tools.ListViewSyntaxMoreThanTwoLines = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("ListViewSyntaxColorOverlap");
if (subNode != null)
settings.Tools.ListViewSyntaxColorOverlap = Convert.ToBoolean(subNode.InnerText);
@ -1562,7 +1562,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("GoogleApiKey", settings.Tools.GoogleApiKey);
textWriter.WriteElementString("ListViewSyntaxColorDuration", settings.Tools.ListViewSyntaxColorDuration.ToString());
textWriter.WriteElementString("ListViewSyntaxColorLongLines", settings.Tools.ListViewSyntaxColorLongLines.ToString());
textWriter.WriteElementString("ListViewSyntaxMoreThanTwoLines", settings.Tools.ListViewSyntaxMoreThanTwoLines.ToString());
textWriter.WriteElementString("ListViewSyntaxMoreThanTwoLines", settings.Tools.ListViewSyntaxMoreThanTwoLines.ToString());
textWriter.WriteElementString("ListViewSyntaxColorOverlap", settings.Tools.ListViewSyntaxColorOverlap.ToString());
textWriter.WriteEndElement();

View File

@ -6,7 +6,7 @@ using System.Text.RegularExpressions;
namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
{
/// <summary>
///4.01 5.12
///4.01 5.12
///Dit is de dag.
/// </summary>
public class UnknownSubtitle12 : SubtitleFormat
@ -39,7 +39,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
LoadSubtitle(subtitle, lines, fileName);
return subtitle.Paragraphs.Count > _errorCount;
}
private string MakeTimeCode(TimeCode tc)
{
return string.Format("{0:0.00}", tc.TotalSeconds);
@ -60,7 +60,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
}
private TimeCode DecodeTimeCode(string timeCode)
{
{
return new TimeCode(TimeSpan.FromSeconds(double.Parse(timeCode.Trim())));
}
@ -102,6 +102,6 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
}
subtitle.Renumber(1);
}
}
}

View File

@ -145,7 +145,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
int startingX = (_data[commandIndex + 1] << 8 | _data[commandIndex + 2]) >> 4;
int endingX = (_data[commandIndex + 2] & Helper.B00001111) << 8 | _data[commandIndex + 3];
int startingY = (_data[commandIndex + 4] << 8 | _data[commandIndex + 5]) >> 4;
int endingY = (_data[commandIndex + 5] & Helper.B00001111) << 8 | _data[commandIndex + 6];
int endingY = (_data[commandIndex + 5] & Helper.B00001111) << 8 | _data[commandIndex + 6];
ImageDisplayArea = new Rectangle(startingX, startingY, endingX - startingX, endingY - startingY);
}
commandIndex += 7;

View File

@ -72,7 +72,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
string _languageName = "English";
string _languageNameShort = "en";
public VobSubWriter(string subFileName, int screenWidth, int screenHeight, int bottomMargin, int languageStreamId, Color pattern, Color emphasis1, Color emphasis2,
public VobSubWriter(string subFileName, int screenWidth, int screenHeight, int bottomMargin, int languageStreamId, Color pattern, Color emphasis1, Color emphasis2,
string languageName, string languageNameShort)
{
_subFileName = subFileName;
@ -125,10 +125,10 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
// Control command 3 = SetColor
WriteColors(ms); // 3 bytes
// Control command 4 = SetContrast
// Control command 4 = SetContrast
WriteContrast(ms); // 3 bytes
// Control command 5 = SetDisplayArea
// Control command 5 = SetDisplayArea
WriteDisplayArea(ms, nbmp); // 7 bytes
// Control command 6 = SetPixelDataAddress
@ -139,7 +139,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
// Control Sequence Table
// Write delay - subtitle duration
WriteEndianWord((int)((Convert.ToInt32(p.Duration.TotalMilliseconds * 90.0 - 1023) >> 10)), ms);
WriteEndianWord((int)((Convert.ToInt32(p.Duration.TotalMilliseconds * 90.0 - 1023) >> 10)), ms);
// next display control sequence table address (use current is last)
WriteEndianWord(startDisplayControlSequenceTableAddress + 24, ms); // start of display control sequence table address
@ -153,7 +153,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
public void WriteParagraph(Paragraph p, Bitmap bmp)
{
// timestamp: 00:00:33:900, filepos: 000000000
_idx.AppendLine(string.Format("timestamp: {0:00}:{1:00}:{2:00}:{3:000}, filepos: {4}", p.StartTime.Hours, p.StartTime.Minutes, p.StartTime.Seconds, p.StartTime.Milliseconds, _subFile.Position.ToString("X").PadLeft(9, '0')));
_idx.AppendLine(string.Format("timestamp: {0:00}:{1:00}:{2:00}:{3:000}, filepos: {4}", p.StartTime.Hours, p.StartTime.Minutes, p.StartTime.Seconds, p.StartTime.Milliseconds, _subFile.Position.ToString("X").PadLeft(9, '0')));
// write binary vobsub file (duration + image)
_subFile.Write(Mpeg2PackHeaderBuffer, 0, Mpeg2PackHeaderBuffer.Length);
@ -214,7 +214,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
{
writeBuffer[4] = (byte)(length / 256);
writeBuffer[5] = (byte)(length % 256);
}
}
}
private void WritePixelDataAddress(Stream stream, int imageTopFieldDataAddress, int imageBottomFieldDataAddress)
@ -240,7 +240,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
}
/// <summary>
/// Directly provides the four contrast (alpha blend) values to associate with the four pixel values. One nibble per pixel value for a total of 2 bytes. 0x0 = transparent, 0xF = opaque
/// Directly provides the four contrast (alpha blend) values to associate with the four pixel values. One nibble per pixel value for a total of 2 bytes. 0x0 = transparent, 0xF = opaque
/// </summary>
/// <param name="_subFile"></param>
private void WriteContrast(Stream stream)
@ -368,5 +368,5 @@ id: " + _languageNameShort + @", index: 0
return (c.R.ToString("X2") + c.G.ToString("X2") + c.B.ToString("X2")).ToLower();
}
}
}
}