diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-19 15:46:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-20 07:32:52 +0200 |
commit | c09c64ede6a395ad4cc5a263e88d5e180b890127 (patch) | |
tree | 2ddcf5b0e6a7ad8e53579237b2fa5d52b5cf16a7 /slideshow | |
parent | 23a16f5d3856d6eb61d599af9e47add4c456bfb2 (diff) |
fdo#46808, convert drawing::GraphicExportFilter to new style
Change-Id: Icd456209406ee8f4dc4ea1f966058f71dce08d58
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index fe63c0bcfead..83eff701e6eb 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/graphic/XGraphicRenderer.hpp> #include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/GraphicExportFilter.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> @@ -187,25 +188,9 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, DummyRenderer* pRenderer( new DummyRenderer() ); uno::Reference< graphic::XGraphicRenderer > xRenderer( pRenderer ); - // -> stuff that into UnoGraphicExporter. - uno::Reference<lang::XMultiComponentFactory> xFactory( - rxContext->getServiceManager() ); - - OSL_ENSURE( xFactory.is(), "### no UNO?!" ); - if( !xFactory.is() ) - return false; - // creating the graphic exporter - uno::Reference< document::XExporter > xExporter( - xFactory->createInstanceWithContext( - "com.sun.star.drawing.GraphicExportFilter", - rxContext), - uno::UNO_QUERY ); - uno::Reference< document::XFilter > xFilter( xExporter, uno::UNO_QUERY ); - - OSL_ENSURE( xExporter.is() && xFilter.is(), "### no graphic exporter?!" ); - if( !xExporter.is() || !xFilter.is() ) - return false; + uno::Reference< drawing::XGraphicExportFilter > xExporter = + drawing::GraphicExportFilter::create(rxContext); uno::Sequence< beans::PropertyValue > aProps(3); aProps[0].Name = "FilterName"; @@ -232,7 +217,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, aProps[2].Value <<= aFilterData; xExporter->setSourceDocument( xSource ); - if( !xFilter->filter( aProps ) ) + if( !xExporter->filter( aProps ) ) return false; rMtf = pRenderer->getMtf( (mtfLoadFlags & MTF_LOAD_FOREIGN_SOURCE) != 0 ); |