diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-20 22:41:38 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-20 22:58:29 +0100 |
commit | 09af884e7b5712e0311a4c122a5213e7c89f626e (patch) | |
tree | f4291ccbae836111fa05ff6404f1b53d1ca94450 | |
parent | be053c9a80ad237afc6da0b4174e1c7afc94ed92 (diff) |
Revert "svx: split into direct implementation getFactories"
Also reverts "These services are in fact implemented in svxcore library."
This reverts commit 090674dcb085cd41f4628e4f07c9a2268a18e862
and commit 4a969ac35174520f1ffeb4f919f5d7bb6d99a628.
This is embarrassing; needs more work.
26 files changed, 895 insertions, 401 deletions
diff --git a/include/osl/detail/component-declarations.h b/include/osl/detail/component-declarations.h index aeb906909508..b8fb658d2822 100644 --- a/include/osl/detail/component-declarations.h +++ b/include/osl/detail/component-declarations.h @@ -109,24 +109,6 @@ void * com_sun_star_comp_stoc_SimpleRegistry( void * , void * ); void * com_sun_star_extensions_xml_sax_Writer( void * , void * ); void * com_sun_star_security_comp_stoc_AccessController( void * , void * ); void * com_sun_star_security_comp_stoc_FilePolicy( void * , void * ); -void * com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory( void * , void * ); -void * com_sun_star_comp_svx_RecoveryUI_implementation_getFactory( void * , void * ); -void * com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory( void * , void * ); -void * com_sun_star_drawing_SvxShapeCollection_implementation_getFactory( void * , void * ); -void * com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_DownSearchToolboxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_FindTextToolboxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_FindAllToolboxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_UpSearchToolboxController_implementation_getFactory( void * , void * ); -void * com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory( void * , void * ); -void * org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory( void * , void * ); #ifdef __cplusplus } diff --git a/include/osl/detail/component-mapping.h b/include/osl/detail/component-mapping.h index 776f37119707..b32d41b5c8a8 100644 --- a/include/osl/detail/component-mapping.h +++ b/include/osl/detail/component-mapping.h @@ -69,6 +69,7 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); { "libspelllo.a", spell_component_getFactory }, \ { "libsvllo.a", svl_component_getFactory }, \ { "libsvtlo.a", svt_component_getFactory }, \ + { "libsvxlo.a", svx_component_getFactory }, \ { "libtklo.a", tk_component_getFactory }, \ { "libucb1.a", ucb_component_getFactory }, \ { "libucpexpand1lo.a", ucpexpand1_component_getFactory }, \ @@ -134,11 +135,8 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); { "libwpftwriterlo.a", wpftwriter_component_getFactory }, \ #define NON_APP_SPECIFIC_CONSTRUCTOR_MAP \ - /* expwrap.component */ \ { "com_sun_star_comp_extensions_xml_sax_ParserExpat", com_sun_star_comp_extensions_xml_sax_ParserExpat }, \ { "com_sun_star_comp_extensions_xml_sax_FastParser", com_sun_star_comp_extensions_xml_sax_FastParser }, \ - { "com_sun_star_extensions_xml_sax_Writer", com_sun_star_extensions_xml_sax_Writer }, \ - /* bootstrap.component */ \ { "com_sun_star_comp_stoc_DLLComponentLoader", com_sun_star_comp_stoc_DLLComponentLoader }, \ { "com_sun_star_comp_stoc_ImplementationRegistration", com_sun_star_comp_stoc_ImplementationRegistration }, \ { "com_sun_star_comp_stoc_NestedRegistry", com_sun_star_comp_stoc_NestedRegistry }, \ @@ -146,27 +144,9 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); { "com_sun_star_comp_stoc_OServiceManager", com_sun_star_comp_stoc_OServiceManager }, \ { "com_sun_star_comp_stoc_OServiceManagerWrapper", com_sun_star_comp_stoc_OServiceManagerWrapper }, \ { "com_sun_star_comp_stoc_SimpleRegistry", com_sun_star_comp_stoc_SimpleRegistry }, \ + { "com_sun_star_extensions_xml_sax_Writer", com_sun_star_extensions_xml_sax_Writer }, \ { "com_sun_star_security_comp_stoc_AccessController", com_sun_star_security_comp_stoc_AccessController }, \ { "com_sun_star_security_comp_stoc_FilePolicy", com_sun_star_security_comp_stoc_FilePolicy }, \ - /* svx.component */ \ - { "com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory", com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory }, \ - { "com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory", com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory }, \ - { "com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory", com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory }, \ - { "com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory", com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory }, \ - { "com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory", com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory }, \ - { "com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory", com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory }, \ - { "com_sun_star_comp_svx_RecoveryUI_implementation_getFactory", com_sun_star_comp_svx_RecoveryUI_implementation_getFactory }, \ - { "com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory", com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory }, \ - { "com_sun_star_drawing_SvxShapeCollection_implementation_getFactory", com_sun_star_drawing_SvxShapeCollection_implementation_getFactory }, \ - { "com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory", com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory }, \ - { "com_sun_star_svx_DownSearchToolboxController_implementation_getFactory", com_sun_star_svx_DownSearchToolboxController_implementation_getFactory }, \ - { "com_sun_star_svx_FindTextToolboxController_implementation_getFactory", com_sun_star_svx_FindTextToolboxController_implementation_getFactory }, \ - { "com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory", com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory }, \ - { "com_sun_star_svx_FindAllToolboxController_implementation_getFactory", com_sun_star_svx_FindAllToolboxController_implementation_getFactory }, \ - { "com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory", com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory }, \ - { "com_sun_star_svx_UpSearchToolboxController_implementation_getFactory", com_sun_star_svx_UpSearchToolboxController_implementation_getFactory }, \ - { "com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory", com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory }, \ - { "org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory", org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory }, \ #endif /* DISABLE_DYNLOADING */ diff --git a/include/svx/sdr/primitive2d/primitiveFactory2d.hxx b/include/svx/sdr/primitive2d/primitiveFactory2d.hxx new file mode 100644 index 000000000000..dcbdc6b79589 --- /dev/null +++ b/include/svx/sdr/primitive2d/primitiveFactory2d.hxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX +#define INCLUDED_SVX_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX + +#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <cppuhelper/compbase1.hxx> +#include <comphelper/broadcasthelper.hxx> + +#include <svx/svxdllapi.h> + +////////////////////////////////////////////////////////////////////////////// +// UNO API helper methods + +namespace drawinglayer +{ + namespace primitive2d + { + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// PrimitiveFactory2D class + +namespace drawinglayer +{ + namespace primitive2d + { + // typedef for PrimitiveFactory2DImplBase + typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase; + + // base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D + class PrimitiveFactory2D + : protected comphelper::OBaseMutex, + public PrimitiveFactory2DImplBase + { + private: + protected: + public: + // constructor + PrimitiveFactory2D(); + + // Methods from XPrimitiveFactory2D + 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); + 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); + + // UNO API helpers + SVX_DLLPUBLIC static OUString getImplementationName_Static(); + SVX_DLLPUBLIC static com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(); + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_SVX_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/unoshcol.hxx b/include/svx/unoshcol.hxx index 523313f6213b..b349b5e01ea2 100644 --- a/include/svx/unoshcol.hxx +++ b/include/svx/unoshcol.hxx @@ -81,8 +81,11 @@ public: virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + static com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(); + static OUString getImplementationName_Static(); }; +::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxShapeCollection_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); #endif diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx index 595be129d3d6..7e399b0f47ef 100644 --- a/include/svx/xmlgrhlp.hxx +++ b/include/svx/xmlgrhlp.hxx @@ -119,6 +119,42 @@ public: virtual OUString SAL_CALL resolveOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rxBinaryStream ) throw (::com::sun::star::uno::RuntimeException); }; + +// for instantiation via service manager +namespace svx +{ +/** Create this with createInstanceWithArguments. service name + "com.sun.star.comp.Svx.GraphicImportHelper", one argument which is the + XStorage. Without arguments no helper class is created. With an empty + argument the helper class is created and initialized like in the CTOR to + SvXMLGraphicHelper that only gets the create mode. + + You should call dispose after you no longer need this component. + + uses eCreateMode == GRAPHICHELPER_MODE_READ, bDirect == sal_True in + SvXMLGraphicHelper + */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw(); + +/** Create this with createInstanceWithArguments. service name + "com.sun.star.comp.Svx.GraphicExportHelper", one argument which is the + XStorage. Without arguments no helper class is created. With an empty + argument the helper class is created and initialized like in the CTOR to + SvXMLGraphicHelper that only gets the create mode + + To write the Pictures stream, you have to call dispose at this component. + Make sure you call dipose before you commit the parent storage. + + uses eCreateMode == GRAPHICHELPER_MODE_WRITE, bDirect == sal_True in + SvXMLGraphicHelper + */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw(); +} + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sidebar/PanelFactory.hxx b/svx/inc/sidebar/PanelFactory.hxx new file mode 100644 index 000000000000..7dcfffe69d38 --- /dev/null +++ b/svx/inc/sidebar/PanelFactory.hxx @@ -0,0 +1,68 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SIDEBAR_PANELFACTORY_HXX +#define INCLUDED_SVX_INC_SIDEBAR_PANELFACTORY_HXX + +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <com/sun/star/ui/XUIElementFactory.hpp> + +#include <boost/noncopyable.hpp> + +namespace cssu = ::com::sun::star::uno; + + +namespace svx { namespace sidebar { + +namespace +{ + typedef ::cppu::WeakComponentImplHelper1 < + css::ui::XUIElementFactory + > PanelFactoryInterfaceBase; +} + + +class PanelFactory + : private ::boost::noncopyable, + private ::cppu::BaseMutex, + public PanelFactoryInterfaceBase +{ +public: + static ::rtl::OUString SAL_CALL getImplementationName (void); + static cssu::Reference<cssu::XInterface> SAL_CALL createInstance ( + const cssu::Reference<css::lang::XMultiServiceFactory>& rxFactory); + static cssu::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames (void); + + PanelFactory (void); + virtual ~PanelFactory (void); + + // XUIElementFactory + cssu::Reference<css::ui::XUIElement> SAL_CALL createUIElement ( + const ::rtl::OUString& rsResourceURL, + const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) + throw( + css::container::NoSuchElementException, + css::lang::IllegalArgumentException, + cssu::RuntimeException); +}; + + +} } // end of namespace svx::sidebar + +#endif diff --git a/svx/inc/tbunocontroller.hxx b/svx/inc/tbunocontroller.hxx index 06ee3f87a76b..82e48c5c51c7 100644 --- a/svx/inc/tbunocontroller.hxx +++ b/svx/inc/tbunocontroller.hxx @@ -25,7 +25,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -namespace { +namespace svx +{ class SvxFontSizeBox_Impl; class FontHeightToolBoxControl : public svt::ToolboxController, @@ -46,6 +47,13 @@ class FontHeightToolBoxControl : public svt::ToolboxController, virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + static OUString getImplementationName_Static() throw() + { + return OUString("com.sun.star.svx.FontHeightToolBoxController"); + } + + static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); @@ -67,6 +75,8 @@ class FontHeightToolBoxControl : public svt::ToolboxController, ::com::sun::star::awt::FontDescriptor m_aCurrentFont; }; +::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL FontHeightToolBoxControl_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); + } #endif // INCLUDED_SVX_INC_TBUNOCONTROLLER_HXX diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx index 51d31de94fc8..5f33b603cd4a 100644 --- a/svx/inc/tbunosearchcontrollers.hxx +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -40,7 +40,8 @@ #include <map> #include <vector> -namespace { +namespace svx +{ class FindTextFieldControl : public ComboBox { @@ -104,6 +105,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static() throw() + { + return OUString("com.sun.star.svx.FindTextToolboxController"); + } + + static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); @@ -145,6 +153,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static( ) throw() + { + return OUString( "com.sun.star.svx.ExitFindbarToolboxController" ); + } + + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); @@ -177,6 +192,14 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static( Type eType ) throw() + { + return eType == UP? OUString( "com.sun.star.svx.UpSearchToolboxController" ) : + OUString( "com.sun.star.svx.DownSearchToolboxController" ); + } + + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); @@ -210,6 +233,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static( ) throw() + { + return OUString( "com.sun.star.svx.MatchCaseToolboxController" ); + } + + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); @@ -244,6 +274,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static( ) throw() + { + return OUString( "com.sun.star.svx.FindAllToolboxController" ); + } + + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XComponent virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); @@ -280,6 +317,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + static OUString getImplementationName_Static() throw() + { + return OUString("com.sun.star.comp.svx.Impl.FindbarDispatcher"); + } + + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); @@ -298,6 +342,15 @@ private: }; +// createInstance +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL FindAllToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); + } #endif // INCLUDED_SVX_INC_TBUNOSEARCHCONTROLLERS_HXX diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index cdd8dca4f58f..bfaa79119530 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -47,10 +47,24 @@ using namespace css; using namespace css::uno; -namespace { - // - EnhancedCustomShapeEngine - -EnhancedCustomShapeEngine::EnhancedCustomShapeEngine() : +OUString EnhancedCustomShapeEngine_getImplementationName() + throw( RuntimeException ) +{ + return OUString( "com.sun.star.drawing.EnhancedCustomShapeEngine" ); +} + +Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() + throw( RuntimeException ) +{ + Sequence< OUString > aRet(1); + OUString* pArray = aRet.getArray(); + pArray[0] = "com.sun.star.drawing.CustomShapeEngine"; + return aRet; +} + +EnhancedCustomShapeEngine::EnhancedCustomShapeEngine( const Reference< lang::XMultiServiceFactory >& rxMgr ) : + mxFact ( rxMgr ), mbForceGroupWithText ( sal_False ) { } @@ -95,7 +109,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName() throw( RuntimeException ) { - return OUString( "com.sun.star.drawing.EnhancedCustomShapeEngine" ); + return EnhancedCustomShapeEngine_getImplementationName(); } sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName ) throw( RuntimeException ) @@ -105,10 +119,7 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() throw ( RuntimeException ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.drawing.CustomShapeEngine"; - return aRet; + return EnhancedCustomShapeEngine_getSupportedServiceNames(); } // XCustomShapeEngine ----------------------------------------------------------- @@ -433,18 +444,4 @@ Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShap return aSeq; } -} - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new EnhancedCustomShapeEngine)); - x->acquire(); - return x.get(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx index cad5f9e097df..ae90045a1f87 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx @@ -40,8 +40,6 @@ class SdrObject; class SdrObjCustomShape; -namespace { - class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3 < css::lang::XInitialization, @@ -49,13 +47,14 @@ class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3 css::drawing::XCustomShapeEngine > { + css::uno::Reference< css::lang::XMultiServiceFactory > mxFact; css::uno::Reference< css::drawing::XShape > mxShape; sal_Bool mbForceGroupWithText; SdrObject* ImplForceGroupWithText( const SdrObjCustomShape* pCustoObj, SdrObject* pRenderedShape ); public: - EnhancedCustomShapeEngine(); + EnhancedCustomShapeEngine( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); virtual ~EnhancedCustomShapeEngine(); // XInterface @@ -85,7 +84,12 @@ public: throw ( css::uno::RuntimeException ); }; -} +OUString EnhancedCustomShapeEngine_getImplementationName() + throw ( css::uno::RuntimeException ); +sal_Bool SAL_CALL EnhancedCustomShapeEngine_supportsService( const OUString& rServiceName ) + throw( css::uno::RuntimeException ); +css::uno::Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() + throw( css::uno::RuntimeException ); #endif diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 18b1d3875e72..3806bcb456d8 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -15,6 +15,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sidebar/PanelFactory.hxx" #include "GalleryControl.hxx" diff --git a/svx/source/inc/recoveryui.hxx b/svx/source/inc/recoveryui.hxx index 46c867db2f96..38febbbbf433 100644 --- a/svx/source/inc/recoveryui.hxx +++ b/svx/source/inc/recoveryui.hxx @@ -28,7 +28,8 @@ #include "docrecovery.hxx" -namespace { +namespace svx +{ namespace svxdr = ::svx::DocRecovery; @@ -108,6 +109,13 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo const css::util::URL& aURL ) throw(css::uno::RuntimeException); + //--------------------------------------- + // XServiceInfo helper + + static OUString st_getImplementationName(); + static css::uno::Sequence< OUString > st_getSupportedServiceNames(); + static css::uno::Reference< css::uno::XInterface > SAL_CALL st_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); + //------------------------------------------- // helper private: @@ -124,7 +132,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo }; -} +} // namespace svx #endif // INCLUDED_SVX_SOURCE_INC_RECOVERYUI_HXX diff --git a/svx/source/inc/unogalthemeprovider.hxx b/svx/source/inc/unogalthemeprovider.hxx index 74e77dc6e461..8d1cd680c08f 100644 --- a/svx/source/inc/unogalthemeprovider.hxx +++ b/svx/source/inc/unogalthemeprovider.hxx @@ -25,9 +25,19 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/gallery/XGalleryThemeProvider.hpp> +#include <svx/svxdllapi.h> + class Gallery; -namespace { +namespace unogallery { + +// ------------------------- +// - some helper functions - +// ------------------------- + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GalleryThemeProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + ::com::sun::star::uno::Sequence< OUString > SAL_CALL GalleryThemeProvider_getSupportedServiceNames() throw(); +OUString SAL_CALL GalleryThemeProvider_getImplementationName() throw(); // ----------------- // - GalleryThemes - @@ -41,6 +51,9 @@ public: GalleryThemeProvider(); ~GalleryThemeProvider(); + SVX_DLLPUBLIC static OUString getImplementationName_Static() throw(); + SVX_DLLPUBLIC static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); + protected: // XServiceInfo diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index d04e46d9a5a5..e549d79b3565 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -17,29 +17,43 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <svx/sdr/primitive2d/primitiveFactory2d.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <svx/svdobj.hxx> #include <svx/svdpage.hxx> #include <svx/unoapi.hxx> #include <svx/sdr/contact/viewcontact.hxx> -using namespace com::sun::star; +////////////////////////////////////////////////////////////////////////////// -namespace { +using namespace com::sun::star; -typedef cppu::WeakComponentImplHelper1< graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase; +////////////////////////////////////////////////////////////////////////////// +// UNO API helper methods -// base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D -class PrimitiveFactory2D: protected comphelper::OBaseMutex, public PrimitiveFactory2DImplBase +namespace drawinglayer { -public: - PrimitiveFactory2D(): PrimitiveFactory2DImplBase(m_aMutex) {} + namespace primitive2d + { + uno::Reference< uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance( + const uno::Reference< lang::XMultiServiceFactory >& /*rSMgr*/) throw( uno::Exception ) + { + return *(new PrimitiveFactory2D()); + } + } // end of namespace primitive2d +} // end of namespace drawinglayer - // Methods from XPrimitiveFactory2D - virtual uno::Sequence< uno::Reference< graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXShape( const uno::Reference< drawing::XShape >& xShape, const uno::Sequence< beans::PropertyValue >& aParms ) throw (uno::RuntimeException); - virtual uno::Sequence< uno::Reference< graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const uno::Reference< drawing::XDrawPage >& xDrawPage, const uno::Sequence< beans::PropertyValue >& aParms ) throw (uno::RuntimeException); -}; +////////////////////////////////////////////////////////////////////////////// +// UNO API helper methods + +namespace drawinglayer +{ + namespace primitive2d + { + PrimitiveFactory2D::PrimitiveFactory2D() + : PrimitiveFactory2DImplBase(m_aMutex) + { + } Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXShape( const uno::Reference< drawing::XShape >& xShape, @@ -82,18 +96,27 @@ public: return aRetval; } -} + OUString PrimitiveFactory2D::getImplementationName_Static() + { + static OUString aRetval("com.sun.star.comp.graphic.PrimitiveFactory2D"); + return aRetval; + } + + uno::Sequence< OUString > PrimitiveFactory2D::getSupportedServiceNames_Static() + { + static uno::Sequence< OUString > aSeq; + osl::Mutex aMutex; + osl::MutexGuard aGuard( aMutex ); -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new PrimitiveFactory2D)); - x->acquire(); - return x.get(); -} + if(!aSeq.getLength()) + { + aSeq.realloc(1L); + aSeq[0] = "com.sun.star.graphic.PrimitiveFactory2D"; + } + + return aSeq; + } + } // end of namespace primitive2d +} // end of namespace drawinglayer /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index 86669834dd6f..693c00f9a02e 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -16,6 +15,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sidebar/PanelFactory.hxx" #include "text/TextPropertyPanel.hxx" #include "paragraph/ParaPropertyPanel.hxx" @@ -37,57 +37,69 @@ #include <vcl/window.hxx> #include <rtl/ref.hxx> #include <comphelper/namedvaluecollection.hxx> -#include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase1.hxx> #include <com/sun/star/ui/XSidebar.hpp> -#include <com/sun/star/ui/XUIElementFactory.hpp> #include <boost/bind.hpp> -#include <boost/noncopyable.hpp> -namespace cssu = ::com::sun::star::uno; + using namespace css; using namespace cssu; -using namespace svx::sidebar; +using ::rtl::OUString; + + +namespace svx { namespace sidebar { -/* Why this is not used ? Doesn't it need to inherit from XServiceInfo ? #define IMPLEMENTATION_NAME "org.apache.openoffice.comp.svx.sidebar.PanelFactory" #define SERVICE_NAME "com.sun.star.ui.UIElementFactory" -*/ -namespace { -typedef ::cppu::WeakComponentImplHelper1 < - css::ui::XUIElementFactory > PanelFactoryInterfaceBase; +::rtl::OUString SAL_CALL PanelFactory::getImplementationName (void) +{ + return OUString(IMPLEMENTATION_NAME); +} + + + + +cssu::Reference<cssu::XInterface> SAL_CALL PanelFactory::createInstance ( + const uno::Reference<lang::XMultiServiceFactory>& rxFactory) +{ + (void)rxFactory; + + ::rtl::Reference<PanelFactory> pPanelFactory (new PanelFactory()); + cssu::Reference<cssu::XInterface> xService (static_cast<XWeak*>(pPanelFactory.get()), cssu::UNO_QUERY); + return xService; +} + + + -class PanelFactory - : private ::boost::noncopyable, - private ::cppu::BaseMutex, - public PanelFactoryInterfaceBase +cssu::Sequence<OUString> SAL_CALL PanelFactory::getSupportedServiceNames (void) { -public: - PanelFactory (void); - virtual ~PanelFactory (void); - - // XUIElementFactory - cssu::Reference<css::ui::XUIElement> SAL_CALL createUIElement ( - const ::rtl::OUString& rsResourceURL, - const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) - throw( - css::container::NoSuchElementException, - css::lang::IllegalArgumentException, - cssu::RuntimeException); -}; + cssu::Sequence<OUString> aServiceNames (1); + aServiceNames[0] = SERVICE_NAME; + return aServiceNames; + +} + + + PanelFactory::PanelFactory (void) : PanelFactoryInterfaceBase(m_aMutex) { } + + + PanelFactory::~PanelFactory (void) { } + + + Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( const ::rtl::OUString& rsResourceURL, const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) @@ -196,18 +208,6 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( return Reference<ui::XUIElement>(); } -} - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new PanelFactory)); - x->acquire(); - return x.get(); -} +} } // end of namespace svx::sidebar -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +// eof diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index c7277546c075..c34384466b6e 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -39,7 +39,8 @@ using namespace ::com::sun::star; -namespace { +namespace svx +{ class FontHeightToolBoxControl; class SvxFontSizeBox_Impl : public FontSizeBox @@ -283,12 +284,18 @@ throw(uno::RuntimeException) OUString SAL_CALL FontHeightToolBoxControl::getImplementationName() throw( uno::RuntimeException ) { - return OUString("com.sun.star.svx.FontHeightToolBoxController"); + return getImplementationName_Static(); } uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( ) throw( uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +uno::Sequence< OUString > FontHeightToolBoxControl::getSupportedServiceNames_Static() +throw() +{ uno::Sequence< OUString > aSNS( 1 ); aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -397,18 +404,12 @@ void FontHeightToolBoxControl::dispatchCommand( } } +uno::Reference< uno::XInterface > SAL_CALL FontHeightToolBoxControl_createInstance( + const uno::Reference< lang::XMultiServiceFactory >& rSMgr ) +{ + return *new FontHeightToolBoxControl( comphelper::getComponentContext(rSMgr) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory( - css::uno::XComponentContext *rxContext, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FontHeightToolBoxControl(rxContext))); - x->acquire(); - return x.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 39e839f352b5..6089e39f5423 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -41,9 +41,8 @@ #include <osl/mutex.hxx> #include <rtl/instance.hxx> -using namespace css; - -namespace { +namespace svx +{ static const char SEARCHITEM_COMMAND[] = "SearchItem.Command"; static const char SEARCHITEM_SEARCHSTRING[] = "SearchItem.SearchString"; @@ -380,7 +379,7 @@ void SAL_CALL FindTextToolbarController::release() throw () // XServiceInfo OUString SAL_CALL FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException ) { - return OUString("com.sun.star.svx.FindTextToolboxController"); + return getImplementationName_Static(); } sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ) @@ -390,6 +389,11 @@ sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& Se css::uno::Sequence< OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > FindTextToolbarController::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -541,9 +545,7 @@ void SAL_CALL UpDownSearchToolboxController::release() throw () // XServiceInfo OUString SAL_CALL UpDownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) { - return meType == UpDownSearchToolboxController::UP? - OUString( "com.sun.star.svx.UpSearchToolboxController" ) : - OUString( "com.sun.star.svx.DownSearchToolboxController" ); + return getImplementationName_Static( meType ); } sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ) @@ -553,6 +555,11 @@ sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString css::uno::Sequence< OUString > SAL_CALL UpDownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > UpDownSearchToolboxController::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -639,7 +646,7 @@ void SAL_CALL MatchCaseToolboxController::release() throw () // XServiceInfo OUString SAL_CALL MatchCaseToolboxController::getImplementationName() throw( css::uno::RuntimeException ) { - return OUString( "com.sun.star.svx.MatchCaseToolboxController" ); + return getImplementationName_Static(); } sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ) @@ -649,6 +656,11 @@ sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > MatchCaseToolboxController::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -745,7 +757,7 @@ void SAL_CALL FindAllToolboxController::release() throw () // XServiceInfo OUString SAL_CALL FindAllToolboxController::getImplementationName() throw( css::uno::RuntimeException ) { - return OUString( "com.sun.star.svx.FindAllToolboxController" ); + return getImplementationName_Static( ); } @@ -756,6 +768,11 @@ sal_Bool SAL_CALL FindAllToolboxController::supportsService( const OUString& Ser css::uno::Sequence< OUString > SAL_CALL FindAllToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > FindAllToolboxController::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -835,9 +852,10 @@ void SAL_CALL ExitSearchToolboxController::release() throw () // XServiceInfo OUString SAL_CALL ExitSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) { - return OUString( "com.sun.star.svx.ExitFindbarToolboxController" ); + return getImplementationName_Static( ); } + sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ) { return cppu::supportsService(this, ServiceName); @@ -845,6 +863,11 @@ sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL ExitSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > ExitSearchToolboxController::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.frame.ToolbarController"; return aSNS; @@ -938,7 +961,7 @@ void SAL_CALL FindbarDispatcher::release() throw() // XServiceInfo OUString SAL_CALL FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException ) { - return OUString("com.sun.star.comp.svx.Impl.FindbarDispatcher"); + return getImplementationName_Static(); } sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ) @@ -948,6 +971,11 @@ sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceNam css::uno::Sequence< OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< OUString > FindbarDispatcher::getSupportedServiceNames_Static() throw() +{ css::uno::Sequence< OUString > aSNS( 2 ); aSNS[0] = "com.sun.star.comp.svx.FindbarDispatcher"; aSNS[1] = "com.sun.star.frame.ProtocolHandler"; @@ -1046,86 +1074,59 @@ void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference { } -} +//----------------------------------------------------------------------------------------------------------- +// create Instance -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_FindTextToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindTextToolbarController(context))); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( + new FindTextToolbarController( comphelper::getComponentContext(rSMgr) ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new ExitSearchToolboxController(context))); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( + new UpDownSearchToolboxController( + comphelper::getComponentContext(rSMgr), UpDownSearchToolboxController::DOWN ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_UpSearchToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController( - context, UpDownSearchToolboxController::UP ))); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( + new UpDownSearchToolboxController( + comphelper::getComponentContext(rSMgr), UpDownSearchToolboxController::UP ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_DownSearchToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController( - context, UpDownSearchToolboxController::DOWN ))); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( + new MatchCaseToolboxController( comphelper::getComponentContext(rSMgr) ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL FindAllToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new MatchCaseToolboxController(context))); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( + new FindAllToolboxController( comphelper::getComponentContext(rSMgr) ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_svx_FindAllToolboxController_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindAllToolboxController(context))); - x->acquire(); - return x.get(); + return *new ExitSearchToolboxController( comphelper::getComponentContext(rSMgr) ); } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindbarDispatcher)); - x->acquire(); - return x.get(); + return static_cast< cppu::OWeakObject * >( new FindbarDispatcher ); +} + +//----------------------------------------------------------------------------------------------------------- } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 365ba925377e..0c83a677b248 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -83,14 +83,15 @@ using namespace ::com::sun::star::document; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; +#include <svx/sdr/contact/viewobjectcontactredirector.hxx> // #i102251# #include <editeng/editstat.hxx> ////////////////////////////////////////////////////////////////////////////// -namespace { - +namespace svx +{ struct ExportSettings { OUString maFilterName; @@ -179,6 +180,26 @@ namespace { SdrModel* mpDoc; }; + SVX_DLLPUBLIC Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & ) + throw( Exception ) + { + return (XWeak*)new GraphicExporter(); + } + + SVX_DLLPUBLIC Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() + throw() + { + Sequence< OUString > aSupportedServiceNames( 1 ); + aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter"; + return aSupportedServiceNames; + } + + SVX_DLLPUBLIC OUString SAL_CALL GraphicExporter_getImplementationName() + throw() + { + return OUString( "com.sun.star.comp.Draw.GraphicExporter" ); + } + /** creates a bitmap that is optionaly transparent from a metafile */ BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, sal_Bool bTransparent, const Size* pSize ) @@ -279,6 +300,7 @@ namespace { return &aOutSize; } +} class ImplExportCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector { @@ -329,7 +351,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec } } -// using namespace ::svx; +using namespace ::svx; GraphicExporter::GraphicExporter() : mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL ) @@ -1202,7 +1224,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon OUString SAL_CALL GraphicExporter::getImplementationName( ) throw(RuntimeException) { - return OUString( "com.sun.star.comp.Draw.GraphicExporter" ); + return GraphicExporter_getImplementationName(); } sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName ) @@ -1214,9 +1236,7 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( ) throw(RuntimeException) { - Sequence< OUString > aSupportedServiceNames( 1 ); - aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter"; - return aSupportedServiceNames; + return GraphicExporter_getSupportedServiceNames(); } // XMimeTypeInfo @@ -1264,8 +1284,6 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( ) thr return aSeq; } -} - Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) { Graphic aGraphic; @@ -1284,16 +1302,4 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) return aGraphic; } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicExporter)); - x->acquire(); - return x.get(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoGraphicExporter.hxx b/svx/source/unodraw/UnoGraphicExporter.hxx new file mode 100644 index 000000000000..864ad2158e67 --- /dev/null +++ b/svx/source/unodraw/UnoGraphicExporter.hxx @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SOURCE_UNODRAW_UNOGRAPHICEXPORTER_HXX +#define INCLUDED_SVX_SOURCE_UNODRAW_UNOGRAPHICEXPORTER_HXX + +#include <com/sun/star/uno/XInterface.hpp> + +namespace svx +{ + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw(); + SVX_DLLPUBLIC OUString SAL_CALL GraphicExporter_getImplementationName() throw(); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index d0c83dcfe6a5..986afe7d8695 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -35,7 +35,8 @@ #include <boost/scoped_ptr.hpp> #include <officecfg/Office/Recovery.hxx> -namespace { +namespace svx +{ namespace svxdr = ::svx::DocRecovery; @@ -56,7 +57,7 @@ RecoveryUI::~RecoveryUI() OUString SAL_CALL RecoveryUI::getImplementationName() throw(css::uno::RuntimeException) { - return OUString("com.sun.star.comp.svx.RecoveryUI"); + return RecoveryUI::st_getImplementationName(); } sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) @@ -68,9 +69,7 @@ sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) css::uno::Sequence< OUString > SAL_CALL RecoveryUI::getSupportedServiceNames() throw(css::uno::RuntimeException) { - css::uno::Sequence< OUString > lServiceNames(1); - lServiceNames[0] = "com.sun.star.dialog.RecoveryUI"; - return lServiceNames; + return RecoveryUI::st_getSupportedServiceNames(); } css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& aURL, @@ -133,6 +132,24 @@ void SAL_CALL RecoveryUI::removeStatusListener(const css::uno::Reference< css::f OSL_FAIL("RecoveryUI::removeStatusListener()\nNot implemented yet!"); } +OUString RecoveryUI::st_getImplementationName() +{ + return OUString("com.sun.star.comp.svx.RecoveryUI"); +} + +css::uno::Sequence< OUString > RecoveryUI::st_getSupportedServiceNames() +{ + css::uno::Sequence< OUString > lServiceNames(1); + lServiceNames[0] = "com.sun.star.dialog.RecoveryUI"; + return lServiceNames; +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL RecoveryUI::st_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) +{ + RecoveryUI* pNew = new RecoveryUI(comphelper::getComponentContext(xSMGR)); + return css::uno::Reference< css::uno::XInterface >(static_cast< css::lang::XServiceInfo* >(pNew)); +} + static OUString GetCrashConfigDir() { @@ -325,17 +342,6 @@ void RecoveryUI::impl_showAllRecoveredDocs() } } -} - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_svx_RecoveryUI_implementation_getFactory( - css::uno::XComponentContext *context, uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new RecoveryUI(context))); - x->acquire(); - return x.get(); -} +} // namespace svx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 76762b9a7efa..6963cf9b52bc 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -20,15 +20,21 @@ #include <unotools/pathoptions.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase2.hxx> + +#include "../customshapes/EnhancedCustomShapeEngine.hxx" + #include <svx/xtable.hxx> +#include "svx/unoshcol.hxx" +#include "recoveryui.hxx" +#include "svx/xmlgrhlp.hxx" +#include "tbunocontroller.hxx" +#include "tbunosearchcontrollers.hxx" using namespace ::com::sun::star; +using namespace ::rtl; using namespace ::cppu; -namespace { - class SvxUnoColorTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo > { private: @@ -43,6 +49,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException); virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( uno::RuntimeException); + static OUString getImplementationName_Static() throw() + { + return OUString("com.sun.star.drawing.SvxUnoColorTable"); + } + + static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw(); + // XNameContainer virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException); virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException); @@ -85,12 +98,17 @@ sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceNam OUString SAL_CALL SvxUnoColorTable::getImplementationName() throw( uno::RuntimeException ) { - return OUString("com.sun.star.drawing.SvxUnoColorTable"); + return OUString("SvxUnoColorTable"); } uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getSupportedServiceNames() throw( uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +uno::Sequence< OUString > SvxUnoColorTable::getSupportedServiceNames_Static(void) throw() +{ uno::Sequence< OUString > aSNS( 1 ); aSNS.getArray()[0] = "com.sun.star.drawing.ColorTable"; return aSNS; @@ -189,18 +207,184 @@ sal_Bool SAL_CALL SvxUnoColorTable::hasElements() return pList.is() && pList->Count() != 0; } +/** + * Create a colortable + */ +uno::Reference< uno::XInterface > SAL_CALL SvxUnoColorTable_createInstance(const uno::Reference< lang::XMultiServiceFactory > & ) throw(uno::Exception) +{ + return *new SvxUnoColorTable(); } +uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( const uno::Reference< lang::XMultiServiceFactory >& rxFact ) throw(uno::Exception) +{ + return *new EnhancedCustomShapeEngine( rxFact ); +} + +// +// export this service +// + +#include "UnoGraphicExporter.hxx" +#include "unogalthemeprovider.hxx" +#include <com/sun/star/registry/XRegistryKey.hpp> +#include "sal/types.h" +#include "osl/diagnose.h" +#include "cppuhelper/factory.hxx" +#include <svx/sdr/primitive2d/primitiveFactory2d.hxx> +#include "sidebar/PanelFactory.hxx" + + +extern "C" +{ -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) +SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory ( + const sal_Char * pImplName, void * pServiceManager, void * ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvxUnoColorTable)); - x->acquire(); - return x.get(); + void * pRet = 0; + if( pServiceManager ) + { + uno::Reference< lang::XSingleServiceFactory > xFactory; + + if( rtl_str_compare( pImplName, "com.sun.star.drawing.SvxUnoColorTable" ) == 0 ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + SvxUnoColorTable::getImplementationName_Static(), + SvxUnoColorTable_createInstance, + SvxUnoColorTable::getSupportedServiceNames_Static() ); + } + else if ( rtl_str_compare( pImplName, "com.sun.star.drawing.EnhancedCustomShapeEngine" ) == 0 ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + EnhancedCustomShapeEngine_getImplementationName(), + create_EnhancedCustomShapeEngine, + EnhancedCustomShapeEngine_getSupportedServiceNames() ); + } + else if( rtl_str_compare( pImplName, "com.sun.star.drawing.SvxShapeCollection" ) == 0 ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + SvxShapeCollection::getImplementationName_Static(), + SvxShapeCollection_createInstance, + SvxShapeCollection::getSupportedServiceNames_Static() ); + } + else if( svx::RecoveryUI::st_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::RecoveryUI::st_getImplementationName(), + svx::RecoveryUI::st_createInstance, + svx::RecoveryUI::st_getSupportedServiceNames() ); + } + else if( svx::GraphicExporter_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::GraphicExporter_getImplementationName(), + svx::GraphicExporter_createInstance, + svx::GraphicExporter_getSupportedServiceNames() ); + } + else if ( svx::FontHeightToolBoxControl::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FontHeightToolBoxControl::getImplementationName_Static(), + svx::FontHeightToolBoxControl_createInstance, + svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() ); + } + else if ( svx::FindTextToolbarController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindTextToolbarController::getImplementationName_Static(), + svx::FindTextToolbarController_createInstance, + svx::FindTextToolbarController::getSupportedServiceNames_Static() ); + } + else if ( svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::DOWN ).equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::DOWN ), + svx::DownSearchToolboxController_createInstance, + svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::UP ).equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::UP ), + svx::UpSearchToolboxController_createInstance, + svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::MatchCaseToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::MatchCaseToolboxController::getImplementationName_Static(), + svx::MatchCaseToolboxController_createInstance, + svx::MatchCaseToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::FindAllToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindAllToolboxController::getImplementationName_Static(), + svx::FindAllToolboxController_createInstance, + svx::FindAllToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::ExitSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::ExitSearchToolboxController::getImplementationName_Static(), + svx::ExitFindbarToolboxController_createInstance, + svx::ExitSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::FindbarDispatcher::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindbarDispatcher::getImplementationName_Static(), + svx::FindbarDispatcher_createInstance, + svx::FindbarDispatcher::getSupportedServiceNames_Static() ); + } + else if( ::unogallery::GalleryThemeProvider_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + ::unogallery::GalleryThemeProvider_getImplementationName(), + ::unogallery::GalleryThemeProvider_createInstance, + ::unogallery::GalleryThemeProvider_getSupportedServiceNames() ); + } + else if( drawinglayer::primitive2d::PrimitiveFactory2D::getImplementationName_Static().equalsAscii( pImplName ) ) + { + // XPrimitiveFactory2D + xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + drawinglayer::primitive2d::PrimitiveFactory2D::getImplementationName_Static(), + drawinglayer::primitive2d::XPrimitiveFactory2DProvider_createInstance, + drawinglayer::primitive2d::PrimitiveFactory2D::getSupportedServiceNames_Static() ); + } + else if( ::svx::SvXMLGraphicImportHelper_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + ::svx::SvXMLGraphicImportHelper_getImplementationName(), + ::svx::SvXMLGraphicImportHelper_createInstance, + ::svx::SvXMLGraphicImportHelper_getSupportedServiceNames() ); + } + else if( ::svx::SvXMLGraphicExportHelper_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + ::svx::SvXMLGraphicExportHelper_getImplementationName(), + ::svx::SvXMLGraphicExportHelper_createInstance, + ::svx::SvXMLGraphicExportHelper_getSupportedServiceNames() ); + } + else if (::svx::sidebar::PanelFactory::getImplementationName().equalsAscii(pImplName)) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast<lang::XMultiServiceFactory*>(pServiceManager), + ::svx::sidebar::PanelFactory::getImplementationName(), + ::svx::sidebar::PanelFactory::createInstance, + ::svx::sidebar::PanelFactory::getSupportedServiceNames()); + } + + if( xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + + return pRet; +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 7e77015129ef..2850e1efb958 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -18,9 +18,8 @@ */ #include <com/sun/star/document/EventObject.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <svx/unoshcol.hxx> +#include "svx/unoshcol.hxx" #include <svx/unoprov.hxx> #include <cppuhelper/supportsservice.hxx> @@ -211,6 +210,11 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException OUString SAL_CALL SvxShapeCollection::getImplementationName() throw( uno::RuntimeException ) { + return getImplementationName_Static(); +} + +OUString SvxShapeCollection::getImplementationName_Static() +{ return OUString("com.sun.star.drawing.SvxShapeCollection"); } @@ -222,22 +226,20 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static() +{ uno::Sequence< OUString > aSeq(2); aSeq.getArray()[0] = "com.sun.star.drawing.Shapes"; aSeq.getArray()[1] = "com.sun.star.drawing.ShapeCollection"; return aSeq; } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_drawing_SvxShapeCollection_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) +Reference< XInterface > SAL_CALL SvxShapeCollection_createInstance( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvxShapeCollection)); - x->acquire(); - return x.get(); + return *( new SvxShapeCollection() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 75049ccc5bab..e5ad2d89002a 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -30,7 +30,38 @@ using namespace ::com::sun::star; -namespace { +namespace unogallery { + +// -------------------- +// - Helper functions - +// -------------------- + +uno::Reference< uno::XInterface > SAL_CALL GalleryThemeProvider_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & ) + throw( uno::Exception ) +{ + return *( new GalleryThemeProvider() ); +} + +// ----------------------------------------------------------------------------- + +uno::Sequence< OUString > SAL_CALL GalleryThemeProvider_getSupportedServiceNames() + throw() +{ + return GalleryThemeProvider::getSupportedServiceNames_Static(); +} + +// ----------------------------------------------------------------------------- + +OUString SAL_CALL GalleryThemeProvider_getImplementationName() + throw() +{ + return GalleryThemeProvider::getImplementationName_Static(); +} + +// ----------------- +// - GalleryThemeProvider - +// ----------------- GalleryThemeProvider::GalleryThemeProvider() : mbHiddenThemes( sal_False ) @@ -46,10 +77,30 @@ GalleryThemeProvider::~GalleryThemeProvider() // ------------------------------------------------------------------------------ +SVX_DLLPUBLIC OUString GalleryThemeProvider::getImplementationName_Static() + throw() +{ + return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" ); +} + +// ------------------------------------------------------------------------------ + +SVX_DLLPUBLIC uno::Sequence< OUString > GalleryThemeProvider::getSupportedServiceNames_Static() + throw() +{ + uno::Sequence< OUString > aSeq( 1 ); + + aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider"; + + return aSeq; +} + +// ------------------------------------------------------------------------------ + OUString SAL_CALL GalleryThemeProvider::getImplementationName() throw( uno::RuntimeException ) { - return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" ); + return getImplementationName_Static(); } // ------------------------------------------------------------------------------ @@ -72,9 +123,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames() throw( uno::RuntimeException ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider"; - return aSeq; + return getSupportedServiceNames_Static(); } // ------------------------------------------------------------------------------ @@ -248,16 +297,4 @@ void SAL_CALL GalleryThemeProvider::removeByName( const OUString& rName ) } -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) -{ - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GalleryThemeProvider)); - x->acquire(); - return x.get(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 4cd46118933e..0509b7c8309e 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <cppuhelper/compbase4.hxx> #include <cppuhelper/supportsservice.hxx> + #include <unotools/ucbstreamhelper.hxx> #include <unotools/streamwrap.hxx> #include <unotools/tempfile.hxx> @@ -53,8 +54,6 @@ using ::com::sun::star::lang::XMultiServiceFactory; #define XML_GRAPHICSTORAGE_NAME "Pictures" #define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:" -namespace { - const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf ) { const MetaCommentAction* pComment = NULL; @@ -347,8 +346,6 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() return maGrfObj; } -} - SvXMLGraphicHelper::SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ) : ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver, ::com::sun::star::document::XBinaryStreamResolver >( maMutex ) @@ -887,9 +884,9 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOut return aRet; } -namespace { - // for instantiation via service manager +namespace svx +{ namespace impl { @@ -1017,8 +1014,8 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName() throw (uno::RuntimeException) { if( m_eGraphicHelperMode == GRAPHICHELPER_MODE_READ ) - return OUString("com.sun.star.comp.Svx.GraphicImportHelper"); - return OUString("com.sun.star.comp.Svx.GraphicExportHelper"); + return SvXMLGraphicImportHelper_getImplementationName(); + return SvXMLGraphicExportHelper_getImplementationName(); } ::sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUString& ServiceName ) @@ -1030,6 +1027,25 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName() Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServiceNames() throw (uno::RuntimeException) { + if( m_eGraphicHelperMode == GRAPHICHELPER_MODE_READ ) + return SvXMLGraphicImportHelper_getSupportedServiceNames(); + return SvXMLGraphicExportHelper_getSupportedServiceNames(); +} + +// import +Reference< XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const Reference< XMultiServiceFactory > & /* rSMgr */ ) + throw( Exception ) +{ + return static_cast< XWeak* >( new SvXMLGraphicImportExportHelper( GRAPHICHELPER_MODE_READ )); +} +OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() + throw() +{ + return OUString( "com.sun.star.comp.Svx.GraphicImportHelper" ); +} +Sequence< OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() + throw() +{ // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service Sequence< OUString > aSupportedServiceNames( 2 ); aSupportedServiceNames[0] = "com.sun.star.document.GraphicObjectResolver"; @@ -1037,56 +1053,27 @@ Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServic return aSupportedServiceNames; } +// export +Reference< XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const Reference< XMultiServiceFactory > & /* rSMgr */ ) + throw( Exception ) +{ + return static_cast< XWeak* >( new SvXMLGraphicImportExportHelper( GRAPHICHELPER_MODE_WRITE )); } - -/** Create this with createInstanceWithArguments. service name - "com.sun.star.comp.Svx.GraphicImportHelper", one argument which is the - XStorage. Without arguments no helper class is created. With an empty - argument the helper class is created and initialized like in the CTOR to - SvXMLGraphicHelper that only gets the create mode. - - You should call dispose after you no longer need this component. - - uses eCreateMode == GRAPHICHELPER_MODE_READ, bDirect == sal_True in - SvXMLGraphicHelper - */ -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) +OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() + throw() { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper( - GRAPHICHELPER_MODE_READ ))); - x->acquire(); - return x.get(); + return OUString( "com.sun.star.comp.Svx.GraphicExportHelper" ); } - -/** Create this with createInstanceWithArguments. service name - "com.sun.star.comp.Svx.GraphicExportHelper", one argument which is the - XStorage. Without arguments no helper class is created. With an empty - argument the helper class is created and initialized like in the CTOR to - SvXMLGraphicHelper that only gets the create mode - - To write the Pictures stream, you have to call dispose at this component. - Make sure you call dipose before you commit the parent storage. - - uses eCreateMode == GRAPHICHELPER_MODE_WRITE, bDirect == sal_True in - SvXMLGraphicHelper - */ - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - uno_Sequence * arguments) +Sequence< OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() + throw() { - assert(arguments != 0 && arguments->nElements == 0); (void) arguments; - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper( - GRAPHICHELPER_MODE_WRITE ))); - x->acquire(); - return x.get(); + // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service + Sequence< OUString > aSupportedServiceNames( 2 ); + aSupportedServiceNames[0] = "com.sun.star.document.GraphicObjectResolver"; + aSupportedServiceNames[1] = "com.sun.star.document.BinaryStreamResolver"; + return aSupportedServiceNames; } +} // namespace svx + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/util/svx.component b/svx/util/svx.component index 848b28e433cf..e5054eb0130c 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -18,62 +18,62 @@ --> <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.gallery.GalleryThemeProvider" - constructor="com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory"> + prefix="svx" xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.Draw.GraphicExporter"> + <service name="com.sun.star.drawing.GraphicExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Svx.GraphicExportHelper"> + <service name="com.sun.star.document.BinaryStreamResolver"/> + <service name="com.sun.star.document.GraphicObjectResolver"/> + </implementation> + <implementation name="com.sun.star.comp.Svx.GraphicImportHelper"> + <service name="com.sun.star.document.BinaryStreamResolver"/> + <service name="com.sun.star.document.GraphicObjectResolver"/> + </implementation> + <implementation name="com.sun.star.comp.gallery.GalleryThemeProvider"> <service name="com.sun.star.gallery.GalleryThemeProvider"/> </implementation> - <implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher" - constructor="com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory"> + <implementation name="com.sun.star.comp.graphic.PrimitiveFactory2D"> + <service name="com.sun.star.graphic.PrimitiveFactory2D"/> + </implementation> + <implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher"> <service name="com.sun.star.comp.svx.FindbarDispatcher"/> <service name="com.sun.star.frame.ProtocolHandler"/> </implementation> - <implementation name="com.sun.star.comp.svx.RecoveryUI" - constructor="com_sun_star_comp_svx_RecoveryUI_implementation_getFactory"> + <implementation name="com.sun.star.comp.svx.RecoveryUI"> <service name="com.sun.star.dialog.RecoveryUI"/> </implementation> - <implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine" - constructor="com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory"> + <implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine"> <service name="com.sun.star.drawing.CustomShapeEngine"/> </implementation> - <implementation name="com.sun.star.drawing.SvxShapeCollection" - constructor="com_sun_star_drawing_SvxShapeCollection_implementation_getFactory"> + <implementation name="com.sun.star.drawing.SvxShapeCollection"> <service name="com.sun.star.drawing.ShapeCollection"/> </implementation> - <implementation name="com.sun.star.drawing.SvxUnoColorTable" - constructor="com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory"> + <implementation name="com.sun.star.drawing.SvxUnoColorTable"> <service name="com.sun.star.drawing.ColorTable"/> </implementation> - <implementation name="com.sun.star.svx.DownSearchToolboxController" - constructor="com_sun_star_svx_DownSearchToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.DownSearchToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.FindTextToolboxController" - constructor="com_sun_star_svx_FindTextToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.FindTextToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.MatchCaseToolboxController" - constructor="com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.MatchCaseToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.FindAllToolboxController" - constructor="com_sun_star_svx_FindAllToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.FindAllToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.FontHeightToolBoxController" - constructor="com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.FontHeightToolBoxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.UpSearchToolboxController" - constructor="com_sun_star_svx_UpSearchToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.UpSearchToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="com.sun.star.svx.ExitFindbarToolboxController" - constructor="com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory"> + <implementation name="com.sun.star.svx.ExitFindbarToolboxController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> - <implementation name="org.apache.openoffice.comp.svx.sidebar.PanelFactory" - constructor="org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory"> + <implementation name="org.apache.openoffice.comp.svx.sidebar.PanelFactory"> <service name="com.sun.star.ui.UIElementFactory"/> </implementation> </component> diff --git a/svx/util/svxcore.component b/svx/util/svxcore.component index 46a18526ce3e..3a9d43c229f9 100644 --- a/svx/util/svxcore.component +++ b/svx/util/svxcore.component @@ -18,24 +18,6 @@ --> <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" prefix="svxcore" xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.Draw.GraphicExporter" - constructor="com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory"> - <service name="com.sun.star.drawing.GraphicExportFilter"/> - </implementation> - <implementation name="com.sun.star.comp.Svx.GraphicExportHelper" - constructor="com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory"> - <service name="com.sun.star.document.BinaryStreamResolver"/> - <service name="com.sun.star.document.GraphicObjectResolver"/> - </implementation> - <implementation name="com.sun.star.comp.Svx.GraphicImportHelper" - constructor="com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory"> - <service name="com.sun.star.document.BinaryStreamResolver"/> - <service name="com.sun.star.document.GraphicObjectResolver"/> - </implementation> - <implementation name="com.sun.star.comp.graphic.PrimitiveFactory2D" - constructor="com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory"> - <service name="com.sun.star.graphic.PrimitiveFactory2D"/> - </implementation> <implementation name="com.sun.star.comp.svx.ExtrusionDepthController"> <service name="com.sun.star.frame.ToolbarController"/> </implementation> |