diff options
Diffstat (limited to 'dbaccess/source/ui/uno')
24 files changed, 127 insertions, 347 deletions
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx index 3debcbe3b661..a6ab43f483f7 100644 --- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx @@ -19,9 +19,7 @@ #include <sal/config.h> -#include <uiservices.hxx> #include <unoadmin.hxx> -#include <dbu_reghelper.hxx> #include <advancedsettingsdlg.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/proparrhlp.hxx> @@ -42,10 +40,9 @@ namespace dbaui ,public ::comphelper::OPropertyArrayUsageHelper< OAdvancedSettingsDialog > { - protected: + public: explicit OAdvancedSettingsDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); - public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -53,14 +50,6 @@ namespace dbaui virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; @@ -83,28 +72,13 @@ namespace dbaui return css::uno::Sequence<sal_Int8>(); } - Reference< XInterface > OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) - { - return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) )); - } - OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName() { - return getImplementationName_Static(); - } - - OUString OAdvancedSettingsDialog::getImplementationName_Static() - { return "org.openoffice.comp.dbu.OAdvancedSettingsDialog"; } css::uno::Sequence<OUString> SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); - } - - css::uno::Sequence<OUString> OAdvancedSettingsDialog::getSupportedServiceNames_Static() - { return { "com.sun.star.sdb.AdvancedDatabaseSettingsDialog" }; } @@ -134,9 +108,11 @@ namespace dbaui } // namespace dbaui -extern "C" void createRegistryInfo_OAdvancedSettingsDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_OAdvancedSettingsDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OAdvancedSettingsDialog > aAutoRegistration; + return cppu::acquire(new ::dbaui::OAdvancedSettingsDialog(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 03c2c80bfe7b..781fdd351d74 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -19,15 +19,15 @@ #include "ColumnControl.hxx" #include "ColumnPeer.hxx" -#include <uiservices.hxx> #include <apitools.hxx> #include <com/sun/star/awt/PosSize.hpp> -#include <dbu_reghelper.hxx> #include <comphelper/processfactory.hxx> -extern "C" void createRegistryInfo_OColumnControl() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_dbu_OColumnControl_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OColumnControl> aAutoRegistration; + return cppu::acquire(new ::dbaui::OColumnControl(context)); } namespace dbaui @@ -43,13 +43,14 @@ OColumnControl::OColumnControl(const Reference<XComponentContext>& rxContext) { } -IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OColumnControl, SERVICE_CONTROLDEFAULT) +OUString SAL_CALL OColumnControl::getImplementationName() +{ + return SERVICE_CONTROLDEFAULT; +} IMPLEMENT_SERVICE_INFO_SUPPORTS(OColumnControl) -IMPLEMENT_SERVICE_INFO_GETSUPPORTED2_STATIC(OColumnControl, "com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl") - -Reference< XInterface > OColumnControl::Create(const Reference< XMultiServiceFactory >& _rxORB) +css::uno::Sequence< OUString > SAL_CALL OColumnControl::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new OColumnControl(comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl" }; } OUString OColumnControl::GetComponentServiceName() diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx index 1d69e1ea2903..2b290cda9c78 100644 --- a/dbaccess/source/ui/uno/ColumnControl.hxx +++ b/dbaccess/source/ui/uno/ColumnControl.hxx @@ -39,12 +39,6 @@ namespace dbaui // XServiceInfo DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); // css::awt::XControl virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& _rToolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent) override; diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx index b56fdcfbbcbd..cadc33075c9a 100644 --- a/dbaccess/source/ui/uno/ColumnModel.cxx +++ b/dbaccess/source/ui/uno/ColumnModel.cxx @@ -18,15 +18,15 @@ */ #include "ColumnModel.hxx" -#include <uiservices.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <stringconstants.hxx> -#include <dbu_reghelper.hxx> -extern "C" void createRegistryInfo_OColumnControlModel() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_dbu_OColumnControlModel_get_implementation( + css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OColumnControlModel> aAutoRegistration; + return cppu::acquire(new ::dbaui::OColumnControlModel()); } namespace dbaui @@ -106,13 +106,14 @@ css::uno::Sequence<sal_Int8> OColumnControlModel::getImplementationId() IMPLEMENT_GETTYPES2(OColumnControlModel,OColumnControlModel_BASE,comphelper::OPropertyContainer) IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OColumnControlModel) -IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OColumnControlModel, "com.sun.star.comp.dbu.OColumnControlModel") +OUString SAL_CALL OColumnControlModel::getImplementationName() +{ + return "com.sun.star.comp.dbu.OColumnControlModel"; +} IMPLEMENT_SERVICE_INFO_SUPPORTS(OColumnControlModel) -IMPLEMENT_SERVICE_INFO_GETSUPPORTED2_STATIC(OColumnControlModel, "com.sun.star.awt.UnoControlModel","com.sun.star.sdb.ColumnDescriptorControlModel") -css::uno::Reference< css::uno::XInterface > - OColumnControlModel::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& ) +css::uno::Sequence< OUString > SAL_CALL OColumnControlModel::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new OColumnControlModel()); + return { "com.sun.star.awt.UnoControlModel","com.sun.star.sdb.ColumnDescriptorControlModel" }; } IMPLEMENT_FORWARD_REFCOUNT( OColumnControlModel, OColumnControlModel_BASE ) Any SAL_CALL OColumnControlModel::queryInterface( const Type& _rType ) diff --git a/dbaccess/source/ui/uno/ColumnModel.hxx b/dbaccess/source/ui/uno/ColumnModel.hxx index f89b26e91588..0cbdbd1b33f6 100644 --- a/dbaccess/source/ui/uno/ColumnModel.hxx +++ b/dbaccess/source/ui/uno/ColumnModel.hxx @@ -73,12 +73,6 @@ public: // css::lang::XServiceInfo DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override; virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override; diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx index 4906d080b8f6..3d07cd48d993 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include "DBTypeWizDlg.hxx" #include <dbwiz.hxx> #include <comphelper/processfactory.hxx> @@ -26,9 +24,11 @@ using namespace dbaui; -extern "C" void createRegistryInfo_ODBTypeWizDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_ODBTypeWizDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< ODBTypeWizDialog > aAutoRegistration; + return cppu::acquire(new ODBTypeWizDialog(context)); } namespace dbaui @@ -48,28 +48,13 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new ODBTypeWizDialog( comphelper::getComponentContext(_rxFactory) )); -} - OUString SAL_CALL ODBTypeWizDialog::getImplementationName() { - return getImplementationName_Static(); -} - -OUString ODBTypeWizDialog::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.ODBTypeWizDialog"; } css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> ODBTypeWizDialog::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.DataSourceTypeChangeDialog" }; } diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx index 1d134421f5b2..95f34bcbbd38 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx @@ -30,10 +30,10 @@ class ODBTypeWizDialog final :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< ODBTypeWizDialog > { +public: explicit ODBTypeWizDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); -public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -41,14 +41,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx index ebf4f0964b66..1408e4f0046f 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include "DBTypeWizDlgSetup.hxx" #include <dbwizsetup.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -28,9 +26,11 @@ using namespace dbaui; -extern "C" void createRegistryInfo_ODBTypeWizDialogSetup() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_ODBTypeWizDialogSetup_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< ODBTypeWizDialogSetup > aAutoRegistration; + return cppu::acquire(new ODBTypeWizDialogSetup(context)); } namespace dbaui @@ -58,31 +58,14 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > ODBTypeWizDialogSetup::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup( comphelper::getComponentContext(_rxFactory) )); - return xDBWizard; -} - OUString SAL_CALL ODBTypeWizDialogSetup::getImplementationName() { - return getImplementationName_Static(); -} - -OUString ODBTypeWizDialogSetup::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.ODBTypeWizDialogSetup"; } css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> ODBTypeWizDialogSetup::getSupportedServiceNames_Static() -{ - css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.DatabaseWizardDialog" }; - return aSupported; + return { "com.sun.star.sdb.DatabaseWizardDialog" }; } Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo() diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx index 65a25b5f09c1..a532974550f1 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx @@ -33,9 +33,9 @@ class ODBTypeWizDialogSetup final bool m_bOpenDatabase; bool m_bStartTableWizard; +public: explicit ODBTypeWizDialogSetup(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); -public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -43,14 +43,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx index 17fb72660695..7d3a5a61a274 100644 --- a/dbaccess/source/ui/uno/TableFilterDlg.cxx +++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include "TableFilterDlg.hxx" #include <TablesSingleDlg.hxx> #include <comphelper/processfactory.hxx> @@ -26,9 +24,11 @@ using namespace dbaui; -extern "C" void createRegistryInfo_OTableFilterDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_OTableFilterDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< OTableFilterDialog > aAutoRegistration; + return cppu::acquire(new OTableFilterDialog(context)); } namespace dbaui @@ -48,28 +48,13 @@ Sequence<sal_Int8> SAL_CALL OTableFilterDialog::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > OTableFilterDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new OTableFilterDialog( comphelper::getComponentContext(_rxFactory) )); -} - OUString SAL_CALL OTableFilterDialog::getImplementationName() { - return getImplementationName_Static(); -} - -OUString OTableFilterDialog::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.OTableFilterDialog"; } css::uno::Sequence<OUString> SAL_CALL OTableFilterDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> OTableFilterDialog::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.TableFilterDialog" }; } diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx index 6e80a1d5c16a..558ee5175a47 100644 --- a/dbaccess/source/ui/uno/TableFilterDlg.hxx +++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx @@ -32,9 +32,9 @@ class OTableFilterDialog final ,public ::comphelper::OPropertyArrayUsageHelper< OTableFilterDialog > { +public: explicit OTableFilterDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); -public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -42,14 +42,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx index 88ab03961f8c..8000add8def5 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include "UserSettingsDlg.hxx" #include <UserAdminDlg.hxx> #include <comphelper/processfactory.hxx> @@ -26,9 +24,11 @@ using namespace dbaui; -extern "C" void createRegistryInfo_OUserSettingsDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_OUserSettingsDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< OUserSettingsDialog > aAutoRegistration; + return cppu::acquire(new OUserSettingsDialog(context)); } namespace dbaui @@ -48,28 +48,13 @@ Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new OUserSettingsDialog( comphelper::getComponentContext(_rxFactory) )); -} - OUString SAL_CALL OUserSettingsDialog::getImplementationName() { - return getImplementationName_Static(); -} - -OUString OUserSettingsDialog::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.OUserSettingsDialog"; } css::uno::Sequence<OUString> SAL_CALL OUserSettingsDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> OUserSettingsDialog::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.UserAdministrationDialog" }; } diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx index e70a57f60152..c29e9cf26a43 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx @@ -32,9 +32,9 @@ class OUserSettingsDialog final ,public ::comphelper::OPropertyArrayUsageHelper< OUserSettingsDialog > { +public: explicit OUserSettingsDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); -public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -42,14 +42,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx index b9ebc6f2ebff..bd9de4b36aa7 100644 --- a/dbaccess/source/ui/uno/admindlg.cxx +++ b/dbaccess/source/ui/uno/admindlg.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include "admindlg.hxx" #include <dbadmin.hxx> #include <comphelper/processfactory.hxx> @@ -26,9 +24,11 @@ using namespace dbaui; -extern "C" void createRegistryInfo_ODataSourcePropertyDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_ODatasourceAdministrationDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< ODataSourcePropertyDialog > aAutoRegistration; + return cppu::acquire(new ODataSourcePropertyDialog(context)); } namespace dbaui @@ -48,28 +48,13 @@ Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > ODataSourcePropertyDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new ODataSourcePropertyDialog( comphelper::getComponentContext(_rxFactory) )); -} - OUString SAL_CALL ODataSourcePropertyDialog::getImplementationName() { - return getImplementationName_Static(); -} - -OUString ODataSourcePropertyDialog::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.ODatasourceAdministrationDialog"; } css::uno::Sequence<OUString> SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> ODataSourcePropertyDialog::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.DatasourceAdministrationDialog" }; } diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx index e4c817c3ca6f..1560a9a66476 100644 --- a/dbaccess/source/ui/uno/admindlg.hxx +++ b/dbaccess/source/ui/uno/admindlg.hxx @@ -30,10 +30,10 @@ class ODataSourcePropertyDialog final :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< ODataSourcePropertyDialog > { +public: explicit ODataSourcePropertyDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); -public: // XTypeProvider virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; @@ -41,14 +41,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static(); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); - // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index 15dea317dfe6..433b588d69b2 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -18,9 +18,7 @@ */ #include "composerdialogs.hxx" -#include <uiservices.hxx> -#include <dbu_reghelper.hxx> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> @@ -32,10 +30,17 @@ #include <osl/diagnose.h> #include <vcl/svapp.hxx> -extern "C" void createRegistryInfo_ComposerDialogs() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_uno_comp_sdb_RowsetOrderDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::RowsetOrderDialog > aOrderDialogRegistration; - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::RowsetFilterDialog > aFilterDialogRegistration; + return cppu::acquire(new ::dbaui::RowsetOrderDialog(context)); +} +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_uno_comp_sdb_RowsetFilterDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) +{ + return cppu::acquire(new ::dbaui::RowsetFilterDialog(context)); } namespace dbaui @@ -133,14 +138,14 @@ namespace dbaui { } - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog") + OUString SAL_CALL RowsetFilterDialog::getImplementationName() + { + return "com.sun.star.uno.comp.sdb.RowsetFilterDialog"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetFilterDialog) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetFilterDialog, "com.sun.star.sdb.FilterDialog") - - css::uno::Reference< css::uno::XInterface > - RowsetFilterDialog::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL RowsetFilterDialog::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new RowsetFilterDialog( comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.sdb.FilterDialog" }; } std::unique_ptr<weld::GenericDialogController> RowsetFilterDialog::createComposerDialog(weld::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns ) @@ -181,14 +186,14 @@ namespace dbaui { } - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog") + OUString SAL_CALL RowsetOrderDialog::getImplementationName() + { + return "com.sun.star.uno.comp.sdb.RowsetOrderDialog"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetOrderDialog) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetOrderDialog, "com.sun.star.sdb.OrderDialog") - - css::uno::Reference< css::uno::XInterface > - RowsetOrderDialog::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL RowsetOrderDialog::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new RowsetOrderDialog( comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.sdb.OrderDialog" }; } std::unique_ptr<weld::GenericDialogController> RowsetOrderDialog::createComposerDialog(weld::Window* pParent, const Reference< XConnection >& rxConnection, const Reference< XNameAccess >& rxColumns) diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx index f50ce5d79a4b..3018c7a16ac2 100644 --- a/dbaccess/source/ui/uno/composerdialogs.hxx +++ b/dbaccess/source/ui/uno/composerdialogs.hxx @@ -80,12 +80,6 @@ namespace dbaui ); DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); protected: // own overridables @@ -110,12 +104,6 @@ namespace dbaui ); DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); protected: // own overridables diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index aed45a4846e9..fedcb407f7d7 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -18,11 +18,9 @@ */ #include <memory> -#include <dbu_reghelper.hxx> #include <strings.hrc> #include <strings.hxx> #include <core_resource.hxx> -#include <uiservices.hxx> #include <WCopyTable.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -152,13 +150,6 @@ namespace dbaui virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; - // XServiceInfo - static methods - /// @throws RuntimeException - static Sequence< OUString > getSupportedServiceNames_Static(); - /// @throws RuntimeException - static OUString getImplementationName_Static(); - static Reference< XInterface > Create( const Reference< XMultiServiceFactory >& ); - // XCopyTableWizard virtual ::sal_Int16 SAL_CALL getOperation() override; virtual void SAL_CALL setOperation( ::sal_Int16 _operation ) override; @@ -189,10 +180,10 @@ namespace dbaui ::osl::Mutex& getMutex() { return m_aMutex; } bool isInitialized() const { return m_xSourceConnection.is() && m_pSourceObject && m_xDestConnection.is(); } - protected: explicit CopyTableWizard( const Reference< XComponentContext >& _rxORB ); virtual ~CopyTableWizard() override; + protected: // OGenericUnoDialog overridables virtual std::unique_ptr<weld::DialogController> createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) override; virtual void executedDialog( sal_Int16 _nExecutionResult ) override; @@ -411,28 +402,13 @@ CopyTableWizard::~CopyTableWizard() // some thinking - would it break existing clients which do not call a dispose, then? } -Reference< XInterface > CopyTableWizard::Create( const Reference< XMultiServiceFactory >& _rxFactory ) -{ - return *( new CopyTableWizard( comphelper::getComponentContext(_rxFactory) ) ); -} - OUString SAL_CALL CopyTableWizard::getImplementationName() { - return getImplementationName_Static(); -} - -OUString CopyTableWizard::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.CopyTableWizard"; } css::uno::Sequence<OUString> SAL_CALL CopyTableWizard::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> CopyTableWizard::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.application.CopyTableWizard" }; } @@ -1545,9 +1521,11 @@ void CopyTableWizard::executedDialog( sal_Int16 _nExecutionResult ) } // namespace dbaui -extern "C" void createRegistryInfo_CopyTableWizard() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_CopyTableWizard_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::CopyTableWizard > aAutoRegistration; + return cppu::acquire(new ::dbaui::CopyTableWizard(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index c3ba87ab0fcb..b33c068483e7 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -19,8 +19,6 @@ #include "dbinteraction.hxx" #include <apitools.hxx> -#include <dbu_reghelper.hxx> -#include <uiservices.hxx> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> #include <connectivity/dbexception.hxx> @@ -39,10 +37,18 @@ #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> -extern "C" void createRegistryInfo_OInteractionHandler() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_dbaccess_DatabaseInteractionHandler_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::SQLExceptionInteractionHandler > aSQLExceptionInteractionHandler_AutoRegistration; - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::LegacyInteractionHandler > aLegacyInteractionHandler_AutoRegistration; + return cppu::acquire(new ::dbaui::SQLExceptionInteractionHandler(context)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_dbaccess_LegacyInteractionHandler_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) +{ + return cppu::acquire(new ::dbaui::LegacyInteractionHandler(context)); } namespace dbaui @@ -341,25 +347,25 @@ namespace dbaui } // SQLExceptionInteractionHandler - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(SQLExceptionInteractionHandler, "com.sun.star.comp.dbaccess.DatabaseInteractionHandler") + OUString SAL_CALL SQLExceptionInteractionHandler::getImplementationName() + { + return "com.sun.star.comp.dbaccess.DatabaseInteractionHandler"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(SQLExceptionInteractionHandler) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(SQLExceptionInteractionHandler, "com.sun.star.sdb.DatabaseInteractionHandler") - - Reference< XInterface > - SQLExceptionInteractionHandler::Create(const Reference< XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL SQLExceptionInteractionHandler::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new SQLExceptionInteractionHandler(comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.sdb.DatabaseInteractionHandler" }; } // LegacyInteractionHandler - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(LegacyInteractionHandler, "com.sun.star.comp.dbaccess.LegacyInteractionHandler") + OUString SAL_CALL LegacyInteractionHandler::getImplementationName() + { + return "com.sun.star.comp.dbaccess.LegacyInteractionHandler"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(LegacyInteractionHandler) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LegacyInteractionHandler, "com.sun.star.sdb.InteractionHandler") - - Reference< XInterface > - LegacyInteractionHandler::Create(const Reference< XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL LegacyInteractionHandler::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new LegacyInteractionHandler(comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.sdb.InteractionHandler" }; } } // namespace dbaui diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx index 66e0bfb164f5..386023124af4 100644 --- a/dbaccess/source/ui/uno/dbinteraction.hxx +++ b/dbaccess/source/ui/uno/dbinteraction.hxx @@ -135,12 +135,6 @@ namespace dbaui // XServiceInfo DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); }; // SQLExceptionInteractionHandler @@ -169,12 +163,6 @@ namespace dbaui // XServiceInfo DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); }; } // namespace dbaui diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx index a6f8261278ef..a846d44b71dd 100644 --- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx +++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx @@ -18,8 +18,6 @@ */ #include <textconnectionsettings.hxx> -#include <uiservices.hxx> -#include <dbu_reghelper.hxx> #include <apitools.hxx> #include <unoadmin.hxx> #include <stringconstants.hxx> @@ -71,20 +69,12 @@ namespace dbaui { PropertyValues m_aPropertyValues; - protected: + public: explicit OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext ); - virtual ~OTextConnectionSettingsDialog() override; - public: virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override; DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); DECLARE_PROPERTYCONTAINER_DEFAULTS( ); virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) override; @@ -124,24 +114,20 @@ namespace dbaui TextConnectionSettingsDialog::bindItemStorages( *m_pDatasourceItems, m_aPropertyValues ); } - OTextConnectionSettingsDialog::~OTextConnectionSettingsDialog() - { - } - css::uno::Sequence<sal_Int8> OTextConnectionSettingsDialog::getImplementationId() { return css::uno::Sequence<sal_Int8>(); } - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog") + OUString SAL_CALL OTextConnectionSettingsDialog::getImplementationName() + { + return "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(OTextConnectionSettingsDialog) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(OTextConnectionSettingsDialog, "com.sun.star.sdb.TextConnectionSettings") - - css::uno::Reference< css::uno::XInterface > - OTextConnectionSettingsDialog::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL OTextConnectionSettingsDialog::getSupportedServiceNames() { - return static_cast< XServiceInfo* >(new OTextConnectionSettingsDialog( comphelper::getComponentContext(_rxORB))); + return { "com.sun.star.sdb.TextConnectionSettings" }; } Reference< XPropertySetInfo > SAL_CALL OTextConnectionSettingsDialog::getPropertySetInfo() @@ -263,9 +249,11 @@ namespace dbaui } // namespace dbaui -extern "C" void createRegistryInfo_OTextConnectionSettingsDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_dbaccess_OTextConnectionSettingsDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OTextConnectionSettingsDialog > aAutoRegistration; + return cppu::acquire(static_cast<dbaui::ODatabaseAdministrationDialog*>(new ::dbaui::OTextConnectionSettingsDialog(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx index 7abfbdfef37d..494407a117f0 100644 --- a/dbaccess/source/ui/uno/unoDirectSql.cxx +++ b/dbaccess/source/ui/uno/unoDirectSql.cxx @@ -19,9 +19,7 @@ #include <sal/config.h> -#include <uiservices.hxx> #include "unoDirectSql.hxx" -#include <dbu_reghelper.hxx> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/connection/XConnection.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -31,9 +29,11 @@ #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> -extern "C" void createRegistryInfo_ODirectSQLDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_sdb_DirectSQLDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::ODirectSQLDialog > aAutoRegistration; + return cppu::acquire(new ::dbaui::ODirectSQLDialog(context)); } namespace dbaui @@ -63,14 +63,14 @@ namespace dbaui return css::uno::Sequence<sal_Int8>(); } - IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog") + OUString SAL_CALL ODirectSQLDialog::getImplementationName() + { + return "com.sun.star.comp.sdb.DirectSQLDialog"; + } IMPLEMENT_SERVICE_INFO_SUPPORTS(ODirectSQLDialog) - IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODirectSQLDialog, SERVICE_SDB_DIRECTSQLDIALOG) - - css::uno::Reference< css::uno::XInterface > - ODirectSQLDialog::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) + css::uno::Sequence< OUString > SAL_CALL ODirectSQLDialog::getSupportedServiceNames( ) { - return static_cast< XServiceInfo* >(new ODirectSQLDialog( comphelper::getComponentContext(_rxORB))); + return { SERVICE_SDB_DIRECTSQLDIALOG }; } IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog ) diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx index afad0d820062..d84dd5d1a704 100644 --- a/dbaccess/source/ui/uno/unoDirectSql.hxx +++ b/dbaccess/source/ui/uno/unoDirectSql.hxx @@ -40,20 +40,13 @@ namespace dbaui { OUString m_sInitialSelection; css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection; - protected: + public: explicit ODirectSQLDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); virtual ~ODirectSQLDialog() override; - public: virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override; DECLARE_SERVICE_INFO(); - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&); DECLARE_PROPERTYCONTAINER_DEFAULTS( ); diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index 4881a174434b..85e87dbab83f 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -18,9 +18,7 @@ */ #include <sqlmessage.hxx> -#include <uiservices.hxx> #include <unosqlmessage.hxx> -#include <dbu_reghelper.hxx> #include <stringconstants.hxx> #include <strings.hxx> #include <comphelper/processfactory.hxx> @@ -37,9 +35,11 @@ using namespace dbtools; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdb; -extern "C" void createRegistryInfo_OSQLMessageDialog() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +org_openoffice_comp_dbu_OSQLMessageDialog_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& ) { - static OMultiInstanceAutoRegistration< OSQLMessageDialog > aAutoRegistration; + return cppu::acquire(new OSQLMessageDialog(context)); } namespace dbaui @@ -63,28 +63,13 @@ Sequence<sal_Int8> SAL_CALL OSQLMessageDialog::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -Reference< XInterface > OSQLMessageDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new OSQLMessageDialog( comphelper::getComponentContext(_rxFactory) )); -} - OUString SAL_CALL OSQLMessageDialog::getImplementationName() { - return getImplementationName_Static(); -} - -OUString OSQLMessageDialog::getImplementationName_Static() -{ return "org.openoffice.comp.dbu.OSQLMessageDialog"; } css::uno::Sequence<OUString> SAL_CALL OSQLMessageDialog::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence<OUString> OSQLMessageDialog::getSupportedServiceNames_Static() -{ return { "com.sun.star.sdb.ErrorMessageDialog" }; } |