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 /sd/source/ui/remotecontrol/ImagePreparer.cxx | |
parent | 23a16f5d3856d6eb61d599af9e47add4c456bfb2 (diff) |
fdo#46808, convert drawing::GraphicExportFilter to new style
Change-Id: Icd456209406ee8f4dc4ea1f966058f71dce08d58
Diffstat (limited to 'sd/source/ui/remotecontrol/ImagePreparer.cxx')
-rw-r--r-- | sd/source/ui/remotecontrol/ImagePreparer.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index 2c6ca5bce558..e9f9c22d9099 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/document/XExporter.hpp> +#include <com/sun/star/drawing/GraphicExportFilter.hpp> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/presentation/XPresentationPage.hpp> #include <com/sun/star/text/XTextRange.hpp> @@ -113,17 +114,8 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview( OUString aFileURL; FileBase::createTempFile( 0, 0, &aFileURL ); - uno::Reference< lang::XMultiServiceFactory > xServiceManager( - ::comphelper::getProcessServiceFactory(), - uno::UNO_QUERY_THROW ); - - uno::Reference< document::XFilter > xFilter( - xServiceManager->createInstance( - "com.sun.star.drawing.GraphicExportFilter" ) , - uno::UNO_QUERY_THROW ); - - uno::Reference< document::XExporter > xExporter( xFilter, - uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XGraphicExportFilter > xFilter = + drawing::GraphicExportFilter::create( ::comphelper::getProcessComponentContext() ); if ( !xController->isRunning() ) return uno::Sequence<sal_Int8>(); @@ -132,7 +124,7 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview( xController->getSlideByIndex( aSlideNumber ), uno::UNO_QUERY_THROW ); - xExporter->setSourceDocument( xSourceDoc ); + xFilter->setSourceDocument( xSourceDoc ); uno::Sequence< beans::PropertyValue > aFilterData(3); |