r19460 by jghali - 12572, patch 008/12: Fix PDFOptionsIO::readSettings()

scribus-commit scribus-commit at lists.scribus.net
Sat Aug 30 00:55:24 UTC 2014


Author: jghali
Date: Sat Aug 30 00:55:24 2014
New Revision: 19460

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19460
Log:
12572, patch 008/12: Fix PDFOptionsIO::readSettings()

Now it actually can read PDFOptions without error.

Modified:
    trunk/Scribus/scribus/pdfoptionsio.cpp

Modified: trunk/Scribus/scribus/pdfoptionsio.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19460&path=/trunk/Scribus/scribus/pdfoptionsio.cpp
==============================================================================
--- trunk/Scribus/scribus/pdfoptionsio.cpp (original)
+++ trunk/Scribus/scribus/pdfoptionsio.cpp Sat Aug 30 00:55:24 2014
@@ -135,7 +135,7 @@
 	addElem(m_root, "mirrorV", m_opts->MirrorV);
 	addElem(m_root, "rotateDegrees", m_opts->RotateDeg);
 	addElem(m_root, "presentMode", m_opts->PresentMode);
-	addPresentationData();
+	// addPresentationData();
 	addElem(m_root, "filename", m_opts->fileName);
 	addElem(m_root, "isGrayscale", m_opts->isGrayscale);
 	addElem(m_root, "useRGB", m_opts->UseRGB);
@@ -345,7 +345,8 @@
 		return false;
 	if (!readElem(m_root, "embedPDF", &m_opts->embedPDF))
 		m_opts->embedPDF = false;
-	readPDFVersion();
+	if (!readPDFVersion())
+		return false;
 	if (!readElem(m_root, "resolution", &m_opts->Resolution))
 		return false;
 	if (!readElem(m_root, "binding", &m_opts->Binding))
@@ -362,8 +363,8 @@
 		return false;
 	if (!readElem(m_root, "presentMode", &m_opts->PresentMode))
 		return false;
-	if (!readPresentationData())
-		return false;
+	// if (!readPresentationData())
+	// 	return false;
 	if (!readElem(m_root, "filename", &m_opts->fileName))
 		return false;
 	if (!readElem(m_root, "isGrayscale", &m_opts->isGrayscale))
@@ -628,7 +629,7 @@
 	QList<PDFPresentationData> pList;
 	for (QDomNode node = pSettings.firstChild(); !node.isNull(); node = node.nextSibling())
 	{
-		QDomElement elem = getValueElement(basenode, "presentationSettingsEntry", false);
+		QDomElement elem = getValueElement(node, "presentationSettingsEntry", false);
 		if (elem.isNull())
 			return false;
 		PDFPresentationData pres;
@@ -670,7 +671,7 @@
 	QMap<QString,LPIData> lpiMap;
 	for (QDomNode node = lpiSettings.firstChild(); !node.isNull(); node = node.nextSibling())
 	{
-		QDomElement elem = getValueElement(basenode, "lpiSettingsEntry", false);
+		QDomElement elem = getValueElement(node, "lpiSettingsEntry", false);
 		if (elem.isNull())
 			return false;
 		QString name (elem.attribute("name"));




More information about the scribus-commit mailing list