diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2016-09-05 14:38:30 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-01-25 11:20:48 +0000 |
commit | 8154953add163554c00935486a1cf5677cef2609 (patch) | |
tree | d8e148e84aa1e164a2358827085f4d9240ce5e31 /filter/source/odfflatxml | |
parent | 657eea01046c7f39ee8ca4545241372177385946 (diff) |
ScXMLTableRowCellContext implements fast interfaces:
Implementation of fast interfaces for contexts in path from
ScXMLImport::CreateFastContext to ScXMLTableRowCellContext.
FastParser is enabled and duplicates are avoided at all
possible places.
OOoXML filters still need those legacy paths we removed,
so I had to temporarily map them to fast elements, which
would increase their load time, but hopefully it should
help us in the long run.
Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670
Reviewed-on: https://gerrit.libreoffice.org/28648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'filter/source/odfflatxml')
-rw-r--r-- | filter/source/odfflatxml/OdfFlatXml.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index f8744ee191f8..f39fc00de811 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> #include <com/sun/star/xml/sax/Writer.hpp> +#include <com/sun/star/xml/sax/XFastParser.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XOutputStream.hpp> @@ -142,6 +143,8 @@ OdfFlatXml::importer( inputSource.sSystemId = url; inputSource.sPublicId = url; inputSource.aInputStream = inputStream; + css::uno::Reference< css::xml::sax::XFastParser > xFastParser = dynamic_cast< + css::xml::sax::XFastParser* >( docHandler.get() ); saxParser->setDocumentHandler(docHandler); try { @@ -149,7 +152,10 @@ OdfFlatXml::importer( if ( xSeekable.is() ) xSeekable->seek( 0 ); - saxParser->parseStream(inputSource); + if( xFastParser.is() ) + xFastParser->parseStream( inputSource ); + else + saxParser->parseStream(inputSource); } catch (const Exception &exc) { |