mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Formatting (whitespace only)
This commit is contained in:
parent
a9a9dd8a16
commit
b9f2b76b38
@ -23,7 +23,7 @@
|
||||
* Fixed unwanted reset of header in format "Timed Text 1.0" - thx Krystian
|
||||
* Fixed crash in OCR - thx dreamday
|
||||
* Minor spell check fix - thx JC
|
||||
* Better support for wsrt files - thx serpico1
|
||||
* Better support for wsrt files - thx serpico1
|
||||
* Fixed EBU justification so setting from UI is used - thx Lucas
|
||||
* Fix for "Remove text for HI" - thx Peta
|
||||
* Fixed issue in DCinema interop regarding italics - thx Marko
|
||||
|
@ -534,14 +534,13 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
||||
if (s.Contains("<i>") && !s.Contains("</i>") && st.Post.Contains("</i>"))
|
||||
st.Post = st.Post.Replace("</i>", string.Empty);
|
||||
|
||||
if (lineNumber == parts.Length -1)
|
||||
if (lineNumber == parts.Length - 1)
|
||||
{
|
||||
if (st.Post.Replace("♪", string.Empty).Replace("♫", string.Empty).Trim().Length == 0)
|
||||
{
|
||||
st.Post = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
lineNumber++;
|
||||
}
|
||||
|
@ -776,7 +776,6 @@ Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(rest))
|
||||
{
|
||||
|
||||
unknownTags += "\\" + rest;
|
||||
rest = string.Empty;
|
||||
}
|
||||
|
@ -137,7 +137,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
return GetTime(EraseTiming, SpecifiedTimingUnit);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CaptionTextPageManagement
|
||||
|
@ -33,141 +33,140 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
const string xmpTemplate = @"<?xml version='1.0' encoding='UNICODE'?>
|
||||
<MediaTransData Version='1'>
|
||||
<Settings Version='1'>
|
||||
<Type></Type>
|
||||
<Description Version='1'>
|
||||
<Count>2</Count>
|
||||
<Item1>For editing SDTV video</Item1>
|
||||
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
||||
</Description>
|
||||
<General Version='1'>
|
||||
<EditingMode>SDTV</EditingMode>
|
||||
<Timebase>25.00 fps</Timebase>
|
||||
<DropFrame>True</DropFrame>
|
||||
<Horizontal>720</Horizontal>
|
||||
<Vertical>400</Vertical>
|
||||
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
||||
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
||||
<Editor>
|
||||
<LineSeparator>|</LineSeparator>
|
||||
</Editor>
|
||||
</General>
|
||||
<Render Version='1'>
|
||||
<Location>Default</Location>
|
||||
<Name>Default</Name>
|
||||
<Type>24Bit PNG</Type>
|
||||
<Index>0001</Index>
|
||||
<ExportPartial>False</ExportPartial>
|
||||
<ServerData Version='1'>
|
||||
<Track>0</Track>
|
||||
<Field>1</Field>
|
||||
<PAC>False</PAC>
|
||||
<Category>Default</Category>
|
||||
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
||||
<Timecode>Default</Timecode>
|
||||
<NBJ>False</NBJ>
|
||||
</ServerData>
|
||||
</Render>
|
||||
<TimecodeBase Version='1'>
|
||||
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
||||
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
||||
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
||||
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
||||
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
||||
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
||||
</TimecodeBase>
|
||||
</Settings>
|
||||
<Movie Version='1'>
|
||||
<Name>C:\Project\uknown.mpg</Name>
|
||||
<Format>29.97DF</Format>
|
||||
</Movie>
|
||||
<Tracks Version='1'>
|
||||
<Count>1</Count>
|
||||
<Track1 Version='1'>
|
||||
<Owner></Owner>
|
||||
<Name>Track 1</Name>
|
||||
<Enabled>True</Enabled>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<Columns Version='1'>
|
||||
<Count>7</Count>
|
||||
<Column1>
|
||||
<Name>No</Name>
|
||||
<Length>40</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column1>
|
||||
<Column2>
|
||||
<Name>In</Name>
|
||||
<Length>64</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column2>
|
||||
<Column3>
|
||||
<Name>Out</Name>
|
||||
<Length>66</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column3>
|
||||
<Column4>
|
||||
<Name>Style</Name>
|
||||
<Length>15</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column4>
|
||||
<Column5>
|
||||
<Name>StyleEx</Name>
|
||||
<Length>96</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column5>
|
||||
<Column6>
|
||||
<Name>Comment</Name>
|
||||
<Length>77</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column6>
|
||||
<Column7>
|
||||
<Name>Language 01</Name>
|
||||
<Length>349</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column7>
|
||||
</Columns>
|
||||
<Rows Version='1'>
|
||||
<Count>4096</Count>
|
||||
</Rows>
|
||||
<Data Version='1'>
|
||||
<Count>[COUNT]</Count>
|
||||
|
||||
</Data>
|
||||
<Highlights Version='1'>
|
||||
<Count>0</Count>
|
||||
</Highlights>
|
||||
</Track1>
|
||||
</Tracks>
|
||||
</MediaTransData>
|
||||
";
|
||||
<Settings Version='1'>
|
||||
<Type></Type>
|
||||
<Description Version='1'>
|
||||
<Count>2</Count>
|
||||
<Item1>For editing SDTV video</Item1>
|
||||
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
||||
</Description>
|
||||
<General Version='1'>
|
||||
<EditingMode>SDTV</EditingMode>
|
||||
<Timebase>25.00 fps</Timebase>
|
||||
<DropFrame>True</DropFrame>
|
||||
<Horizontal>720</Horizontal>
|
||||
<Vertical>400</Vertical>
|
||||
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
||||
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
||||
<Editor>
|
||||
<LineSeparator>|</LineSeparator>
|
||||
</Editor>
|
||||
</General>
|
||||
<Render Version='1'>
|
||||
<Location>Default</Location>
|
||||
<Name>Default</Name>
|
||||
<Type>24Bit PNG</Type>
|
||||
<Index>0001</Index>
|
||||
<ExportPartial>False</ExportPartial>
|
||||
<ServerData Version='1'>
|
||||
<Track>0</Track>
|
||||
<Field>1</Field>
|
||||
<PAC>False</PAC>
|
||||
<Category>Default</Category>
|
||||
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
||||
<Timecode>Default</Timecode>
|
||||
<NBJ>False</NBJ>
|
||||
</ServerData>
|
||||
</Render>
|
||||
<TimecodeBase Version='1'>
|
||||
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
||||
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
||||
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
||||
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
||||
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
||||
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
||||
</TimecodeBase>
|
||||
</Settings>
|
||||
<Movie Version='1'>
|
||||
<Name>C:\Project\uknown.mpg</Name>
|
||||
<Format>29.97DF</Format>
|
||||
</Movie>
|
||||
<Tracks Version='1'>
|
||||
<Count>1</Count>
|
||||
<Track1 Version='1'>
|
||||
<Owner></Owner>
|
||||
<Name>Track 1</Name>
|
||||
<Enabled>True</Enabled>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<Columns Version='1'>
|
||||
<Count>7</Count>
|
||||
<Column1>
|
||||
<Name>No</Name>
|
||||
<Length>40</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column1>
|
||||
<Column2>
|
||||
<Name>In</Name>
|
||||
<Length>64</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column2>
|
||||
<Column3>
|
||||
<Name>Out</Name>
|
||||
<Length>66</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column3>
|
||||
<Column4>
|
||||
<Name>Style</Name>
|
||||
<Length>15</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column4>
|
||||
<Column5>
|
||||
<Name>StyleEx</Name>
|
||||
<Length>96</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column5>
|
||||
<Column6>
|
||||
<Name>Comment</Name>
|
||||
<Length>77</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column6>
|
||||
<Column7>
|
||||
<Name>Language 01</Name>
|
||||
<Length>349</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column7>
|
||||
</Columns>
|
||||
<Rows Version='1'>
|
||||
<Count>4096</Count>
|
||||
</Rows>
|
||||
<Data Version='1'>
|
||||
<Count>[COUNT]</Count>
|
||||
</Data>
|
||||
<Highlights Version='1'>
|
||||
<Count>0</Count>
|
||||
</Highlights>
|
||||
</Track1>
|
||||
</Tracks>
|
||||
</MediaTransData>";
|
||||
|
||||
const string paragraphTemplate = @"
|
||||
<In>10:21:15:06</In>
|
||||
<Out>10:21:16:18</Out>
|
||||
<Style></Style>
|
||||
<StyleEx></StyleEx>
|
||||
<Comment></Comment>
|
||||
<Fields Version='2'>
|
||||
<Field1>
|
||||
<Type>Text</Type>
|
||||
<Data>Line1|Line2</Data>
|
||||
</Field1>
|
||||
</Fields>";
|
||||
<In>10:21:15:06</In>
|
||||
<Out>10:21:16:18</Out>
|
||||
<Style></Style>
|
||||
<StyleEx></StyleEx>
|
||||
<Comment></Comment>
|
||||
<Fields Version=""2"">
|
||||
<Field1>
|
||||
<Type>Text</Type>
|
||||
<Data>Line1|Line2</Data>
|
||||
</Field1>
|
||||
</Fields>";
|
||||
|
||||
var xml = new XmlDocument();
|
||||
xml.LoadXml(xmpTemplate.Replace('\'', '"').Replace("[COUNT]", subtitle.Paragraphs.Count.ToString()));
|
||||
var paragraphInsertNode = xml.DocumentElement.SelectSingleNode("Tracks/Track1/Data");
|
||||
|
@ -95,7 +95,6 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
var pattern = arguments[2].Trim();
|
||||
|
||||
|
||||
var targetFormat = arguments[3].Trim().Replace(" ", string.Empty).ToLowerInvariant();
|
||||
if (targetFormat == "ass")
|
||||
{
|
||||
|
@ -252,7 +252,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// // split into lines
|
||||
/// split into lines
|
||||
/// </summary>
|
||||
public static List<ImageSplitterItem> SplitVertical(NikseBitmap bmp, int minLineHeight, double averageLineHeight = -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user