summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-05-29 20:24:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-01 11:59:06 +0200
commit5e68d6cfade45f40b1ad46025a81afe4cb8dd337 (patch)
treeaf7740f3636e6b303371c764bfe7ff083e847879 /svx
parentf15a6e1b1b186bf42e1ade05630d17841add2c46 (diff)
Convert XFastParser into a normal C++ interface
There is no need for it to be an UNO interface anymore (ever since we started supporting dynamic_cast on UNO objects). Which means that XImportFilter2 also needs become a C++ interface. Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xml/xmlexport.cxx10
-rw-r--r--svx/source/xml/xmlxtimp.cxx1
2 files changed, 6 insertions, 5 deletions
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index d6bc3870ce08..79e65373a496 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -22,12 +22,12 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <comphelper/processfactory.hxx>
+#include <sax/xfastparser.hxx>
#include <svx/svdmodel.hxx>
#include <svx/xmleohlp.hxx>
#include <svx/xmlgrhlp.hxx>
@@ -193,18 +193,18 @@ bool SvxDrawingLayerImport( SdrModel* pModel, const uno::Reference<io::XInputStr
// get filter
Reference< XInterface > xFilter = xContext->getServiceManager()->createInstanceWithArgumentsAndContext( OUString::createFromAscii( pImportService ), aFilterArgs, xContext);
SAL_WARN_IF( !xFilter, "svx", "Can't instantiate filter component " << pImportService);
- uno::Reference< xml::sax::XFastParser > xFastParser( xFilter, UNO_QUERY );
- assert(xFastParser);
+ XFastParser* pFastParser = dynamic_cast<XFastParser*>( xFilter.get() );
+ assert(pFastParser);
bRet = false;
- if( xFastParser.is() )
+ if( pFastParser )
{
// connect model and filter
uno::Reference < document::XImporter > xImporter( xFilter, UNO_QUERY );
xImporter->setTargetDocument( xTargetDocument );
// finally, parser the stream
- xFastParser->parseStream( aParserInput );
+ pFastParser->parseStream( aParserInput );
bRet = true;
}
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 19c2a66ce1bb..e653f5695872 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/document/XGraphicStorageHandler.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
#include <com/sun/star/drawing/LineDash.hpp>