r18399 by fschmid - Fixed Bug #11685: "Insufficient text and vector import of IDML file"

scribus-commit scribus-commit at lists.scribus.net
Sat Jul 27 07:47:11 UTC 2013


Author: fschmid
Date: Sat Jul 27 07:47:11 2013
New Revision: 18399

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18399
Log:
Fixed Bug #11685: "Insufficient text and vector import of IDML file"

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=18399&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 Sat Jul 27 07:47:11 2013
@@ -1532,6 +1532,8 @@
 					baseX = m_Doc->currentPage()->xOffset();
 					baseY = m_Doc->currentPage()->yOffset() + m_Doc->currentPage()->height() / 2.0;
 					firstPage = false;
+					if ((importerFlags & LoadSavePlugin::lfCreateDoc) && spe.hasAttribute("AppliedMaster"))
+						m_Doc->applyMasterPage(spe.attribute("AppliedMaster"), m_Doc->currentPageNumber());
 				}
 			}
 			if ((facingPages) && (pagecount % 2 == 0))
@@ -1558,15 +1560,15 @@
 				}
 			}
 		}
-/*		else if (e.tagName() == "MasterSpread")
+		else if (e.tagName() == "MasterSpread")
 		{
 			m_Doc->setMasterPageMode(true);
+			QString pageNam = e.attribute("Self");
 			for(QDomNode sp = e.firstChild(); !sp.isNull(); sp = sp.nextSibling() )
 			{
 				QDomElement spe = sp.toElement();
 				if (spe.tagName() == "Page")
 				{
-					QString pageNam = spe.attribute("Name") + "_" + spe.attribute("Self");
 					m_Doc->addMasterPage(mpagecount, pageNam);
 					m_Doc->currentPage()->MPageNam = "";
 					m_Doc->view()->addPage(mpagecount, true);
@@ -1599,7 +1601,7 @@
 				}
 			}
 			m_Doc->setMasterPageMode(false);
-		} */
+		}
 	}
 	return;
 }
@@ -2594,6 +2596,7 @@
 	}
 	ParagraphStyle newStyle;
 	newStyle.setParent(pStyle);
+	newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
 	// Apply possible override of paragraph style
 	readParagraphStyleAttributes(newStyle, ste);
 	ParagraphStyle ttx = m_Doc->paragraphStyle(pStyle);
@@ -2836,6 +2839,7 @@
 		item->itemText.insertChars(posC, data);
 		item->itemText.applyStyle(posC, newStyle);
 		item->itemText.applyCharStyle(posC, data.length(), nstyle);
+		posC = item->itemText.length();
 	}
 }
 




More information about the scribus-commit mailing list