diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-23 21:25:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-26 09:05:43 +0200 |
commit | 97ee2bbd402c8457f4bf8fe6fd8f5f36590b963f (patch) | |
tree | 1b69cef6af129c2c9c7d7013693ac67e4160d846 /extensions | |
parent | e61c97f08e5472b64ba33fc64a595ad48de4b357 (diff) |
extensions: remove COMPMOD preprocessor defines
COMPMOD_RESPREFIX=abp was unused ever since initial commit in 2001.
COMPMOD_NAMESPACE was used to set the namespace name qualifier of
the helper in componentmodule.hxx to the extension's namespace name.
I don't see why this is necessary as the helper is always compiled in
a separate extension library.
Change-Id: I287607008db3dc0ebc32731536747a921c91807d
Reviewed-on: https://gerrit.libreoffice.org/39184
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
20 files changed, 34 insertions, 46 deletions
diff --git a/extensions/Library_abp.mk b/extensions/Library_abp.mk index ad2f062b690a..0262b3a02e0b 100644 --- a/extensions/Library_abp.mk +++ b/extensions/Library_abp.mk @@ -19,11 +19,6 @@ $(eval $(call gb_Library_set_include,abp,\ -I$(SRCDIR)/extensions/source/inc \ )) -$(eval $(call gb_Library_add_defs,abp,\ - -DCOMPMOD_NAMESPACE=abp \ - -DCOMPMOD_RESPREFIX=abp \ -)) - $(eval $(call gb_Library_use_external,abp,boost_headers)) $(eval $(call gb_Library_use_sdk_api,abp)) diff --git a/extensions/Library_dbp.mk b/extensions/Library_dbp.mk index 6ddd129a6ac6..83c44a9d7d33 100644 --- a/extensions/Library_dbp.mk +++ b/extensions/Library_dbp.mk @@ -19,10 +19,6 @@ $(eval $(call gb_Library_set_include,dbp,\ -I$(SRCDIR)/extensions/source/inc \ )) -$(eval $(call gb_Library_add_defs,dbp,\ - -DCOMPMOD_NAMESPACE=dbp \ -)) - $(eval $(call gb_Library_use_external,dbp,boost_headers)) $(eval $(call gb_Library_use_sdk_api,dbp)) diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 4c56318fad8b..dd0da506bf4c 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -105,7 +105,7 @@ namespace abp #else m_aSettings.eType = AST_OTHER; #endif - m_aSettings.sDataSourceName = ModuleRes(RID_STR_DEFAULT_NAME); + m_aSettings.sDataSourceName = compmodule::ModuleRes(RID_STR_DEFAULT_NAME); m_aSettings.bRegisterDataSource = false; m_aSettings.bEmbedDataSource = false; m_aSettings.bIgnoreNoTable = false; @@ -116,7 +116,7 @@ namespace abp typeSelectionChanged( m_aSettings.eType ); - OUString sDialogTitle = ModuleRes(RID_STR_ABSOURCEDIALOGTITLE); + OUString sDialogTitle = compmodule::ModuleRes(RID_STR_ABSOURCEDIALOGTITLE); setTitleBase(sDialogTitle); SetHelpId(HID_ABSPILOT); } @@ -137,7 +137,7 @@ namespace abp OUString sDisplayName; if ( nResId ) { - sDisplayName = ModuleRes(nResId); + sDisplayName = compmodule::ModuleRes(nResId); } return sDisplayName; @@ -260,7 +260,7 @@ namespace abp if ( aTables.empty() ) { - if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) + if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, compmodule::ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) { // cannot ask the user, or the user chose to use this data source, though there are no tables bAllow = false; diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index 71c459a7b5db..79c833731b87 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -74,7 +74,7 @@ namespace abp *pArguments++ <<= PropertyValue("ParentWindow", -1, makeAny(xDialogParent), PropertyState_DIRECT_VALUE); // the title of the dialog - OUString sAdminDialogTitle(ModuleRes(RID_STR_ADMINDIALOGTITLE)); + OUString sAdminDialogTitle(compmodule::ModuleRes(RID_STR_ADMINDIALOGTITLE)); *pArguments++ <<= PropertyValue("Title", -1, makeAny(sAdminDialogTitle), PropertyState_DIRECT_VALUE); // the name of the new data source diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 88abdcce660e..598d476bdd3a 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -583,8 +583,8 @@ namespace abp { // prepend some context info SQLContext aDetailedError; - aDetailedError.Message = ModuleRes(RID_STR_NOCONNECTION); - aDetailedError.Details = ModuleRes(RID_STR_PLEASECHECKSETTINGS); + aDetailedError.Message = compmodule::ModuleRes(RID_STR_NOCONNECTION); + aDetailedError.Details = compmodule::ModuleRes(RID_STR_PLEASECHECKSETTINGS); aDetailedError.NextException = aError; // handle (aka display) the new context info xInteractions->handle( new OInteractionRequest( makeAny( aDetailedError ) ) ); diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 392a613bd694..4176323e5907 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -73,7 +73,7 @@ namespace abp // create an instance of the dialog service Reference< XWindow > xDialogParent = VCLUnoHelper::GetInterface( _pParent ); - OUString sTitle(ModuleRes(RID_STR_FIELDDIALOGTITLE)); + OUString sTitle(compmodule::ModuleRes(RID_STR_FIELDDIALOGTITLE)); Reference< XExecutableDialog > xDialog = AddressBookSourceDialog::createWithDataSource(_rxORB, // the parent window xDialogParent, diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 0c357bf8d996..d805d5749f19 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -67,7 +67,7 @@ namespace abp const AddressSettings& rSettings = getSettings(); OUString sHint; if ( rSettings.aFieldMapping.empty() ) - sHint = ModuleRes(RID_STR_NOFIELDSASSIGNED); + sHint = compmodule::ModuleRes(RID_STR_NOFIELDSASSIGNED); m_pHint->SetText( sHint ); } diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index eb4e00b83fca..f96a509cee32 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -226,7 +226,7 @@ namespace abp if (AST_INVALID == getSelectedType( )) { - ScopedVclPtrInstance< MessageDialog > aError(this, ModuleRes(RID_STR_NEEDTYPESELECTION)); + ScopedVclPtrInstance< MessageDialog > aError(this, compmodule::ModuleRes(RID_STR_NEEDTYPESELECTION)); aError->Execute(); return false; } diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx index 7dc6ab8de2b5..1390bb75cf3a 100644 --- a/extensions/source/abpilot/unodialogabp.cxx +++ b/extensions/source/abpilot/unodialogabp.cxx @@ -150,7 +150,7 @@ org_openoffice_comp_abp_OAddressBookSourcePilot( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - abp::OModule::setResourceFilePrefix("abp"); + compmodule::OModule::setResourceFilePrefix("abp"); return cppu::acquire(new abp::OABSPilotUno(context)); } diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx index a2dafa18838f..b5532179b3ff 100644 --- a/extensions/source/abpilot/unodialogabp.hxx +++ b/extensions/source/abpilot/unodialogabp.hxx @@ -33,7 +33,7 @@ namespace abp typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase; /// the UNO wrapper for the address book source pilot class OABSPilotUno - :public OModuleResourceClient + :public compmodule::OModuleResourceClient ,public svt::OGenericUnoDialog ,public OABSPilotUno_JBase ,public OABSPilotUno_PBase diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index af958da2dc3d..5f3ed6459035 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -450,7 +450,7 @@ namespace dbp get(m_pStoreYes, "yesRadiobutton"); get(m_pStoreNo, "noRadiobutton"); get(m_pStoreWhere, "storeInFieldCombobox"); - SetText(ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); + SetText(compmodule::ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); announceControls(*m_pStoreYes, *m_pStoreNo, *m_pStoreWhere); m_pStoreWhere->SetDropDownLineCount(10); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 8bf34931d91a..ed66dd5986b7 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -230,7 +230,7 @@ namespace dbp nCommandTypeResourceId = RID_STR_TYPE_COMMAND; break; } - m_pFormContentType->SetText(ModuleRes(nCommandTypeResourceId)); + m_pFormContentType->SetText(compmodule::ModuleRes(nCommandTypeResourceId)); } OControlWizardPage_Base::initializePage(); @@ -606,7 +606,7 @@ namespace dbp // prepend an extra SQLContext explaining what we were doing SQLContext aContext; - aContext.Message = ModuleRes(RID_STR_COULDNOTOPENTABLE); + aContext.Message = compmodule::ModuleRes(RID_STR_COULDNOTOPENTABLE); aContext.NextException = aSQLException; // create an interaction handler to display this exception diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index d54c8a00e8b5..4956b6b8d198 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -32,7 +32,7 @@ extern "C" void SAL_CALL dbp_initializeModule() createRegistryInfo_OGroupBoxWizard(); createRegistryInfo_OListComboWizard(); createRegistryInfo_OGridWizard(); - ::dbp::OModule::setResourceFilePrefix("dbp"); + compmodule::OModule::setResourceFilePrefix("dbp"); s_bInit = true; } } @@ -48,7 +48,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbp_component_getFactory( Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { - xRet = ::dbp::OModule::getComponentFactory( + xRet = compmodule::OModule::getComponentFactory( OUString::createFromAscii(pImplementationName), static_cast< XMultiServiceFactory* >(pServiceManager)); } diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 9db743904aa4..bdc61e2461d1 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -60,7 +60,7 @@ namespace dbp m_pNextPage->SetHelpId(HID_GRIDWIZARD_NEXT); m_pCancel->SetHelpId(HID_GRIDWIZARD_CANCEL); m_pFinish->SetHelpId(HID_GRIDWIZARD_FINISH); - setTitleBase(ModuleRes(RID_STR_GRIDWIZARD_TITLE)); + setTitleBase(compmodule::ModuleRes(RID_STR_GRIDWIZARD_TITLE)); // if we do not need the data source selection page ... if (!needDatasourceSelection()) @@ -160,11 +160,11 @@ namespace dbp case DataType::TIMESTAMP: aColumnServiceNames.push_back(OUString("DateField")); - aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_DATEPOSTFIX)); + aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_DATEPOSTFIX)); aFormFieldNames.push_back(*pSelectedFields); aColumnServiceNames.push_back(OUString("TimeField")); - aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_TIMEPOSTFIX)); + aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_TIMEPOSTFIX)); break; default: diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index ab44cefe5bb1..269715e3e86b 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -55,7 +55,7 @@ namespace dbp m_pNextPage->SetHelpId(HID_GROUPWIZARD_NEXT); m_pCancel->SetHelpId(HID_GROUPWIZARD_CANCEL); m_pFinish->SetHelpId(HID_GROUPWIZARD_FINISH); - setTitleBase(ModuleRes(RID_STR_GROUPWIZARD_TITLE)); + setTitleBase(compmodule::ModuleRes(RID_STR_GROUPWIZARD_TITLE)); } @@ -468,7 +468,7 @@ namespace dbp OOptionDBFieldPage::OOptionDBFieldPage( OControlWizard* _pParent ) :ODBFieldPage(_pParent) { - setDescriptionText(ModuleRes(RID_STR_GROUPWIZ_DBFIELD)); + setDescriptionText(compmodule::ModuleRes(RID_STR_GROUPWIZ_DBFIELD)); } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 3b8e09a9b9ab..f03327d566f8 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -73,11 +73,11 @@ namespace dbp { case FormComponentType::LISTBOX: m_bListBox = true; - setTitleBase(ModuleRes(RID_STR_LISTWIZARD_TITLE)); + setTitleBase(compmodule::ModuleRes(RID_STR_LISTWIZARD_TITLE)); return true; case FormComponentType::COMBOBOX: m_bListBox = false; - setTitleBase(ModuleRes(RID_STR_COMBOWIZARD_TITLE)); + setTitleBase(compmodule::ModuleRes(RID_STR_COMBOWIZARD_TITLE)); return true; } return false; @@ -354,7 +354,7 @@ namespace dbp get(m_pSelectTableField, "selectfield"); get(m_pDisplayedField, "displayfield"); get(m_pInfo, "info"); - m_pInfo->SetText(ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX)); + m_pInfo->SetText(compmodule::ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX)); m_pSelectTableField->SetSelectHdl(LINK(this, OContentFieldSelection, OnFieldSelected)); m_pSelectTableField->SetDoubleClickHdl(LINK(this, OContentFieldSelection, OnTableDoubleClicked)); } @@ -505,7 +505,7 @@ namespace dbp OComboDBFieldPage::OComboDBFieldPage( OControlWizard* _pParent ) :ODBFieldPage(_pParent) { - setDescriptionText(ModuleRes(RID_STR_COMBOWIZ_DBFIELD)); + setDescriptionText(compmodule::ModuleRes(RID_STR_COMBOWIZ_DBFIELD)); } diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx index e0d1ff000dc9..5b148ffdcaa7 100644 --- a/extensions/source/dbpilots/unoautopilot.hxx +++ b/extensions/source/dbpilots/unoautopilot.hxx @@ -36,7 +36,7 @@ namespace dbp class OUnoAutoPilot :public OUnoAutoPilot_Base ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > > - ,public OModuleResourceClient + ,public compmodule::OModuleResourceClient { explicit OUnoAutoPilot(const css::uno::Reference< css::uno::XComponentContext >& _rxORB) : OUnoAutoPilot_Base(_rxORB) diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx index 52bcf33f6f0b..5f8a8e744af5 100644 --- a/extensions/source/dbpilots/wizardservices.cxx +++ b/extensions/source/dbpilots/wizardservices.cxx @@ -29,21 +29,21 @@ // the registration methods extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard() { - static ::dbp::OMultiInstanceAutoRegistration< + static compmodule::OMultiInstanceAutoRegistration< ::dbp::OUnoAutoPilot< ::dbp::OGroupBoxWizard, ::dbp::OGroupBoxSI > > aAutoRegistration; } extern "C" void SAL_CALL createRegistryInfo_OListComboWizard() { - static ::dbp::OMultiInstanceAutoRegistration< + static compmodule::OMultiInstanceAutoRegistration< ::dbp::OUnoAutoPilot< ::dbp::OListComboWizard, ::dbp::OListComboSI > > aAutoRegistration; } extern "C" void SAL_CALL createRegistryInfo_OGridWizard() { - static ::dbp::OMultiInstanceAutoRegistration< + static compmodule::OMultiInstanceAutoRegistration< ::dbp::OUnoAutoPilot< ::dbp::OGridWizard, ::dbp::OGridSI > > aAutoRegistration; } diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 77165e88c3ef..7ed33cf63fe7 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -30,7 +30,7 @@ ensureImpl() -namespace COMPMOD_NAMESPACE +namespace compmodule { @@ -259,7 +259,7 @@ namespace COMPMOD_NAMESPACE } -} // namespace COMPMOD_NAMESPACE +} // namespace compmodule /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx index f523e3f7675d..66b232c481c5 100644 --- a/extensions/source/inc/componentmodule.hxx +++ b/extensions/source/inc/componentmodule.hxx @@ -23,9 +23,6 @@ /** you may find this file helpful if you implement a component (in it's own library) which can't use the usual infrastructure.<br/> More precise, you find helper classes to ease the use of resources and the registration of services. - <p> - You need to define a preprocessor variable COMPMOD_NAMESPACE in order to use this file. Set it to a string - which should be used as namespace for the classes defined herein.</p> */ #include <osl/mutex.hxx> @@ -41,7 +38,7 @@ class ResMgr; -namespace COMPMOD_NAMESPACE +namespace compmodule { @@ -193,7 +190,7 @@ typedef css::uno::Reference< css::lang::XSingleServiceFactory > (SAL_CALL *Facto OModule::revokeComponent(TYPE::getImplementationName_Static()); } -} // namespace COMPMOD_NAMESPACE +} // namespace compmodule #endif // INCLUDED_EXTENSIONS_SOURCE_INC_COMPONENTMODULE_HXX |