summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx8
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx3
2 files changed, 8 insertions, 3 deletions
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 3d8b2c1be603..963264436092 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -331,13 +331,15 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
{
::osl::MutexGuard aGuard(m_aMutex);
comphelper::SequenceAsHashMap aArgs(_aArguments);
- m_xDelegatee = aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDelegatee);
+ m_xDocumentHandler = aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDocumentHandler);
m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel);
- OSL_ENSURE(m_xDelegatee.is(),"No document handler available!");
- if ( !m_xDelegatee.is() || !m_xModel.is() )
+ OSL_ENSURE(m_xDocumentHandler.is(), "No document handler available!");
+ if (!m_xDocumentHandler.is() || !m_xModel.is())
throw uno::Exception("no delegatee and no model", nullptr);
+ m_xDelegatee.set(new SvXMLLegacyToFastDocHandler(dynamic_cast<SvXMLImport*>(m_xDocumentHandler.get())));
+
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
{
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index 342194a9612a..aadea441ca62 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -23,12 +23,14 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
#include <comphelper/uno3.hxx>
+#include <xmloff/xmlimp.hxx>
#include <memory>
class SvXMLTokenMap;
@@ -77,6 +79,7 @@ private:
::std::vector< OUString> m_aDetailFields;
css::uno::Sequence< css::beans::PropertyValue > m_aArguments;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference<css::xml::sax::XFastDocumentHandler> m_xDocumentHandler;
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xDelegatee;
css::uno::Reference< css::uno::XAggregation > m_xProxy;
css::uno::Reference< css::lang::XTypeProvider > m_xTypeProvider;