Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2045 → Rev 2046

/branches/Version13x/Scribus/scribus/pdfoptions.h
19,6 → 19,10
* @brief PDF Options struture. Capable of verifying its self, but otherwise largely
* a dumb struct.
*
* If you change this class, please ensure that PDFOptionsIO is
* updated to match and scribus/dtd/scribuspdfoptions.dtd is tweaked
* if required.
*
* @sa PDFOptionsIO
*/
class PDFOptions
/branches/Version13x/Scribus/scribus/pdfoptionsio.cpp
63,7 → 63,7
{
// Verify to make sure our settings are sane
QString vrfyError;
// Initialise the DOM. We don't re-use any existing one in case
// Make sure the options are sane
PDFOptions::VerifyResults vr = m_opts->verify(&vrfyError);
if (vr != PDFOptions::Verify_NoError)
{
71,6 → 71,7
return QString::null;
}
// Build the document. Initial implementation uses QDom.
m_doc = QDomDocument();
m_root = m_doc.createElement("ScribusPDFOptions");
m_root.setAttribute("version", formatVersion);
m_doc.appendChild(m_root);
78,7 → 79,10
buildSettings();
// We're done - return a string containing the document XML
QString xml = m_doc.toString();
xml.prepend("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
xml.prepend(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE ScribusPDFOptions SYSTEM 'scribuspdfoptions.dtd'>\n"
);
return xml;
}
 
145,7 → 149,7
void PDFOptionsIO::addElem(QDomElement& addTo, QString name, bool value)
{
QDomElement elem = m_doc.createElement(name);
elem.setAttribute("value",value);
elem.setAttribute("value", value ? "true" : "false" );
addTo.appendChild(elem);
}