r20685 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 16 08:54:30 UTC 2016


Author: fschmid
Date: Sat Jan 16 08:54:30 2016
New Revision: 20685

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20685
Log:
Fixed Bug #11255: Imported *.odt list has invalid font name but rest of test is O.K

Modified:
    trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp

Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20685&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	Sat Jan 16 08:54:30 2016
@@ -433,10 +433,14 @@
 		else if (spd.tagName() == "style:style")
 		{
 			DrawStyle currStyle;
-			if (spd.attribute("style:family") == "paragraph")
-				currStyle = parDefaultStyle;
-			else if (spd.attribute("style:family") == "text")
-				currStyle = txtDefaultStyle;
+			currStyle.parentStyle = AttributeValue(spd.attribute("style:parent-style-name", ""));
+			if (!currStyle.parentStyle.valid)
+			{
+				if (spd.attribute("style:family") == "paragraph")
+					currStyle = parDefaultStyle;
+				else if (spd.attribute("style:family") == "text")
+					currStyle = txtDefaultStyle;
+			}
 			currStyle.styleType = AttributeValue(spd.attribute("style:family", ""));
 			currStyle.styleOrigin = AttributeValue(type);
 			for(QDomElement spe = spd.firstChildElement(); !spe.isNull(); spe = spe.nextSiblingElement() )
@@ -502,7 +506,6 @@
 				}
 			}
 			currStyle.displayName = AttributeValue(spd.attribute("style:display-name", ""));
-			currStyle.parentStyle = AttributeValue(spd.attribute("style:parent-style-name", ""));
 			m_Styles.insert(spd.attribute("style:name"), currStyle);
 			if (type == "styles")
 			{




More information about the scribus-commit mailing list