summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-10-01 14:11:11 +0530
committerMichael Meeks <michael.meeks@collabora.com>2018-03-14 14:12:08 +0100
commitbf46b46a1d734348096936284fb8a76e977936d0 (patch)
treea76c30897cf1e49491bf26580c823701b6d74778 /sd
parent1b61d0417bf46896ef1f1bd1e1a8209588fc157a (diff)
Moving XSAXDocumentBuilder2 to use XFastDocumentHandler:
This is used in parsing of meta Contexts across different modules. This also involved moving to XFastParser for parsing xml filters in sw, sd, starmath. Change-Id: Ic663aaac6cb20ee8ce5b97cae87c93220f5a2929 Reviewed-on: https://gerrit.libreoffice.org/42989 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index da0c95bc12f3..3f8ad2f5f623 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -41,6 +41,7 @@
#include <strmname.h>
#include <svx/xmleohlp.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/document/XExporter.hpp>
@@ -216,11 +217,18 @@ ErrCode ReadThroughComponent(
// connect model and filter
Reference < XImporter > xImporter( xFilter, UNO_QUERY );
xImporter->setTargetDocument( xModelComponent );
+
+ uno::Reference< xml::sax::XFastParser > xFastParser = dynamic_cast<
+ xml::sax::XFastParser* >( xFilter.get() );
+
// finally, parser the stream
SAL_INFO( "sd.filter", "parsing stream" );
try
{
- xParser->parseStream( aParserInput );
+ if( xFastParser.is() )
+ xFastParser->parseStream( aParserInput );
+ else
+ xParser->parseStream( aParserInput );
}
catch (const xml::sax::SAXParseException& r)
{