diff options
-rw-r--r-- | sc/inc/ScPanelFactory.hxx | 5 | ||||
-rw-r--r-- | sc/inc/afmtuno.hxx | 8 | ||||
-rw-r--r-- | sc/inc/appluno.hxx | 54 | ||||
-rw-r--r-- | sc/inc/filtuno.hxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 187 | ||||
-rw-r--r-- | sc/source/ui/sidebar/ScPanelFactory.cxx | 36 | ||||
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 21 | ||||
-rw-r--r-- | sc/source/ui/unoobj/appluno.cxx | 104 | ||||
-rw-r--r-- | sc/source/ui/unoobj/filtuno.cxx | 21 | ||||
-rw-r--r-- | sc/util/sc.component | 39 |
10 files changed, 72 insertions, 411 deletions
diff --git a/sc/inc/ScPanelFactory.hxx b/sc/inc/ScPanelFactory.hxx index 8f81d3833f32..517d526e134b 100644 --- a/sc/inc/ScPanelFactory.hxx +++ b/sc/inc/ScPanelFactory.hxx @@ -42,11 +42,6 @@ class ScPanelFactory public PanelFactoryInterfaceBase { public: - static ::rtl::OUString SAL_CALL getImplementationName_static(); - static css::uno::Reference<css::uno::XInterface> SAL_CALL createInstance( - const css::uno::Reference<css::lang::XMultiServiceFactory>& rxFactory); - static css::uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_static(); - ScPanelFactory(); virtual ~ScPanelFactory(); diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx index 5e1da0e50433..ca2b53205460 100644 --- a/sc/inc/afmtuno.hxx +++ b/sc/inc/afmtuno.hxx @@ -44,11 +44,6 @@ class ScAutoFormatObj; #define SC_AFMTOBJ_INVALID USHRT_MAX -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - ScAutoFormatsObj_CreateInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& ); - class ScAutoFormatsObj : public ::cppu::WeakImplHelper4< ::com::sun::star::container::XNameContainer, ::com::sun::star::container::XEnumerationAccess, @@ -63,9 +58,6 @@ public: ScAutoFormatsObj(); virtual ~ScAutoFormatsObj(); - static OUString getImplementationName_Static(); - static ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_Static(); - // XNameContainer virtual void SAL_CALL insertByName( const OUString& aName, const ::com::sun::star::uno::Any& aElement ) diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx index 662b028ebf92..982536a4d8d1 100644 --- a/sc/inc/appluno.hxx +++ b/sc/inc/appluno.hxx @@ -76,60 +76,6 @@ OUString SAL_CALL ScXMLImport_Settings_getImplementationName() throw(); css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLImport_Settings_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) throw( css::uno::Exception ); -// Calc XML export -css::uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOOoExport_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOOoExport_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Meta_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOOoExport_Meta_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOOoExport_Meta_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Styles_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOOoExport_Styles_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOOoExport_Styles_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Content_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOOoExport_Content_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOOoExport_Content_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Settings_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOOoExport_Settings_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOOoExport_Settings_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw( css::uno::Exception, std::exception ); - -// Calc XML Oasis export -css::uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOasisExport_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOasisExport_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Meta_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOasisExport_Meta_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOasisExport_Meta_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Styles_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOasisExport_Styles_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOasisExport_Styles_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw( css::uno::Exception, std::exception ); -css::uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Content_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOasisExport_Content_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOasisExport_Content_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); -css::uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Settings_getSupportedServiceNames() throw(); -OUString SAL_CALL ScXMLOasisExport_Settings_getImplementationName() throw(); -css::uno::Reference< css::uno::XInterface > SAL_CALL ScXMLOasisExport_Settings_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr ) - throw (css::uno::Exception, std::exception); - class ScSpreadsheetSettings : public cppu::WeakImplHelper3< com::sun::star::sheet::XGlobalSheetSettings, com::sun::star::beans::XPropertySet, diff --git a/sc/inc/filtuno.hxx b/sc/inc/filtuno.hxx index 5b8969b172f6..a3126db578ee 100644 --- a/sc/inc/filtuno.hxx +++ b/sc/inc/filtuno.hxx @@ -33,11 +33,6 @@ namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } } -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - ScFilterOptionsObj_CreateInstance( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& ); - class ScFilterOptionsObj : public ::cppu::WeakImplHelper5< ::com::sun::star::beans::XPropertyAccess, ::com::sun::star::ui::dialogs::XExecutableDialog, @@ -56,9 +51,6 @@ public: ScFilterOptionsObj(); virtual ~ScFilterOptionsObj(); - static OUString getImplementationName_Static(); - static ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_Static(); - // XPropertyAccess virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 8c21574ff706..8cdbd82e8cc4 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -244,191 +244,64 @@ OUString lcl_GetFormattedString( ScDocument* pDoc, const ScAddress& rPos ) } // anonymous namespace -OUString SAL_CALL ScXMLOOoExport_getImplementationName() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return OUString( "com.sun.star.comp.Calc.XMLExporter" ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLExporter", SvXMLExportFlags::ALL)); } -uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_getSupportedServiceNames() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLMetaExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - const OUString aServiceName( ScXMLOOoExport_getImplementationName() ); - return uno::Sequence< OUString >( &aServiceName, 1 ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLMetaExporter", SvXMLExportFlags::META)); } -uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw(uno::Exception, std::exception) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLStylesExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_getImplementationName(), SvXMLExportFlags::ALL ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLStylesExporter", SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS)); } -OUString SAL_CALL ScXMLOOoExport_Meta_getImplementationName() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLContentExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return OUString( "com.sun.star.comp.Calc.XMLMetaExporter" ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLContentExporter", SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS)); } -uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Meta_getSupportedServiceNames() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLSettingsExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - const OUString aServiceName( ScXMLOOoExport_Meta_getImplementationName() ); - return uno::Sequence< OUString > ( &aServiceName, 1 ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLSettingsExporter", SvXMLExportFlags::SETTINGS)); } -uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Meta_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLOasisExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Meta_getImplementationName(), SvXMLExportFlags::META ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLOasisExporter", SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS)); } -OUString SAL_CALL ScXMLOOoExport_Styles_getImplementationName() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return OUString( "com.sun.star.comp.Calc.XMLStylesExporter" ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLOasisMetaExporter", SvXMLExportFlags::META|SvXMLExportFlags::OASIS)); } -uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Styles_getSupportedServiceNames() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLOasisStylesExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - const OUString aServiceName( ScXMLOOoExport_Styles_getImplementationName() ); - return uno::Sequence< OUString > ( &aServiceName, 1 ); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLOasisStylesExporter", SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS)); } -uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Styles_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLOasisContentExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLOasisContentExporter", SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS)); } -OUString SAL_CALL ScXMLOOoExport_Content_getImplementationName() throw() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const &) { - return OUString( "com.sun.star.comp.Calc.XMLContentExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Content_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOOoExport_Content_getImplementationName() ); - return uno::Sequence< OUString > ( &aServiceName, 1 ); -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Content_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) -{ - return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS); -} - -OUString SAL_CALL ScXMLOOoExport_Settings_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLSettingsExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOOoExport_Settings_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOOoExport_Settings_getImplementationName() ); - return uno::Sequence< OUString > ( &aServiceName, 1 ); -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOOoExport_Settings_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw( uno::Exception, std::exception ) -{ - return (cppu::OWeakObject*)new ScXMLExport( comphelper::getComponentContext(rSMgr), ScXMLOOoExport_Settings_getImplementationName(), SvXMLExportFlags::SETTINGS ); -} - -// Oasis Filter - -OUString SAL_CALL ScXMLOasisExport_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLOasisExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOasisExport_getImplementationName() ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) -{ - return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS); -} - -OUString SAL_CALL ScXMLOasisExport_Meta_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLOasisMetaExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Meta_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOasisExport_Meta_getImplementationName() ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Meta_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) -{ - return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Meta_getImplementationName(), SvXMLExportFlags::META|SvXMLExportFlags::OASIS); -} - -OUString SAL_CALL ScXMLOasisExport_Styles_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLOasisStylesExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Styles_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOasisExport_Styles_getImplementationName() ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Styles_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw( uno::Exception, std::exception ) -{ - return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS); -} - -OUString SAL_CALL ScXMLOasisExport_Content_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLOasisContentExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Content_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOasisExport_Content_getImplementationName() ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Content_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) -{ - return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS); -} - -OUString SAL_CALL ScXMLOasisExport_Settings_getImplementationName() throw() -{ - return OUString( "com.sun.star.comp.Calc.XMLOasisSettingsExporter" ); -} - -uno::Sequence< OUString > SAL_CALL ScXMLOasisExport_Settings_getSupportedServiceNames() throw() -{ - const OUString aServiceName( ScXMLOasisExport_Settings_getImplementationName() ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Settings_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) - throw (uno::Exception, std::exception) -{ - return (cppu::OWeakObject*)new ScXMLExport(comphelper::getComponentContext(rSMgr), ScXMLOasisExport_Settings_getImplementationName(), SvXMLExportFlags::SETTINGS|SvXMLExportFlags::OASIS); + return cppu::acquire(new ScXMLExport(context, "com.sun.star.comp.Calc.XMLOasisSettingsExporter", SvXMLExportFlags::SETTINGS|SvXMLExportFlags::OASIS)); } class ScXMLShapeExport : public XMLShapeExport diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index 24cf2ede34df..00e8eb14d454 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -43,30 +43,6 @@ using ::rtl::OUString; namespace sc { namespace sidebar { -#define IMPLEMENTATION_NAME "org.apache.openoffice.comp.sc.sidebar.ScPanelFactory" -#define SERVICE_NAME "com.sun.star.ui.UIElementFactory" - -::rtl::OUString SAL_CALL ScPanelFactory::getImplementationName_static() -{ - return OUString(IMPLEMENTATION_NAME); -} - -css::uno::Reference<css::uno::XInterface> SAL_CALL ScPanelFactory::createInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) -{ - ::rtl::Reference<ScPanelFactory> pPanelFactory (new ScPanelFactory()); - css::uno::Reference<css::uno::XInterface> xService (static_cast<XWeak*>(pPanelFactory.get()), css::uno::UNO_QUERY); - return xService; -} - -css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames_static() -{ - css::uno::Sequence<OUString> aServiceNames (1); - aServiceNames[0] = SERVICE_NAME; - return aServiceNames; - -} - ScPanelFactory::ScPanelFactory() : PanelFactoryInterfaceBase(m_aMutex) { @@ -151,7 +127,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( OUString ScPanelFactory::getImplementationName() throw (css::uno::RuntimeException, std::exception) { - return getImplementationName_static(); + return OUString("org.apache.openoffice.comp.sc.sidebar.ScPanelFactory"); } sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) @@ -163,9 +139,17 @@ sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - return getSupportedServiceNames_static(); + css::uno::Sequence<OUString> aServiceNames(1); + aServiceNames[0] = "com.sun.star.ui.UIElementFactory"; + return aServiceNames; } } } // end of namespace sc::sidebar +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +ScPanelFactory_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new sc::sidebar::ScPanelFactory()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 7af9a593d3c5..ab104f4a9ab0 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -171,27 +171,12 @@ ScAutoFormatsObj::~ScAutoFormatsObj() { } -// stuff for exService_... - -uno::Reference<uno::XInterface> SAL_CALL ScAutoFormatsObj_CreateInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +ScAutoFormatsObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) { SolarMutexGuard aGuard; ScDLL::Init(); - return (::cppu::OWeakObject*) new ScAutoFormatsObj; -} - -OUString ScAutoFormatsObj::getImplementationName_Static() -{ - return OUString( "stardiv.StarCalc.ScAutoFormatsObj" ); -} - -uno::Sequence<OUString> ScAutoFormatsObj::getSupportedServiceNames_Static() -{ - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SCAUTOFORMATSOBJ_SERVICE; - return aRet; + return cppu::acquire(new ScAutoFormatsObj); } // XTableAutoFormats diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 47045564a2a5..bb6115b1c0a2 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -128,14 +128,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScFunctionListObj_CreateInstance, ScFunctionListObj::getSupportedServiceNames_Static() )); } - else if ( aImpl == ScAutoFormatsObj::getImplementationName_Static() ) - { - xFactory.set(cppu::createOneInstanceFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScAutoFormatsObj::getImplementationName_Static(), - ScAutoFormatsObj_CreateInstance, - ScAutoFormatsObj::getSupportedServiceNames_Static() )); - } else if ( aImpl == ScFunctionAccess::getImplementationName_Static() ) { xFactory.set(cppu::createOneInstanceFactory( @@ -144,14 +136,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScFunctionAccess_CreateInstance, ScFunctionAccess::getSupportedServiceNames_Static() )); } - else if ( aImpl == ScFilterOptionsObj::getImplementationName_Static() ) - { - xFactory.set(cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScFilterOptionsObj::getImplementationName_Static(), - ScFilterOptionsObj_CreateInstance, - ScFilterOptionsObj::getSupportedServiceNames_Static() )); - } else if ( aImpl == ScXMLImport_getImplementationName() ) { xFactory.set(cppu::createSingleFactory( @@ -192,86 +176,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScXMLImport_Settings_createInstance, ScXMLImport_Settings_getSupportedServiceNames() )); } - else if ( aImpl == ScXMLOOoExport_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_getImplementationName(), - ScXMLOOoExport_createInstance, - ScXMLOOoExport_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Meta_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Meta_getImplementationName(), - ScXMLOOoExport_Meta_createInstance, - ScXMLOOoExport_Meta_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Styles_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Styles_getImplementationName(), - ScXMLOOoExport_Styles_createInstance, - ScXMLOOoExport_Styles_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Content_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Content_getImplementationName(), - ScXMLOOoExport_Content_createInstance, - ScXMLOOoExport_Content_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Settings_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Settings_getImplementationName(), - ScXMLOOoExport_Settings_createInstance, - ScXMLOOoExport_Settings_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_getImplementationName(), - ScXMLOasisExport_createInstance, - ScXMLOasisExport_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Meta_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Meta_getImplementationName(), - ScXMLOasisExport_Meta_createInstance, - ScXMLOasisExport_Meta_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Styles_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Styles_getImplementationName(), - ScXMLOasisExport_Styles_createInstance, - ScXMLOasisExport_Styles_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Content_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Content_getImplementationName(), - ScXMLOasisExport_Content_createInstance, - ScXMLOasisExport_Content_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Settings_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Settings_getImplementationName(), - ScXMLOasisExport_Settings_createInstance, - ScXMLOasisExport_Settings_getSupportedServiceNames() ); - } else if ( aImpl == ScDocument_getImplementationName() ) { xFactory.set(sfx2::createSfxModelFactory( @@ -280,14 +184,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScDocument_createInstance, ScDocument_getSupportedServiceNames() )); } - else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName_static() ) - { - xFactory = ::cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ::sc::sidebar::ScPanelFactory::getImplementationName_static(), - ::sc::sidebar::ScPanelFactory::createInstance, - ::sc::sidebar::ScPanelFactory::getSupportedServiceNames_static() ); - } void* pRet = NULL; if (xFactory.is()) diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 6ccd62971391..2246df755328 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -111,27 +111,12 @@ ScFilterOptionsObj::~ScFilterOptionsObj() { } -// stuff for exService_... - -uno::Reference<uno::XInterface> SAL_CALL ScFilterOptionsObj_CreateInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_FilterOptionsDialog_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) { SolarMutexGuard aGuard; ScDLL::Init(); - return (::cppu::OWeakObject*) new ScFilterOptionsObj; -} - -OUString ScFilterOptionsObj::getImplementationName_Static() -{ - return OUString( SCFILTEROPTIONSOBJ_IMPLNAME ); -} - -uno::Sequence<OUString> ScFilterOptionsObj::getSupportedServiceNames_Static() -{ - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SCFILTEROPTIONSOBJ_SERVICE; - return aRet; + return cppu::acquire(new ScFilterOptionsObj); } // XPropertyAccess diff --git a/sc/util/sc.component b/sc/util/sc.component index 03bb057389a3..b7b65b1c5f07 100644 --- a/sc/util/sc.component +++ b/sc/util/sc.component @@ -19,58 +19,70 @@ <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" prefix="sc" xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.Calc.FilterOptionsDialog"> + <implementation name="com.sun.star.comp.Calc.FilterOptionsDialog" + constructor="Calc_FilterOptionsDialog_get_implementation"> <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/> </implementation> <implementation name="com.sun.star.comp.Calc.SpreadsheetDocument"> <service name="com.sun.star.sheet.SpreadsheetDocument"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLContentExporter"> + <implementation name="com.sun.star.comp.Calc.XMLContentExporter" + constructor="Calc_XMLContentExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLContentExporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLExporter"> + <implementation name="com.sun.star.comp.Calc.XMLExporter" + constructor="Calc_XMLExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLExporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLMetaExporter"> + <implementation name="com.sun.star.comp.Calc.XMLMetaExporter" + constructor="Calc_XMLMetaExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLMetaExporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLOasisContentExporter"> + <implementation name="com.sun.star.comp.Calc.XMLOasisContentExporter" + constructor="Calc_XMLOasisContentExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLOasisContentExporter"/> </implementation> <implementation name="com.sun.star.comp.Calc.XMLOasisContentImporter"> <service name="com.sun.star.comp.Calc.XMLOasisContentImporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLOasisExporter"> + <implementation name="com.sun.star.comp.Calc.XMLOasisExporter" + constructor="Calc_XMLOasisExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLOasisExporter"/> </implementation> <implementation name="com.sun.star.comp.Calc.XMLOasisImporter"> <service name="com.sun.star.comp.Calc.XMLOasisImporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLOasisMetaExporter"> + <implementation name="com.sun.star.comp.Calc.XMLOasisMetaExporter" + constructor="Calc_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLOasisMetaExporter"/> </implementation> <implementation name="com.sun.star.comp.Calc.XMLOasisMetaImporter"> <service name="com.sun.star.comp.Calc.XMLOasisMetaImporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsExporter"> + <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsExporter" + constructor="Calc_XMLOasisSettingsExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLOasisSettingsExporter"/> </implementation> <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsImporter"> <service name="com.sun.star.comp.Calc.XMLOasisSettingsImporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLOasisStylesExporter"> + <implementation name="com.sun.star.comp.Calc.XMLOasisStylesExporter" + constructor="Calc_XMLOasisStylesExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLOasisStylesExporter"/> </implementation> <implementation name="com.sun.star.comp.Calc.XMLOasisStylesImporter"> <service name="com.sun.star.comp.Calc.XMLOasisStylesImporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLSettingsExporter"> + <implementation name="com.sun.star.comp.Calc.XMLSettingsExporter" + constructor="Calc_XMLSettingsExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLSettingsExporter"/> </implementation> - <implementation name="com.sun.star.comp.Calc.XMLStylesExporter"> + <implementation name="com.sun.star.comp.Calc.XMLStylesExporter" + constructor="Calc_XMLStylesExporter_get_implementation"> <service name="com.sun.star.comp.Calc.XMLStylesExporter"/> </implementation> - <implementation name="stardiv.StarCalc.ScAutoFormatsObj"> + <implementation name="stardiv.StarCalc.ScAutoFormatsObj" + constructor="ScAutoFormatsObj_get_implementation"> <service name="com.sun.star.sheet.TableAutoFormats"/> </implementation> <implementation name="stardiv.StarCalc.ScFunctionAccess"> @@ -85,7 +97,8 @@ <implementation name="stardiv.StarCalc.ScSpreadsheetSettings"> <service name="com.sun.star.sheet.GlobalSheetSettings"/> </implementation> - <implementation name="org.apache.openoffice.comp.sc.sidebar.ScPanelFactory"> + <implementation name="org.apache.openoffice.comp.sc.sidebar.ScPanelFactory" + constructor="ScPanelFactory_get_implementation"> <service name="com.sun.star.ui.UIElementFactory"/> </implementation> </component> |