summaryrefslogtreecommitdiff
path: root/desktop/source/deployment
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-18 21:14:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-21 19:28:59 +0200
commitd666c2f87d56da1f4dd3d421665ac3078c447a17 (patch)
treefb837b5b12955d94c06e1abdb0ccb09ceb901607 /desktop/source/deployment
parentd3ba63909740262e0cd64648e2eb00096b4626d2 (diff)
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2155e04d6343638ca9815d394cbc4f78c2b17c3a) drop toString Change-Id: I0f67c8931523bbe90bfbc8cc7d9a5bd523758ee5 (cherry picked from commit 8b1101023f01b2c7478a014b5ead73ada4fd4861) pNameResId is unused Change-Id: Ic1fe6abc7066517187695266c4d1a0888b41ffe7 (cherry picked from commit c2667d7ff558a1b7bf83e694909465f00d1a16f6) Reviewed-on: https://gerrit.libreoffice.org/37843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx28
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx16
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx12
-rw-r--r--desktop/source/deployment/misc/dp_resource.cxx2
6 files changed, 35 insertions, 35 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index a7ff752f9fa3..dc75acbb8264 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -92,7 +92,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
const SolarMutexGuard guard;
std::unique_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
OSL_ASSERT( resmgr.get() != nullptr );
- return ResId(STR_FILTERNAME_ALL, *resmgr.get()).toString();
+ return ResId(STR_FILTERNAME_ALL, *resmgr.get());
}
};
@@ -358,7 +358,7 @@ ResId DialogHelper::getResId( sal_uInt16 nId )
OUString DialogHelper::getResourceString(sal_uInt16 id)
{
const SolarMutexGuard guard;
- OUString ret(ResId(id, *DeploymentGuiResMgr::get()).toString());
+ OUString ret(ResId(id, *DeploymentGuiResMgr::get()));
if (ret.indexOf("%PRODUCTNAME" ) != -1)
{
ret = ret.replaceAll("%PRODUCTNAME", utl::ConfigManager::getProductName());
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index a7970b81297e..d8f4abc5b06e 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -436,15 +436,15 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
//hypothetical: requires two instances of an extension with the same
//version to have different display names. Probably the developer forgot
//to change the version.
- s = ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString();
+ s = ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get());
}
else if (id == RID_STR_WARNING_VERSION_LESS)
{
- s = ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString();
+ s = ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get());
}
else if (id == RID_STR_WARNING_VERSION_GREATER)
{
- s = ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString();
+ s = ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get());
}
s = s.replaceAll("$NAME", verExc.NewDisplayName);
s = s.replaceAll("$OLDNAME", verExc.Deployed->getDisplayName());
@@ -477,7 +477,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
else if (request >>= platExc)
{
SolarMutexGuard guard;
- OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString());
+ OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()));
sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName());
ScopedVclPtrInstance< MessageDialog > box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, sMsg);
box->Execute();
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 9f9760607725..51c213c5d97b 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -482,17 +482,17 @@ UpdateDialog::UpdateDialog(
std::vector< dp_gui::UpdateData > * updateData):
ModalDialog(parent, "UpdateDialog", "desktop/ui/updatedialog.ui"),
m_context(context),
- m_none(DPGUI_RESSTR(RID_DLG_UPDATE_NONE)),
- m_noInstallable(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALLABLE)),
- m_failure(DPGUI_RESSTR(RID_DLG_UPDATE_FAILURE)),
- m_unknownError(DPGUI_RESSTR(RID_DLG_UPDATE_UNKNOWNERROR)),
- m_noDescription(DPGUI_RESSTR(RID_DLG_UPDATE_NODESCRIPTION)),
- m_noInstall(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALL)),
- m_noDependency(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY)),
- m_noDependencyCurVer(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER)),
- m_browserbased(DPGUI_RESSTR(RID_DLG_UPDATE_BROWSERBASED)),
- m_version(DPGUI_RESSTR(RID_DLG_UPDATE_VERSION)),
- m_ignoredUpdate(DPGUI_RESSTR(RID_DLG_UPDATE_IGNORED_UPDATE)),
+ m_none(DpGuiResId(RID_DLG_UPDATE_NONE)),
+ m_noInstallable(DpGuiResId(RID_DLG_UPDATE_NOINSTALLABLE)),
+ m_failure(DpGuiResId(RID_DLG_UPDATE_FAILURE)),
+ m_unknownError(DpGuiResId(RID_DLG_UPDATE_UNKNOWNERROR)),
+ m_noDescription(DpGuiResId(RID_DLG_UPDATE_NODESCRIPTION)),
+ m_noInstall(DpGuiResId(RID_DLG_UPDATE_NOINSTALL)),
+ m_noDependency(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY)),
+ m_noDependencyCurVer(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER)),
+ m_browserbased(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED)),
+ m_version(DpGuiResId(RID_DLG_UPDATE_VERSION)),
+ m_ignoredUpdate(DpGuiResId(RID_DLG_UPDATE_IGNORED_UPDATE)),
m_updateData(*updateData),
m_thread(
new UpdateDialog::Thread(
@@ -598,9 +598,9 @@ short UpdateDialog::Execute() {
UpdateDialog::CheckListBox::CheckListBox( vcl::Window* pParent, UpdateDialog & dialog):
SvxCheckListBox( pParent, WinBits(WB_BORDER) ),
- m_ignoreUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE ) ),
- m_ignoreAllUpdates( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE_ALL ) ),
- m_enableUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_ENABLE ) ),
+ m_ignoreUpdate( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ),
+ m_ignoreAllUpdates( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ),
+ m_enableUpdate( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ),
m_dialog(dialog)
{
SetNormalStaticImage(Image(BitmapEx(RID_DLG_UPDATE_NORMALALERT)));
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 8f18c13c8060..ddadb5f7afd1 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -205,14 +205,14 @@ UpdateInstallDialog::UpdateInstallDialog(
m_thread(new Thread(xCtx, *this, aVecUpdateData)),
m_bError(false),
m_bNoEntry(true),
- m_sInstalling(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_INSTALLING)),
- m_sFinished(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_FINISHED)),
- m_sNoErrors(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_NO_ERRORS)),
- m_sErrorDownload(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)),
- m_sErrorInstallation(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)),
- m_sErrorLicenseDeclined(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)),
- m_sNoInstall(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)),
- m_sThisErrorOccurred(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))
+ m_sInstalling(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING)),
+ m_sFinished(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED)),
+ m_sNoErrors(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS)),
+ m_sErrorDownload(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)),
+ m_sErrorInstallation(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)),
+ m_sErrorLicenseDeclined(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)),
+ m_sNoInstall(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)),
+ m_sThisErrorOccurred(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))
{
get(m_pFt_action, "DOWNLOADING");
get(m_pStatusbar, "STATUSBAR");
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 10d10f292765..6112ad114593 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -85,7 +85,7 @@ OUString produceErrorText(
{
return reason.replaceFirst("%VERSION",
(version.isEmpty()
- ? dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString()
+ ? dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN)
: version));
}
@@ -156,27 +156,27 @@ OUString getErrorText(
if ( dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == minimalVersionOpenOfficeOrg )
{
return produceErrorText(
- dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(),
+ dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN),
dependency->getAttribute("value"));
} else if (dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == maximalVersionOpenOfficeOrg )
{
return produceErrorText(
- dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX).toString(),
+ dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX),
dependency->getAttribute("value"));
} else if (dependency->getNamespaceURI() == namespaceLibreOffice && dependency->getTagName() == minimalVersionLibreOffice )
{
return produceErrorText(
- dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN).toString(),
+ dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN),
dependency->getAttribute("value"));
} else if (dependency->hasAttributeNS(namespaceOpenOfficeOrg,
minimalVersionOpenOfficeOrg))
{
return produceErrorText(
- dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(),
+ dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN),
dependency->getAttributeNS(namespaceOpenOfficeOrg,
minimalVersionOpenOfficeOrg));
} else {
- return dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString();
+ return dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN);
}
}
diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx
index f03633df7fe8..b7f3739c85a2 100644
--- a/desktop/source/deployment/misc/dp_resource.cxx
+++ b/desktop/source/deployment/misc/dp_resource.cxx
@@ -68,7 +68,7 @@ ResId getResId( sal_uInt16 id )
OUString getResourceString( sal_uInt16 id )
{
const osl::MutexGuard guard(theResourceMutex::get());
- OUString ret(ResId(id, *DeploymentResMgr::get()).toString());
+ OUString ret(ResId(id, *DeploymentResMgr::get()));
return ret.replaceAll("%PRODUCTNAME", utl::ConfigManager::getProductName());
}