r20507 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 28 19:20:58 UTC 2015
Author: fschmid
Date: Wed Oct 28 19:20:58 2015
New Revision: 20507
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20507
Log:
Don't use ":" in style names, it's forbidden in Xtags.
Modified:
trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20507&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp Wed Oct 28 19:20:58 2015
@@ -925,10 +925,10 @@
sfcName = getToken();
if (sfcName == "@$:")
{
- if (doc->paragraphStyles().contains(m_item->itemName() + ":Normal"))
+ if (doc->paragraphStyles().contains(m_item->itemName() + "_Normal"))
{
ParagraphStyle newStyle;
- newStyle.setParent(m_item->itemName() + ":Normal");
+ newStyle.setParent(m_item->itemName() + "_Normal");
currentParagraphStyle = newStyle;
currentCharStyle = newStyle.charStyle();
}
@@ -954,10 +954,10 @@
currentCharStyle.setFeatures(styleEffects.featureList());
enterState(textMode);
}
- else if (doc->paragraphStyles().contains(m_item->itemName() + ":" + sfcName))
+ else if (doc->paragraphStyles().contains(m_item->itemName() + "_" + sfcName))
{
ParagraphStyle newStyle;
- newStyle.setParent(m_item->itemName() + ":" + sfcName);
+ newStyle.setParent(m_item->itemName() + "_" + sfcName);
currentParagraphStyle = newStyle;
currentCharStyle = newStyle.charStyle();
if (lookAhead() == ':')
@@ -1007,7 +1007,7 @@
if (lookAhead() != '[')
{
define = 1;
- currentCharStyle.setName(m_item->itemName() + ":" + sfcName);
+ currentCharStyle.setName(m_item->itemName() + "_" + sfcName);
enterState(textMode);
}
else
@@ -1030,10 +1030,10 @@
styleEffects = ScStyle_None;
currentCharStyle.setFeatures(styleEffects.featureList());
}
- else if (doc->paragraphStyles().contains(m_item->itemName() + ":" + sfcName))
+ else if (doc->paragraphStyles().contains(m_item->itemName() + "_" + sfcName))
{
ParagraphStyle newStyle;
- newStyle.setParent(m_item->itemName() + ":" + sfcName);
+ newStyle.setParent(m_item->itemName() + "_" + sfcName);
currentParagraphStyle = newStyle;
currentCharStyle = newStyle.charStyle();
}
@@ -1161,8 +1161,8 @@
ParagraphStyle newStyle;
if (s1 != "")
{
- if (doc->paragraphStyles().contains(m_item->itemName() + ":" + s1))
- newStyle.setParent(m_item->itemName() + ":" + s1);
+ if (doc->paragraphStyles().contains(m_item->itemName() + "_" + s1))
+ newStyle.setParent(m_item->itemName() + "_" + s1);
else if (doc->paragraphStyles().contains(s1))
newStyle.setParent(s1);
else
@@ -1170,12 +1170,12 @@
}
else
newStyle.setParent(pStyle);
- newStyle.setName(m_item->itemName() + ":" + sfcName);
+ newStyle.setName(m_item->itemName() + "_" + sfcName);
newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
if (s3 != "")
{
- if (doc->charStyles().contains(m_item->itemName() + ":" + s3))
- newStyle.charStyle().setParent(m_item->itemName() + ":" + s3);
+ if (doc->charStyles().contains(m_item->itemName() + "_" + s3))
+ newStyle.charStyle().setParent(m_item->itemName() + "_" + s3);
else if (doc->charStyles().contains(s3))
newStyle.charStyle().setParent(s3);
else
Modified: trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20507&path=/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp (original)
+++ trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp Wed Oct 28 19:20:58 2015
@@ -379,7 +379,7 @@
void SlaDocumentRtfOutput::insertStyleSheetTableEntry(quint32 stylesheetTableIndex, ParagraphStyle stylesheetTableEntry)
{
- QString newName = m_item->itemName() + ":" + stylesheetTableEntry.name();
+ QString newName = m_item->itemName() + "_" + stylesheetTableEntry.name();
stylesheetTableEntry.setName(newName);
if (stylesheetTableEntry.charStyle().fontVariant() != "")
{
More information about the scribus-commit
mailing list