summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/dp_gui_shared.hxx9
-rw-r--r--desktop/source/app/app.cxx8
-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
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx18
10 files changed, 52 insertions, 55 deletions
diff --git a/desktop/inc/dp_gui_shared.hxx b/desktop/inc/dp_gui_shared.hxx
index bd175cb3bfa5..63496c860867 100644
--- a/desktop/inc/dp_gui_shared.hxx
+++ b/desktop/inc/dp_gui_shared.hxx
@@ -33,13 +33,10 @@ struct DeploymentGuiResMgr :
}
};
-class DpGuiResId : public ResId
+inline OUString DpGuiResId(sal_uInt16 nId)
{
-public:
- explicit DpGuiResId( sal_uInt16 nId ):ResId( nId, *DeploymentGuiResMgr::get() ) {}
-};
-
-#define DPGUI_RESSTR(i) DpGuiResId(i).toString()
+ return ResId(nId, *DeploymentGuiResMgr::get());
+}
} // namespace dp_gui
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 627cf6a2db92..5ec52681c5a7 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -374,7 +374,7 @@ OUString GetMsgString(
{
ResMgr* resMgr = Desktop::GetDesktopResManager();
if ( resMgr )
- return ResId(nId, *resMgr).toString();
+ return ResId(nId, *resMgr);
}
return aFallbackMsg;
}
@@ -402,7 +402,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
ResMgr* pResMgr = Desktop::GetDesktopResManager();
if ( pResMgr )
- aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr).toString() );
+ aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr) );
else
aDiagnosticMessage.append( "The program cannot be started." );
@@ -410,7 +410,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
{
aDiagnosticMessage.append( "\n\n" );
if ( pResMgr )
- aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr).toString() );
+ aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr) );
else
aDiagnosticMessage.append( "The following internal error has occurred:\n\n" );
aDiagnosticMessage.append( aInternalErrMsg );
@@ -1163,7 +1163,7 @@ void restartOnMac(bool passArguments) {
#if HAVE_FEATURE_MACOSX_SANDBOX
(void) passArguments; // avoid warnings
ResMgr *resMgr = Desktop::GetDesktopResManager();
- OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr).toString();
+ OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr);
MessageDialog aRestartBox(NULL, aMessage);
aRestartBox.Execute();
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());
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 99bd66bbeea2..572bdd0eaef4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2493,7 +2493,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
{
boost::property_tree::ptree aChild;
- OUString sClearFormat = SVX_RESSTR( RID_SVXSTR_CLEARFORM );
+ OUString sClearFormat = SvxResId(RID_SVXSTR_CLEARFORM);
boost::property_tree::ptree aName;
aName.put("", sClearFormat.toUtf8());
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 80ed1bcec910..0eb7feff44e4 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -137,15 +137,15 @@ void CommandEnvironmentImpl::printLicense(
const OUString & sName, const OUString& sLicense, bool & accept, bool &decline)
{
ResMgr * pResMgr = DeploymentResMgr::get();
- OUString s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr).toString());
+ OUString s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr));
OUString s1(s1tmp.replaceAll("$NAME", sName));
- OUString s2 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr).toString();
- OUString s3 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr).toString();
- OUString s4 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr).toString();
- OUString sYES = ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr).toString();
- OUString sY = ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr).toString();
- OUString sNO = ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr).toString();
- OUString sN = ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr).toString();
+ OUString s2 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr);
+ OUString s3 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr);
+ OUString s4 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr);
+ OUString sYES = ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr);
+ OUString sY = ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr);
+ OUString sNO = ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr);
+ OUString sN = ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr);
OUString sNewLine("\n");
@@ -264,7 +264,7 @@ void CommandEnvironmentImpl::handle(
}
else if (request >>= platExc)
{
- OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()).toString());
+ OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()));
sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName());
dp_misc::writeConsole("\n" + sMsg + "\n\n");
approve = true;