diff options
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/graphiccollector.cxx | 4 | ||||
-rw-r--r-- | sdext/source/minimizer/impoptimizer.cxx | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx index 8c13a1c59ae3..10558e2933e1 100644 --- a/sdext/source/minimizer/graphiccollector.cxx +++ b/sdext/source/minimizer/graphiccollector.cxx @@ -20,6 +20,7 @@ #include "graphiccollector.hxx" #include <com/sun/star/awt/XDevice.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/BitmapMode.hpp> @@ -46,8 +47,7 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo { try { - Reference< XFramesSupplier > xDesktop( rxFact->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.frame.Desktop" ), rxFact ), UNO_QUERY_THROW ); + Reference< XDesktop2 > xDesktop = Desktop::create( rxFact ); Reference< XFrame > xFrame( xDesktop->getActiveFrame() ); Reference< XWindow > xWindow( xFrame->getContainerWindow() ); Reference< XDevice > xDevice( xWindow, UNO_QUERY_THROW ); diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index c8882639312e..4a496d57e6f2 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/util/MeasureUnit.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -681,10 +681,8 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) ); DispatchStatus(); - Reference< XDesktop > xDesktop( mxMSF->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.frame.Desktop" ), mxMSF ), UNO_QUERY ); - Reference< XFrame > xFrame( xDesktop, UNO_QUERY ); - xSelf = xFrame->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE ); + Reference< XDesktop2 > xDesktop = Desktop::create( mxMSF ); + xSelf = xDesktop->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE ); Reference< XComponentLoader > xComponentLoader( xSelf, UNO_QUERY ); Sequence< PropertyValue > aLoadProps( 1 ); |