diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-21 19:28:59 +0200 |
commit | d666c2f87d56da1f4dd3d421665ac3078c447a17 (patch) | |
tree | fb837b5b12955d94c06e1abdb0ccb09ceb901607 /desktop/source/deployment/misc | |
parent | d3ba63909740262e0cd64648e2eb00096b4626d2 (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/misc')
-rw-r--r-- | desktop/source/deployment/misc/dp_dependencies.cxx | 12 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_resource.cxx | 2 |
2 files changed, 7 insertions, 7 deletions
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()); } |