From 9f9e861c6d168e8318b9cdc761a387b0d650e5c0 Mon Sep 17 00:00:00 2001 From: Mohammed Abdul Azeem Date: Wed, 15 Mar 2017 10:20:06 +0530 Subject: Old-to-new mapping of attributes is moved into a Module: This should make it easy to reuse the mapping code wherever necessary and restores the loading of writerperfect documents. Change-Id: I505bffa47fe37270b0430d9ae5afec5072762b4c Reviewed-on: https://gerrit.libreoffice.org/35263 Tested-by: Jenkins Reviewed-by: David Tardon --- writerperfect/source/common/DocumentHandler.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'writerperfect') diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx index 3ea4d053e4a6..29788200b6de 100644 --- a/writerperfect/source/common/DocumentHandler.cxx +++ b/writerperfect/source/common/DocumentHandler.cxx @@ -16,6 +16,7 @@ #include #include +#include namespace writerperfect { @@ -110,8 +111,10 @@ using com::sun::star::xml::sax::XAttributeList; using com::sun::star::xml::sax::XDocumentHandler; DocumentHandler::DocumentHandler(Reference < XDocumentHandler > &xHandler) : - mxHandler(xHandler) + mxHandler( xHandler ) { + if (SvXMLImport *pFastHandler = dynamic_cast(mxHandler.get())) + mxHandler.set( new SvXMLLegacyToFastDocHandler( pFastHandler ) ); } void DocumentHandler::startDocument() -- cgit