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
4bec9c5496
commit
9b2eaa68ef
@ -14,7 +14,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
|
||||
public static bool LineEndsWithHtmlTag(this string text, bool threeLengthTag, bool includeFont = false)
|
||||
{
|
||||
if (text == null)
|
||||
if (text == null)
|
||||
return false;
|
||||
|
||||
var len = text.Length;
|
||||
@ -27,7 +27,6 @@ namespace Nikse.SubtitleEdit.Core
|
||||
if (includeFont && len > 8 && text[len - 7] == '<' && text[len - 6] == '/')
|
||||
return true;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static bool LineBreakStartsWithHtmlTag(this string text, bool threeLengthTag, bool includeFont = false)
|
||||
|
@ -80,7 +80,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
<StoryBlock TimingType='Manual'>
|
||||
<SceneBaseBlock NewsID='0' Position='0' NewsRoomInternalID='0'/>
|
||||
</StoryBlock>
|
||||
|
||||
|
||||
</FileBody>
|
||||
</XIF>";
|
||||
|
||||
@ -103,7 +103,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
</Content>
|
||||
</ThreadedObject>
|
||||
</ContentBlock>";
|
||||
|
||||
|
||||
var xml = new XmlDocument();
|
||||
var lastTimeCode = new TimeCode(0);
|
||||
if (subtitle.Paragraphs.Count > 0)
|
||||
@ -163,11 +163,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
attrColor.InnerText = "7";
|
||||
foregroundColorNode.Attributes.Append(attrColor);
|
||||
paragraphNode.AppendChild(foregroundColorNode);
|
||||
|
||||
|
||||
var textNode = xml.CreateElement("Text");
|
||||
textNode.InnerText = line;
|
||||
paragraphNode.AppendChild(textNode);
|
||||
|
||||
}
|
||||
fileBodyNode.AppendChild(content.SelectSingleNode("ContentBlock"));
|
||||
}
|
||||
@ -214,7 +213,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
}
|
||||
}
|
||||
subtitle.Renumber();
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void ListBoxSuggestionsMouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
ButtonUseSuggestionAlwaysClick(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoAction(SpellCheckAction action)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
labelOtherSubtitleFileName.Visible = false;
|
||||
subtitleListView2.Visible = false;
|
||||
buttonFindTextOther.Visible = false;
|
||||
groupBoxImportResult.Width = listBoxSyncPoints.Left + listBoxSyncPoints.Width + 20;
|
||||
groupBoxImportResult.Width = listBoxSyncPoints.Left + listBoxSyncPoints.Width + 20;
|
||||
Width = groupBoxImportResult.Left + groupBoxImportResult.Width + 15;
|
||||
SubtitleListview1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonSetSyncPoint.Anchor = AnchorStyles.Right;
|
||||
@ -446,4 +446,4 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
labelTip.Text = _language.Tip;
|
||||
Utilities.FixLargeFonts(this, buttonCancel);
|
||||
_timerHideSyncLabel.Tick += timerHideSyncLabel_Tick;
|
||||
_timerHideSyncLabel.Interval = 1000;
|
||||
_timerHideSyncLabel.Interval = 1000;
|
||||
}
|
||||
|
||||
private void timerHideSyncLabel_Tick(object sender, EventArgs e)
|
||||
@ -743,7 +743,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (MediaPlayerEnd.VideoPlayer != null) // && MediaPlayerEnd.VideoPlayer.GetType() == typeof(QuartsPlayer))
|
||||
{
|
||||
MediaPlayerEnd.RefreshProgressBar();
|
||||
}
|
||||
}
|
||||
timerProgressBarRefresh.Start();
|
||||
}
|
||||
|
||||
@ -775,4 +775,4 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void InsertLanguageCharacter(object sender, EventArgs e)
|
||||
{
|
||||
var toolStripMenuItem = sender as ToolStripMenuItem;
|
||||
if (toolStripMenuItem != null)
|
||||
if (toolStripMenuItem != null)
|
||||
textBoxCharacters.Text = textBoxCharacters.Text.Insert(textBoxCharacters.SelectionStart, toolStripMenuItem.Text);
|
||||
}
|
||||
|
||||
@ -251,4 +251,4 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
textBoxCharacters.Text = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ namespace Test
|
||||
var xmlFileNames = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.xml");
|
||||
foreach (var xmlFileName in xmlFileNames)
|
||||
{
|
||||
TestXmlWellFormedness(xmlFileName);
|
||||
TestXmlWellFormedness(xmlFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DeploymentItem("..\\Dictionaries")]
|
||||
@ -45,18 +45,18 @@ namespace Test
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string msg = Path.GetFileName(xmlFileName) + " has an invalid RegEx find expression: " + regExPattern + Environment.NewLine +
|
||||
string msg = Path.GetFileName(xmlFileName) + " has an invalid RegEx find expression: " + regExPattern + Environment.NewLine +
|
||||
exception.Message;
|
||||
Assert.Fail(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void TestXmlWellFormedness(string fileName)
|
||||
{
|
||||
@ -91,4 +91,4 @@ namespace Test
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user