summaryrefslogtreecommitdiff
path: root/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-29 20:00:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-03-30 09:38:49 +0200
commit70f3a94949cce612be9eff14fca94976acfc61a4 (patch)
tree7e096ea9dbf23d6f054c3d767e15078190f3e9d7 /reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
parent365a3ed39083389f40612dec765d7b8e0dc2377b (diff)
tdf#117162 ImportDocumentHandler expected XDocumentHandler argument
but SvXMLImport not longer supports XDocumentHandler since commit fe2b4e7dc6533535736a8f08496f316427386179 Date: Tue Oct 6 18:27:27 2020 +0200 make SvXMLImport fast-parser only here use a SvXMLLegacyToFastDocHandler to try and glue the two parts together again. Though the use of reflection::XProxyFactory is a bit worrying here wrt this change so unforseen side effects are possible. Full change over to fast-parser only is probably advisable. Change-Id: Ie14d1d9fa8534c187efc67a6c1cc0989316c4634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132285 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx')
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx8
1 files changed, 5 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() )
{