summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-03-15 10:20:06 +0530
committerDavid Tardon <dtardon@redhat.com>2017-03-21 09:24:32 +0000
commit9f9e861c6d168e8318b9cdc761a387b0d650e5c0 (patch)
tree02bdb8da78c2b899a5ed9d4132ec02632490c3c2 /writerperfect
parentd7470bab57640a4499500e3c06ace4fb8ab9c4af (diff)
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 <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/common/DocumentHandler.cxx5
1 files changed, 4 insertions, 1 deletions
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 <com/sun/star/xml/sax/XAttributeList.hpp>
#include <xmloff/attrlist.hxx>
+#include <xmloff/xmlimp.hxx>
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<SvXMLImport*>(mxHandler.get()))
+ mxHandler.set( new SvXMLLegacyToFastDocHandler( pFastHandler ) );
}
void DocumentHandler::startDocument()