r18054 by fschmid - Write and read the internal Default Style of Textframes correctly with the new paragraph effects.
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 5 20:23:12 UTC 2013
Author: fschmid
Date: Sat Jan 5 20:23:11 2013
New Revision: 18054
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18054
Log:
Write and read the internal Default Style of Textframes correctly with the new paragraph effects.
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18054&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Jan 5 20:23:11 2013
@@ -4671,6 +4671,42 @@
pstyle.setKeepWithNext(attrs.valueAsBool("keepWithNext"));
if (attrs.hasAttribute("keepTogether"))
pstyle.setKeepTogether(attrs.valueAsBool("keepTogether"));
+ if (attrs.hasAttribute("ParagraphEffectCharStyle"))
+ pstyle.setPeCharStyleName(attrs.valueAsString("ParagraphEffectCharStyle"));
+ if (attrs.hasAttribute("ParagraphEffectOffset"))
+ pstyle.setParEffectOffset(attrs.valueAsDouble("ParagraphEffectOffset"));
+ if (attrs.hasAttribute("ParagraphEffectIndent"))
+ pstyle.setParEffectIndent(attrs.valueAsDouble("ParagraphEffectIndent"));
+ if (attrs.hasAttribute("DROP"))
+ pstyle.setHasDropCap(static_cast<bool>(attrs.valueAsInt("DROP")));
+ if (attrs.hasAttribute("DROPLIN"))
+ pstyle.setDropCapLines(attrs.valueAsInt("DROPLIN"));
+ if (attrs.hasAttribute("DROPDIST"))
+ pstyle.setParEffectOffset(attrs.valueAsDouble("DROPDIST"));
+ if (attrs.hasAttribute("Bullet"))
+ pstyle.setHasBullet(static_cast<bool>(attrs.valueAsInt("Bullet")));
+ if (attrs.hasAttribute("BulletStr"))
+ pstyle.setBulletStr(attrs.valueAsString("BulletStr"));
+ if (attrs.hasAttribute("Numeration"))
+ pstyle.setHasNum(static_cast<bool>(attrs.valueAsInt("Numeration")));
+ if (attrs.hasAttribute("NumerationName"))
+ pstyle.setNumName(attrs.valueAsString("NumerationName"));
+ if (attrs.hasAttribute("NumerationFormat"))
+ pstyle.setNumFormat(attrs.valueAsInt("NumerationFormat"));
+ if (attrs.hasAttribute("NumerationLevel"))
+ pstyle.setNumLevel(attrs.valueAsInt("NumerationLevel"));
+ if (attrs.hasAttribute("NumerationStart"))
+ pstyle.setNumStart(attrs.valueAsInt("NumerationStart"));
+ if (attrs.hasAttribute("NumerationPrefix"))
+ pstyle.setNumPrefix(attrs.valueAsString("NumerationPrefix"));
+ if (attrs.hasAttribute("NumerationSuffix"))
+ pstyle.setNumSuffix(attrs.valueAsString("NumerationSuffix"));
+ if (attrs.hasAttribute("NumerationRestart"))
+ pstyle.setNumRestart(attrs.valueAsInt("NumerationRestart"));
+ if (attrs.hasAttribute("NumeartionOther"))
+ pstyle.setNumOther(static_cast<bool>(attrs.valueAsInt("NumeartionOther")));
+ if (attrs.hasAttribute("NumerationHigher"))
+ pstyle.setNumHigher(static_cast<bool>(attrs.valueAsInt("NumerationHigher")));
currItem->itemText.setDefaultStyle(pstyle);
if (attrs.hasAttribute("PSTYLE"))
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18054&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Jan 5 20:23:11 2013
@@ -2586,6 +2586,40 @@
docu.writeAttribute("ISIZE", dStyle.charStyle().fontSize() / 10.0 );
if ( ! dStyle.charStyle().isInhLanguage())
docu.writeAttribute("LANGUAGE", dStyle.charStyle().language());
+ if ( ! dStyle.isInhPeCharStyleName())
+ docu.writeAttribute("ParagraphEffectCharStyle", dStyle.peCharStyleName());
+ if ( ! dStyle.isInhParEffectOffset())
+ docu.writeAttribute("ParagraphEffectOffset", dStyle.parEffectOffset());
+ if ( ! dStyle.isInhParEffectIndent())
+ docu.writeAttribute("ParagraphEffectIndent", static_cast<int>(dStyle.parEffectIndent()));
+ if ( ! dStyle.isInhHasDropCap())
+ docu.writeAttribute("DROP", static_cast<int>(dStyle.hasDropCap()));
+ if ( ! dStyle.isInhDropCapLines())
+ docu.writeAttribute("DROPLIN", dStyle.dropCapLines());
+ if ( ! dStyle.isInhHasBullet())
+ docu.writeAttribute("Bullet", static_cast<int>(dStyle.hasBullet()));
+ if ( ! dStyle.isInhBulletStr())
+ docu.writeAttribute("BulletStr", dStyle.bulletStr());
+ if ( ! dStyle.isInhHasNum())
+ docu.writeAttribute("Numeration", static_cast<int>(dStyle.hasNum()));
+ if ( ! dStyle.isInhNumFormat())
+ docu.writeAttribute("NumerationFormat", dStyle.numFormat());
+ if ( ! dStyle.isInhNumName())
+ docu.writeAttribute("NumerationName", dStyle.numName());
+ if ( ! dStyle.isInhNumLevel())
+ docu.writeAttribute("NumerationLevel", dStyle.numLevel());
+ if ( ! dStyle.isInhNumPrefix())
+ docu.writeAttribute("NumerationPrefix", dStyle.numPrefix());
+ if ( ! dStyle.isInhNumSuffix())
+ docu.writeAttribute("NumerationSuffix", dStyle.numSuffix());
+ if ( ! dStyle.isInhNumStart())
+ docu.writeAttribute("NumerationStart", dStyle.numStart());
+ if ( ! dStyle.isInhNumRestart())
+ docu.writeAttribute("NumerationRestart", dStyle.numRestart());
+ if ( ! dStyle.isInhNumOther())
+ docu.writeAttribute("NumerationOther", static_cast<int>(dStyle.numOther()));
+ if ( ! dStyle.isInhNumHigher())
+ docu.writeAttribute("NumerationHigher", static_cast<int>(dStyle.numHigher()));
}
if (item->asTextFrame() || item->asPathText())
{
More information about the scribus-commit
mailing list