Kaydet (Commit) 4a969ac3 authored tarafından Matúš Kukan's avatar Matúš Kukan

svx: split into direct implementation getFactories

Change-Id: I888f10a923dc2b97247b2a66cc6bd116eee280a7
üst 296b1e76
...@@ -109,6 +109,24 @@ void * com_sun_star_comp_stoc_SimpleRegistry( void * , void * ); ...@@ -109,6 +109,24 @@ void * com_sun_star_comp_stoc_SimpleRegistry( void * , void * );
void * com_sun_star_extensions_xml_sax_Writer( 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_AccessController( void * , void * );
void * com_sun_star_security_comp_stoc_FilePolicy( 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 #ifdef __cplusplus
} }
......
...@@ -69,7 +69,6 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); ...@@ -69,7 +69,6 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void);
{ "libspelllo.a", spell_component_getFactory }, \ { "libspelllo.a", spell_component_getFactory }, \
{ "libsvllo.a", svl_component_getFactory }, \ { "libsvllo.a", svl_component_getFactory }, \
{ "libsvtlo.a", svt_component_getFactory }, \ { "libsvtlo.a", svt_component_getFactory }, \
{ "libsvxlo.a", svx_component_getFactory }, \
{ "libtklo.a", tk_component_getFactory }, \ { "libtklo.a", tk_component_getFactory }, \
{ "libucb1.a", ucb_component_getFactory }, \ { "libucb1.a", ucb_component_getFactory }, \
{ "libucpexpand1lo.a", ucpexpand1_component_getFactory }, \ { "libucpexpand1lo.a", ucpexpand1_component_getFactory }, \
...@@ -135,8 +134,11 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); ...@@ -135,8 +134,11 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void);
{ "libwpftwriterlo.a", wpftwriter_component_getFactory }, \ { "libwpftwriterlo.a", wpftwriter_component_getFactory }, \
#define NON_APP_SPECIFIC_CONSTRUCTOR_MAP \ #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_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_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_DLLComponentLoader", com_sun_star_comp_stoc_DLLComponentLoader }, \
{ "com_sun_star_comp_stoc_ImplementationRegistration", com_sun_star_comp_stoc_ImplementationRegistration }, \ { "com_sun_star_comp_stoc_ImplementationRegistration", com_sun_star_comp_stoc_ImplementationRegistration }, \
{ "com_sun_star_comp_stoc_NestedRegistry", com_sun_star_comp_stoc_NestedRegistry }, \ { "com_sun_star_comp_stoc_NestedRegistry", com_sun_star_comp_stoc_NestedRegistry }, \
...@@ -144,9 +146,27 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); ...@@ -144,9 +146,27 @@ 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_OServiceManager", com_sun_star_comp_stoc_OServiceManager }, \
{ "com_sun_star_comp_stoc_OServiceManagerWrapper", com_sun_star_comp_stoc_OServiceManagerWrapper }, \ { "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_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_AccessController", com_sun_star_security_comp_stoc_AccessController }, \
{ "com_sun_star_security_comp_stoc_FilePolicy", com_sun_star_security_comp_stoc_FilePolicy }, \ { "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 */ #endif /* DISABLE_DYNLOADING */
......
/* -*- 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: */
...@@ -81,11 +81,8 @@ public: ...@@ -81,11 +81,8 @@ public:
virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); 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 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); 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 #endif
......
...@@ -119,42 +119,6 @@ public: ...@@ -119,42 +119,6 @@ public:
virtual OUString SAL_CALL resolveOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rxBinaryStream ) throw (::com::sun::star::uno::RuntimeException); 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 #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*
* 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
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
namespace svx namespace {
{
class SvxFontSizeBox_Impl; class SvxFontSizeBox_Impl;
class FontHeightToolBoxControl : public svt::ToolboxController, class FontHeightToolBoxControl : public svt::ToolboxController,
...@@ -47,13 +46,6 @@ class FontHeightToolBoxControl : public svt::ToolboxController, ...@@ -47,13 +46,6 @@ class FontHeightToolBoxControl : public svt::ToolboxController,
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
...@@ -75,8 +67,6 @@ class FontHeightToolBoxControl : public svt::ToolboxController, ...@@ -75,8 +67,6 @@ class FontHeightToolBoxControl : public svt::ToolboxController,
::com::sun::star::awt::FontDescriptor m_aCurrentFont; ::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 #endif // INCLUDED_SVX_INC_TBUNOCONTROLLER_HXX
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
namespace svx namespace {
{
class FindTextFieldControl : public ComboBox class FindTextFieldControl : public ComboBox
{ {
...@@ -105,13 +104,6 @@ public: ...@@ -105,13 +104,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
...@@ -153,13 +145,6 @@ public: ...@@ -153,13 +145,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
...@@ -192,14 +177,6 @@ public: ...@@ -192,14 +177,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
...@@ -233,13 +210,6 @@ public: ...@@ -233,13 +210,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
...@@ -274,13 +244,6 @@ public: ...@@ -274,13 +244,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
...@@ -317,13 +280,6 @@ public: ...@@ -317,13 +280,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException ); 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 ); 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 // XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException );
...@@ -342,15 +298,6 @@ private: ...@@ -342,15 +298,6 @@ 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 #endif // INCLUDED_SVX_INC_TBUNOSEARCHCONTROLLERS_HXX
......
...@@ -47,24 +47,10 @@ ...@@ -47,24 +47,10 @@
using namespace css; using namespace css;
using namespace css::uno; using namespace css::uno;
// - EnhancedCustomShapeEngine - namespace {
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 ) : // - EnhancedCustomShapeEngine -
mxFact ( rxMgr ), EnhancedCustomShapeEngine::EnhancedCustomShapeEngine() :
mbForceGroupWithText ( sal_False ) mbForceGroupWithText ( sal_False )
{ {
} }
...@@ -109,7 +95,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg ...@@ -109,7 +95,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg
OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName() OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName()
throw( RuntimeException ) throw( RuntimeException )
{ {
return EnhancedCustomShapeEngine_getImplementationName(); return OUString( "com.sun.star.drawing.EnhancedCustomShapeEngine" );
} }
sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName ) sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName )
throw( RuntimeException ) throw( RuntimeException )
...@@ -119,7 +105,10 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS ...@@ -119,7 +105,10 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS
Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return EnhancedCustomShapeEngine_getSupportedServiceNames(); Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
pArray[0] = "com.sun.star.drawing.CustomShapeEngine";
return aRet;
} }
// XCustomShapeEngine ----------------------------------------------------------- // XCustomShapeEngine -----------------------------------------------------------
...@@ -444,4 +433,18 @@ Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShap ...@@ -444,4 +433,18 @@ Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShap
return aSeq; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
class SdrObject; class SdrObject;
class SdrObjCustomShape; class SdrObjCustomShape;
namespace {
class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3 class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3
< <
css::lang::XInitialization, css::lang::XInitialization,
...@@ -47,14 +49,13 @@ class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3 ...@@ -47,14 +49,13 @@ class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3
css::drawing::XCustomShapeEngine css::drawing::XCustomShapeEngine
> >
{ {
css::uno::Reference< css::lang::XMultiServiceFactory > mxFact;
css::uno::Reference< css::drawing::XShape > mxShape; css::uno::Reference< css::drawing::XShape > mxShape;
sal_Bool mbForceGroupWithText; sal_Bool mbForceGroupWithText;
SdrObject* ImplForceGroupWithText( const SdrObjCustomShape* pCustoObj, SdrObject* pRenderedShape ); SdrObject* ImplForceGroupWithText( const SdrObjCustomShape* pCustoObj, SdrObject* pRenderedShape );
public: public:
EnhancedCustomShapeEngine( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); EnhancedCustomShapeEngine();
virtual ~EnhancedCustomShapeEngine(); virtual ~EnhancedCustomShapeEngine();
// XInterface // XInterface
...@@ -84,12 +85,7 @@ public: ...@@ -84,12 +85,7 @@ public:
throw ( css::uno::RuntimeException ); 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 #endif
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "sidebar/PanelFactory.hxx"
#include "GalleryControl.hxx" #include "GalleryControl.hxx"
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include "docrecovery.hxx" #include "docrecovery.hxx"
namespace svx namespace {
{
namespace svxdr = ::svx::DocRecovery; namespace svxdr = ::svx::DocRecovery;
...@@ -109,13 +108,6 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo ...@@ -109,13 +108,6 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
const css::util::URL& aURL ) const css::util::URL& aURL )
throw(css::uno::RuntimeException); 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 // helper
private: private:
...@@ -132,7 +124,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo ...@@ -132,7 +124,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
}; };
} // namespace svx }
#endif // INCLUDED_SVX_SOURCE_INC_RECOVERYUI_HXX #endif // INCLUDED_SVX_SOURCE_INC_RECOVERYUI_HXX
......
...@@ -25,19 +25,9 @@ ...@@ -25,19 +25,9 @@
#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/gallery/XGalleryThemeProvider.hpp> #include <com/sun/star/gallery/XGalleryThemeProvider.hpp>
#include <svx/svxdllapi.h>
class Gallery; class Gallery;
namespace unogallery { namespace {
// -------------------------
// - 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 - // - GalleryThemes -
...@@ -51,9 +41,6 @@ public: ...@@ -51,9 +41,6 @@ public:
GalleryThemeProvider(); GalleryThemeProvider();
~GalleryThemeProvider(); ~GalleryThemeProvider();
SVX_DLLPUBLIC static OUString getImplementationName_Static() throw();
SVX_DLLPUBLIC static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
protected: protected:
// XServiceInfo // XServiceInfo
......
...@@ -17,43 +17,29 @@ ...@@ -17,43 +17,29 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <svx/sdr/primitive2d/primitiveFactory2d.hxx> #include <com/sun/star/graphic/XPrimitiveFactory2D.hpp>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <svx/svdobj.hxx> #include <svx/svdobj.hxx>
#include <svx/svdpage.hxx> #include <svx/svdpage.hxx>
#include <svx/unoapi.hxx> #include <svx/unoapi.hxx>
#include <svx/sdr/contact/viewcontact.hxx> #include <svx/sdr/contact/viewcontact.hxx>
//////////////////////////////////////////////////////////////////////////////
using namespace com::sun::star; using namespace com::sun::star;
////////////////////////////////////////////////////////////////////////////// namespace {
// UNO API helper methods
namespace drawinglayer
{
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
////////////////////////////////////////////////////////////////////////////// typedef cppu::WeakComponentImplHelper1< graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase;
// UNO API helper methods
namespace drawinglayer // base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D
class PrimitiveFactory2D: protected comphelper::OBaseMutex, public PrimitiveFactory2DImplBase
{ {
namespace primitive2d public:
{ PrimitiveFactory2D(): PrimitiveFactory2DImplBase(m_aMutex) {}
PrimitiveFactory2D::PrimitiveFactory2D()
: PrimitiveFactory2DImplBase(m_aMutex) // 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);
};
Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXShape( Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXShape(
const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShape >& xShape,
...@@ -96,27 +82,18 @@ namespace drawinglayer ...@@ -96,27 +82,18 @@ namespace drawinglayer
return aRetval; 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 );
if(!aSeq.getLength()) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
{ com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory(
aSeq.realloc(1L); SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
aSeq[0] = "com.sun.star.graphic.PrimitiveFactory2D"; uno_Sequence * arguments)
} {
assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
return aSeq; css::uno::Reference<css::uno::XInterface> x(
} static_cast<cppu::OWeakObject *>(new PrimitiveFactory2D));
} // end of namespace primitive2d x->acquire();
} // end of namespace drawinglayer return x.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -15,7 +16,6 @@ ...@@ -15,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "sidebar/PanelFactory.hxx"
#include "text/TextPropertyPanel.hxx" #include "text/TextPropertyPanel.hxx"
#include "paragraph/ParaPropertyPanel.hxx" #include "paragraph/ParaPropertyPanel.hxx"
...@@ -37,69 +37,57 @@ ...@@ -37,69 +37,57 @@
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <comphelper/namedvaluecollection.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/XSidebar.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
namespace cssu = ::com::sun::star::uno;
using namespace css; using namespace css;
using namespace cssu; using namespace cssu;
using ::rtl::OUString; using namespace svx::sidebar;
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 IMPLEMENTATION_NAME "org.apache.openoffice.comp.svx.sidebar.PanelFactory"
#define SERVICE_NAME "com.sun.star.ui.UIElementFactory" #define SERVICE_NAME "com.sun.star.ui.UIElementFactory"
*/
namespace {
::rtl::OUString SAL_CALL PanelFactory::getImplementationName (void) typedef ::cppu::WeakComponentImplHelper1 <
{ css::ui::XUIElementFactory > PanelFactoryInterfaceBase;
return OUString(IMPLEMENTATION_NAME);
}
cssu::Reference<cssu::XInterface> SAL_CALL PanelFactory::createInstance ( class PanelFactory
const uno::Reference<lang::XMultiServiceFactory>& rxFactory) : private ::boost::noncopyable,
private ::cppu::BaseMutex,
public PanelFactoryInterfaceBase
{ {
(void)rxFactory; public:
PanelFactory (void);
::rtl::Reference<PanelFactory> pPanelFactory (new PanelFactory()); virtual ~PanelFactory (void);
cssu::Reference<cssu::XInterface> xService (static_cast<XWeak*>(pPanelFactory.get()), cssu::UNO_QUERY);
return xService;
}
cssu::Sequence<OUString> SAL_CALL PanelFactory::getSupportedServiceNames (void)
{
cssu::Sequence<OUString> aServiceNames (1);
aServiceNames[0] = SERVICE_NAME;
return aServiceNames;
}
// 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);
};
PanelFactory::PanelFactory (void) PanelFactory::PanelFactory (void)
: PanelFactoryInterfaceBase(m_aMutex) : PanelFactoryInterfaceBase(m_aMutex)
{ {
} }
PanelFactory::~PanelFactory (void) PanelFactory::~PanelFactory (void)
{ {
} }
Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
const ::rtl::OUString& rsResourceURL, const ::rtl::OUString& rsResourceURL,
const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) const ::cssu::Sequence<css::beans::PropertyValue>& rArguments)
...@@ -208,6 +196,18 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( ...@@ -208,6 +196,18 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
return Reference<ui::XUIElement>(); return Reference<ui::XUIElement>();
} }
} } // end of namespace svx::sidebar }
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();
}
// eof /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
namespace svx namespace {
{
class FontHeightToolBoxControl; class FontHeightToolBoxControl;
class SvxFontSizeBox_Impl : public FontSizeBox class SvxFontSizeBox_Impl : public FontSizeBox
...@@ -284,17 +283,11 @@ throw(uno::RuntimeException) ...@@ -284,17 +283,11 @@ throw(uno::RuntimeException)
OUString SAL_CALL FontHeightToolBoxControl::getImplementationName() OUString SAL_CALL FontHeightToolBoxControl::getImplementationName()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
return getImplementationName_Static(); return OUString("com.sun.star.svx.FontHeightToolBoxController");
} }
uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( ) uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
}
uno::Sequence< OUString > FontHeightToolBoxControl::getSupportedServiceNames_Static()
throw()
{ {
uno::Sequence< OUString > aSNS( 1 ); uno::Sequence< OUString > aSNS( 1 );
aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController";
...@@ -404,12 +397,18 @@ void FontHeightToolBoxControl::dispatchCommand( ...@@ -404,12 +397,18 @@ 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -83,15 +83,14 @@ using namespace ::com::sun::star::document; ...@@ -83,15 +83,14 @@ using namespace ::com::sun::star::document;
using namespace ::com::sun::star::frame; using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::task; using namespace ::com::sun::star::task;
#include <svx/sdr/contact/viewobjectcontactredirector.hxx>
// #i102251# // #i102251#
#include <editeng/editstat.hxx> #include <editeng/editstat.hxx>
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
namespace svx namespace {
{
struct ExportSettings struct ExportSettings
{ {
OUString maFilterName; OUString maFilterName;
...@@ -180,26 +179,6 @@ namespace svx ...@@ -180,26 +179,6 @@ namespace svx
SdrModel* mpDoc; 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 /** creates a bitmap that is optionaly transparent from a metafile
*/ */
BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, sal_Bool bTransparent, const Size* pSize ) BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, sal_Bool bTransparent, const Size* pSize )
...@@ -300,7 +279,6 @@ namespace svx ...@@ -300,7 +279,6 @@ namespace svx
return &aOutSize; return &aOutSize;
} }
}
class ImplExportCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector class ImplExportCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector
{ {
...@@ -351,7 +329,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec ...@@ -351,7 +329,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec
} }
} }
using namespace ::svx; // using namespace ::svx;
GraphicExporter::GraphicExporter() GraphicExporter::GraphicExporter()
: mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL ) : mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL )
...@@ -1224,7 +1202,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon ...@@ -1224,7 +1202,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
OUString SAL_CALL GraphicExporter::getImplementationName( ) OUString SAL_CALL GraphicExporter::getImplementationName( )
throw(RuntimeException) throw(RuntimeException)
{ {
return GraphicExporter_getImplementationName(); return OUString( "com.sun.star.comp.Draw.GraphicExporter" );
} }
sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName )
...@@ -1236,7 +1214,9 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName ...@@ -1236,7 +1214,9 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName
Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( ) Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( )
throw(RuntimeException) throw(RuntimeException)
{ {
return GraphicExporter_getSupportedServiceNames(); Sequence< OUString > aSupportedServiceNames( 1 );
aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter";
return aSupportedServiceNames;
} }
// XMimeTypeInfo // XMimeTypeInfo
...@@ -1284,6 +1264,8 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( ) thr ...@@ -1284,6 +1264,8 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( ) thr
return aSeq; return aSeq;
} }
}
Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
{ {
Graphic aGraphic; Graphic aGraphic;
...@@ -1302,4 +1284,16 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) ...@@ -1302,4 +1284,16 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
return aGraphic; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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: */
...@@ -35,8 +35,7 @@ ...@@ -35,8 +35,7 @@
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <officecfg/Office/Recovery.hxx> #include <officecfg/Office/Recovery.hxx>
namespace svx namespace {
{
namespace svxdr = ::svx::DocRecovery; namespace svxdr = ::svx::DocRecovery;
...@@ -57,7 +56,7 @@ RecoveryUI::~RecoveryUI() ...@@ -57,7 +56,7 @@ RecoveryUI::~RecoveryUI()
OUString SAL_CALL RecoveryUI::getImplementationName() OUString SAL_CALL RecoveryUI::getImplementationName()
throw(css::uno::RuntimeException) throw(css::uno::RuntimeException)
{ {
return RecoveryUI::st_getImplementationName(); return OUString("com.sun.star.comp.svx.RecoveryUI");
} }
sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName)
...@@ -69,7 +68,9 @@ sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName) ...@@ -69,7 +68,9 @@ sal_Bool SAL_CALL RecoveryUI::supportsService(const OUString& sServiceName)
css::uno::Sequence< OUString > SAL_CALL RecoveryUI::getSupportedServiceNames() css::uno::Sequence< OUString > SAL_CALL RecoveryUI::getSupportedServiceNames()
throw(css::uno::RuntimeException) throw(css::uno::RuntimeException)
{ {
return RecoveryUI::st_getSupportedServiceNames(); css::uno::Sequence< OUString > lServiceNames(1);
lServiceNames[0] = "com.sun.star.dialog.RecoveryUI";
return lServiceNames;
} }
css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& aURL, css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& aURL,
...@@ -132,24 +133,6 @@ void SAL_CALL RecoveryUI::removeStatusListener(const css::uno::Reference< css::f ...@@ -132,24 +133,6 @@ void SAL_CALL RecoveryUI::removeStatusListener(const css::uno::Reference< css::f
OSL_FAIL("RecoveryUI::removeStatusListener()\nNot implemented yet!"); 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() static OUString GetCrashConfigDir()
{ {
...@@ -342,6 +325,17 @@ void RecoveryUI::impl_showAllRecoveredDocs() ...@@ -342,6 +325,17 @@ void RecoveryUI::impl_showAllRecoveredDocs()
} }
} }
} // namespace svx }
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();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
*/ */
#include <com/sun/star/document/EventObject.hpp> #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 <svx/unoprov.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
...@@ -209,11 +210,6 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException ...@@ -209,11 +210,6 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException
// XServiceInfo // XServiceInfo
OUString SAL_CALL SvxShapeCollection::getImplementationName() OUString SAL_CALL SvxShapeCollection::getImplementationName()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{
return getImplementationName_Static();
}
OUString SvxShapeCollection::getImplementationName_Static()
{ {
return OUString("com.sun.star.drawing.SvxShapeCollection"); return OUString("com.sun.star.drawing.SvxShapeCollection");
} }
...@@ -225,11 +221,6 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa ...@@ -225,11 +221,6 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa
} }
uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
}
uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static()
{ {
uno::Sequence< OUString > aSeq(2); uno::Sequence< OUString > aSeq(2);
aSeq.getArray()[0] = "com.sun.star.drawing.Shapes"; aSeq.getArray()[0] = "com.sun.star.drawing.Shapes";
...@@ -237,9 +228,16 @@ uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static() ...@@ -237,9 +228,16 @@ uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static()
return aSeq; return aSeq;
} }
Reference< XInterface > SAL_CALL SvxShapeCollection_createInstance( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) 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)
{ {
return *( new SvxShapeCollection() ); 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();
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -30,38 +30,7 @@ ...@@ -30,38 +30,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
namespace unogallery { namespace {
// --------------------
// - 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() : GalleryThemeProvider::GalleryThemeProvider() :
mbHiddenThemes( sal_False ) mbHiddenThemes( sal_False )
...@@ -77,30 +46,10 @@ GalleryThemeProvider::~GalleryThemeProvider() ...@@ -77,30 +46,10 @@ 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() OUString SAL_CALL GalleryThemeProvider::getImplementationName()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
return getImplementationName_Static(); return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" );
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
...@@ -123,7 +72,9 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service ...@@ -123,7 +72,9 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service
uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
return getSupportedServiceNames_Static(); uno::Sequence< OUString > aSeq( 1 );
aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider";
return aSeq;
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
...@@ -297,4 +248,16 @@ void SAL_CALL GalleryThemeProvider::removeByName( const OUString& rName ) ...@@ -297,4 +248,16 @@ 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/compbase4.hxx> #include <cppuhelper/compbase4.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx> #include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx> #include <unotools/tempfile.hxx>
...@@ -54,6 +53,8 @@ using ::com::sun::star::lang::XMultiServiceFactory; ...@@ -54,6 +53,8 @@ using ::com::sun::star::lang::XMultiServiceFactory;
#define XML_GRAPHICSTORAGE_NAME "Pictures" #define XML_GRAPHICSTORAGE_NAME "Pictures"
#define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:" #define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:"
namespace {
const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf ) const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf )
{ {
const MetaCommentAction* pComment = NULL; const MetaCommentAction* pComment = NULL;
...@@ -346,6 +347,8 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() ...@@ -346,6 +347,8 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
return maGrfObj; return maGrfObj;
} }
}
SvXMLGraphicHelper::SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ) : SvXMLGraphicHelper::SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ) :
::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver, ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver,
::com::sun::star::document::XBinaryStreamResolver >( maMutex ) ::com::sun::star::document::XBinaryStreamResolver >( maMutex )
...@@ -884,9 +887,9 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOut ...@@ -884,9 +887,9 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOut
return aRet; return aRet;
} }
namespace {
// for instantiation via service manager // for instantiation via service manager
namespace svx
{
namespace impl namespace impl
{ {
...@@ -1014,8 +1017,8 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName() ...@@ -1014,8 +1017,8 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName()
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
if( m_eGraphicHelperMode == GRAPHICHELPER_MODE_READ ) if( m_eGraphicHelperMode == GRAPHICHELPER_MODE_READ )
return SvXMLGraphicImportHelper_getImplementationName(); return OUString("com.sun.star.comp.Svx.GraphicImportHelper");
return SvXMLGraphicExportHelper_getImplementationName(); return OUString("com.sun.star.comp.Svx.GraphicExportHelper");
} }
::sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUString& ServiceName ) ::sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUString& ServiceName )
...@@ -1026,25 +1029,6 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName() ...@@ -1026,25 +1029,6 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName()
Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServiceNames() Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServiceNames()
throw (uno::RuntimeException) 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 // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service
Sequence< OUString > aSupportedServiceNames( 2 ); Sequence< OUString > aSupportedServiceNames( 2 );
...@@ -1053,27 +1037,56 @@ Sequence< OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames( ...@@ -1053,27 +1037,56 @@ Sequence< OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames(
return aSupportedServiceNames; return aSupportedServiceNames;
} }
// export
Reference< XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const Reference< XMultiServiceFactory > & /* rSMgr */ )
throw( Exception )
{
return static_cast< XWeak* >( new SvXMLGraphicImportExportHelper( GRAPHICHELPER_MODE_WRITE ));
} }
OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName()
throw() /** 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)
{ {
return OUString( "com.sun.star.comp.Svx.GraphicExportHelper" ); 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();
} }
Sequence< OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames()
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
*/
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)
{ {
// XGraphicObjectResolver and XBinaryStreamResolver are not part of any service assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
Sequence< OUString > aSupportedServiceNames( 2 ); css::uno::Reference<css::uno::XInterface> x(
aSupportedServiceNames[0] = "com.sun.star.document.GraphicObjectResolver"; static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper(
aSupportedServiceNames[1] = "com.sun.star.document.BinaryStreamResolver"; GRAPHICHELPER_MODE_WRITE )));
return aSupportedServiceNames; x->acquire();
return x.get();
} }
} // namespace svx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -18,62 +18,80 @@ ...@@ -18,62 +18,80 @@
--> -->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="svx" xmlns="http://openoffice.org/2010/uno-components"> xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.Draw.GraphicExporter"> <implementation name="com.sun.star.comp.Draw.GraphicExporter"
constructor="com_sun_star_comp_Draw_GraphicExporter_implementation_getFactory">
<service name="com.sun.star.drawing.GraphicExportFilter"/> <service name="com.sun.star.drawing.GraphicExportFilter"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.Svx.GraphicExportHelper"> <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.BinaryStreamResolver"/>
<service name="com.sun.star.document.GraphicObjectResolver"/> <service name="com.sun.star.document.GraphicObjectResolver"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.Svx.GraphicImportHelper"> <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.BinaryStreamResolver"/>
<service name="com.sun.star.document.GraphicObjectResolver"/> <service name="com.sun.star.document.GraphicObjectResolver"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.gallery.GalleryThemeProvider"> <implementation name="com.sun.star.comp.gallery.GalleryThemeProvider"
constructor="com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory">
<service name="com.sun.star.gallery.GalleryThemeProvider"/> <service name="com.sun.star.gallery.GalleryThemeProvider"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.graphic.PrimitiveFactory2D"> <implementation name="com.sun.star.comp.graphic.PrimitiveFactory2D"
constructor="com_sun_star_comp_graphic_PrimitiveFactory2D_implementation_getFactory">
<service name="com.sun.star.graphic.PrimitiveFactory2D"/> <service name="com.sun.star.graphic.PrimitiveFactory2D"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher"> <implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher"
constructor="com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory">
<service name="com.sun.star.comp.svx.FindbarDispatcher"/> <service name="com.sun.star.comp.svx.FindbarDispatcher"/>
<service name="com.sun.star.frame.ProtocolHandler"/> <service name="com.sun.star.frame.ProtocolHandler"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.svx.RecoveryUI"> <implementation name="com.sun.star.comp.svx.RecoveryUI"
constructor="com_sun_star_comp_svx_RecoveryUI_implementation_getFactory">
<service name="com.sun.star.dialog.RecoveryUI"/> <service name="com.sun.star.dialog.RecoveryUI"/>
</implementation> </implementation>
<implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine"> <implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine"
constructor="com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory">
<service name="com.sun.star.drawing.CustomShapeEngine"/> <service name="com.sun.star.drawing.CustomShapeEngine"/>
</implementation> </implementation>
<implementation name="com.sun.star.drawing.SvxShapeCollection"> <implementation name="com.sun.star.drawing.SvxShapeCollection"
constructor="com_sun_star_drawing_SvxShapeCollection_implementation_getFactory">
<service name="com.sun.star.drawing.ShapeCollection"/> <service name="com.sun.star.drawing.ShapeCollection"/>
</implementation> </implementation>
<implementation name="com.sun.star.drawing.SvxUnoColorTable"> <implementation name="com.sun.star.drawing.SvxUnoColorTable"
constructor="com_sun_star_drawing_SvxUnoColorTable_implementation_getFactory">
<service name="com.sun.star.drawing.ColorTable"/> <service name="com.sun.star.drawing.ColorTable"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.DownSearchToolboxController"> <implementation name="com.sun.star.svx.DownSearchToolboxController"
constructor="com_sun_star_svx_DownSearchToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.FindTextToolboxController"> <implementation name="com.sun.star.svx.FindTextToolboxController"
constructor="com_sun_star_svx_FindTextToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.MatchCaseToolboxController"> <implementation name="com.sun.star.svx.MatchCaseToolboxController"
constructor="com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.FindAllToolboxController"> <implementation name="com.sun.star.svx.FindAllToolboxController"
constructor="com_sun_star_svx_FindAllToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.FontHeightToolBoxController"> <implementation name="com.sun.star.svx.FontHeightToolBoxController"
constructor="com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.UpSearchToolboxController"> <implementation name="com.sun.star.svx.UpSearchToolboxController"
constructor="com_sun_star_svx_UpSearchToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.ExitFindbarToolboxController"> <implementation name="com.sun.star.svx.ExitFindbarToolboxController"
constructor="com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="org.apache.openoffice.comp.svx.sidebar.PanelFactory"> <implementation name="org.apache.openoffice.comp.svx.sidebar.PanelFactory"
constructor="org_apache_openoffice_comp_svx_sidebar_PanelFactory_implementation_getFactory">
<service name="com.sun.star.ui.UIElementFactory"/> <service name="com.sun.star.ui.UIElementFactory"/>
</implementation> </implementation>
</component> </component>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment