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 unwanted reset of header in format "Timed Text 1.0" - thx Krystian
|
||||||
* Fixed crash in OCR - thx dreamday
|
* Fixed crash in OCR - thx dreamday
|
||||||
* Minor spell check fix - thx JC
|
* 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
|
* Fixed EBU justification so setting from UI is used - thx Lucas
|
||||||
* Fix for "Remove text for HI" - thx Peta
|
* Fix for "Remove text for HI" - thx Peta
|
||||||
* Fixed issue in DCinema interop regarding italics - thx Marko
|
* 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>"))
|
if (s.Contains("<i>") && !s.Contains("</i>") && st.Post.Contains("</i>"))
|
||||||
st.Post = st.Post.Replace("</i>", string.Empty);
|
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)
|
if (st.Post.Replace("♪", string.Empty).Replace("♫", string.Empty).Trim().Length == 0)
|
||||||
{
|
{
|
||||||
st.Post = string.Empty;
|
st.Post = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
lineNumber++;
|
lineNumber++;
|
||||||
}
|
}
|
||||||
|
@ -1872,7 +1872,7 @@
|
|||||||
public string MainListViewVideoGoToPositionMinus1SecAndPlay { get; set; }
|
public string MainListViewVideoGoToPositionMinus1SecAndPlay { get; set; }
|
||||||
public string MainListViewEditTextAndPause { get; set; }
|
public string MainListViewEditTextAndPause { get; set; }
|
||||||
public string AutoBackup { get; set; }
|
public string AutoBackup { get; set; }
|
||||||
|
|
||||||
public string AutoBackupEveryMinute { get; set; }
|
public string AutoBackupEveryMinute { get; set; }
|
||||||
public string AutoBackupEveryFiveMinutes { get; set; }
|
public string AutoBackupEveryFiveMinutes { get; set; }
|
||||||
public string AutoBackupEveryFifteenMinutes { get; set; }
|
public string AutoBackupEveryFifteenMinutes { get; set; }
|
||||||
|
@ -776,7 +776,6 @@ Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
|
|||||||
}
|
}
|
||||||
else if (!string.IsNullOrEmpty(rest))
|
else if (!string.IsNullOrEmpty(rest))
|
||||||
{
|
{
|
||||||
|
|
||||||
unknownTags += "\\" + rest;
|
unknownTags += "\\" + rest;
|
||||||
rest = string.Empty;
|
rest = string.Empty;
|
||||||
}
|
}
|
||||||
@ -1599,7 +1598,7 @@ Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (styleName != null && style.Name != null && (styleName.Equals(style.Name, StringComparison.OrdinalIgnoreCase) ||
|
if (styleName != null && style.Name != null && (styleName.Equals(style.Name, StringComparison.OrdinalIgnoreCase) ||
|
||||||
(styleName.Equals("*Default", StringComparison.OrdinalIgnoreCase) && style.Name.Equals("Default", StringComparison.OrdinalIgnoreCase))))
|
(styleName.Equals("*Default", StringComparison.OrdinalIgnoreCase) && style.Name.Equals("Default", StringComparison.OrdinalIgnoreCase))))
|
||||||
{
|
{
|
||||||
style.LoadedFromHeader = true;
|
style.LoadedFromHeader = true;
|
||||||
|
@ -41,7 +41,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
|||||||
{
|
{
|
||||||
sb.Append(" ");
|
sb.Append(" ");
|
||||||
}
|
}
|
||||||
else if (b >= 0x21 && b <= 0x7e) // GL - Graphic-set left
|
else if (b >= 0x21 && b <= 0x7e) // GL - Graphic-set left
|
||||||
{
|
{
|
||||||
ParseGlArea(sb, b, ref pos, buffer);
|
ParseGlArea(sb, b, ref pos, buffer);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
|||||||
public string Sound { get; set; } // 1 byte
|
public string Sound { get; set; } // 1 byte
|
||||||
public string TotalNumberOfPages { get; set; } // 4 bytes
|
public string TotalNumberOfPages { get; set; } // 4 bytes
|
||||||
public string ProgramDataAmount { get; set; } // 8 bytes
|
public string ProgramDataAmount { get; set; } // 8 bytes
|
||||||
public string TimingPresent { get; set; } // 1 byte - Space: No, *: Yes
|
public string TimingPresent { get; set; } // 1 byte - Space: No, *: Yes
|
||||||
public string TimingType { get; set; } // 2 bytes
|
public string TimingType { get; set; } // 2 bytes
|
||||||
public string TimingUnit { get; set; } // 1 byte - T: Time UnitF: Frame
|
public string TimingUnit { get; set; } // 1 byte - T: Time UnitF: Frame
|
||||||
|
|
||||||
@ -137,7 +137,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
|||||||
|
|
||||||
return GetTime(EraseTiming, SpecifiedTimingUnit);
|
return GetTime(EraseTiming, SpecifiedTimingUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CaptionTextPageManagement
|
public class CaptionTextPageManagement
|
||||||
|
@ -33,141 +33,140 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
|||||||
{
|
{
|
||||||
const string xmpTemplate = @"<?xml version='1.0' encoding='UNICODE'?>
|
const string xmpTemplate = @"<?xml version='1.0' encoding='UNICODE'?>
|
||||||
<MediaTransData Version='1'>
|
<MediaTransData Version='1'>
|
||||||
<Settings Version='1'>
|
<Settings Version='1'>
|
||||||
<Type></Type>
|
<Type></Type>
|
||||||
<Description Version='1'>
|
<Description Version='1'>
|
||||||
<Count>2</Count>
|
<Count>2</Count>
|
||||||
<Item1>For editing SDTV video</Item1>
|
<Item1>For editing SDTV video</Item1>
|
||||||
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
||||||
</Description>
|
</Description>
|
||||||
<General Version='1'>
|
<General Version='1'>
|
||||||
<EditingMode>SDTV</EditingMode>
|
<EditingMode>SDTV</EditingMode>
|
||||||
<Timebase>25.00 fps</Timebase>
|
<Timebase>25.00 fps</Timebase>
|
||||||
<DropFrame>True</DropFrame>
|
<DropFrame>True</DropFrame>
|
||||||
<Horizontal>720</Horizontal>
|
<Horizontal>720</Horizontal>
|
||||||
<Vertical>400</Vertical>
|
<Vertical>400</Vertical>
|
||||||
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
||||||
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
||||||
<Editor>
|
<Editor>
|
||||||
<LineSeparator>|</LineSeparator>
|
<LineSeparator>|</LineSeparator>
|
||||||
</Editor>
|
</Editor>
|
||||||
</General>
|
</General>
|
||||||
<Render Version='1'>
|
<Render Version='1'>
|
||||||
<Location>Default</Location>
|
<Location>Default</Location>
|
||||||
<Name>Default</Name>
|
<Name>Default</Name>
|
||||||
<Type>24Bit PNG</Type>
|
<Type>24Bit PNG</Type>
|
||||||
<Index>0001</Index>
|
<Index>0001</Index>
|
||||||
<ExportPartial>False</ExportPartial>
|
<ExportPartial>False</ExportPartial>
|
||||||
<ServerData Version='1'>
|
<ServerData Version='1'>
|
||||||
<Track>0</Track>
|
<Track>0</Track>
|
||||||
<Field>1</Field>
|
<Field>1</Field>
|
||||||
<PAC>False</PAC>
|
<PAC>False</PAC>
|
||||||
<Category>Default</Category>
|
<Category>Default</Category>
|
||||||
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
||||||
<Timecode>Default</Timecode>
|
<Timecode>Default</Timecode>
|
||||||
<NBJ>False</NBJ>
|
<NBJ>False</NBJ>
|
||||||
</ServerData>
|
</ServerData>
|
||||||
</Render>
|
</Render>
|
||||||
<TimecodeBase Version='1'>
|
<TimecodeBase Version='1'>
|
||||||
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
||||||
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
||||||
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
||||||
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
||||||
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
||||||
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
||||||
</TimecodeBase>
|
</TimecodeBase>
|
||||||
</Settings>
|
</Settings>
|
||||||
<Movie Version='1'>
|
<Movie Version='1'>
|
||||||
<Name>C:\Project\uknown.mpg</Name>
|
<Name>C:\Project\uknown.mpg</Name>
|
||||||
<Format>29.97DF</Format>
|
<Format>29.97DF</Format>
|
||||||
</Movie>
|
</Movie>
|
||||||
<Tracks Version='1'>
|
<Tracks Version='1'>
|
||||||
<Count>1</Count>
|
<Count>1</Count>
|
||||||
<Track1 Version='1'>
|
<Track1 Version='1'>
|
||||||
<Owner></Owner>
|
<Owner></Owner>
|
||||||
<Name>Track 1</Name>
|
<Name>Track 1</Name>
|
||||||
<Enabled>True</Enabled>
|
<Enabled>True</Enabled>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<Columns Version='1'>
|
<Columns Version='1'>
|
||||||
<Count>7</Count>
|
<Count>7</Count>
|
||||||
<Column1>
|
<Column1>
|
||||||
<Name>No</Name>
|
<Name>No</Name>
|
||||||
<Length>40</Length>
|
<Length>40</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column1>
|
</Column1>
|
||||||
<Column2>
|
<Column2>
|
||||||
<Name>In</Name>
|
<Name>In</Name>
|
||||||
<Length>64</Length>
|
<Length>64</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column2>
|
</Column2>
|
||||||
<Column3>
|
<Column3>
|
||||||
<Name>Out</Name>
|
<Name>Out</Name>
|
||||||
<Length>66</Length>
|
<Length>66</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column3>
|
</Column3>
|
||||||
<Column4>
|
<Column4>
|
||||||
<Name>Style</Name>
|
<Name>Style</Name>
|
||||||
<Length>15</Length>
|
<Length>15</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column4>
|
</Column4>
|
||||||
<Column5>
|
<Column5>
|
||||||
<Name>StyleEx</Name>
|
<Name>StyleEx</Name>
|
||||||
<Length>96</Length>
|
<Length>96</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column5>
|
</Column5>
|
||||||
<Column6>
|
<Column6>
|
||||||
<Name>Comment</Name>
|
<Name>Comment</Name>
|
||||||
<Length>77</Length>
|
<Length>77</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column6>
|
</Column6>
|
||||||
<Column7>
|
<Column7>
|
||||||
<Name>Language 01</Name>
|
<Name>Language 01</Name>
|
||||||
<Length>349</Length>
|
<Length>349</Length>
|
||||||
<Locked>False</Locked>
|
<Locked>False</Locked>
|
||||||
<Password></Password>
|
<Password></Password>
|
||||||
<NonText>False</NonText>
|
<NonText>False</NonText>
|
||||||
</Column7>
|
</Column7>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Rows Version='1'>
|
<Rows Version='1'>
|
||||||
<Count>4096</Count>
|
<Count>4096</Count>
|
||||||
</Rows>
|
</Rows>
|
||||||
<Data Version='1'>
|
<Data Version='1'>
|
||||||
<Count>[COUNT]</Count>
|
<Count>[COUNT]</Count>
|
||||||
|
</Data>
|
||||||
</Data>
|
<Highlights Version='1'>
|
||||||
<Highlights Version='1'>
|
<Count>0</Count>
|
||||||
<Count>0</Count>
|
</Highlights>
|
||||||
</Highlights>
|
</Track1>
|
||||||
</Track1>
|
</Tracks>
|
||||||
</Tracks>
|
</MediaTransData>";
|
||||||
</MediaTransData>
|
|
||||||
";
|
|
||||||
|
|
||||||
const string paragraphTemplate = @"
|
const string paragraphTemplate = @"
|
||||||
<In>10:21:15:06</In>
|
<In>10:21:15:06</In>
|
||||||
<Out>10:21:16:18</Out>
|
<Out>10:21:16:18</Out>
|
||||||
<Style></Style>
|
<Style></Style>
|
||||||
<StyleEx></StyleEx>
|
<StyleEx></StyleEx>
|
||||||
<Comment></Comment>
|
<Comment></Comment>
|
||||||
<Fields Version='2'>
|
<Fields Version=""2"">
|
||||||
<Field1>
|
<Field1>
|
||||||
<Type>Text</Type>
|
<Type>Text</Type>
|
||||||
<Data>Line1|Line2</Data>
|
<Data>Line1|Line2</Data>
|
||||||
</Field1>
|
</Field1>
|
||||||
</Fields>";
|
</Fields>";
|
||||||
|
|
||||||
var xml = new XmlDocument();
|
var xml = new XmlDocument();
|
||||||
xml.LoadXml(xmpTemplate.Replace('\'', '"').Replace("[COUNT]", subtitle.Paragraphs.Count.ToString()));
|
xml.LoadXml(xmpTemplate.Replace('\'', '"').Replace("[COUNT]", subtitle.Paragraphs.Count.ToString()));
|
||||||
var paragraphInsertNode = xml.DocumentElement.SelectSingleNode("Tracks/Track1/Data");
|
var paragraphInsertNode = xml.DocumentElement.SelectSingleNode("Tracks/Track1/Data");
|
||||||
|
@ -181,7 +181,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
foreach (Paragraph p in _translatedSubtitle.Paragraphs)
|
foreach (Paragraph p in _translatedSubtitle.Paragraphs)
|
||||||
p.Text = string.Empty;
|
p.Text = string.Empty;
|
||||||
|
|
||||||
_targetTwoLetterIsoLanguageName = (comboBoxTo.SelectedItem as ComboBoxItem).Value;
|
_targetTwoLetterIsoLanguageName = (comboBoxTo.SelectedItem as ComboBoxItem).Value;
|
||||||
if (!_googleTranslate)
|
if (!_googleTranslate)
|
||||||
{
|
{
|
||||||
string from = (comboBoxFrom.SelectedItem as ComboBoxItem).Value;
|
string from = (comboBoxFrom.SelectedItem as ComboBoxItem).Value;
|
||||||
|
@ -3675,8 +3675,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
var oldAllowEditOfOriginalSubtitle = Configuration.Settings.General.AllowEditOfOriginalSubtitle;
|
var oldAllowEditOfOriginalSubtitle = Configuration.Settings.General.AllowEditOfOriginalSubtitle;
|
||||||
using (var settings = new Settings())
|
using (var settings = new Settings())
|
||||||
{
|
{
|
||||||
settings.Initialize(Icon, toolStripButtonFileNew.Image, toolStripButtonFileOpen.Image, toolStripButtonSave.Image, toolStripButtonSaveAs.Image, toolStripButtonFind.Image,
|
settings.Initialize(Icon, toolStripButtonFileNew.Image, toolStripButtonFileOpen.Image, toolStripButtonSave.Image, toolStripButtonSaveAs.Image, toolStripButtonFind.Image,
|
||||||
toolStripButtonReplace.Image, toolStripButtonFixCommonErrors.Image, toolStripButtonRemoveTextForHi.Image, toolStripButtonVisualSync.Image,
|
toolStripButtonReplace.Image, toolStripButtonFixCommonErrors.Image, toolStripButtonRemoveTextForHi.Image, toolStripButtonVisualSync.Image,
|
||||||
toolStripButtonSpellCheck.Image, toolStripButtonSettings.Image, toolStripButtonHelp.Image);
|
toolStripButtonSpellCheck.Image, toolStripButtonSettings.Image, toolStripButtonHelp.Image);
|
||||||
settings.ShowDialog(this);
|
settings.ShowDialog(this);
|
||||||
}
|
}
|
||||||
@ -20001,7 +20001,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private void MenuClosed(object sender, EventArgs e)
|
private void MenuClosed(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
IsMenuOpen = false;
|
IsMenuOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,6 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
{
|
{
|
||||||
var pattern = arguments[2].Trim();
|
var pattern = arguments[2].Trim();
|
||||||
|
|
||||||
|
|
||||||
var targetFormat = arguments[3].Trim().Replace(" ", string.Empty).ToLowerInvariant();
|
var targetFormat = arguments[3].Trim().Replace(" ", string.Empty).ToLowerInvariant();
|
||||||
if (targetFormat == "ass")
|
if (targetFormat == "ass")
|
||||||
{
|
{
|
||||||
|
@ -252,7 +252,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// // split into lines
|
/// split into lines
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static List<ImageSplitterItem> SplitVertical(NikseBitmap bmp, int minLineHeight, double averageLineHeight = -1)
|
public static List<ImageSplitterItem> SplitVertical(NikseBitmap bmp, int minLineHeight, double averageLineHeight = -1)
|
||||||
{
|
{
|
||||||
@ -382,7 +382,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
if (leftX >= rightX)
|
if (leftX >= rightX)
|
||||||
{
|
{
|
||||||
allTransparent = true;
|
allTransparent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTransparent)
|
if (allTransparent)
|
||||||
@ -408,7 +408,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (size > 2)
|
if (size > 2)
|
||||||
{
|
{
|
||||||
if (size == bmp.Height)
|
if (size == bmp.Height)
|
||||||
{
|
{
|
||||||
if (size > 100)
|
if (size > 100)
|
||||||
|
Loading…
Reference in New Issue
Block a user