mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Use const to store xml text instead
This commit is contained in:
parent
04e0e56cda
commit
93d31e73f8
@ -775,6 +775,7 @@ namespace Nikse.SubtitleEdit.Logic.Dictionaries
|
||||
|
||||
private XmlDocument LoadXmlReplaceListDocument()
|
||||
{
|
||||
const string xmlText = "<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/></ReplaceList>";
|
||||
var doc = new XmlDocument();
|
||||
if (File.Exists(_replaceListXmlFileName))
|
||||
{
|
||||
@ -784,12 +785,12 @@ namespace Nikse.SubtitleEdit.Logic.Dictionaries
|
||||
}
|
||||
catch
|
||||
{
|
||||
doc.LoadXml("<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/></ReplaceList>");
|
||||
doc.LoadXml(xmlText);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
doc.LoadXml("<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/></ReplaceList>");
|
||||
doc.LoadXml(xmlText);
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
@ -801,6 +802,7 @@ namespace Nikse.SubtitleEdit.Logic.Dictionaries
|
||||
|
||||
private XmlDocument LoadXmlReplaceListUserDocument()
|
||||
{
|
||||
const string xmlText = "<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/><RemovedWholeWords/><RemovedPartialLines/><RemovedBeginLines/><RemovedEndLines/><RemovedWholeLines/></ReplaceList>";
|
||||
var doc = new XmlDocument();
|
||||
if (File.Exists(ReplaceListXmlFileNameUser))
|
||||
{
|
||||
@ -810,12 +812,12 @@ namespace Nikse.SubtitleEdit.Logic.Dictionaries
|
||||
}
|
||||
catch
|
||||
{
|
||||
doc.LoadXml("<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/><RemovedWholeWords/><RemovedPartialLines/><RemovedBeginLines/><RemovedEndLines/><RemovedWholeLines/></ReplaceList>");
|
||||
doc.LoadXml(xmlText);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
doc.LoadXml("<ReplaceList><WholeWords/><PartialLines/><BeginLines/><EndLines/><WholeLines/><RemovedWholeWords/><RemovedPartialLines/><RemovedBeginLines/><RemovedEndLines/><RemovedWholeLines/></ReplaceList>");
|
||||
doc.LoadXml(xmlText);
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user