diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-14 12:58:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-21 10:57:09 +0200 |
commit | bb121c864cc3c101ef733a4088c7ba3e36eced14 (patch) | |
tree | 2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /oox | |
parent | 6d818ed651aaafcfb12ebc21449d35947d2e85a9 (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 'oox')
-rw-r--r-- | oox/source/helper/graphichelper.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index 95dd078a82ad..8cd4d8d86928 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/awt/XDevice.hpp> #include <com/sun/star/awt/XUnitConversion.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> #include <com/sun/star/graphic/GraphicObject.hpp> #include <com/sun/star/graphic/GraphicProvider.hpp> @@ -69,9 +70,7 @@ GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, c maGraphicObjScheme( CREATE_OUSTRING( "vnd.sun.star.GraphicObject:" ) ) { OSL_ENSURE( mxContext.is(), "GraphicHelper::GraphicHelper - missing component context" ); - Reference< XMultiServiceFactory > xFactory( mxContext->getServiceManager(), UNO_QUERY ); - OSL_ENSURE( xFactory.is(), "GraphicHelper::GraphicHelper - missing service factory" ); - if( xFactory.is() ) + if( mxContext.is() ) mxGraphicProvider.set( graphic::GraphicProvider::create( mxContext ) ); //! TODO: get colors from system @@ -109,9 +108,9 @@ GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, c // if no target frame has been passed (e.g. OLE objects), try to fallback to the active frame // TODO: we need some mechanism to keep and pass the parent frame Reference< XFrame > xFrame = rxTargetFrame; - if( !xFrame.is() && xFactory.is() ) try + if( !xFrame.is() && mxContext.is() ) try { - Reference< XFramesSupplier > xFramesSupp( xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY_THROW ); + Reference< XDesktop2 > xFramesSupp = Desktop::create( mxContext ); xFrame = xFramesSupp->getActiveFrame(); } catch( Exception& ) |