diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
commit | 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 (patch) | |
tree | 63699b525800b2c6708e90b817853bb60be5f6d8 | |
parent | loplugin: add Dialog to unusedvariablecheck (diff) | |
download | core-3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2.tar.gz core-3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2.zip |
Fix various XServiceInfo implementations
...to match what is recorded in the .component files
Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
140 files changed, 2129 insertions, 435 deletions
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index be295f56b0b4..2fae2ca2071e 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -161,6 +161,18 @@ Any SAL_CALL FrameControl::queryAggregation( const Type& aType ) throw( RuntimeE return aReturn; } +OUString FrameControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return impl_getStaticImplementationName(); +} + +css::uno::Sequence<OUString> FrameControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return impl_getStaticSupportedServiceNames(); +} + // XControl void SAL_CALL FrameControl::createPeer( const Reference< XToolkit >& xToolkit , diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx index f3ffef6c575b..e1b48b7f96db 100644 --- a/UnoControls/source/inc/framecontrol.hxx +++ b/UnoControls/source/inc/framecontrol.hxx @@ -101,6 +101,12 @@ public: const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XControl virtual void SAL_CALL createPeer( diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 9b804a929235..d3f0b870745a 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -523,7 +523,7 @@ OUString getImplementationName_PAR() Sequence<OUString> getSupportedServiceNames_SEQ() { Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.animations.SequenceTimContainer"; + aRet.getArray()[0] = "com.sun.star.animations.SequenceTimeContainer"; return aRet; } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 3949d89ffe85..652ef8624040 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -104,7 +104,7 @@ namespace dbaxml Reference< XInterface > SAL_CALL ODBExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB) { - return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB), SvXMLExportFlags::SETTINGS | SvXMLExportFlags::PRETTY )); + return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB), getImplementationName_Static(), SvXMLExportFlags::SETTINGS | SvXMLExportFlags::PRETTY )); } OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException) @@ -121,7 +121,7 @@ namespace dbaxml Reference< XInterface > SAL_CALL ODBFullExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB) { - return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB), SvXMLExportFlags::ALL)); + return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB), getImplementationName_Static(), SvXMLExportFlags::ALL)); } OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException) { @@ -183,8 +183,8 @@ namespace dbaxml // nothing to do here } }; -ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext, SvXMLExportFlags nExportFlag) -: SvXMLExport( util::MeasureUnit::MM_10TH, _rxContext, getImplementationName_Static(), XML_DATABASE, +ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext, OUString const & implementationName, SvXMLExportFlags nExportFlag) +: SvXMLExport( util::MeasureUnit::MM_10TH, _rxContext, implementationName, XML_DATABASE, SvXMLExportFlags::OASIS | nExportFlag) ,m_aTypeCollection(_rxContext) ,m_bAllreadyFilled(false) @@ -266,7 +266,7 @@ css::uno::Sequence<OUString> ODBExport::getSupportedServiceNames_Static() ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ODBExport::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) { - return static_cast< XServiceInfo* >(new ODBExport( comphelper::getComponentContext(_rxORB))); + return static_cast< XServiceInfo* >(new ODBExport( comphelper::getComponentContext(_rxORB), getImplementationName_Static())); } void ODBExport::exportDataSource() diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index aa94e135e509..2dc9c3e0fb7b 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -173,7 +173,7 @@ protected: virtual ~ODBExport(){}; public: - ODBExport(const Reference< XComponentContext >& _rxContext, SvXMLExportFlags nExportFlag = SvXMLExportFlags::CONTENT | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::PRETTY | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::SCRIPTS ); + ODBExport(const Reference< XComponentContext >& _rxContext, OUString const & implementationName, SvXMLExportFlags nExportFlag = SvXMLExportFlags::CONTENT | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::PRETTY | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::SCRIPTS ); static OUString SAL_CALL getImplementationName_Static() throw (css::uno::RuntimeException); diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index ad460ffedbf1..ad0c88866ed6 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -129,7 +129,7 @@ void SAL_CALL LimitBoxController::release() throw () /// XServiceInfo IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(LimitBoxController, "org.libreoffice.comp.dbu.LimitBoxController") IMPLEMENT_SERVICE_INFO_SUPPORTS(LimitBoxController) -IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LimitBoxController, "com.sun.star.frame.ToolboxController") +IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LimitBoxController, "com.sun.star.frame.ToolbarController") uno::Reference< uno::XInterface > SAL_CALL LimitBoxController::Create(const uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 80b7ee8d9bf0..7087c3b04d13 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -350,7 +350,7 @@ namespace dbaui // LegacyInteractionHandler IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(LegacyInteractionHandler, "com.sun.star.comp.dbaccess.LegacyInteractionHandler") IMPLEMENT_SERVICE_INFO_SUPPORTS(LegacyInteractionHandler) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LegacyInteractionHandler, "com.sun.star.sdb.LegacyInteractionHandler") + IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LegacyInteractionHandler, "com.sun.star.sdb.InteractionHandler") Reference< XInterface > SAL_CALL LegacyInteractionHandler::Create(const Reference< XMultiServiceFactory >& _rxORB) diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index c6537db18968..1e99fd651b07 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -19,7 +19,7 @@ #include <scanner.hxx> -#include <cppuhelper/queryinterface.hxx> +#include <cppuhelper/supportsservice.hxx> // - ScannerManager - @@ -44,40 +44,29 @@ ScannerManager::~ScannerManager() ReleaseData(); } - - -Any SAL_CALL ScannerManager::queryInterface( const Type& rType ) throw( RuntimeException, std::exception ) +Sequence< sal_Int8 > SAL_CALL ScannerManager::getMaskDIB() throw(std::exception) { - const Any aRet( cppu::queryInterface( rType, - static_cast< XScannerManager2* >( this ), - static_cast< css::awt::XBitmap* >( this ) ) ); - - return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) ); + return Sequence< sal_Int8 >(); } - - -void SAL_CALL ScannerManager::acquire() throw() +OUString ScannerManager::getImplementationName() + throw (css::uno::RuntimeException, std::exception) { - OWeakObject::acquire(); + return getImplementationName_Static(); } - - -void SAL_CALL ScannerManager::release() throw() +sal_Bool ScannerManager::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) { - OWeakObject::release(); + return cppu::supportsService(this, ServiceName); } - - -Sequence< sal_Int8 > SAL_CALL ScannerManager::getMaskDIB() throw(std::exception) +css::uno::Sequence<OUString> ScannerManager::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) { - return Sequence< sal_Int8 >(); + return getSupportedServiceNames_Static(); } - - OUString ScannerManager::getImplementationName_Static() throw() { return OUString( "com.sun.star.scanner.ScannerManager" ); diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index 19e7761bdf61..4b4a18e64318 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -23,12 +23,13 @@ #include <tools/stream.hxx> #include <osl/mutex.hxx> #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/awt/XBitmap.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/scanner/XScannerManager2.hpp> #include <com/sun/star/scanner/ScannerException.hpp> @@ -37,7 +38,9 @@ using namespace cppu; using namespace com::sun::star::uno; using namespace com::sun::star::scanner; -class ScannerManager : public OWeakObject, XScannerManager2, css::awt::XBitmap +class ScannerManager: + public cppu::WeakImplHelper< + XScannerManager2, css::awt::XBitmap, css::lang::XServiceInfo> { protected: @@ -52,11 +55,6 @@ public: ScannerManager(); virtual ~ScannerManager(); - // XInterface - virtual Any SAL_CALL queryInterface( const Type & rType ) throw( RuntimeException, std::exception ) SAL_OVERRIDE; - virtual void SAL_CALL acquire() throw() SAL_OVERRIDE; - virtual void SAL_CALL release() throw() SAL_OVERRIDE; - // XScannerManager virtual Sequence< ScannerContext > SAL_CALL getAvailableScanners() throw(std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL configureScanner( ScannerContext& scanner_context ) throw( ScannerException, std::exception ) SAL_OVERRIDE; @@ -70,6 +68,15 @@ public: virtual Sequence< sal_Int8 > SAL_CALL getDIB() throw(std::exception) SAL_OVERRIDE; virtual Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw(std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // Misc static OUString getImplementationName_Static() throw(); static Sequence< OUString > getSupportedServiceNames_Static() throw(); diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index 64b6dd194b84..fffedaeb33ca 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -10,13 +10,14 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/factory.hxx> -#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/supportsservice.hxx> #include <osl/diagnose.h> #include <sax/tools/documenthandleradapter.hxx> #include <com/sun/star/lang/XComponent.hpp> - +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Type.hxx> @@ -53,8 +54,8 @@ namespace filter { * OdfFlatXml export and imports ODF flat XML documents by plugging a pass-through * filter implementation into XmlFilterAdaptor. */ - class OdfFlatXml : public WeakImplHelper3<XImportFilter, - XExportFilter, DocumentHandlerAdapter> + class OdfFlatXml : public WeakImplHelper<XImportFilter, + XExportFilter, DocumentHandlerAdapter, css::lang::XServiceInfo> { private: Reference< XComponentContext > m_xContext; @@ -81,6 +82,22 @@ namespace filter { throw (IllegalArgumentException, RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.comp.filter.OdfFlatXml"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + return css::uno::Sequence<OUString>{ + "com.sun.star.document.ImportFilter", + "com.sun.star.document.ExportFilter"}; + } + // UNO component helper methods static OUString impl_getImplementationName(); diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 0b595ad9c95c..05aefec23513 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -116,10 +116,11 @@ IMPLEMENT_DEFAULT_CLONING( OButtonModel ) StringSequence OButtonModel::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OClickableImageBaseModel::getSupportedServiceNames(); - aSupported.realloc( aSupported.getLength() + 1 ); + aSupported.realloc( aSupported.getLength() + 2 ); OUString* pArray = aSupported.getArray(); - pArray[ aSupported.getLength() - 1 ] = FRM_SUN_COMPONENT_COMMANDBUTTON; + pArray[ aSupported.getLength() - 2 ] = FRM_SUN_COMPONENT_COMMANDBUTTON; + pArray[ aSupported.getLength() - 1 ] = FRM_COMPONENT_COMMANDBUTTON; return aSupported; } @@ -340,10 +341,11 @@ Sequence<Type> OButtonControl::_getTypes() StringSequence OButtonControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OClickableImageBaseControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_COMMANDBUTTON; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_COMMANDBUTTON; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_COMMANDBUTTON; return aSupported; } diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index 418de7fa3c27..cd28061b545f 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -55,7 +55,10 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OButtonModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OButtonModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::io::XPersistObject @@ -131,7 +134,10 @@ public: virtual ~OButtonControl(); // XServiceInfo - IMPLEMENTATION_NAME(OButtonControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OButtonControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // UNO binding diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 2c3ff8ef81f9..dc4d86fe3e09 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -48,10 +48,11 @@ OCheckBoxControl::OCheckBoxControl(const Reference<XComponentContext>& _rxFactor StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_CHECKBOX; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_CHECKBOX; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_CHECKBOX; return aSupported; } @@ -88,7 +89,7 @@ StringSequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() throw(::com:: StringSequence aSupported = OReferenceValueComponent::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -102,6 +103,8 @@ StringSequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() throw(::com:: *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_CHECKBOX; *pStoreTo++ = BINDABLE_DATABASE_CHECK_BOX; + *pStoreTo++ = FRM_COMPONENT_CHECKBOX; + return aSupported; } diff --git a/forms/source/component/CheckBox.hxx b/forms/source/component/CheckBox.hxx index 276992af12cb..2819ee328880 100644 --- a/forms/source/component/CheckBox.hxx +++ b/forms/source/component/CheckBox.hxx @@ -36,7 +36,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OCheckBoxModel ); // XServiceInfo - IMPLEMENTATION_NAME(OCheckBoxModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OCheckBoxModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XPersistObject @@ -66,7 +69,10 @@ public: OCheckBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext); // XServiceInfo - IMPLEMENTATION_NAME(OCheckBoxControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OCheckBoxControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 8d959ee01525..654d962b49a9 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -87,7 +87,7 @@ StringSequence SAL_CALL OComboBoxModel::getSupportedServiceNames() throw(Runtime StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -101,6 +101,8 @@ StringSequence SAL_CALL OComboBoxModel::getSupportedServiceNames() throw(Runtime *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_COMBOBOX; *pStoreTo++ = BINDABLE_DATABASE_COMBO_BOX; + *pStoreTo++ = FRM_COMPONENT_COMBOBOX; + return aSupported; } @@ -868,10 +870,11 @@ OComboBoxControl::OComboBoxControl(const Reference<XComponentContext>& _rxContex StringSequence SAL_CALL OComboBoxControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_COMBOBOX; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_COMBOBOX; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_COMBOBOX; return aSupported; } diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx index ad3ed573e5cb..b752c3240f21 100644 --- a/forms/source/component/ComboBox.hxx +++ b/forms/source/component/ComboBox.hxx @@ -84,7 +84,10 @@ public: virtual void SAL_CALL reloaded( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OComboBoxModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OComboBoxModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // UNO @@ -144,7 +147,10 @@ public: OComboBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext); // XServiceInfo - IMPLEMENTATION_NAME(OComboBoxControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OComboBoxControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index cad851f66bd3..bc7975d0b7b4 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -54,10 +54,11 @@ Sequence<Type> OCurrencyControl::_getTypes() StringSequence SAL_CALL OCurrencyControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_CURRENCYFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_CURRENCYFIELD; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_CURRENCYFIELD; return aSupported; } @@ -150,7 +151,7 @@ StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw(std::ex StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 4 ); + aSupported.realloc( nOldLen + 5 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = DATA_AWARE_CONTROL_MODEL; @@ -159,6 +160,8 @@ StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw(std::ex *pStoreTo++ = FRM_SUN_COMPONENT_CURRENCYFIELD; *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_CURRENCYFIELD; + *pStoreTo++ = FRM_COMPONENT_CURRENCYFIELD; + return aSupported; } diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx index 23a2ee8f326d..98230b94b46e 100644 --- a/forms/source/component/Currency.hxx +++ b/forms/source/component/Currency.hxx @@ -38,7 +38,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OCurrencyModel ); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OCurrencyModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OCurrencyModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::io::XPersistObject @@ -74,7 +77,10 @@ protected: public: OCurrencyControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OCurrencyControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OCurrencyControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index bb2c6a885987..6bb799181c28 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -3768,39 +3768,12 @@ OUString SAL_CALL ODatabaseForm::getImplementationName_Static() return OUString( "com.sun.star.comp.forms.ODatabaseForm" ); } - -Sequence< OUString > SAL_CALL ODatabaseForm::getCompatibleServiceNames_Static() -{ - Sequence< OUString > aServices( 1 ); - OUString* pServices = aServices.getArray(); - - *pServices++ = FRM_COMPONENT_FORM; - - return aServices; -} - - -Sequence< OUString > SAL_CALL ODatabaseForm::getCurrentServiceNames_Static() -{ - Sequence< OUString > aServices( 5 ); - OUString* pServices = aServices.getArray(); - - *pServices++ = FRM_SUN_FORMCOMPONENT; - *pServices++ = "com.sun.star.form.FormComponents"; - *pServices++ = FRM_SUN_COMPONENT_FORM; - *pServices++ = FRM_SUN_COMPONENT_HTMLFORM; - *pServices++ = FRM_SUN_COMPONENT_DATAFORM; - - return aServices; -} - - Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames_Static() { - return ::comphelper::concatSequences( - getCurrentServiceNames_Static(), - getCompatibleServiceNames_Static() - ); + return css::uno::Sequence<OUString>{ + FRM_SUN_FORMCOMPONENT, "com.sun.star.form.FormComponents", + FRM_SUN_COMPONENT_FORM, FRM_SUN_COMPONENT_HTMLFORM, + FRM_SUN_COMPONENT_DATAFORM, FRM_COMPONENT_FORM}; } @@ -3820,13 +3793,9 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() throw( R // concat with out own services return ::comphelper::concatSequences( - getCurrentServiceNames_Static(), + getSupportedServiceNames_Static(), aServices ); - // use getCurrentXXX instead of getSupportedXXX, because at runtime, we do not want to have - // the compatible names - // This is maily to be consistent with the implementation before fixing #97083#, though the - // better solution _may_ be to return the compatible names at runtime, too } sal_Bool SAL_CALL ODatabaseForm::supportsService(const OUString& ServiceName) throw( RuntimeException, std::exception ) diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 72358a4f669d..e9110ed06d55 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -383,8 +383,6 @@ public: // com::sun::star::lang::XServiceInfo - static version static OUString SAL_CALL getImplementationName_Static(); static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); - static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getCurrentServiceNames_Static(); - static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getCompatibleServiceNames_Static(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory ); // com::sun::star::io::XPersistObject diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index d446d094812b..ace219607fc5 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -59,10 +59,11 @@ Sequence<Type> ODateControl::_getTypes() StringSequence SAL_CALL ODateControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_DATEFIELD; + pArray[aSupported.getLength()-2] = STARDIV_ONE_FORM_CONTROL_DATEFIELD; return aSupported; } @@ -124,7 +125,7 @@ StringSequence SAL_CALL ODateModel::getSupportedServiceNames() throw(std::except StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -138,6 +139,8 @@ StringSequence SAL_CALL ODateModel::getSupportedServiceNames() throw(std::except *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_DATEFIELD; *pStoreTo++ = BINDABLE_DATABASE_DATE_FIELD; + *pStoreTo++ = FRM_COMPONENT_DATEFIELD; + return aSupported; } diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx index 5942e7e1d342..572f51bc4a55 100644 --- a/forms/source/component/Date.hxx +++ b/forms/source/component/Date.hxx @@ -51,7 +51,10 @@ public: virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(ODateModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ODateModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // XPropertySet @@ -106,7 +109,10 @@ public: DECLARE_UNO3_AGG_DEFAULTS(ODateControl, OBoundControl) // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(ODateControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ODateControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 8bd967e3c959..4b0472ae1b45 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -142,10 +142,12 @@ void OEditControl::disposing() StringSequence OEditControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 3); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_TEXTFIELD; + pArray[aSupported.getLength()-3] = FRM_SUN_CONTROL_TEXTFIELD; + pArray[aSupported.getLength()-2] = STARDIV_ONE_FORM_CONTROL_EDIT; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_TEXTFIELD; return aSupported; } @@ -330,7 +332,7 @@ StringSequence SAL_CALL OEditModel::getSupportedServiceNames() throw(std::except StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -344,6 +346,8 @@ StringSequence SAL_CALL OEditModel::getSupportedServiceNames() throw(std::except *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_TEXTFIELD; *pStoreTo++ = BINDABLE_DATABASE_TEXT_FIELD; + *pStoreTo++ = FRM_COMPONENT_TEXTFIELD; + return aSupported; } diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index 2e80b2edc0a4..1d17c00e31b9 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -70,7 +70,10 @@ public: virtual void SAL_CALL reset( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OEditModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OEditModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // OControlModel's property handling @@ -145,7 +148,10 @@ public: virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OEditControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OEditControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::form::XChangeBroadcaster diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index 2c6f97df8460..c42625775b93 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -70,10 +70,11 @@ Sequence<Type> OFileControlModel::_getTypes() StringSequence OFileControlModel::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_FILECONTROL; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_FILECONTROL; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_FILECONTROL; return aSupported; } diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx index 9e5fd5a7b999..80b3ef6ce07d 100644 --- a/forms/source/component/File.hxx +++ b/forms/source/component/File.hxx @@ -43,7 +43,10 @@ public: virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OFileControlModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OFileControlModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // OComponentHelper diff --git a/forms/source/component/FixedText.cxx b/forms/source/component/FixedText.cxx index ba34a7241bc5..b281b509fe74 100644 --- a/forms/source/component/FixedText.cxx +++ b/forms/source/component/FixedText.cxx @@ -65,10 +65,11 @@ IMPLEMENT_DEFAULT_CLONING( OFixedTextModel ) StringSequence SAL_CALL OFixedTextModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) { StringSequence aSupported = OControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_FIXEDTEXT; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_FIXEDTEXT; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_FIXEDTEXT; return aSupported; } diff --git a/forms/source/component/FixedText.hxx b/forms/source/component/FixedText.hxx index f733fa3ac550..d6299e42030b 100644 --- a/forms/source/component/FixedText.hxx +++ b/forms/source/component/FixedText.hxx @@ -33,7 +33,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OFixedTextModel ); // XServiceInfo - IMPLEMENTATION_NAME(OFixedTextModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OFixedTextModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XPersistObject diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 4fa30d53bd27..662aec432ba4 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1533,7 +1533,7 @@ void SAL_CALL OBoundControlModel::disposing(const com::sun::star::lang::EventObj // XServiceInfo StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(RuntimeException, std::exception) { - return ::comphelper::concatSequences( + return ::comphelper::combineSequences( getAggregateServiceNames(), getSupportedServiceNames_Static() ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 61f009acac28..c5ef478545b1 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -254,9 +254,10 @@ IMPL_LINK(OFormattedControl, OnKeyPressed, void*, /*EMPTYARG*/) StringSequence OFormattedControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_FORMATTEDFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_FORMATTEDFIELD; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_FORMATTEDFIELD; return aSupported; } @@ -315,7 +316,7 @@ StringSequence OFormattedModel::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OEditBaseModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; *pStoreTo++ = DATA_AWARE_CONTROL_MODEL; @@ -325,6 +326,7 @@ StringSequence OFormattedModel::getSupportedServiceNames() throw(std::exception) *pStoreTo++ = FRM_SUN_COMPONENT_FORMATTEDFIELD; *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD; *pStoreTo++ = BINDABLE_DATABASE_FORMATTED_FIELD; + *pStoreTo++ = FRM_COMPONENT_FORMATTEDFIELD; return aSupported; } diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx index c4b047b8b6e3..424f0dbc27a0 100644 --- a/forms/source/component/FormattedField.hxx +++ b/forms/source/component/FormattedField.hxx @@ -70,7 +70,10 @@ class OFormattedModel virtual void SAL_CALL disposing() SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OFormattedModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OFormattedModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // XPersistObject @@ -158,7 +161,10 @@ class OFormattedModel virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OFormattedControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OFormattedControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XEventListener diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index f27813278977..b368eaca33ee 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -177,7 +177,7 @@ OUString SAL_CALL OFormattedFieldWrapper::getServiceName() throw(RuntimeExceptio OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) throw (RuntimeException, std::exception) { - return OUString("com.sun.star.comp.forms.OFormattedFieldWrapper"); + return OUString("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"); } sal_Bool SAL_CALL OFormattedFieldWrapper::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception) diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx index daa1b0cf3672..074c8f70ed2f 100644 --- a/forms/source/component/FormsCollection.cxx +++ b/forms/source/component/FormsCollection.cxx @@ -85,7 +85,7 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) throw(Runtim OUString SAL_CALL OFormsCollection::getImplementationName() throw(RuntimeException, std::exception) { - return OUString("com.sun.star.comp.forms.OFormsCollection"); + return OUString("com.sun.star.form.OFormsCollection"); } sal_Bool SAL_CALL OFormsCollection::supportsService( const OUString& _rServiceName ) throw(RuntimeException, std::exception) diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 524e1292363c..c33afe9b605d 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -169,9 +169,11 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain StringSequence OGridControlModel::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 2); - aSupported[aSupported.getLength()-2] = "com.sun.star.awt.UnoControlModel"; - aSupported[aSupported.getLength()-1] = FRM_SUN_COMPONENT_GRIDCONTROL; + aSupported.realloc(aSupported.getLength() + 4); + aSupported[aSupported.getLength()-4] = "com.sun.star.awt.UnoControlModel"; + aSupported[aSupported.getLength()-3] = FRM_SUN_COMPONENT_GRIDCONTROL; + aSupported[aSupported.getLength()-2] = FRM_COMPONENT_GRID; + aSupported[aSupported.getLength()-1] = FRM_COMPONENT_GRIDCONTROL; return aSupported; } Any SAL_CALL OGridControlModel::queryAggregation( const Type& _rType ) throw (RuntimeException, std::exception) diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx index d48f8e19e2d3..44a8b37e5f8a 100644 --- a/forms/source/component/Grid.hxx +++ b/forms/source/component/Grid.hxx @@ -108,7 +108,10 @@ public: virtual void SAL_CALL setParent(const InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OGridControlModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OGridControlModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XTypeProvider diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx index 93fdd4e83cb5..73792e17d25b 100644 --- a/forms/source/component/GroupBox.cxx +++ b/forms/source/component/GroupBox.cxx @@ -60,10 +60,11 @@ OGroupBoxModel::OGroupBoxModel( const OGroupBoxModel* _pOriginal, const Referenc StringSequence SAL_CALL OGroupBoxModel::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_GROUPBOX; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_GROUPBOX; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_GROUPBOX; return aSupported; } @@ -130,10 +131,11 @@ OGroupBoxControl::OGroupBoxControl(const Reference<XComponentContext>& _rxFactor StringSequence SAL_CALL OGroupBoxControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_GROUPBOX; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_GROUPBOX; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_GROUPBOX; return aSupported; } diff --git a/forms/source/component/GroupBox.hxx b/forms/source/component/GroupBox.hxx index 255f705d80a0..0c9ebedf3ed8 100644 --- a/forms/source/component/GroupBox.hxx +++ b/forms/source/component/GroupBox.hxx @@ -33,7 +33,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OGroupBoxModel ); // XServiceInfo - IMPLEMENTATION_NAME(OGroupBoxModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OGroupBoxModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XPersistObject @@ -61,7 +64,10 @@ public: OGroupBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); // XServiceInfo - IMPLEMENTATION_NAME(OGroupBoxControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OGroupBoxControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index 5e5eeeb83020..92b15008532d 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -120,10 +120,9 @@ void OHiddenModel::describeFixedProperties( Sequence< Property >& _rProps ) cons StringSequence SAL_CALL OHiddenModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) { - StringSequence aSupported( 2 ); - aSupported[ 0 ] = FRM_SUN_COMPONENT_HIDDENCONTROL; - aSupported[ 1 ] = FRM_SUN_FORMCOMPONENT; - return aSupported; + return css::uno::Sequence<OUString>{ + FRM_SUN_COMPONENT_HIDDENCONTROL, FRM_SUN_FORMCOMPONENT, + FRM_COMPONENT_HIDDEN, FRM_COMPONENT_HIDDENCONTROL }; } diff --git a/forms/source/component/Hidden.hxx b/forms/source/component/Hidden.hxx index 358c71c1e223..68a29a5b6318 100644 --- a/forms/source/component/Hidden.hxx +++ b/forms/source/component/Hidden.hxx @@ -43,7 +43,10 @@ public: throw (::com::sun::star::lang::IllegalArgumentException) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OHiddenModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OHiddenModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XPersistObject diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index c9a0b5fd58fa..f355b9d21266 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -64,10 +64,11 @@ OImageButtonModel::~OImageButtonModel() StringSequence OImageButtonModel::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OClickableImageBaseModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_IMAGEBUTTON; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_IMAGEBUTTON; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_IMAGEBUTTON; return aSupported; } @@ -152,10 +153,11 @@ Sequence<Type> OImageButtonControl::_getTypes() StringSequence OImageButtonControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OClickableImageBaseControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_IMAGEBUTTON; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_IMAGEBUTTON; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_IMAGEBUTTON; return aSupported; } diff --git a/forms/source/component/ImageButton.hxx b/forms/source/component/ImageButton.hxx index ee728e81fd8f..1d9dd1abd3cd 100644 --- a/forms/source/component/ImageButton.hxx +++ b/forms/source/component/ImageButton.hxx @@ -34,7 +34,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OImageButtonModel ); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OImageButtonModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OImageButtonModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::io::XPersistObject @@ -63,7 +66,10 @@ public: OImageButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); // XServiceInfo - IMPLEMENTATION_NAME(OImageButtonControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OImageButtonControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // UNO Binding diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 8646fd512b67..e3789cf92030 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -191,10 +191,11 @@ IMPLEMENT_DEFAULT_CLONING( OImageControlModel ) StringSequence OImageControlModel::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_IMAGECONTROL; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_IMAGECONTROL; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_IMAGECONTROL; return aSupported; } @@ -725,10 +726,11 @@ Any SAL_CALL OImageControlControl::queryAggregation(const Type& _rType) throw (R StringSequence OImageControlControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_IMAGECONTROL; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_IMAGECONTROL; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_IMAGECONTROL; return aSupported; } diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index 4caaf90b2e94..1317c754932f 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -76,7 +76,10 @@ public: virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OImageControlModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OImageControlModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // OComponentHelper @@ -165,7 +168,10 @@ public: virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OImageControlControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OImageControlControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // XMouseListener diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 2fd08c75b313..d87da0bd7eb5 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -208,7 +208,7 @@ namespace frm StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -222,6 +222,8 @@ namespace frm *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_LISTBOX; *pStoreTo++ = BINDABLE_DATABASE_LIST_BOX; + *pStoreTo++ = FRM_COMPONENT_LISTBOX; + return aSupported; } @@ -1806,10 +1808,11 @@ namespace frm StringSequence SAL_CALL OListBoxControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_LISTBOX; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_LISTBOX; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_LISTBOX; return aSupported; } diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 9b9bee3382fc..381d36ed8638 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -127,7 +127,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OListBoxModel ); // XServiceInfo - IMPLEMENTATION_NAME(OListBoxModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OListBoxModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // UNO Anbindung @@ -280,7 +283,10 @@ public: virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - IMPLEMENTATION_NAME(OListBoxControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OListBoxControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XChangeBroadcaster diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index a8daa2e73f39..2d1cb74083fe 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -45,10 +45,11 @@ ONumericControl::ONumericControl(const Reference<XComponentContext>& _rxFactory) StringSequence ONumericControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_NUMERICFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_NUMERICFIELD; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_NUMERICFIELD; return aSupported; } @@ -99,7 +100,7 @@ StringSequence ONumericModel::getSupportedServiceNames() throw(std::exception) StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -113,6 +114,8 @@ StringSequence ONumericModel::getSupportedServiceNames() throw(std::exception) *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_NUMERICFIELD; *pStoreTo++ = BINDABLE_DATABASE_NUMERIC_FIELD; + *pStoreTo++ = FRM_COMPONENT_NUMERICFIELD; + return aSupported; } diff --git a/forms/source/component/Numeric.hxx b/forms/source/component/Numeric.hxx index 3d37a965afe7..5b97d9e1b361 100644 --- a/forms/source/component/Numeric.hxx +++ b/forms/source/component/Numeric.hxx @@ -38,7 +38,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( ONumericModel ); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(ONumericModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ONumericModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::io::XPersistObject @@ -72,7 +75,10 @@ public: ONumericControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(ONumericControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ONumericControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index 89a10a799eb1..8631f0deec9a 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -53,10 +53,11 @@ Sequence<Type> OPatternControl::_getTypes() StringSequence OPatternControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_PATTERNFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_PATTERNFIELD; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_PATTERNFIELD; return aSupported; } @@ -100,11 +101,12 @@ IMPLEMENT_DEFAULT_CLONING( OPatternModel ) StringSequence SAL_CALL OPatternModel::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 2); + aSupported.realloc(aSupported.getLength() + 3); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD; - pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_PATTERNFIELD; + pArray[aSupported.getLength()-3] = FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_COMPONENT_PATTERNFIELD; + pArray[aSupported.getLength()-1] = FRM_COMPONENT_PATTERNFIELD; return aSupported; } diff --git a/forms/source/component/Pattern.hxx b/forms/source/component/Pattern.hxx index dfcdde01dd43..2f5d6bf57da0 100644 --- a/forms/source/component/Pattern.hxx +++ b/forms/source/component/Pattern.hxx @@ -45,7 +45,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( OPatternModel ); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OPatternModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OPatternModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // ::com::sun::star::io::XPersistObject @@ -81,7 +84,10 @@ public: OPatternControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OPatternControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OPatternControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index abe62f0d36c6..4a6ee60ef373 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -46,10 +46,11 @@ using namespace ::com::sun::star::form::binding; StringSequence SAL_CALL ORadioButtonControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString* pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_RADIOBUTTON; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_RADIOBUTTON; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_RADIOBUTTON; return aSupported; } @@ -115,7 +116,7 @@ StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(Runt StringSequence aSupported = OReferenceValueComponent::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -129,6 +130,8 @@ StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(Runt *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_RADIOBUTTON; *pStoreTo++ = BINDABLE_DATABASE_RADIO_BUTTON; + *pStoreTo++ = FRM_COMPONENT_RADIOBUTTON; + return aSupported; } diff --git a/forms/source/component/RadioButton.hxx b/forms/source/component/RadioButton.hxx index 62e8246e7f3e..d8660c0e7b8a 100644 --- a/forms/source/component/RadioButton.hxx +++ b/forms/source/component/RadioButton.hxx @@ -32,7 +32,10 @@ public: DECLARE_DEFAULT_LEAF_XTOR( ORadioButtonModel ); // XServiceInfo - IMPLEMENTATION_NAME(ORadioButtonModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ORadioButtonModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // OPropertySetHelper @@ -83,7 +86,10 @@ public: ORadioButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); // XServiceInfo - IMPLEMENTATION_NAME(ORadioButtonControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.ORadioButtonControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index 7c03a518fd63..e09359a36a2d 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -59,10 +59,11 @@ Sequence<Type> OTimeControl::_getTypes() StringSequence SAL_CALL OTimeControl::getSupportedServiceNames() throw(std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); - aSupported.realloc(aSupported.getLength() + 1); + aSupported.realloc(aSupported.getLength() + 2); OUString*pArray = aSupported.getArray(); - pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_TIMEFIELD; + pArray[aSupported.getLength()-2] = FRM_SUN_CONTROL_TIMEFIELD; + pArray[aSupported.getLength()-1] = STARDIV_ONE_FORM_CONTROL_TIMEFIELD; return aSupported; } @@ -76,7 +77,7 @@ StringSequence SAL_CALL OTimeModel::getSupportedServiceNames() throw(std::except StringSequence aSupported = OBoundControlModel::getSupportedServiceNames(); sal_Int32 nOldLen = aSupported.getLength(); - aSupported.realloc( nOldLen + 8 ); + aSupported.realloc( nOldLen + 9 ); OUString* pStoreTo = aSupported.getArray() + nOldLen; *pStoreTo++ = BINDABLE_CONTROL_MODEL; @@ -90,6 +91,8 @@ StringSequence SAL_CALL OTimeModel::getSupportedServiceNames() throw(std::except *pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_TIMEFIELD; *pStoreTo++ = BINDABLE_DATABASE_TIME_FIELD; + *pStoreTo++ = FRM_COMPONENT_TIMEFIELD; + return aSupported; } diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx index dfef239d93fb..329b65fda26e 100644 --- a/forms/source/component/Time.hxx +++ b/forms/source/component/Time.hxx @@ -52,7 +52,10 @@ public: virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OTimeModel); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OTimeModel"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; // OControlModel's property handling @@ -106,7 +109,10 @@ public: DECLARE_UNO3_AGG_DEFAULTS(OTimeControl, OBoundControl) // ::com::sun::star::lang::XServiceInfo - IMPLEMENTATION_NAME(OTimeControl); + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.OTimeControl"); } + virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE; }; diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index 91ecc23f7efb..abf8956ae772 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -84,12 +84,7 @@ namespace frm #define DECLARE_XPERSISTOBJECT() \ virtual OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \ virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \ - virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \ - - // old macro for quickly implementing XServiceInfo::getImplementationName - #define IMPLEMENTATION_NAME(ImplName) \ - virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \ - { return OUString("com.sun.star.comp.forms." #ImplName); } + virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; class OControlModel; diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx index cf72d01cb0e6..98bdf7344438 100644 --- a/forms/source/inc/forms_module.hxx +++ b/forms/source/inc/forms_module.hxx @@ -198,7 +198,7 @@ namespace FORMS_MODULE_NAMESPACE \ Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw (RuntimeException, std::exception) \ { \ - return ::comphelper::concatSequences( \ + return ::comphelper::combineSequences( \ getAggregateServiceNames(), \ getSupportedServiceNames_Static() \ ); \ @@ -273,7 +273,7 @@ namespace FORMS_MODULE_NAMESPACE aOwnNames[ 4 ] = service5; \ aOwnNames[ 5 ] = service6; \ aOwnNames[ 6 ] = service7; \ - aOwnNames[ 6 ] = service8; \ + aOwnNames[ 7 ] = service8; \ \ return ::comphelper::concatSequences( \ baseclass::getSupportedServiceNames_Static(), \ diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index e428d451fcd0..c6774ddc0488 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -36,6 +36,7 @@ #include <comphelper/propertysetinfo.hxx> #include <comphelper/processfactory.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <algorithm> @@ -680,6 +681,23 @@ Sequence<sal_Int8> Model::getImplementationId() return css::uno::Sequence<sal_Int8>(); } +OUString Model::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.form.Model"); +} + +sal_Bool Model::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> Model::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.xforms.Model"}; +} extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL com_sun_star_form_Model_get_implementation(::com::sun::star::uno::XComponentContext*, diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 0d8b962414e5..2ae00816a163 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -20,11 +20,12 @@ #ifndef INCLUDED_FORMS_SOURCE_XFORMS_MODEL_HXX #define INCLUDED_FORMS_SOURCE_XFORMS_MODEL_HXX -#include <cppuhelper/implbase4.hxx> +#include <cppuhelper/implbase.hxx> #include <propertysetbase.hxx> #include <com/sun/star/xforms/XModel2.hpp> #include <com/sun/star/xforms/XFormsUIHelper1.hpp> #include <com/sun/star/util/XUpdatable.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/uno/Reference.hxx> @@ -65,12 +66,13 @@ namespace xforms * * See http://www.w3.org/TR/xforms/ for more information. */ -typedef cppu::ImplInheritanceHelper4< +typedef cppu::ImplInheritanceHelper< PropertySetBase, com::sun::star::xforms::XModel2, com::sun::star::xforms::XFormsUIHelper1, com::sun::star::util::XUpdatable, - com::sun::star::lang::XUnoTunnel + com::sun::star::lang::XUnoTunnel, + css::lang::XServiceInfo > Model_t; class Model : public Model_t { @@ -439,6 +441,14 @@ public: virtual IntSequence_t SAL_CALL getImplementationId() throw( RuntimeException_t ) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } // namespace diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 9637ae1ae97c..7e88ab115db5 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -24,14 +24,39 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XInterface.hpp> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; +namespace { + +class Implementation: + public cppu::ImplInheritanceHelper< + NameContainer<css::uno::Reference<css::beans::XPropertySet>>, + css::lang::XServiceInfo> +{ + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.form.XForms"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + return css::uno::Sequence<OUString>{"com.sun.star.xforms.XForms"}; + } +}; + +} + extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* SAL_CALL com_sun_star_form_XForms_get_implementation(uno::XComponentContext*, uno::Sequence<uno::Any> const &) { - return cppu::acquire(new NameContainer<uno::Reference<beans::XPropertySet> >()); + return cppu::acquire(new Implementation); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx index 471358285fd2..fdba924ae790 100644 --- a/include/comphelper/sequence.hxx +++ b/include/comphelper/sequence.hxx @@ -62,6 +62,33 @@ namespace comphelper return aReturn; } + /// concat additional elements from right sequence to left sequence + /// + /// be aware that this takes time O(|left| * |right|) + template<typename T> css::uno::Sequence<T> combineSequences( + css::uno::Sequence<T> const & left, css::uno::Sequence<T> const & right) + { + sal_Int32 n1 = left.getLength(); + css::uno::Sequence<T> ret(n1 + right.getLength()); + //TODO: check for overflow + T * p = ret.getArray(); + internal::implCopySequence(left.getConstArray(), p, n1); + sal_Int32 n2 = n1; + for (sal_Int32 i = 0; i != right.getLength(); ++i) { + bool found = false; + for (sal_Int32 j = 0; j != n1; ++j) { + if (right[i] == left[j]) { + found = true; + break; + } + } + if (!found) { + ret[n2++] = right[i]; + } + } + ret.realloc(n2); + return ret; + } /// concat three sequences template <class T> diff --git a/include/comphelper/servicedecl.hxx b/include/comphelper/servicedecl.hxx index 69c640305907..0e3fef2e2380 100644 --- a/include/comphelper/servicedecl.hxx +++ b/include/comphelper/servicedecl.hxx @@ -197,6 +197,22 @@ public: : ServiceImpl_BASE(rServiceDecl, xContext) {} }; +template <typename ImplT> +class InheritingServiceImpl : public OwnServiceImpl< ImplT > +{ +typedef OwnServiceImpl< ImplT > ServiceImpl_BASE; +public: + InheritingServiceImpl( + ServiceDecl const& rServiceDecl, + css::uno::Sequence<css::uno::Any> const& args, + css::uno::Reference<css::uno::XComponentContext> const& xContext ) + : ServiceImpl_BASE(rServiceDecl, args, xContext) {} + InheritingServiceImpl( + ServiceDecl const& rServiceDecl, + css::uno::Reference<css::uno::XComponentContext> const& xContext ) + : ServiceImpl_BASE(rServiceDecl, xContext) {} +}; + template <typename ServiceImplT> struct PostProcessDefault { css::uno::Reference<css::uno::XInterface> @@ -298,6 +314,24 @@ struct class_ : public serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT explicit class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {} }; +template <typename ImplT_, typename WithArgsT = with_args<false> > +struct inheritingClass_ : public serviceimpl_base< detail::InheritingServiceImpl<ImplT_>, WithArgsT > +{ + typedef serviceimpl_base< detail::InheritingServiceImpl<ImplT_>, WithArgsT > baseT; + /** Default ctor. Implementation class without args, expecting + component context as single argument. + */ + inheritingClass_() : baseT() {} + template <typename PostProcessFuncT> + /** Ctor to pass a post processing function/functor. + + @tpl PostProcessDefaultT let your compiler deduce this + @param postProcessFunc function/functor that gets the yet unacquired + ImplT_ pointer returning a + uno::Reference<uno::XInterface> + */ + explicit inheritingClass_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {} +}; // component_... helpers with arbitrary service declarations: diff --git a/include/toolkit/awt/vclxpointer.hxx b/include/toolkit/awt/vclxpointer.hxx index fb224c6cf41b..5e3d86784f70 100644 --- a/include/toolkit/awt/vclxpointer.hxx +++ b/include/toolkit/awt/vclxpointer.hxx @@ -22,9 +22,9 @@ #include <com/sun/star/awt/XPointer.hpp> -#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <osl/mutex.hxx> #include <vcl/pointr.hxx> @@ -33,10 +33,8 @@ // class VCLXPointer -class VCLXPointer : public ::com::sun::star::awt::XPointer, - public ::com::sun::star::lang::XTypeProvider, - public ::com::sun::star::lang::XUnoTunnel, - public ::cppu::OWeakObject +class VCLXPointer: public cppu::WeakImplHelper< + css::awt::XPointer, css::lang::XUnoTunnel, css::lang::XServiceInfo> { private: ::osl::Mutex maMutex; @@ -51,23 +49,23 @@ public: const Pointer& GetPointer() const { return maPointer; } - // ::com::sun::star::uno::XInterface - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - void SAL_CALL acquire() throw() SAL_OVERRIDE { OWeakObject::acquire(); } - void SAL_CALL release() throw() SAL_OVERRIDE { OWeakObject::release(); } - // ::com::sun::star::lang::XUnoTunnel static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw(); static VCLXPointer* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ); sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::awt::XPointer void SAL_CALL setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; sal_Int32 SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/awt/vclxprinter.hxx b/include/toolkit/awt/vclxprinter.hxx index 71289fe86857..892cc4cb0839 100644 --- a/include/toolkit/awt/vclxprinter.hxx +++ b/include/toolkit/awt/vclxprinter.hxx @@ -25,13 +25,14 @@ #include <com/sun/star/awt/XPrinter.hpp> #include <com/sun/star/awt/XPrinterServer.hpp> #include <com/sun/star/awt/XInfoPrinter.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> #include <toolkit/helper/mutexandbroadcasthelper.hxx> #include <cppuhelper/propshlp.hxx> -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase.hxx> #include <comphelper/uno3.hxx> #include <vcl/oldprintadaptor.hxx> @@ -49,7 +50,7 @@ // class VCLXPrinterPropertySet -typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XPrinterPropertySet +typedef ::cppu::WeakImplHelper < ::com::sun::star::awt::XPrinterPropertySet > VCLXPrinterPropertySet_Base; class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base ,public MutexAndBroadcastHelper @@ -102,7 +103,7 @@ public: // class VCLXPrinter -typedef ::cppu::ImplInheritanceHelper1 < VCLXPrinterPropertySet +typedef ::cppu::ImplInheritanceHelper < VCLXPrinterPropertySet , ::com::sun::star::awt::XPrinter > VCLXPrinter_Base; class VCLXPrinter: public VCLXPrinter_Base @@ -141,7 +142,7 @@ public: // class VCLXInfoPrinter -typedef ::cppu::ImplInheritanceHelper1 < VCLXPrinterPropertySet +typedef ::cppu::ImplInheritanceHelper < VCLXPrinterPropertySet , ::com::sun::star::awt::XInfoPrinter > VCLXInfoPrinter_Base; class VCLXInfoPrinter: public VCLXInfoPrinter_Base @@ -174,7 +175,8 @@ public: // class VCLXPrinterServer -typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XPrinterServer +typedef ::cppu::WeakImplHelper < ::com::sun::star::awt::XPrinterServer, + css::lang::XServiceInfo > VCLXPrinterServer_Base; class VCLXPrinterServer : public VCLXPrinterServer_Base { @@ -183,6 +185,15 @@ public: ::com::sun::star::uno::Sequence< OUString > SAL_CALL getPrinterNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > SAL_CALL createPrinter( const OUString& printerName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const OUString& printerName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; #endif // INCLUDED_TOOLKIT_AWT_VCLXPRINTER_HXX diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx index c6f46eb678b2..347fc20a9964 100644 --- a/include/toolkit/controls/dialogcontrol.hxx +++ b/include/toolkit/controls/dialogcontrol.hxx @@ -153,7 +153,14 @@ public: // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ) SAL_OVERRIDE; diff --git a/include/toolkit/controls/formattedcontrol.hxx b/include/toolkit/controls/formattedcontrol.hxx index b91523e23241..44584c4e9f2e 100644 --- a/include/toolkit/controls/formattedcontrol.hxx +++ b/include/toolkit/controls/formattedcontrol.hxx @@ -77,7 +77,11 @@ namespace toolkit // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlFormattedFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlFormattedFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual ~UnoControlFormattedFieldModel(); @@ -114,7 +118,11 @@ namespace toolkit void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoFormattedFieldControl, UnoEditControl, "com.sun.star.awt.UnoControlFormattedField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/roadmapcontrol.hxx b/include/toolkit/controls/roadmapcontrol.hxx index e95853db1654..1d0f35cde12b 100644 --- a/include/toolkit/controls/roadmapcontrol.hxx +++ b/include/toolkit/controls/roadmapcontrol.hxx @@ -111,7 +111,11 @@ namespace toolkit OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlRoadmapModel_Base, "com.sun.star.awt.UnoControlRoadmapModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -179,7 +183,11 @@ namespace toolkit DECLARE_XINTERFACE() // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoRoadmapControl, UnoControlBase, "com.sun.star.awt.UnoControlRoadmap" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/stdtabcontroller.hxx b/include/toolkit/controls/stdtabcontroller.hxx index be86f995ae55..789eb7791c72 100644 --- a/include/toolkit/controls/stdtabcontroller.hxx +++ b/include/toolkit/controls/stdtabcontroller.hxx @@ -77,7 +77,14 @@ public: void SAL_CALL activateLast( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO( StdTabController, szServiceName2_TabController ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/stdtabcontrollermodel.hxx b/include/toolkit/controls/stdtabcontrollermodel.hxx index f03ae4e75e9e..da4932374eac 100644 --- a/include/toolkit/controls/stdtabcontrollermodel.hxx +++ b/include/toolkit/controls/stdtabcontrollermodel.hxx @@ -128,7 +128,14 @@ public: void SAL_CALL read( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& InStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO( StdTabControllerModel, szServiceName2_TabControllerModel ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/tkscrollbar.hxx b/include/toolkit/controls/tkscrollbar.hxx index 979b098b2d95..80b1bfa6a657 100644 --- a/include/toolkit/controls/tkscrollbar.hxx +++ b/include/toolkit/controls/tkscrollbar.hxx @@ -54,7 +54,11 @@ namespace toolkit OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlScrollBarModel, UnoControlModel, "com.sun.star.awt.UnoControlScrollBarModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -104,7 +108,11 @@ namespace toolkit sal_Int32 SAL_CALL getOrientation( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoScrollBarControl, UnoControlBase, "com.sun.star.awt.UnoControlScrollBar" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/unocontrolcontainer.hxx b/include/toolkit/controls/unocontrolcontainer.hxx index f9bad95baf2c..c6a81674d42f 100644 --- a/include/toolkit/controls/unocontrolcontainer.hxx +++ b/include/toolkit/controls/unocontrolcontainer.hxx @@ -105,7 +105,11 @@ public: // ::com::sun::star::awt::XWindow void SAL_CALL setVisible( sal_Bool Visible ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - DECLIMPL_SERVICEINFO_DERIVED( UnoControlContainer, UnoControlBase, "com.sun.star.awt.UnoControlContainer" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ) SAL_OVERRIDE; diff --git a/include/toolkit/controls/unocontrolcontainermodel.hxx b/include/toolkit/controls/unocontrolcontainermodel.hxx index df934f2fdafc..2ab139b21e9e 100644 --- a/include/toolkit/controls/unocontrolcontainermodel.hxx +++ b/include/toolkit/controls/unocontrolcontainermodel.hxx @@ -48,7 +48,11 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlContainerModel, UnoControlModel, "com.sun.star.awt.UnoControlContainerModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx index e87800bef0b4..a0bd3cdbcd0d 100644 --- a/include/toolkit/controls/unocontrols.hxx +++ b/include/toolkit/controls/unocontrols.hxx @@ -98,7 +98,11 @@ public: // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlEditModel, UnoControlModel, "com.sun.star.awt.UnoControlEditModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -201,7 +205,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlFileControlModel, UnoControlModel, "com.sun.star.awt.UnoControlFileControlModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -214,7 +222,11 @@ public: OUString GetComponentServiceName() SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoFileControl, UnoEditControl, "com.sun.star.awt.UnoControlFileControl" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -269,7 +281,11 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, GraphicControlModel, "com.sun.star.awt.UnoControlButtonModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -319,7 +335,11 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, UnoControlBase, "com.sun.star.awt.UnoControlButton" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -347,7 +367,11 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, GraphicControlModel, "com.sun.star.awt.UnoControlImageControlModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::cppu::OPropertySetHelper void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; @@ -380,7 +404,11 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, UnoControlBase, "com.sun.star.awt.UnoControlImageControl" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -406,8 +434,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, GraphicControlModel, "com.sun.star.awt.UnoControlRadioButtonModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -459,8 +490,11 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, UnoControlBase, "com.sun.star.awt.UnoControlRadioButton" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -485,7 +519,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, GraphicControlModel, "com.sun.star.awt.UnoControlCheckBoxModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -540,8 +578,11 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, UnoControlBase, "com.sun.star.awt.UnoControlCheckBox" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -640,8 +681,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedTextModel, UnoControlModel, "com.sun.star.awt.UnoControlFixedTextModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -679,8 +723,11 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoFixedTextControl, UnoControlBase, "com.sun.star.awt.UnoControlFixedText" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -705,8 +752,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlGroupBoxModel, UnoControlModel, "com.sun.star.awt.UnoControlGroupBoxModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -721,8 +771,11 @@ public: sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoGroupBoxControl, UnoControlBase, "com.sun.star.awt.UnoControlGroupBox" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1068,8 +1121,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlDateFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlDateFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1119,7 +1175,11 @@ public: sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoDateFieldControl, UnoSpinFieldControl, "com.sun.star.awt.UnoControlDateField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1144,8 +1204,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlTimeFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlTimeFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1193,8 +1256,11 @@ public: sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoTimeFieldControl, UnoSpinFieldControl, "com.sun.star.awt.UnoControlTimeField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1219,8 +1285,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlNumericFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlNumericFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1270,8 +1339,11 @@ public: sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoNumericFieldControl, UnoSpinFieldControl, "com.sun.star.awt.UnoControlNumericField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1296,8 +1368,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlCurrencyFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlCurrencyFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1347,7 +1422,11 @@ public: sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoCurrencyFieldControl, UnoSpinFieldControl, "com.sun.star.awt.UnoControlCurrencyField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1372,8 +1451,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlPatternFieldModel, UnoControlModel, "com.sun.star.awt.UnoControlPatternFieldModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1407,8 +1489,11 @@ public: sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoPatternFieldControl, UnoSpinFieldControl, "com.sun.star.awt.UnoControlPatternField" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1433,7 +1518,11 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlProgressBarModel, UnoControlModel, "com.sun.star.awt.UnoControlProgressBarModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1463,7 +1552,11 @@ public: sal_Int32 SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoProgressBarControl, UnoControlBase, "com.sun.star.awt.UnoControlProgressBar" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1489,8 +1582,11 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedLineModel, UnoControlModel, "com.sun.star.awt.UnoControlFixedLineModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -1505,8 +1601,11 @@ public: sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoFixedLineControl, UnoControlBase, "com.sun.star.awt.UnoControlFixedLine" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/vbahelper/vbaeventshelperbase.hxx b/include/vbahelper/vbaeventshelperbase.hxx index c94ae3c95047..737bfcacfe10 100644 --- a/include/vbahelper/vbaeventshelperbase.hxx +++ b/include/vbahelper/vbaeventshelperbase.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/script/vba/XVBAEventProcessor.hpp> #include <com/sun/star/util/XChangesListener.hpp> -#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/implbase.hxx> #include <vbahelper/vbahelper.hxx> namespace com { namespace sun { namespace star { @@ -36,10 +36,11 @@ namespace com { namespace sun { namespace star { -typedef ::cppu::WeakImplHelper3< +typedef ::cppu::WeakImplHelper< css::script::vba::XVBAEventProcessor, css::document::XEventListener, - css::util::XChangesListener > VbaEventsHelperBase_BASE; + css::util::XChangesListener, + css::lang::XServiceInfo > VbaEventsHelperBase_BASE; class VBAHELPER_DLLPUBLIC VbaEventsHelperBase : public VbaEventsHelperBase_BASE { @@ -62,6 +63,9 @@ public: // lang::XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& rEvent ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // little helpers --------------------------------------------------------- /** Helper to execute event handlers without throwing any exceptions. */ diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index f671572dc18f..e03ae4471787 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -1161,7 +1161,7 @@ Sequence<OUString> OObjectOutputStream_getSupportedServiceNames(void) // XServiceInfo OUString OObjectOutputStream::getImplementationName() throw (std::exception) { - return ODataInputStream_getImplementationName(); + return OObjectOutputStream_getImplementationName(); } // XServiceInfo diff --git a/sc/inc/ScPanelFactory.hxx b/sc/inc/ScPanelFactory.hxx index 8a0c704f3337..69af4f086e26 100644 --- a/sc/inc/ScPanelFactory.hxx +++ b/sc/inc/ScPanelFactory.hxx @@ -19,9 +19,10 @@ #ifndef INCLUDED_SC_INC_SCPANELFACTORY_HXX #define INCLUDED_SC_INC_SCPANELFACTORY_HXX -#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/ui/XUIElementFactory.hpp> #include <boost/noncopyable.hpp> @@ -30,8 +31,8 @@ namespace sc { namespace sidebar { namespace { - typedef ::cppu::WeakComponentImplHelper1 < - css::ui::XUIElementFactory + typedef ::cppu::WeakComponentImplHelper < + css::ui::XUIElementFactory, css::lang::XServiceInfo > PanelFactoryInterfaceBase; } @@ -41,10 +42,10 @@ class ScPanelFactory public PanelFactoryInterfaceBase { public: - static ::rtl::OUString SAL_CALL getImplementationName(void); + 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(void); + static css::uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_static(); ScPanelFactory(void); virtual ~ScPanelFactory(void); @@ -57,6 +58,15 @@ public: css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } } // end of namespace sc::sidebar diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index a53ae72da6a0..b0d4c8fdd4ed 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <comphelper/namedvaluecollection.hxx> - +#include <cppuhelper/supportsservice.hxx> #include <boost/bind.hpp> using namespace css; @@ -46,7 +46,7 @@ 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 (void) +::rtl::OUString SAL_CALL ScPanelFactory::getImplementationName_static() { return OUString(IMPLEMENTATION_NAME); } @@ -59,7 +59,7 @@ css::uno::Reference<css::uno::XInterface> SAL_CALL ScPanelFactory::createInstanc return xService; } -css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames (void) +css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames_static() { css::uno::Sequence<OUString> aServiceNames (1); aServiceNames[0] = SERVICE_NAME; @@ -168,6 +168,24 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( return xElement; } +OUString ScPanelFactory::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return getImplementationName_static(); +} + +sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return getSupportedServiceNames_static(); +} + } } // end of namespace sc::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 865449f27718..dc30db4cd577 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -142,7 +142,7 @@ static const SfxItemPropertyMapEntry* lcl_GetAutoFieldMap() SC_SIMPLE_SERVICE_INFO( ScAutoFormatFieldObj, "ScAutoFormatFieldObj", "com.sun.star.sheet.TableAutoFormatField" ) SC_SIMPLE_SERVICE_INFO( ScAutoFormatObj, "ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat" ) -SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, "ScAutoFormatsObj", SCAUTOFORMATSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, "stardiv.StarCalc.ScAutoFormatsObj", SCAUTOFORMATSOBJ_SERVICE ) static bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, const OUString& rName, sal_uInt16& rOutIndex ) { diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 51a95910771d..dff6fd0f96c9 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -89,9 +89,9 @@ static const SfxItemPropertyMapEntry* lcl_GetSettingsPropertyMap() #define SCRECENTFUNCTIONSOBJ_SERVICE "com.sun.star.sheet.RecentFunctions" #define SCSPREADSHEETSETTINGS_SERVICE "com.sun.star.sheet.GlobalSheetSettings" -SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "stardiv.StarCalc.ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "stardiv.StarCalc.ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "stardiv.StarCalc.ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE ) extern "C" { @@ -280,13 +280,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScDocument_createInstance, ScDocument_getSupportedServiceNames() )); } - else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName() ) + else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName_static() ) { xFactory = ::cppu::createSingleFactory( reinterpret_cast<lang::XMultiServiceFactory*>(pServiceManager), - ::sc::sidebar::ScPanelFactory::getImplementationName(), + ::sc::sidebar::ScPanelFactory::getImplementationName_static(), ::sc::sidebar::ScPanelFactory::createInstance, - ::sc::sidebar::ScPanelFactory::getSupportedServiceNames() ); + ::sc::sidebar::ScPanelFactory::getSupportedServiceNames_static() ); } void* pRet = NULL; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index dcd16fad3b24..b9e2bf45be45 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2164,7 +2164,7 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getAvailableServiceNames() // XServiceInfo OUString SAL_CALL ScModelObj::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "ScModelObj" ); + return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" ); } sal_Bool SAL_CALL ScModelObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 6f3b11d62390..c53e3b9cf8af 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -224,7 +224,7 @@ uno::Sequence<OUString> ScFunctionAccess::getSupportedServiceNames_Static() // XServiceInfo OUString SAL_CALL ScFunctionAccess::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "ScFunctionAccess"); + return getImplementationName_Static(); } sal_Bool SAL_CALL ScFunctionAccess::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 9d76d4417fa2..0c8eaf4f5263 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -615,6 +615,19 @@ void SAL_CALL ScVbaEventsHelper::notifyEvent( const css::document::EventObject& VbaEventsHelperBase::notifyEvent( rEvent ); } +OUString ScVbaEventsHelper::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("ScVbaEventsHelper"); +} + +css::uno::Sequence<OUString> ScVbaEventsHelper::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.script.vba.VBASpreadsheetEventProcessor"}; +} + // protected ------------------------------------------------------------------ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index 93c946742562..87dd60be46ea 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -37,6 +37,12 @@ public: virtual void SAL_CALL notifyEvent( const css::document::EventObject& rEvent ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + protected: virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException) SAL_OVERRIDE; virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) SAL_OVERRIDE; diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java index 497b0731ce1e..dcf173ab4aba 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java @@ -79,7 +79,9 @@ public abstract class ScriptProvider implements private final String[] __serviceNames = { "com.sun.star.script.provider.ScriptProviderFor", - "com.sun.star.script.provider.LanguageScriptProvider" + "com.sun.star.script.provider.LanguageScriptProvider", + "com.sun.star.script.browse.BrowseNode", + "com.sun.star.script.provider.ScriptProvider" }; protected String language; @@ -671,4 +673,4 @@ public abstract class ScriptProvider implements return xModel; } -}
\ No newline at end of file +} diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 201b5c9752a0..c8867aa796d1 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -34,6 +34,7 @@ from com.sun.star.mail.MailServiceType import IMAP from com.sun.star.uno import XCurrentContext from com.sun.star.lang import IllegalArgumentException from com.sun.star.lang import EventObject +from com.sun.star.lang import XServiceInfo from com.sun.star.mail import SendMailMessageFailedException from email.mime.base import MIMEBase @@ -50,6 +51,11 @@ from socket import _GLOBAL_DEFAULT_TIMEOUT import sys, smtplib, imaplib, poplib dbg = False +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_providerImplName = "org.openoffice.pyuno.MailServiceProvider" +g_messageImplName = "org.openoffice.pyuno.MailMessage" + #no stderr under windows, output to pymailmerge.log #with no buffering if dbg and os.name == 'nt': @@ -428,7 +434,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): print("PyMailPOP3Service getCurrentConnectionContext", file=dbgout) return self.connectioncontext -class PyMailServiceProvider(unohelper.Base, XMailServiceProvider): +class PyMailServiceProvider(unohelper.Base, XMailServiceProvider, XServiceInfo): def __init__( self, ctx ): if dbg: print("PyMailServiceProvider init", file=dbgout) @@ -445,6 +451,15 @@ class PyMailServiceProvider(unohelper.Base, XMailServiceProvider): else: print("PyMailServiceProvider, unknown TYPE " + aType, file=dbgout) + def getImplementationName(self): + return g_providerImplName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_providerImplName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_providerImplName) + class PyMailMessage(unohelper.Base, XMailMessage): def __init__( self, ctx, sTo='', sFrom='', Subject='', Body=None, aMailAttachment=None ): if dbg: @@ -497,11 +512,18 @@ class PyMailMessage(unohelper.Base, XMailMessage): print("PyMailMessage.getAttachments", file=dbgout) return tuple(self.aMailAttachments) -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + def getImplementationName(self): + return g_messageImplName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_messageImplName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_messageImplName) + g_ImplementationHelper.addImplementation( \ - PyMailServiceProvider, "org.openoffice.pyuno.MailServiceProvider", + PyMailServiceProvider, g_providerImplName, ("com.sun.star.mail.MailServiceProvider",),) g_ImplementationHelper.addImplementation( \ - PyMailMessage, "org.openoffice.pyuno.MailMessage", + PyMailMessage, g_messageImplName, ("com.sun.star.mail.MailMessage",),) diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 3a693d2297cc..381552c29369 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -775,7 +775,7 @@ StringResourcePersistenceImpl::~StringResourcePersistenceImpl() OUString StringResourcePersistenceImpl::getImplementationName( ) throw (RuntimeException, std::exception) { - return OUString( "com.sun.star.comp.scripting.StringResourceWithLocation"); + return OUString( "com.sun.star.comp.scripting.StringResource"); } diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx index 493834c6e5ab..b25a33d0bb21 100644 --- a/sd/source/ui/framework/configuration/Configuration.cxx +++ b/sd/source/ui/framework/configuration/Configuration.cxx @@ -234,6 +234,26 @@ void SAL_CALL Configuration::setName (const OUString& rsName) (void)rsName; // rsName is ignored. } +OUString Configuration::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString( + "com.sun.star.comp.Draw.framework.configuration.Configuration"); +} + +sal_Bool Configuration::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> Configuration::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.drawing.framework.Configuration"}; +} + void Configuration::PostEvent ( const Reference<XResourceId>& rxResourceId, const bool bActivation) diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index 623f4a500162..1aef100bf4c7 100644 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -398,6 +398,25 @@ void SAL_CALL ResourceId::initialize (const Sequence<Any>& aArguments) ParseResourceURL(); } +OUString ResourceId::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.Draw.framework.ResourceId"); +} + +sal_Bool ResourceId::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> ResourceId::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.drawing.framework.ResourceId"}; +} + /** When eMode is DIRECTLY then the anchor of the called object and the anchor represented by the given sequence of anchor URLs have to be identical. When eMode is RECURSIVE then the anchor of the called diff --git a/sd/source/ui/inc/framework/Configuration.hxx b/sd/source/ui/inc/framework/Configuration.hxx index 457023b633e5..7d17b200a533 100644 --- a/sd/source/ui/inc/framework/Configuration.hxx +++ b/sd/source/ui/inc/framework/Configuration.hxx @@ -23,17 +23,19 @@ #include "MutexOwner.hxx" #include <com/sun/star/drawing/framework/XConfiguration.hpp> #include <com/sun/star/drawing/framework/XConfigurationControllerBroadcaster.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/container/XNamed.hpp> -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase.hxx> #include <boost/scoped_ptr.hpp> namespace { -typedef ::cppu::WeakComponentImplHelper2 < +typedef ::cppu::WeakComponentImplHelper < ::com::sun::star::drawing::framework::XConfiguration, - ::com::sun::star::container::XNamed + ::com::sun::star::container::XNamed, + css::lang::XServiceInfo > ConfigurationInterfaceBase; } // end of anonymous namespace. @@ -128,6 +130,15 @@ public: virtual void SAL_CALL setName (const OUString& rName) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + private: class ResourceContainer; /** The resource container holds the URLs of unique resource and of diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx index 102a1c2b7fbb..c407db582777 100644 --- a/sd/source/ui/inc/framework/ResourceId.hxx +++ b/sd/source/ui/inc/framework/ResourceId.hxx @@ -20,17 +20,23 @@ #ifndef INCLUDED_SD_SOURCE_UI_INC_FRAMEWORK_RESOURCEID_HXX #define INCLUDED_SD_SOURCE_UI_INC_FRAMEWORK_RESOURCEID_HXX +#include <sal/config.h> + +#include <vector> + #include <com/sun/star/drawing/framework/XResourceId.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XURLTransformer.hpp> -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/implbase.hxx> #include <boost/scoped_ptr.hpp> namespace { -typedef ::cppu::WeakImplHelper2 < +typedef ::cppu::WeakImplHelper < css::drawing::framework::XResourceId, - css::lang::XInitialization + css::lang::XInitialization, + css::lang::XServiceInfo > ResourceIdInterfaceBase; } // end of anonymous namespace. @@ -156,6 +162,15 @@ public: const css::uno::Sequence<css::uno::Any>& aArguments) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + private: /** The set of URLs that consist of the resource URL at index 0 and the anchor URLs and indices 1 and above. diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index 8407ee0de734..908908c7277c 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> +#include <cppuhelper/supportsservice.hxx> #include <rtl/ref.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> @@ -213,6 +214,24 @@ void SAL_CALL PresenterCanvas::initialize ( } } +OUString PresenterCanvas::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.Draw.PresenterCanvasFactory"); +} + +sal_Bool PresenterCanvas::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> PresenterCanvas::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.rendering.Canvas"}; +} + //----- XCanvas --------------------------------------------------------------- void SAL_CALL PresenterCanvas::clear (void) diff --git a/sd/source/ui/presenter/PresenterCanvas.hxx b/sd/source/ui/presenter/PresenterCanvas.hxx index 80dabd43d1de..d60d41f95c9b 100644 --- a/sd/source/ui/presenter/PresenterCanvas.hxx +++ b/sd/source/ui/presenter/PresenterCanvas.hxx @@ -27,23 +27,25 @@ #include <com/sun/star/awt/XWindowListener.hpp> #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/rendering/XBitmapCanvas.hpp> #include <com/sun/star/rendering/VolatileContentDestroyedException.hpp> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase.hxx> #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> namespace sd { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper4 < + typedef ::cppu::WeakComponentImplHelper < css::rendering::XSpriteCanvas, css::rendering::XBitmap, css::awt::XWindowListener, - css::lang::XInitialization + css::lang::XInitialization, + css::lang::XServiceInfo > PresenterCanvasInterfaceBase; } @@ -147,6 +149,15 @@ public: const css::uno::Sequence<css::uno::Any>& rArguments) throw(css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XCanvas virtual void SAL_CALL clear (void) diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index eb0b5f8161e5..c744aac4a378 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -25,6 +25,7 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <cppcanvas/vclfactory.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -62,6 +63,24 @@ void SAL_CALL SlideRenderer::initialize (const Sequence<Any>& rArguments) } } +OUString SlideRenderer::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.Draw.SlideRenderer"); +} + +sal_Bool SlideRenderer::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> SlideRenderer::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.drawing.SlideRenderer"}; +} + //----- XSlideRenderer -------------------------------------------------------- Reference<awt::XBitmap> SlideRenderer::createPreview ( diff --git a/sd/source/ui/presenter/SlideRenderer.hxx b/sd/source/ui/presenter/SlideRenderer.hxx index 6e318bcbc193..19846faca260 100644 --- a/sd/source/ui/presenter/SlideRenderer.hxx +++ b/sd/source/ui/presenter/SlideRenderer.hxx @@ -24,19 +24,21 @@ #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XSlideRenderer.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase.hxx> #include <boost/noncopyable.hpp> namespace sd { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper2 < + typedef ::cppu::WeakComponentImplHelper < css::drawing::XSlideRenderer, - css::lang::XInitialization + css::lang::XInitialization, + css::lang::XServiceInfo > SlideRendererInterfaceBase; } @@ -57,6 +59,15 @@ public: virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XSlideRenderer virtual css::uno::Reference<css::awt::XBitmap> SAL_CALL createPreview ( diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ec29f8412880..028091292007 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1177,7 +1177,9 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames( OUString SAL_CALL SdXImpressDocument::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "SdXImpressDocument" ); + return mbImpressDoc + ? OUString("com.sun.star.comp.Draw.PresentationDocument") + : OUString("com.sun.star.comp.Draw.DrawingDocument"); } sal_Bool SAL_CALL SdXImpressDocument::supportsService( const OUString& ServiceName ) diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 75840e78fff7..33c3f44c4af9 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/io/TempFile.hpp> - +#include <cppuhelper/supportsservice.hxx> #include <boost/scoped_ptr.hpp> #include <string.h> @@ -388,6 +388,24 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF return aOutTypeName; } +OUString PDFDetector::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("org.libreoffice.comp.documents.PDFDetector"); +} + +sal_Bool PDFDetector::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> PDFDetector::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.document.ImportFilter"}; +} + bool checkDocChecksum( const OUString& rInPDFFileURL, sal_uInt32 nBytes, const OUString& rChkSum ) diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx index 334e68fc8aa8..fede97c8dce8 100644 --- a/sdext/source/pdfimport/filterdet.hxx +++ b/sdext/source/pdfimport/filterdet.hxx @@ -26,15 +26,15 @@ #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> -#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> namespace pdfi { -typedef ::cppu::WeakComponentImplHelper1< - css::document::XExtendedFilterDetection > PDFDetectorBase; +typedef ::cppu::WeakComponentImplHelper< + css::document::XExtendedFilterDetection, css::lang::XServiceInfo> PDFDetectorBase; class PDFDetector : private cppu::BaseMutex, public PDFDetectorBase @@ -51,6 +51,15 @@ public: virtual OUString SAL_CALL detect( css::uno::Sequence< css::beans::PropertyValue >& io_rDescriptor ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 6162d27b049d..d9832bd76c48 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -32,6 +32,7 @@ #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -200,10 +201,27 @@ void SAL_CALL PDFIHybridAdaptor::setTargetDocument( const uno::Reference< lang:: throw lang::IllegalArgumentException(); } +OUString PDFIHybridAdaptor::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("org.libreoffice.comp.documents.HybridPDFImport"); +} + +sal_Bool PDFIHybridAdaptor::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} +css::uno::Sequence<OUString> PDFIHybridAdaptor::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.document.ImportFilter"}; +} -PDFIRawAdaptor::PDFIRawAdaptor( const uno::Reference< uno::XComponentContext >& xContext ) : +PDFIRawAdaptor::PDFIRawAdaptor( OUString const & implementationName, const uno::Reference< uno::XComponentContext >& xContext ) : PDFIAdaptorBase( m_aMutex ), + m_implementationName(implementationName), m_xContext( xContext ), m_xModel(), m_pVisitorFactory(), @@ -316,6 +334,24 @@ void SAL_CALL PDFIRawAdaptor::setTargetDocument( const uno::Reference< lang::XCo throw lang::IllegalArgumentException(); } +OUString PDFIRawAdaptor::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return m_implementationName; +} + +sal_Bool PDFIRawAdaptor::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> PDFIRawAdaptor::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.document.ImportFilter"}; +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/pdfiadaptor.hxx b/sdext/source/pdfimport/pdfiadaptor.hxx index 0b7c749b08c5..ab25dc288cd4 100644 --- a/sdext/source/pdfimport/pdfiadaptor.hxx +++ b/sdext/source/pdfimport/pdfiadaptor.hxx @@ -23,6 +23,7 @@ #include "xmlemitter.hxx" #include "treevisitorfactory.hxx" +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/xml/XImportFilter.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -33,15 +34,16 @@ #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> namespace pdfi { - typedef ::cppu::WeakComponentImplHelper2< + typedef ::cppu::WeakComponentImplHelper< css::document::XFilter, - css::document::XImporter > PDFIHybridAdaptorBase; + css::document::XImporter, + css::lang::XServiceInfo> PDFIHybridAdaptorBase; class PDFIHybridAdaptor : private cppu::BaseMutex, public PDFIHybridAdaptorBase @@ -64,11 +66,20 @@ namespace pdfi virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDocument ) throw( css::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; - typedef ::cppu::WeakComponentImplHelper2< + typedef ::cppu::WeakComponentImplHelper< css::xml::XImportFilter, - css::document::XImporter > PDFIAdaptorBase; + css::document::XImporter, + css::lang::XServiceInfo> PDFIAdaptorBase; /** Adapts raw pdf import to XImportFilter interface */ @@ -76,6 +87,7 @@ namespace pdfi public PDFIAdaptorBase { private: + OUString const m_implementationName; css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< @@ -92,7 +104,8 @@ namespace pdfi const OUString& rFilterOptions = OUString()); public: - explicit PDFIRawAdaptor( const css::uno::Reference< + explicit PDFIRawAdaptor( OUString const & implementationName, + const css::uno::Reference< css::uno::XComponentContext >& xContext ); /** Set factory object used to create the tree visitors @@ -125,6 +138,15 @@ namespace pdfi // XImporter virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDocument ) throw( css::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx index 156244fc5677..6e0d175d4b50 100644 --- a/sdext/source/pdfimport/services.cxx +++ b/sdext/source/pdfimport/services.cxx @@ -40,7 +40,7 @@ namespace static Reference< XInterface > Create_PDFIRawAdaptor_Writer( const Reference< XComponentContext >& _rxContext ) { - pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( _rxContext ); + pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( "org.libreoffice.comp.documents.WriterPDFImport", _rxContext ); pAdaptor->setTreeVisitorFactory(pdfi::createWriterTreeVisitorFactory()); pAdaptor->enableToplevelText(); // TEMP! TEMP! @@ -50,7 +50,7 @@ namespace static Reference< XInterface > Create_PDFIRawAdaptor_Draw( const Reference< XComponentContext >& _rxContext ) { - pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( _rxContext ); + pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( "org.libreoffice.comp.documents.DrawPDFImport", _rxContext ); pAdaptor->setTreeVisitorFactory(pdfi::createDrawTreeVisitorFactory()); @@ -59,7 +59,7 @@ namespace static Reference< XInterface > Create_PDFIRawAdaptor_Impress( const Reference< XComponentContext >& _rxContext ) { - pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( _rxContext ); + pdfi::PDFIRawAdaptor* pAdaptor = new pdfi::PDFIRawAdaptor( "org.libreoffice.comp.documents.ImpressPDFImport", _rxContext ); pAdaptor->setTreeVisitorFactory(pdfi::createImpressTreeVisitorFactory()); diff --git a/sdext/source/pdfimport/test/pdf2xml.cxx b/sdext/source/pdfimport/test/pdf2xml.cxx index 974822de0953..518b0ef2c938 100644 --- a/sdext/source/pdfimport/test/pdf2xml.cxx +++ b/sdext/source/pdfimport/test/pdf2xml.cxx @@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) test::BootstrapFixtureBase aEnv; aEnv.setUp(); - pdfi::PDFIRawAdaptor aAdaptor( aEnv.getComponentContext() ); + pdfi::PDFIRawAdaptor aAdaptor( OUString(), aEnv.getComponentContext() ); aAdaptor.setTreeVisitorFactory(pTreeFactory); aAdaptor.odfConvert( aSrcURL, new OutputWrap(aDstURL), NULL ); } diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 8388377f8e7f..e1e399b0202d 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -473,7 +473,7 @@ namespace void testOdfDrawExport() { - pdfi::PDFIRawAdaptor aAdaptor( getComponentContext() ); + pdfi::PDFIRawAdaptor aAdaptor( OUString(), getComponentContext() ); aAdaptor.setTreeVisitorFactory( createDrawTreeVisitorFactory() ); OUString tempFileURL; @@ -488,7 +488,7 @@ namespace void testOdfWriterExport() { - pdfi::PDFIRawAdaptor aAdaptor( getComponentContext() ); + pdfi::PDFIRawAdaptor aAdaptor( OUString(), getComponentContext() ); aAdaptor.setTreeVisitorFactory( createWriterTreeVisitorFactory() ); OUString tempFileURL; diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx index 50d69f4dca79..c18625492d74 100644 --- a/sdext/source/presenter/PresenterProtocolHandler.cxx +++ b/sdext/source/presenter/PresenterProtocolHandler.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/presentation/XSlideShowView.hpp> #include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <cppuhelper/compbase2.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -289,6 +290,25 @@ void SAL_CALL PresenterProtocolHandler::initialize (const Sequence<Any>& aArgume } } +OUString PresenterProtocolHandler::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return getImplementationName_static(); +} + +sal_Bool PresenterProtocolHandler::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> +PresenterProtocolHandler::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return getSupportedServiceNames_static(); +} + //----- XDispatchProvider ----------------------------------------------------- Reference<frame::XDispatch> SAL_CALL PresenterProtocolHandler::queryDispatch ( diff --git a/sdext/source/presenter/PresenterProtocolHandler.hxx b/sdext/source/presenter/PresenterProtocolHandler.hxx index 287dcd06096f..ecae6661329c 100644 --- a/sdext/source/presenter/PresenterProtocolHandler.hxx +++ b/sdext/source/presenter/PresenterProtocolHandler.hxx @@ -20,19 +20,21 @@ #ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPROTOCOLHANDLER_HXX #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPROTOCOLHANDLER_HXX -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <rtl/ref.hxx> namespace sdext { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper2 < + typedef ::cppu::WeakComponentImplHelper < css::lang::XInitialization, + css::lang::XServiceInfo, css::frame::XDispatchProvider > PresenterProtocolHandlerInterfaceBase; } @@ -60,6 +62,15 @@ public: const css::uno::Sequence<css::uno::Any>& aArguments) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XDispatchProvider virtual css::uno::Reference<css::frame::XDispatch > SAL_CALL diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index d761f83676c6..51a08a8a96bb 100644 --- a/sfx2/source/appl/appdispatchprovider.cxx +++ b/sfx2/source/appl/appdispatchprovider.cxx @@ -122,7 +122,7 @@ sal_Bool SAL_CALL SfxAppDispatchProvider::supportsService( const OUString& sServ css::uno::Sequence< OUString > SAL_CALL SfxAppDispatchProvider::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { css::uno::Sequence< OUString > seqServiceNames( 2 ); - seqServiceNames.getArray()[0] = "com.sun.star.frame.DispatchProvider"; + seqServiceNames.getArray()[0] = "com.sun.star.frame.ProtocolHandler"; seqServiceNames.getArray()[1] = "com.sun.star.frame.AppDispatchProvider"; return seqServiceNames; } diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index a5e05d2bf4f1..07da391c5601 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -60,12 +60,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::configuration; -#define COMP_IMPL_NAME "com.sun.star.comp.system.SimpleCommandMail2" - - -// helper functions - - namespace // private { Sequence< OUString > SAL_CALL Component_getSupportedServiceNames() @@ -313,7 +307,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM OUString SAL_CALL CmdMailSuppl::getImplementationName( ) throw( RuntimeException, std::exception ) { - return OUString(COMP_IMPL_NAME); + return OUString("com.sun.star.comp.system.SimpleCommandMail"); } // XServiceInfo diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 34bef4081f24..0239a668f1ff 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -55,18 +55,12 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::system::SystemShellExecuteFlags; using namespace cppu; -#define SHELLEXEC_IMPL_NAME "com.sun.star.comp.system.SystemShellExecute2" - - -// helper functions - - namespace // private { Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = "com.sun.star.sys.shell.SystemShellExecute"; + aRet[0] = "com.sun.star.system.SystemShellExecute"; return aRet; } } @@ -273,7 +267,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar OUString SAL_CALL ShellExec::getImplementationName( ) throw( RuntimeException, std::exception ) { - return OUString(SHELLEXEC_IMPL_NAME ); + return OUString("com.sun.star.comp.system.SystemShellExecute"); } // XServiceInfo diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 9dd0efddf2a5..18e78fc8e40f 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -68,7 +68,7 @@ namespace // private Sequence< OUString > SAL_CALL SysShExec_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = "com.sun.star.sys.shell.SystemShellExecute"; + aRet[0] = "com.sun.star.system.SystemShellExecute"; return aRet; } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 8e617e348d3c..c093d5f92292 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -402,7 +402,7 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny) OUString SmModel::getImplementationName(void) throw( uno::RuntimeException, std::exception ) { - return OUString("com.sun.star.comp.math.FormulaDocument"); + return OUString("com.sun.star.comp.Math.FormulaDocument"); } sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException, std::exception ) diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 4c3425de2818..46fe1a8c4868 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -164,7 +164,7 @@ uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog::getSupportedServiceNam { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.ui.dialog.FilterOptionsDialog"; + pArray[0] = "com.sun.star.ui.dialogs.FilterOptionsDialog"; return aRet; } diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index d911a41931a2..df42d47b46ab 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -18,7 +18,10 @@ */ #include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/supportsservice.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <rtl/ref.hxx> #include <svx/svdobj.hxx> @@ -30,7 +33,7 @@ using namespace com::sun::star; namespace { -typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase; +typedef cppu::WeakComponentImplHelper< ::com::sun::star::graphic::XPrimitiveFactory2D, css::lang::XServiceInfo > PrimitiveFactory2DImplBase; // base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D class PrimitiveFactory2D @@ -44,6 +47,20 @@ public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xDrawPage, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("com.sun.star.comp.graphic.PrimitiveFactory2D"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + return css::uno::Sequence<OUString>{ + "com.sun.star.graphic.PrimitiveFactory2D"}; + } }; Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXShape( diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index f4194224ed9a..e5a0cad0085b 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -35,7 +35,9 @@ #include <rtl/ref.hxx> #include <comphelper/namedvaluecollection.hxx> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/ui/XSidebar.hpp> #include <com/sun/star/ui/XUIElementFactory.hpp> @@ -54,7 +56,7 @@ namespace { #define SERVICE_NAME "com.sun.star.ui.UIElementFactory" */ -typedef ::cppu::WeakComponentImplHelper1< css::ui::XUIElementFactory > +typedef ::cppu::WeakComponentImplHelper< css::ui::XUIElementFactory, css::lang::XServiceInfo > PanelFactoryInterfaceBase; class PanelFactory @@ -74,6 +76,18 @@ public: css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("org.apache.openoffice.comp.svx.sidebar.PanelFactory"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return css::uno::Sequence<OUString>{"com.sun.star.ui.UIElementFactory"}; } }; PanelFactory::PanelFactory (void) diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index 257c829b9c48..71e2f99c8a31 100644 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -83,7 +83,7 @@ OUString SwVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& / namespace vbaeventshelper { namespace sdecl = comphelper::service_decl; -sdecl::class_<SwVbaEventsHelper, sdecl::with_args<true> > serviceImpl; +sdecl::inheritingClass_<SwVbaEventsHelper, sdecl::with_args<true> > serviceImpl; extern sdecl::ServiceDecl const serviceDecl( serviceImpl, "SwVbaEventsHelper", diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index 4fc7d8d11b9a..cc7984077b0d 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -29,9 +29,11 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> #include <rtl/ref.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <comphelper/namedvaluecollection.hxx> -#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> +#include <cppuhelper/supportsservice.hxx> #include <boost/bind.hpp> #include <boost/noncopyable.hpp> @@ -41,8 +43,8 @@ using namespace css::uno; namespace { -typedef ::cppu::WeakComponentImplHelper1 < - css::ui::XUIElementFactory +typedef ::cppu::WeakComponentImplHelper < + css::ui::XUIElementFactory, css::lang::XServiceInfo > PanelFactoryInterfaceBase; class SwPanelFactory @@ -62,6 +64,18 @@ public: css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("org.apache.openoffice.comp.sw.sidebar.SwPanelFactory"); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return css::uno::Sequence<OUString>{"com.sun.star.ui.UIElementFactory"}; } }; SwPanelFactory::SwPanelFactory (void) diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index e806a50668c2..6c0e76fc1d00 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1770,7 +1770,11 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void) OUString SwXTextDocument::getImplementationName(void) throw( RuntimeException, std::exception ) { - return OUString("SwXTextDocument"); + return PTR_CAST(SwGlobalDocShell, pDocShell) != nullptr + ? OUString("com.sun.star.comp.Writer.GlobalDocument") + : PTR_CAST(SwWebDocShell, pDocShell) != nullptr + ? OUString("com.sun.star.comp.Writer.WebDocument") + : OUString("com.sun.star.comp.Writer.TextDocument"); } sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception ) diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 38842b089213..639cc594e588 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -188,13 +188,14 @@ throw (css::uno::RuntimeException, std::exception) const bool bIsPopupMenu = IsPopupMenu(); aGuard.clear(); - css::uno::Sequence< OUString > aNames( 1 ); if ( bIsPopupMenu ) - aNames[ 0 ] = OUString::createFromAscii( szServiceName2_PopupMenu ); + return css::uno::Sequence<OUString>{ + OUString::createFromAscii(szServiceName2_PopupMenu), + "stardiv.vcl.PopupMenu"}; else - aNames[ 0 ] = OUString::createFromAscii( szServiceName2_MenuBar ); - - return aNames; + return css::uno::Sequence<OUString>{ + OUString::createFromAscii(szServiceName2_MenuBar), + "stardiv.vcl.MenuBar"}; } sal_Bool SAL_CALL VCLXMenu::supportsService(const OUString& rServiceName ) diff --git a/toolkit/source/awt/vclxpointer.cxx b/toolkit/source/awt/vclxpointer.cxx index 2ec98adf6f3c..c6560d8ae89b 100644 --- a/toolkit/source/awt/vclxpointer.cxx +++ b/toolkit/source/awt/vclxpointer.cxx @@ -20,11 +20,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <toolkit/awt/vclxpointer.hxx> #include <toolkit/helper/macros.hxx> -#include <cppuhelper/typeprovider.hxx> -#include <cppuhelper/queryinterface.hxx> - - -// class VCLXPointer +#include <cppuhelper/supportsservice.hxx> VCLXPointer::VCLXPointer() { @@ -34,24 +30,9 @@ VCLXPointer::~VCLXPointer() { } -// ::com::sun::star::uno::XInterface -::com::sun::star::uno::Any VCLXPointer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) -{ - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - (static_cast< ::com::sun::star::awt::XPointer* >(this)), - (static_cast< ::com::sun::star::lang::XUnoTunnel* >(this)), - (static_cast< ::com::sun::star::lang::XTypeProvider* >(this)) ); - return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); -} - // ::com::sun::star::lang::XUnoTunnel IMPL_XUNOTUNNEL( VCLXPointer ) -// ::com::sun::star::lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( VCLXPointer ) - cppu::UnoType<com::sun::star::awt::XPointer>::get() -IMPL_XTYPEPROVIDER_END - void VCLXPointer::setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException, std::exception) { ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); @@ -66,6 +47,25 @@ sal_Int32 VCLXPointer::getType() throw(::com::sun::star::uno::RuntimeException, return (sal_Int32)maPointer.GetStyle(); } +OUString VCLXPointer::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.VCLXPointer"); +} + +sal_Bool VCLXPointer::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> VCLXPointer::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.awt.Pointer", "stardiv.vcl.Pointer"}; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_VCLXPointer_get_implementation( css::uno::XComponentContext *, diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index c80caae2b3b9..3080148f78a5 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <toolkit/awt/vclxprinter.hxx> #include <toolkit/helper/macros.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <rtl/uuid.h> @@ -381,6 +382,25 @@ VCLXInfoPrinter::~VCLXInfoPrinter() return xP; } +OUString VCLXPrinterServer::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.VCLXPrinterServer"); +} + +sal_Bool VCLXPrinterServer::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> VCLXPrinterServer::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.awt.PrinterServer", "stardiv.vcl.PrinterServer"}; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_VCLXPrinterServer_get_implementation( css::uno::XComponentContext *, diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 006a216fa634..bbcd62aa0e24 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1509,8 +1509,8 @@ sal_Bool VCLXToolkit::supportsService( const OUString& rServiceName ) throw(::co ::com::sun::star::uno::Sequence< OUString > VCLXToolkit::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) { - OUString aServiceName("com.sun.star.awt.Toolkit"); - return ::com::sun::star::uno::Sequence< OUString >( &aServiceName, 1); + return css::uno::Sequence<OUString>{ + "com.sun.star.awt.Toolkit", "stardiv.vcl.VclToolkit"}; } // css::awt::XExtendedToolkit: diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index af8f6d55a28d..afce8f36d903 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <tools/debug.hxx> @@ -167,7 +168,19 @@ public: OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, "com.sun.star.awt.UnoControlDialogModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("stardiv.Toolkit.UnoControlDialogModel"); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + auto s(ControlModelContainerBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlDialogModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.Dialog"; + return s; + } }; UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext >& rxContext ) @@ -385,6 +398,26 @@ void UnoDialogControl::createPeer( const Reference< XToolkit > & rxToolkit, cons } } +OUString UnoDialogControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoDialogControl"); +} + +sal_Bool UnoDialogControl::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> UnoDialogControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + OUString::createFromAscii(szServiceName2_UnoControlDialog), + "stardiv.vcl.control.Dialog"}; +} + void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ) { UnoControlContainer::PrepareWindowDescriptor( rDesc ); diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index ba3374ffcfa0..0f8ab776dce5 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -418,6 +418,22 @@ namespace toolkit return xInfo; } + OUString UnoControlFormattedFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) + { + return OUString("stardiv.Toolkit.UnoControlFormattedFieldModel"); + } + + css::uno::Sequence<OUString> + UnoControlFormattedFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) + { + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFormattedFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.FormattedField"; + return s; + } // = UnoFormattedFieldControl @@ -453,7 +469,22 @@ namespace toolkit GetTextListeners().textChanged( e ); } + OUString UnoFormattedFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) + { + return OUString("stardiv.Toolkit.UnoFormattedFieldControl"); + } + css::uno::Sequence<OUString> + UnoFormattedFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) + { + auto s(UnoEditControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFormattedField"; + s[s.getLength() - 1] = "stardiv.vcl.control.FormattedField"; + return s; + } } // namespace toolkit diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 432b93e47073..a19d63192753 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -65,7 +65,18 @@ public: void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoGridModel, UnoControlModel, "com.sun.star.awt.grid.UnoControlGridModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("stardiv.Toolkit.GridControlModel"); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 1); + s[s.getLength() - 1] = "com.sun.star.awt.grid.UnoControlGridModel"; + return s; + } }; @@ -108,7 +119,18 @@ public: virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoGridControl, UnoControlBase, "com.sun.star.awt.grid.UnoControlGrid" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("stardiv.Toolkit.GridControl"); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 1); + s[s.getLength() - 1] = "com.sun.star.awt.grid.UnoControlGrid"; + return s; + } using UnoControl::getPeer; diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index 6976acddadde..b63b72bf68cd 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -81,7 +81,22 @@ static void lcl_throwIndexOutOfBoundsException( ) return OUString::createFromAscii( szServiceName_UnoControlRoadmapModel ); } + OUString UnoControlRoadmapModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) + { + return OUString("stardiv.Toolkit.UnoControlRoadmapModel"); + } + css::uno::Sequence<OUString> + UnoControlRoadmapModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) + { + auto s(UnoControlRoadmapModel_Base::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlRoadmapModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.Roadmap"; + return s; + } Any UnoControlRoadmapModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { @@ -487,6 +502,22 @@ void SAL_CALL UnoRoadmapControl::propertyChange( const PropertyChangeEvent& evt xPeer->propertyChange( evt ); } +OUString UnoRoadmapControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoRoadmapControl"); +} + +css::uno::Sequence<OUString> UnoRoadmapControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlRoadmap"; + s[s.getLength() - 1] = "stardiv.vcl.control.Roadmap"; + return s; +} + } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index ced5b7691cc4..65ced01f3ee4 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -25,6 +25,7 @@ #include <toolkit/controls/stdtabcontrollermodel.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/macros.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <rtl/uuid.h> @@ -365,6 +366,25 @@ void StdTabController::activateLast( ) throw(RuntimeException, std::exception) ImplActivateControl( false ); } +OUString StdTabController::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.StdTabController"); +} + +sal_Bool StdTabController::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> StdTabController::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + OUString::createFromAscii(szServiceName2_TabController), + "stardiv.vcl.control.TabController"}; +} Reference< XControl > StdTabController::FindControl( Sequence< Reference< XControl > >& rCtrls, const Reference< XControlModel > & rxCtrlModel ) diff --git a/toolkit/source/controls/stdtabcontrollermodel.cxx b/toolkit/source/controls/stdtabcontrollermodel.cxx index 8bac30c7f019..8b95155001bf 100644 --- a/toolkit/source/controls/stdtabcontrollermodel.cxx +++ b/toolkit/source/controls/stdtabcontrollermodel.cxx @@ -24,6 +24,7 @@ #include <toolkit/helper/macros.hxx> #include <toolkit/helper/servicenames.hxx> #include <toolkit/helper/property.hxx> +#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <rtl/uuid.h> @@ -414,6 +415,26 @@ void StdTabControllerModel::read( const ::com::sun::star::uno::Reference< ::com: } } +OUString StdTabControllerModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.StdTabControllerModel"); +} + +sal_Bool StdTabControllerModel::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> StdTabControllerModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + OUString::createFromAscii(szServiceName2_TabControllerModel), + "stardiv.vcl.controlmodel.TabController"}; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_StdTabControllerModel_get_implementation( css::uno::XComponentContext *, diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx index 3b293a53bf00..52fc7cd7beed 100644 --- a/toolkit/source/controls/tkscrollbar.cxx +++ b/toolkit/source/controls/tkscrollbar.cxx @@ -49,6 +49,22 @@ namespace toolkit return OUString::createFromAscii( szServiceName_UnoControlScrollBarModel ); } + OUString UnoControlScrollBarModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) + { + return OUString("stardiv.Toolkit.UnoControlScrollBarModel"); + } + + css::uno::Sequence<OUString> + UnoControlScrollBarModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) + { + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlScrollBarModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ScrollBar"; + return s; + } uno::Any UnoControlScrollBarModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { @@ -278,8 +294,21 @@ namespace toolkit return n; } + OUString UnoScrollBarControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) + { + return OUString("stardiv.Toolkit.UnoScrollBarControl"); + } - + css::uno::Sequence<OUString> UnoScrollBarControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) + { + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlScrollBar"; + s[s.getLength() - 1] = "stardiv.vcl.control.ScrollBar"; + return s; + } } // namespace toolkit diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 7d2312535a9c..95e61961b64a 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -189,7 +189,7 @@ public: OUString SAL_CALL UnoSpinButtonModel::getImplementationName( ) throw(RuntimeException, std::exception) { - return OUString( "com.sun.star.comp.toolkit.UnoSpinButtonModel" ); + return OUString( "stardiv.Toolkit.UnoSpinButtonModel" ); } @@ -252,7 +252,7 @@ public: OUString SAL_CALL UnoSpinButtonControl::getImplementationName( ) throw(RuntimeException, std::exception) { - return OUString( "com.sun.star.comp.toolkit.UnoSpinButtonControl" ); + return OUString( "stardiv.Toolkit.UnoSpinButtonControl" ); } diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index f6bed0357c9b..dbf2e0c1d64b 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -51,7 +51,18 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoTreeModel, UnoControlModel, "com.sun.star.awt.tree.TreeControlModel" ) + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString("stardiv.Toolkit.TreeControlModel"); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 1); + s[s.getLength() - 1] = "com.sun.star.awt.tree.TreeControlModel"; + return s; + } }; } // toolkit diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 6d121ac706ea..675ed753079b 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -817,6 +817,22 @@ void UnoControlContainer::setVisible( sal_Bool bVisible ) throw(uno::RuntimeExce createPeer( uno::Reference< awt::XToolkit > (), uno::Reference< awt::XWindowPeer > () ); } +OUString UnoControlContainer::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlContainer"); +} + +css::uno::Sequence<OUString> UnoControlContainer::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlContainer"; + s[s.getLength() - 1] = "stardiv.vcl.control.ControlContainer"; + return s; +} + void UnoControlContainer::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ) { // HACK due to the fact that we can't really use VSCROLL & HSCROLL diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx index eabc7467c4d3..f1c23d9c006a 100644 --- a/toolkit/source/controls/unocontrolcontainermodel.cxx +++ b/toolkit/source/controls/unocontrolcontainermodel.cxx @@ -45,6 +45,23 @@ OUString UnoControlContainerModel::getServiceName() throw(::com::sun::star::uno: return OUString::createFromAscii( szServiceName_UnoControlContainerModel ); } +OUString UnoControlContainerModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlContainerModel"); +} + +css::uno::Sequence<OUString> +UnoControlContainerModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlContainerModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ControlContainer"; + return s; +} + ::com::sun::star::uno::Any UnoControlContainerModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { ::com::sun::star::uno::Any aDefault; diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 8c8ec5f51553..820322d986e8 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -71,17 +71,6 @@ using ::com::sun::star::graphic::XGraphic; using ::com::sun::star::uno::Reference; using namespace ::toolkit; -#define IMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \ - OUString SAL_CALL ImplName::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { return OUString( "stardiv.Toolkit." #ImplName ); } \ - ::com::sun::star::uno::Sequence< OUString > SAL_CALL ImplName::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) \ - { \ - ::com::sun::star::uno::Sequence< OUString > aNames = BaseClass::getSupportedServiceNames( ); \ - aNames.realloc( aNames.getLength() + 1 ); \ - aNames[ aNames.getLength() - 1 ] = ServiceName; \ - return aNames; \ - } \ - - uno::Reference< graphic::XGraphic > ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& xOutGraphicObj, const OUString& _rURL ) { @@ -171,6 +160,22 @@ uno::Reference< beans::XPropertySetInfo > UnoControlEditModel::getPropertySetInf return xInfo; } +OUString UnoControlEditModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlEditModel"); +} + +css::uno::Sequence<OUString> UnoControlEditModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlEditModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.Edit"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlEditModel_get_implementation( css::uno::XComponentContext *context, @@ -492,8 +497,9 @@ OUString UnoEditControl::getImplementationName( ) throw(uno::RuntimeException, uno::Sequence< OUString > UnoEditControl::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { uno::Sequence< OUString > aNames = UnoControlBase::getSupportedServiceNames( ); - aNames.realloc( aNames.getLength() + 1 ); - aNames[ aNames.getLength() - 1 ] = OUString::createFromAscii( szServiceName2_UnoControlEdit ); + aNames.realloc( aNames.getLength() + 2 ); + aNames[ aNames.getLength() - 2 ] = OUString::createFromAscii( szServiceName2_UnoControlEdit ); + aNames[ aNames.getLength() - 1 ] = "stardiv.vcl.control.Edit"; return aNames; } @@ -565,6 +571,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFileControlModel::getPropert return xInfo; } +OUString UnoControlFileControlModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlFileControlModel"); +} + +css::uno::Sequence<OUString> +UnoControlFileControlModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFileControlModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.FileControl"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlFileControlModel_get_implementation( css::uno::XComponentContext *context, @@ -586,6 +609,22 @@ OUString UnoFileControl::GetComponentServiceName() return OUString("filecontrol"); } +OUString UnoFileControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoFileControl"); +} + +css::uno::Sequence<OUString> UnoFileControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoEditControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFileControl"; + s[s.getLength() - 1] = "stardiv.vcl.control.FileControl"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoFileControl_get_implementation( css::uno::XComponentContext *, @@ -722,6 +761,22 @@ uno::Reference< beans::XPropertySetInfo > UnoControlButtonModel::getPropertySetI return xInfo; } +OUString UnoControlButtonModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlButtonModel"); +} + +css::uno::Sequence<OUString> UnoControlButtonModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(GraphicControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlButtonModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.Button"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlButtonModel_get_implementation( css::uno::XComponentContext *context, @@ -870,6 +925,22 @@ awt::Size UnoButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) throw( return Impl_calcAdjustedSize( rNewSize ); } +OUString UnoButtonControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoButtonControl"); +} + +css::uno::Sequence<OUString> UnoButtonControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlButton"; + s[s.getLength() - 1] = "stardiv.vcl.control.Button"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoButtonControl_get_implementation( css::uno::XComponentContext *, @@ -893,6 +964,25 @@ OUString UnoControlImageControlModel::getServiceName() throw(::com::sun::star::u return OUString::createFromAscii( szServiceName_UnoControlImageControlModel ); } +OUString UnoControlImageControlModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlImageControlModel"); +} + +css::uno::Sequence<OUString> +UnoControlImageControlModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(GraphicControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 4); + s[s.getLength() - 4] = "com.sun.star.awt.UnoControlImageButtonModel"; + s[s.getLength() - 3] = "com.sun.star.awt.UnoControlImageControlModel"; + s[s.getLength() - 2] = "stardiv.vcl.controlmodel.ImageButton"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ImageControl"; + return s; +} + uno::Any UnoControlImageControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) @@ -1013,6 +1103,24 @@ awt::Size UnoImageControlControl::calcAdjustedSize( const awt::Size& rNewSize ) return Impl_calcAdjustedSize( rNewSize ); } +OUString UnoImageControlControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoImageControlControl"); +} + +css::uno::Sequence<OUString> UnoImageControlControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 4); + s[s.getLength() - 4] = "com.sun.star.awt.UnoControlImageButton"; + s[s.getLength() - 3] = "com.sun.star.awt.UnoControlImageControl"; + s[s.getLength() - 2] = "stardiv.vcl.control.ImageButton"; + s[s.getLength() - 1] = "stardiv.vcl.control.ImageControl"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoImageControlControl_get_implementation( css::uno::XComponentContext *, @@ -1067,6 +1175,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlRadioButtonModel::getPropert return xInfo; } +OUString UnoControlRadioButtonModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlRadioButtonModel"); +} + +css::uno::Sequence<OUString> +UnoControlRadioButtonModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(GraphicControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlRadioButtonModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.RadioButton"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlRadioButtonModel_get_implementation( css::uno::XComponentContext *context, @@ -1237,6 +1362,22 @@ awt::Size UnoRadioButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) t return Impl_calcAdjustedSize( rNewSize ); } +OUString UnoRadioButtonControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoRadioButtonControl"); +} + +css::uno::Sequence<OUString> UnoRadioButtonControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlRadioButton"; + s[s.getLength() - 1] = "stardiv.vcl.control.RadioButton"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoRadioButtonControl_get_implementation( css::uno::XComponentContext *, @@ -1291,6 +1432,22 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCheckBoxModel::getPropertySe return xInfo; } +OUString UnoControlCheckBoxModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString( "stardiv.Toolkit.UnoControlCheckBoxModel"); +} + +css::uno::Sequence<OUString> UnoControlCheckBoxModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(GraphicControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlCheckBoxModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.CheckBox"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlCheckBoxModel_get_implementation( css::uno::XComponentContext *context, @@ -1436,6 +1593,22 @@ awt::Size UnoCheckBoxControl::calcAdjustedSize( const awt::Size& rNewSize ) thro return Impl_calcAdjustedSize( rNewSize ); } +OUString UnoCheckBoxControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoCheckBoxControl"); +} + +css::uno::Sequence<OUString> UnoCheckBoxControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlCheckBox"; + s[s.getLength() - 1] = "stardiv.vcl.control.CheckBox"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoCheckBoxControl_get_implementation( css::uno::XComponentContext *, @@ -1697,6 +1870,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedTextModel::getPropertyS return xInfo; } +OUString UnoControlFixedTextModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlFixedTextModel"); +} + +css::uno::Sequence<OUString> +UnoControlFixedTextModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFixedTextModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.FixedText"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlFixedTextModel_get_implementation( css::uno::XComponentContext *context, @@ -1786,6 +1976,22 @@ awt::Size UnoFixedTextControl::calcAdjustedSize( const awt::Size& rNewSize ) thr return Impl_calcAdjustedSize( rNewSize ); } +OUString UnoFixedTextControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoFixedTextControl"); +} + +css::uno::Sequence<OUString> UnoFixedTextControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFixedText"; + s[s.getLength() - 1] = "stardiv.vcl.control.FixedText"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoFixedTextControl_get_implementation( css::uno::XComponentContext *, @@ -1846,6 +2052,22 @@ uno::Reference< beans::XPropertySetInfo > UnoControlGroupBoxModel::getPropertySe return xInfo; } +OUString UnoControlGroupBoxModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlGroupBoxModel"); +} + +css::uno::Sequence<OUString> UnoControlGroupBoxModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlGroupBoxModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.GroupBox"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlGroupBoxModel_get_implementation( css::uno::XComponentContext *context, @@ -1874,6 +2096,22 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException, std::e return sal_True; } +OUString UnoGroupBoxControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoGroupBoxControl"); +} + +css::uno::Sequence<OUString> UnoGroupBoxControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlGroupBox"; + s[s.getLength() - 1] = "stardiv.vcl.control.GroupBox"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoGroupBoxControl_get_implementation( css::uno::XComponentContext *, @@ -2009,7 +2247,22 @@ UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_ UnoControlListBoxModel::~UnoControlListBoxModel() { } -IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, "com.sun.star.awt.UnoControlListBoxModel" ) + +OUString UnoControlListBoxModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlListBoxModel"); +} + +css::uno::Sequence<OUString> UnoControlListBoxModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlListBoxModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ListBox"; + return s; +} OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { @@ -2452,7 +2705,22 @@ OUString UnoListBoxControl::GetComponentServiceName() { return OUString("listbox"); } -IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, "com.sun.star.awt.UnoControlListBox" ) + +OUString UnoListBoxControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoListBoxControl"); +} + +css::uno::Sequence<OUString> UnoListBoxControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlListBox"; + s[s.getLength() - 1] = "stardiv.vcl.control.ListBox"; + return s; +} void UnoListBoxControl::dispose() throw(uno::RuntimeException, std::exception) { @@ -2877,7 +3145,21 @@ UnoControlComboBoxModel::UnoControlComboBoxModel( const Reference< XComponentCon UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox ); } -IMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, "com.sun.star.awt.UnoControlComboBoxModel" ) +OUString UnoControlComboBoxModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlComboBoxModel"); +} + +css::uno::Sequence<OUString> UnoControlComboBoxModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlComboBoxModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ComboBox"; + return s; +} uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException, std::exception) { @@ -2963,7 +3245,22 @@ UnoComboBoxControl::UnoComboBoxControl() maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; } -IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, "com.sun.star.awt.UnoControlComboBox" ) + +OUString UnoComboBoxControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString( "stardiv.Toolkit.UnoComboBoxControl"); +} + +css::uno::Sequence<OUString> UnoComboBoxControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoEditControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlComboBox"; + s[s.getLength() - 1] = "stardiv.vcl.control.ComboBox"; + return s; +} OUString UnoComboBoxControl::GetComponentServiceName() { @@ -3409,6 +3706,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlDateFieldModel::getPropertyS return xInfo; } +OUString UnoControlDateFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlDateFieldModel"); +} + +css::uno::Sequence<OUString> +UnoControlDateFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlDateFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.DateField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlDateFieldModel_get_implementation( css::uno::XComponentContext *context, @@ -3613,6 +3927,22 @@ sal_Bool UnoDateFieldControl::isStrictFormat() throw(uno::RuntimeException, std: return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT ); } +OUString UnoDateFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoDateFieldControl"); +} + +css::uno::Sequence<OUString> UnoDateFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoSpinFieldControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlDateField"; + s[s.getLength() - 1] = "stardiv.vcl.control.DateField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoDateFieldControl_get_implementation( css::uno::XComponentContext *, @@ -3665,6 +3995,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlTimeFieldModel::getPropertyS return xInfo; } +OUString UnoControlTimeFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlTimeFieldModel"); +} + +css::uno::Sequence<OUString> +UnoControlTimeFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlTimeFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.TimeField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlTimeFieldModel_get_implementation( css::uno::XComponentContext *context, @@ -3828,6 +4175,22 @@ sal_Bool UnoTimeFieldControl::isStrictFormat() throw(uno::RuntimeException, std: return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT ); } +OUString UnoTimeFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoTimeFieldControl"); +} + +css::uno::Sequence<OUString> UnoTimeFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoSpinFieldControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlTimeField"; + s[s.getLength() - 1] = "stardiv.vcl.control.TimeField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoTimeFieldControl_get_implementation( css::uno::XComponentContext *, @@ -3880,6 +4243,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlNumericFieldModel::getProper return xInfo; } +OUString UnoControlNumericFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlNumericFieldModel"); +} + +css::uno::Sequence<OUString> +UnoControlNumericFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlNumericFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.NumericField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlNumericFieldModel_get_implementation( css::uno::XComponentContext *context, @@ -4016,6 +4396,22 @@ sal_Bool UnoNumericFieldControl::isStrictFormat() throw(uno::RuntimeException, s return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT ); } +OUString UnoNumericFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoNumericFieldControl"); +} + +css::uno::Sequence<OUString> UnoNumericFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoSpinFieldControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlNumericField"; + s[s.getLength() - 1] = "stardiv.vcl.control.NumericField"; + return s; +} + void UnoNumericFieldControl::setSpinSize( double Digits ) throw(uno::RuntimeException, std::exception) { uno::Any aAny; @@ -4098,6 +4494,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCurrencyFieldModel::getPrope return xInfo; } +OUString UnoControlCurrencyFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlCurrencyFieldModel"); +} + +css::uno::Sequence<OUString> +UnoControlCurrencyFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlCurrencyFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.CurrencyField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlCurrencyFieldModel_get_implementation( css::uno::XComponentContext *context, @@ -4233,6 +4646,23 @@ sal_Bool UnoCurrencyFieldControl::isStrictFormat() throw(uno::RuntimeException, return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT ); } +OUString UnoCurrencyFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoCurrencyFieldControl"); +} + +css::uno::Sequence<OUString> +UnoCurrencyFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoSpinFieldControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlCurrencyField"; + s[s.getLength() - 1] = "stardiv.vcl.control.CurrencyField"; + return s; +} + void UnoCurrencyFieldControl::setSpinSize( double Digits ) throw(uno::RuntimeException, std::exception) { uno::Any aAny; @@ -4308,6 +4738,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlPatternFieldModel::getProper return xInfo; } +OUString UnoControlPatternFieldModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlPatternFieldModel"); +} + +css::uno::Sequence<OUString> +UnoControlPatternFieldModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlPatternFieldModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.PatternField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlPatternFieldModel_get_implementation( css::uno::XComponentContext *context, @@ -4405,6 +4852,22 @@ sal_Bool UnoPatternFieldControl::isStrictFormat() throw(uno::RuntimeException, s return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT ); } +OUString UnoPatternFieldControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoPatternFieldControl"); +} + +css::uno::Sequence<OUString> UnoPatternFieldControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoSpinFieldControl::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlPatternField"; + s[s.getLength() - 1] = "stardiv.vcl.control.PatternField"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoPatternFieldControl_get_implementation( css::uno::XComponentContext *, @@ -4469,6 +4932,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlProgressBarModel::getPropert return xInfo; } +OUString UnoControlProgressBarModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlProgressBarModel"); +} + +css::uno::Sequence<OUString> +UnoControlProgressBarModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlProgressBarModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.ProgressBar"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlProgressBarModel_get_implementation( css::uno::XComponentContext *context, @@ -4553,6 +5033,22 @@ sal_Int32 UnoProgressBarControl::getValue() throw(::com::sun::star::uno::Runtime return ImplGetPropertyValue_INT32( BASEPROPERTY_PROGRESSVALUE ); } +OUString UnoProgressBarControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoProgressBarControl"); +} + +css::uno::Sequence<OUString> UnoProgressBarControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlProgressBar"; + s[s.getLength() - 1] = "stardiv.vcl.control.ProgressBar"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoProgressBarControl_get_implementation( css::uno::XComponentContext *, @@ -4613,6 +5109,23 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedLineModel::getPropertyS return xInfo; } +OUString UnoControlFixedLineModel::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoControlFixedLineModel"); +} + +css::uno::Sequence<OUString> +UnoControlFixedLineModel::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlModel::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFixedLineModel"; + s[s.getLength() - 1] = "stardiv.vcl.controlmodel.FixedLine"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoControlFixedLineModel_get_implementation( css::uno::XComponentContext *context, @@ -4641,6 +5154,22 @@ sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException, std:: return sal_True; } +OUString UnoFixedLineControl::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("stardiv.Toolkit.UnoFixedLineControl"); +} + +css::uno::Sequence<OUString> UnoFixedLineControl::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + auto s(UnoControlBase::getSupportedServiceNames()); + s.realloc(s.getLength() + 2); + s[s.getLength() - 2] = "com.sun.star.awt.UnoControlFixedLine"; + s[s.getLength() - 1] = "stardiv.vcl.control.FixedLine"; + return s; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL stardiv_Toolkit_UnoFixedLineControl_get_implementation( css::uno::XComponentContext *, diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 1a5d28938109..1632cfd9d83a 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -23,7 +23,8 @@ #include <uno/mapping.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/factory.hxx> -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/supportsservice.hxx> #include <tools/urlobj.hxx> #include <ucbhelper/content.hxx> @@ -35,6 +36,7 @@ #include <com/sun/star/io/XActiveDataSink.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XActiveDataStreamer.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/ucb/CommandFailedException.hpp> #include <com/sun/star/ucb/ContentInfo.hpp> @@ -74,7 +76,8 @@ namespace { // Implementation XSimpleFileAccess -typedef cppu::WeakImplHelper1< XSimpleFileAccess3 > FileAccessHelper; +typedef cppu::WeakImplHelper<XSimpleFileAccess3, css::lang::XServiceInfo> + FileAccessHelper; class OCommandEnvironment; class OFileAccess : public FileAccessHelper @@ -113,6 +116,18 @@ public: virtual void SAL_CALL writeFile( const OUString& FileURL, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& data ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isHidden( const OUString& FileURL ) throw(::com::sun::star::ucb::CommandAbortedException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setHidden( const OUString& FileURL, sal_Bool bHidden ) throw(::com::sun::star::ucb::CommandAbortedException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return OUString(IMPLEMENTATION_NAME); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return FileAccess_getSupportedServiceNames(); } }; // Implementation XActiveDataSink diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index da9035310c8f..c7a1e08a7733 100644 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -181,6 +181,12 @@ void SAL_CALL VbaEventsHelperBase::disposing( const lang::EventObject& rEvent ) stopListening(); } +sal_Bool VbaEventsHelperBase::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + void VbaEventsHelperBase::processVbaEventNoThrow( sal_Int32 nEventId, const uno::Sequence< uno::Any >& rArgs ) { try diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 05a149008a48..f2d221d743d3 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -40,8 +40,7 @@ #include "com/sun/star/datatransfer/dnd/XDropTarget.hpp" #include "com/sun/star/datatransfer/dnd/DNDConstants.hpp" -#include "cppuhelper/compbase1.hxx" -#include "cppuhelper/compbase2.hxx" +#include "cppuhelper/compbase.hxx" #include "cppuhelper/implbase1.hxx" #include <cppuhelper/supportsservice.hxx> @@ -53,7 +52,7 @@ namespace vcl { // generic implementation to satisfy SalInstance class GenericClipboard : - public cppu::WeakComponentImplHelper2 < + public cppu::WeakComponentImplHelper< datatransfer::clipboard::XSystemClipboard, XServiceInfo > @@ -65,7 +64,7 @@ class GenericClipboard : public: - GenericClipboard() : cppu::WeakComponentImplHelper2< + GenericClipboard() : cppu::WeakComponentImplHelper< datatransfer::clipboard::XSystemClipboard, XServiceInfo >( m_aMutex ) @@ -205,7 +204,7 @@ void GenericClipboard::removeClipboardListener( const Reference< datatransfer::c m_aListeners.remove( listener ); } -class ClipboardFactory : public ::cppu::WeakComponentImplHelper1< +class ClipboardFactory : public ::cppu::WeakComponentImplHelper< com::sun::star::lang::XSingleServiceFactory > { @@ -222,7 +221,7 @@ public: }; ClipboardFactory::ClipboardFactory() : - cppu::WeakComponentImplHelper1< + cppu::WeakComponentImplHelper< com::sun::star::lang::XSingleServiceFactory >( m_aMutex ) { @@ -267,14 +266,15 @@ Reference< XSingleServiceFactory > SAL_CALL Clipboard_createFactory( const Refer /* * generic DragSource dummy */ -class GenericDragSource : public cppu::WeakComponentImplHelper2< +class GenericDragSource : public cppu::WeakComponentImplHelper< datatransfer::dnd::XDragSource, - XInitialization + XInitialization, + css::lang::XServiceInfo > { osl::Mutex m_aMutex; public: - GenericDragSource() : cppu::WeakComponentImplHelper2< datatransfer::dnd::XDragSource, XInitialization >( m_aMutex ) {} + GenericDragSource() : WeakComponentImplHelper( m_aMutex ) {} virtual ~GenericDragSource(); // XDragSource @@ -290,7 +290,18 @@ public: // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception, std::exception ) SAL_OVERRIDE; -#if !defined UNX + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return getImplementationName_static(); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return getSupportedServiceNames_static(); } + static Sequence< OUString > getSupportedServiceNames_static() { Sequence< OUString > aRet( 1 ); @@ -302,7 +313,6 @@ public: { return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource"); } -#endif }; GenericDragSource::~GenericDragSource() @@ -377,17 +387,15 @@ Reference< XInterface > SAL_CALL DragSource_createInstance( const Reference< XMu * generic DragSource dummy */ -class GenericDropTarget : public cppu::WeakComponentImplHelper2< +class GenericDropTarget : public cppu::WeakComponentImplHelper< datatransfer::dnd::XDropTarget, - XInitialization + XInitialization, + css::lang::XServiceInfo > { osl::Mutex m_aMutex; public: - GenericDropTarget() : cppu::WeakComponentImplHelper2< - datatransfer::dnd::XDropTarget, - XInitialization - > ( m_aMutex ) + GenericDropTarget() : WeakComponentImplHelper( m_aMutex ) {} virtual ~GenericDropTarget(); @@ -402,7 +410,18 @@ public: virtual sal_Int8 SAL_CALL getDefaultActions() throw(std::exception) SAL_OVERRIDE; virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(std::exception) SAL_OVERRIDE; -#if !defined UNX + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return getImplementationName_static(); } + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return cppu::supportsService(this, ServiceName); } + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE + { return getSupportedServiceNames_static(); } + static Sequence< OUString > getSupportedServiceNames_static() { Sequence< OUString > aRet( 1 ); @@ -414,7 +433,6 @@ public: { return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget"); } -#endif }; GenericDropTarget::~GenericDropTarget() diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.py b/wizards/com/sun/star/wizards/agenda/CallWizard.py index 79811cf5300c..2b784e2fe200 100644 --- a/wizards/com/sun/star/wizards/agenda/CallWizard.py +++ b/wizards/com/sun/star/wizards/agenda/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .AgendaWizardDialogImpl import AgendaWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.agenda.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -52,12 +57,18 @@ class CallWizard(unohelper.Base, XJobExecutor): " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.agenda.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index e40138fc5678..405c2c3c62cf 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .FaxWizardDialogImpl import FaxWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.fax.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -51,13 +56,19 @@ class CallWizard(unohelper.Base, XJobExecutor): print ("Wizard failure exception " + str(type(e)) + " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) - -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.fax.CallWizard", # implemtenation name + g_implName, # implemtenation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.py b/wizards/com/sun/star/wizards/letter/CallWizard.py index c09b8bb71925..fc12e1b5e5cf 100644 --- a/wizards/com/sun/star/wizards/letter/CallWizard.py +++ b/wizards/com/sun/star/wizards/letter/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .LetterWizardDialogImpl import LetterWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.letter.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -51,13 +56,19 @@ class CallWizard(unohelper.Base, XJobExecutor): print ("Wizard failure exception " + str(type(e)) + " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) - -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.letter.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/web/CallWizard.py b/wizards/com/sun/star/wizards/web/CallWizard.py index cdaf00c9f2c2..6f5bd2360951 100644 --- a/wizards/com/sun/star/wizards/web/CallWizard.py +++ b/wizards/com/sun/star/wizards/web/CallWizard.py @@ -21,11 +21,16 @@ import traceback from .WWD_Events import WWD_Events from ..common.Desktop import Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.web.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -52,12 +57,18 @@ class CallWizard(unohelper.Base, XJobExecutor): except Exception: traceback.print_exc() -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.web.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index bb5ef953873a..fc8e8ac90ee3 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/util/RevisionTag.hpp> #include <com/sun/star/embed/XStorage.hpp> -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase.hxx> #include <xmloff/xmlictxt.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/xmlimp.hxx> @@ -117,11 +117,20 @@ public: virtual ~XMLVersionContext(); }; -class XMLVersionListPersistence : public ::cppu::WeakImplHelper1< ::com::sun::star::document::XDocumentRevisionListPersistence > +class XMLVersionListPersistence : public ::cppu::WeakImplHelper< ::com::sun::star::document::XDocumentRevisionListPersistence, css::lang::XServiceInfo > { public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag > SAL_CALL load( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL store( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage, const ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag >& List ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; #endif diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 41a525b14ba3..18885fd25081 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/Writer.hpp> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::uno; @@ -426,6 +427,27 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con return aVersions; } +OUString XMLVersionListPersistence::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("XMLVersionListPersistence"); +} + +sal_Bool XMLVersionListPersistence::supportsService( + OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> +XMLVersionListPersistence::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.document.DocumentRevisionListPersistence"}; +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL XMLVersionListPersistence_get_implementation( css::uno::XComponentContext *, diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index b476d80fcff4..acaac53e3e43 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -41,7 +41,7 @@ #include <com/sun/star/security/CertificateValidity.hpp> #include <com/sun/star/security/SerialNumberAdapter.hpp> #include <comphelper/documentconstants.hxx> - +#include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <stdio.h> @@ -89,6 +89,26 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments) } } +OUString DocumentDigitalSignatures::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return GetImplementationName(); +} + +sal_Bool DocumentDigitalSignatures::supportsService( + OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> +DocumentDigitalSignatures::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return GetSupportedServiceNames(); +} + sal_Bool DocumentDigitalSignatures::signDocumentContent( const Reference< css::embed::XStorage >& rxStorage, const Reference< css::io::XStream >& xSignStream) diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx index 7102f6e5179f..ab674f367638 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.hxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx @@ -20,9 +20,10 @@ #ifndef INCLUDED_XMLSECURITY_SOURCE_COMPONENT_DOCUMENTDIGITALSIGNATURES_HXX #define INCLUDED_XMLSECURITY_SOURCE_COMPONENT_DOCUMENTDIGITALSIGNATURES_HXX -#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -35,10 +36,11 @@ namespace com { namespace sun { namespace star { } }}} -class DocumentDigitalSignatures : public cppu::WeakImplHelper2 +class DocumentDigitalSignatures : public cppu::WeakImplHelper < com::sun::star::security::XDocumentDigitalSignatures, - com::sun::star::lang::XInitialization + com::sun::star::lang::XInitialization, + css::lang::XServiceInfo > { private: @@ -65,6 +67,15 @@ public: void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XDocumentDigitalSignatures sal_Bool SAL_CALL signDocumentContent( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xSignStream ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation > SAL_CALL verifyDocumentContentSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignInStream ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; |