r17233 by fschmid - IDML Importer: fixed reading of StoryText in idms files.

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 24 22:44:16 UTC 2012


Author: fschmid
Date: Tue Jan 24 22:44:16 2012
New Revision: 17233

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17233
Log:
IDML Importer: fixed reading of StoryText in idms files.

Modified:
    trunk/Scribus/scribus/plugins/import/idml/importidml.cpp

Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17233&path=/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidml.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidml.cpp Tue Jan 24 22:44:16 2012
@@ -2104,13 +2104,13 @@
 	for (QDomNode n = stNode.firstChild(); !n.isNull(); n = n.nextSibling() )
 	{
 		QDomElement e = n.toElement();
-		QString storyName = e.attribute("Self");
-		PageItem *item = NULL;
-		if (!storyMap.contains(storyName))
-			return;
-		item = storyMap[storyName];
 		if (e.tagName() == "Story")
 		{
+			QString storyName = e.attribute("Self");
+			PageItem *item = NULL;
+			if (!storyMap.contains(storyName))
+				return;
+			item = storyMap[storyName];
 			for(QDomNode st = e.firstChild(); !st.isNull(); st = st.nextSibling() )
 			{
 				QDomElement ste = st.toElement();
@@ -2122,6 +2122,8 @@
 						pStyle = ste.attribute("AppliedParagraphStyle");
 						if (styleTranslate.contains(pStyle))
 							pStyle = styleTranslate[pStyle];
+						else
+							pStyle = CommonStrings::DefaultParagraphStyle;
 					}
 					ParagraphStyle newStyle;
 					newStyle.setParent(pStyle);




More information about the scribus-commit mailing list