diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
commit | 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 (patch) | |
tree | 63699b525800b2c6708e90b817853bb60be5f6d8 /svx | |
parent | 5229726b4d4e7d76f410d221f8f8cd8abcfd5a19 (diff) |
Fix various XServiceInfo implementations
...to match what is recorded in the .component files
Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/primitive2d/primitivefactory2d.cxx | 19 | ||||
-rw-r--r-- | svx/source/sidebar/PanelFactory.cxx | 18 |
2 files changed, 34 insertions, 3 deletions
diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index d911a41931a2..df42d47b46ab 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -18,7 +18,10 @@ */ #include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/supportsservice.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <rtl/ref.hxx> #include <svx/svdobj.hxx> @@ -30,7 +33,7 @@ using namespace com::sun::star; namespace { -typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase; +typedef cppu::WeakComponentImplHelper< ::com::sun::star::graphic::XPrimitiveFactory2D, css::lang::XServiceInfo > PrimitiveFactory2DImplBase; // base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D class PrimitiveFactory2D @@ -44,6 +47,20 @@ public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xDrawPage, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.comp.graphic.PrimitiveFactory2D"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + return css::uno::Sequence<OUString>{ + "com.sun.star.graphic.PrimitiveFactory2D"}; + } }; Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXShape( diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index f4194224ed9a..e5a0cad0085b 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -35,7 +35,9 @@ #include <rtl/ref.hxx> #include <comphelper/namedvaluecollection.hxx> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/ui/XSidebar.hpp> #include <com/sun/star/ui/XUIElementFactory.hpp> @@ -54,7 +56,7 @@ namespace { #define SERVICE_NAME "com.sun.star.ui.UIElementFactory" */ -typedef ::cppu::WeakComponentImplHelper1< css::ui::XUIElementFactory > +typedef ::cppu::WeakComponentImplHelper< css::ui::XUIElementFactory, css::lang::XServiceInfo > PanelFactoryInterfaceBase; class PanelFactory @@ -74,6 +76,18 @@ public: css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("org.apache.openoffice.comp.svx.sidebar.PanelFactory"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return css::uno::Sequence<OUString>{"com.sun.star.ui.UIElementFactory"}; } }; PanelFactory::PanelFactory (void) |