mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
remove trailing whitespace
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1194 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
48546fe083
commit
c37b56312c
@ -8450,7 +8450,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
InsertAfter();
|
||||
textBoxListViewText.Text = Utilities.AutoBreakLine(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
e.SuppressKeyPress = true;
|
||||
|
@ -278,7 +278,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
}
|
||||
subtitle.Renumber(1);
|
||||
|
||||
// adjust all times
|
||||
// adjust all times
|
||||
if (buffer.Length > 1364)
|
||||
{
|
||||
string adjust = Encoding.GetEncoding(1252).GetString(buffer, 1354, 11); // 00:59:59:28
|
||||
|
@ -69,7 +69,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
var lines = p.Text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.None);
|
||||
foreach (string line in lines)
|
||||
{
|
||||
{
|
||||
foreach (char ch in line)
|
||||
text.Add(Encoding.GetEncoding(1252).GetBytes(ch.ToString())[0]);
|
||||
|
||||
@ -79,7 +79,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
text.Add(0x14);
|
||||
text.Add(0x74);
|
||||
//text.Add(0x17);
|
||||
//text.Add(0x17);
|
||||
//text.Add(0x21);
|
||||
|
||||
}
|
||||
@ -87,7 +87,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
// codes+text length
|
||||
buffer = Encoding.ASCII.GetBytes(string.Format("{0:000}", text.Count));
|
||||
fs.Write(buffer, 0, buffer.Length);
|
||||
|
||||
|
||||
WriteTime(fs, p.StartTime, true);
|
||||
|
||||
// write codes + text
|
||||
|
@ -49,7 +49,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
// paragraphs
|
||||
foreach (Paragraph p in subtitle.Paragraphs)
|
||||
{
|
||||
string text = p.Text;
|
||||
string text = p.Text;
|
||||
|
||||
//styles + ?
|
||||
buffer = new byte[] {
|
||||
@ -61,7 +61,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
0,
|
||||
3, // justification, 1=left, 2=right, 3=center
|
||||
0xF, //horizontal position, 1=top, F=bottom
|
||||
0x10, //horizontal position, 3=left, 0x10=center, 0x19=right
|
||||
0x10, //horizontal position, 3=left, 0x10=center, 0x19=right
|
||||
};
|
||||
|
||||
//Normal : 12 01 00 00 00 00 03 0F 10
|
||||
@ -101,7 +101,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
}
|
||||
|
||||
var textBytes = new List<byte>();
|
||||
bool italic = false;
|
||||
bool italic = false;
|
||||
if (p.Text.StartsWith("<i>") && p.Text.EndsWith("</i>"))
|
||||
italic = true;
|
||||
text = Utilities.RemoveHtmlTags(text);
|
||||
@ -124,7 +124,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
textBytes.Add(Encoding.GetEncoding(1252).GetBytes(text.Substring(j, 1))[0]);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int length = textBytes.Count + 20;
|
||||
@ -243,7 +243,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
sb.Append(Encoding.ASCII.GetString(buffer, index, 1));
|
||||
}
|
||||
j++;
|
||||
|
@ -161,7 +161,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
</video>
|
||||
</media>
|
||||
</sequence>
|
||||
</xmeml>";
|
||||
</xmeml>";
|
||||
|
||||
string xmlTrackStructure =
|
||||
@" <generatoritem id='Outline Text[NUMBER]'>
|
||||
@ -411,7 +411,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XmlNode trackNode = xml.DocumentElement.SelectSingleNode("sequence/media/video/track");
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
int pos = line.IndexOf("[0] = ");
|
||||
for (int i = pos + 6; i < line.Length && Utilities.IsInteger(line[i].ToString()); i++)
|
||||
{
|
||||
{
|
||||
sb.Append(line.Substring(i, 1));
|
||||
}
|
||||
p.StartTime.TotalMilliseconds = int.Parse(sb.ToString());
|
||||
@ -72,14 +72,14 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
pos = line.IndexOf("[1] = '");
|
||||
sb = new StringBuilder();
|
||||
for (int i = pos + 7; i<line.Length &&line[i] != '\''; i++)
|
||||
{
|
||||
{
|
||||
sb.Append(line.Substring(i, 1));
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
sb.AppendLine();
|
||||
pos = line.IndexOf("[2] = '");
|
||||
for (int i = pos + 7; i<line.Length &&line[i] != '\''; i++)
|
||||
{
|
||||
{
|
||||
sb.Append(line.Substring(i, 1));
|
||||
}
|
||||
p.Text = sb.ToString().Trim();
|
||||
|
@ -115,9 +115,9 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
0x2E,
|
||||
0x14,
|
||||
(byte)(0x74 - (numberOfNewLines * 0x20)),
|
||||
|
||||
|
||||
0x17, 0x21, // 0x1721=center, 0x1722=right ?
|
||||
};
|
||||
};
|
||||
|
||||
//if (text.StartsWith("{\\a6}"))
|
||||
//{
|
||||
|
@ -6,7 +6,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class UnknownSubtitle1 : SubtitleFormat
|
||||
{
|
||||
//0:01 – 0:11
|
||||
//0:01 – 0:11
|
||||
static readonly Regex RegexTimeCodes = new Regex(@"^\d+:\d\d – \d+:\d\d ", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
|
Loading…
Reference in New Issue
Block a user