summaryrefslogtreecommitdiffstats
path: root/filter/source/svg
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/svg')
-rw-r--r--filter/source/svg/svgexport.cxx2
-rw-r--r--filter/source/svg/svgfilter.cxx8
-rw-r--r--filter/source/svg/svgfilter.hxx2
-rw-r--r--filter/source/svg/svgimport.cxx4
4 files changed, 7 insertions, 9 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 4289a30abb67..2bf32d0ce995 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2018,7 +2018,7 @@ sal_Bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & r
sal_Bool SVGFilter::implCreateObjectsFromBackground( const Reference< XDrawPage >& rxDrawPage )
{
- Reference< XExporter > xExporter( mxMSF->createInstance( B2UCONST( "com.sun.star.drawing.GraphicExportFilter" ) ), UNO_QUERY );
+ Reference< XExporter > xExporter( mxContext->getServiceManager()->createInstanceWithContext( B2UCONST( "com.sun.star.drawing.GraphicExportFilter" ), mxContext ), UNO_QUERY );
sal_Bool bRet = sal_False;
if( xExporter.is() )
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index bbe2a3c35dfd..2570fee33b30 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -24,7 +24,7 @@
#include <uno/environment.h>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/drawing/XDrawSubController.hpp>
@@ -52,8 +52,7 @@ using namespace ::com::sun::star;
// -------------
SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
- mxMSF( rxCtx->getServiceManager(),
- uno::UNO_QUERY_THROW ),
+ mxContext( rxCtx ),
mpSVGDoc( NULL ),
mpSVGExport( NULL ),
mpSVGFontExport( NULL ),
@@ -97,8 +96,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
{
if( !mbExportAll && !mSelectedPages.hasElements() )
{
- uno::Reference< frame::XDesktop > xDesktop(mxMSF->createInstance( "com.sun.star.frame.Desktop" ),
- uno::UNO_QUERY_THROW);
+ uno::Reference< frame::XDesktop2 > xDesktop(frame::Desktop::create(mxContext));
uno::Reference< frame::XFrame > xFrame(xDesktop->getCurrentFrame(),
uno::UNO_QUERY_THROW);
uno::Reference<frame::XController > xController(xFrame->getController(),
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 975b7c6f226e..86694f217a23 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -277,7 +277,7 @@ public:
private:
- Reference< XMultiServiceFactory > mxMSF;
+ Reference< XComponentContext > mxContext;
SvXMLElementExport* mpSVGDoc;
SVGExport* mpSVGExport;
SVGFontExport* mpSVGFontExport;
diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx
index 15e1fe1b89c7..e3e7a7b7ee2b 100644
--- a/filter/source/svg/svgimport.cxx
+++ b/filter/source/svg/svgimport.cxx
@@ -64,13 +64,13 @@ sal_Bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
return sal_False;
rtl::OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.XMLOasisImporter" ) );
- Reference < XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
+ Reference < XDocumentHandler > xInternalHandler( mxContext->getServiceManager()->createInstanceWithContext( sXMLImportService, mxContext ), UNO_QUERY );
// The XImporter sets up an empty target document for XDocumentHandler to write to..
uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
xImporter->setTargetDocument(mxDstDoc);
- SVGReader aReader(mxMSF, xInputStream, xInternalHandler);
+ SVGReader aReader(uno::Reference<lang::XMultiServiceFactory>(mxContext->getServiceManager(), uno::UNO_QUERY_THROW), xInputStream, xInternalHandler);
return aReader.parseAndConvert();
}