Kaydet (Commit) 97ee2bbd authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

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/39184Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e61c97f0
......@@ -373,7 +373,7 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) {
|| tc.Class("list").StdNamespace()
|| tc.Class("mem_fun1_t").StdNamespace()
// registration template thing, doesn't actually allocate anything we need to care about
|| tc.Class("OMultiInstanceAutoRegistration").Namespace("dbp").GlobalNamespace())
|| tc.Class("OMultiInstanceAutoRegistration").Namespace("compmodule").GlobalNamespace())
{
return true;
}
......
......@@ -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))
......
......@@ -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))
......
......@@ -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;
......
......@@ -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
......
......@@ -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 ) ) );
......
......@@ -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,
......
......@@ -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 );
}
......
......@@ -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;
}
......
......@@ -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));
}
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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));
}
......
......@@ -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:
......
......@@ -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));
}
......
......@@ -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));
}
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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: */
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment