diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 10:59:36 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-04 09:07:27 +0100 |
commit | e83d7993d46b096ecc18c01d92d39e170cce18c1 (patch) | |
tree | daa5c81c6dbd076027876128fa8ca958f9e1f0b4 /writerperfect/source | |
parent | 3ed8466b55ace15a28761e06b6bb76ebd8758106 (diff) |
EPUB export, fixed layout: disable DTD string in SVG header
epubcheck complains:
ERROR(HTM-003): test.epub/OEBPS/images/image0001.svg(5675,37): External entities are not allowed in EPUB v3 documents. External entity declaration found: %svg-extensibility.mod.
and similar ones. Just not writing the DTD header is enough to address
the error.
Change-Id: I5307e932a0f07585297cce734aceae77e43cc7a6
Reviewed-on: https://gerrit.libreoffice.org/45648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/writer/exp/xmlimp.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx index 4686cd95ad64..6750019216e3 100644 --- a/writerperfect/source/writer/exp/xmlimp.cxx +++ b/writerperfect/source/writer/exp/xmlimp.cxx @@ -17,6 +17,7 @@ #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/Writer.hpp> +#include <comphelper/propertyvalue.hxx> #include <rtl/uri.hxx> #include <tools/stream.hxx> #include <tools/urlobj.hxx> @@ -283,7 +284,10 @@ void XMLOfficeDocContext::HandleFixedLayoutPage(const uno::Sequence<sal_Int8> &r if (!xSaxWriter.is()) return; - uno::Sequence<uno::Any> aArguments; + uno::Sequence<uno::Any> aArguments = + { + uno::makeAny(uno::Sequence<beans::PropertyValue>({comphelper::makePropertyValue("DTDString", false)})) + }; uno::Reference<svg::XSVGWriter> xSVGWriter(xCtx->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.svg.SVGWriter", aArguments, xCtx), uno::UNO_QUERY); if (!xSVGWriter.is()) return; |