r23392 by jghali - #15975: IDML: guides on pages are not imported (ale)

scribus-commit scribus-commit at lists.scribus.net
Sat Nov 30 20:42:22 UTC 2019


Author: jghali
Date: Sat Nov 30 20:42:22 2019
New Revision: 23392

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23392
Log:
#15975: IDML: guides on pages are not imported (ale)

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=23392&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 Nov 30 20:42:22 2019
@@ -33,6 +33,7 @@
 #include "importidml.h"
 
 #include "commonstrings.h"
+#include "guidemanagercore.h"
 #include "loadsaveplugin.h"
 #include "pageitem_table.h"
 #include "pagesize.h"
@@ -1577,6 +1578,22 @@
 									mp = mSpr + "_" + masterSpreads[mSpr][0];
 							}
 							m_Doc->applyMasterPage(mp, m_Doc->currentPageNumber());
+						}
+					}
+					for (QDomNode pageNode = spe.firstChild(); !pageNode.isNull(); pageNode = pageNode.nextSibling())
+					{
+						QDomElement pageElement = pageNode.toElement();
+						if (pageElement.tagName() == "Guide" && pageElement.hasAttribute("Location") && pageElement.hasAttribute("Orientation"))
+						{
+							bool convOk = false;
+							double location = pageElement.attribute("Location").toDouble(&convOk);
+							if (!convOk)
+								continue;
+							QString orientation = pageElement.attribute("Orientation");
+							if (orientation == "Horizontal")
+								m_Doc->currentPage()->guides.addHorizontal(location, GuideManagerCore::Standard);
+							else if (pageElement.attribute("Orientation") == "Vertical")
+								m_Doc->currentPage()->guides.addVertical(location, GuideManagerCore::Standard);
 						}
 					}
 				}




More information about the scribus-commit mailing list