summaryrefslogtreecommitdiff
path: root/filter/source/svg
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-14 12:58:00 +0200
committerNoel Grandin <noel@peralex.com>2012-12-21 10:57:09 +0200
commitbb121c864cc3c101ef733a4088c7ba3e36eced14 (patch)
tree2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /filter/source/svg
parent6d818ed651aaafcfb12ebc21449d35947d2e85a9 (diff)
fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface because it introduced method name conflicts (addEventListener). Shouldn't be an issue since it was scheduled to be dropped anyhow, and the service implementation still implements it, so existing clients will be fine. I dropped the interface XPropertySet from the combined IDL because nobody seems to be using it, and it's primary purpose appears to be to set weird flags. I dropped the optional interfaces XStatusIndicatorFactory XDispatchInformationProvider from the combined IDL because the service does not implement them, and nobody seems to be using them. I suspect they were mistakenly copied from XFrame. I also did not convert the Title, UserDefinedAttributes and LayoutManager properties to attributes, again because no-one is using them. Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
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();
}