From fcb1e4d8433b49686cd8e53c699dd5d6503ea314 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 13 Feb 2013 15:59:38 +0100 Subject: fdo#60471: svgio, sax: enable internal entity declarations for SVG Change-Id: I147acac61dfe0b626268fe1e600dcf641ca63a0c --- svgio/source/svguno/xsvgparser.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'svgio') 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 #include +#include #include #include #include @@ -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 const xInit(xParser, + uno::UNO_QUERY_THROW); + uno::Sequence args(1); + args[0] <<= OUString("DoSmeplease"); + xInit->initialize(args); // connect parser and filter xParser->setDocumentHandler(xSvgDocHdl); -- cgit