From 9738002eca0f7cba337ae856cb5bce8ba93ee293 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Sep 2012 13:49:59 +0200 Subject: fdo#46808, Adapt drawing::ShapeCollection UNO service to new style No client code is using the XComponent interface, so drop it. Change-Id: Id8f6da1248da641dcc0a3cb6d0a70e3bf29e5c99 --- extensions/source/dbpilots/groupboxwiz.cxx | 3 ++- extensions/source/dbpilots/optiongrouplayouter.cxx | 9 ++++----- extensions/source/dbpilots/optiongrouplayouter.hxx | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'extensions') diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 4d15d553de7c..00d7dabb52e5 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -33,6 +33,7 @@ #include #include "optiongrouplayouter.hxx" #include "dbpilots.hrc" +#include #define GBW_STATE_OPTIONLIST 0 #define GBW_STATE_DEFAULTOPTION 1 @@ -168,7 +169,7 @@ namespace dbp { try { - OOptionGroupLayouter aLayouter(getServiceFactory()); + OOptionGroupLayouter aLayouter(comphelper::ComponentContext(getServiceFactory()).getUNOContext()); aLayouter.doLayout(getContext(), getSettings()); } catch(const Exception&) diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index 99b68ad46f25..f5b73a8a8457 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -62,8 +63,8 @@ namespace dbp //= OOptionGroupLayouter //===================================================================== //--------------------------------------------------------------------- - OOptionGroupLayouter::OOptionGroupLayouter(const Reference< XMultiServiceFactory >& _rxORB) - :m_xORB(_rxORB) + OOptionGroupLayouter::OOptionGroupLayouter(const Reference< XComponentContext >& _rxContext) + :mxContext(_rxContext) { } @@ -103,9 +104,7 @@ namespace dbp implAnchorShape(Reference< XPropertySet >(_rContext.xObjectShape, UNO_QUERY)); // shape collection (for grouping the shapes) - Reference< XShapes > xButtonCollection(m_xORB->createInstance( - ::rtl::OUString("com.sun.star.drawing.ShapeCollection")), - UNO_QUERY); + Reference< XShapes > xButtonCollection( ShapeCollection::create(mxContext), UNO_QUERY_THROW ); // first member : the shape of the control xButtonCollection->add(_rContext.xObjectShape.get()); diff --git a/extensions/source/dbpilots/optiongrouplayouter.hxx b/extensions/source/dbpilots/optiongrouplayouter.hxx index 08d36efe8fa2..0a0c8707a888 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.hxx +++ b/extensions/source/dbpilots/optiongrouplayouter.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include "dbptypes.hxx" @@ -39,12 +39,12 @@ namespace dbp //===================================================================== class OOptionGroupLayouter { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + mxContext; public: OOptionGroupLayouter( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext ); public: -- cgit