diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-13 15:59:38 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-13 16:31:56 +0100 |
commit | fcb1e4d8433b49686cd8e53c699dd5d6503ea314 (patch) | |
tree | b7c16ef1da11498e2136e26566db0c0b0a701e2a /svgio | |
parent | filter: svg: optimizeGradientStops: fix STL assertion (diff) | |
download | core-fcb1e4d8433b49686cd8e53c699dd5d6503ea314.tar.gz core-fcb1e4d8433b49686cd8e53c699dd5d6503ea314.zip |
fdo#60471: svgio, sax: enable internal entity declarations for SVG
Change-Id: I147acac61dfe0b626268fe1e600dcf641ca63a0c
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svguno/xsvgparser.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx index 26a81c0b5e75..1b12d9ad8dbe 100644 --- a/svgio/source/svguno/xsvgparser.cxx +++ b/svgio/source/svguno/xsvgparser.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/graphic/XSvgParser.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XInitialization.hpp> #include <cppuhelper/implbase2.hxx> #include <svgio/svgreader/svgdocumenthandler.hxx> #include <com/sun/star/xml/sax/XParser.hpp> @@ -131,6 +132,14 @@ namespace svgio // get parser uno::Reference< xml::sax::XParser > xParser( xml::sax::Parser::create(context_)); + // fdo#60471 need to enable internal entities because + // certain ... popular proprietary products write SVG files + // that use entities to define XML namespaces. + uno::Reference<lang::XInitialization> const xInit(xParser, + uno::UNO_QUERY_THROW); + uno::Sequence<uno::Any> args(1); + args[0] <<= OUString("DoSmeplease"); + xInit->initialize(args); // connect parser and filter xParser->setDocumentHandler(xSvgDocHdl); |