diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-04 13:49:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-04 17:26:03 +0200 |
commit | 9738002eca0f7cba337ae856cb5bce8ba93ee293 (patch) | |
tree | bb942212ba1aa12e714710542261e12e795f5449 /extensions | |
parent | af5059d19a37c6f2dffd756c579e92d30f65bc8b (diff) |
fdo#46808, Adapt drawing::ShapeCollection UNO service to new style
No client code is using the XComponent interface, so drop it.
Change-Id: Id8f6da1248da641dcc0a3cb6d0a70e3bf29e5c99
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/dbpilots/groupboxwiz.cxx | 3 | ||||
-rw-r--r-- | extensions/source/dbpilots/optiongrouplayouter.cxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/optiongrouplayouter.hxx | 8 |
3 files changed, 10 insertions, 10 deletions
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 <vcl/msgbox.hxx> #include "optiongrouplayouter.hxx" #include "dbpilots.hrc" +#include <comphelper/componentcontext.hxx> #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 <com/sun/star/awt/Point.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/drawing/ShapeCollection.hpp> #include <com/sun/star/drawing/XShapes.hpp> #include <com/sun/star/drawing/XShapeGrouper.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> @@ -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 <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/frame/XModel.hpp> #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: |