From c09c64ede6a395ad4cc5a263e88d5e180b890127 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 19 Mar 2013 15:46:25 +0200 Subject: fdo#46808, convert drawing::GraphicExportFilter to new style Change-Id: Icd456209406ee8f4dc4ea1f966058f71dce08d58 --- slideshow/source/engine/shapes/gdimtftools.cxx | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'slideshow') 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 #include #include +#include #include #include @@ -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 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 ); -- cgit