summaryrefslogtreecommitdiff
path: root/uui/source/iahndl-locking.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'uui/source/iahndl-locking.cxx')
-rw-r--r--uui/source/iahndl-locking.cxx44
1 files changed, 18 insertions, 26 deletions
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index d5ca16f95a96..927351727129 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -30,10 +30,11 @@
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
+#include <tools/resmgr.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
-#include "ids.hrc"
+#include "strings.hrc"
#include "getcontinuations.hxx"
#include "openlocked.hxx"
#include "trylater.hxx"
@@ -73,9 +74,7 @@ handleLockedDocumentRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
OUString aMessage;
std::vector< OUString > aArguments;
@@ -86,41 +85,40 @@ handleLockedDocumentRequest_(
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
- : ResId( STR_UNKNOWNUSER,
- *xManager.get() ).toString() );
- aMessage = ResId(STR_OPENLOCKED_MSG, *xManager.get()).toString();
+ : Translate::get( STR_UNKNOWNUSER, aResLocale) );
+ aMessage = Translate::get(STR_OPENLOCKED_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, xManager.get(), aMessage);
+ ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, aResLocale, aMessage);
nResult = xDialog->Execute();
}
else if ( nMode == UUI_DOC_SAVE_LOCK )
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
- : ResId( STR_UNKNOWNUSER,
- *xManager.get() ).toString() );
- aMessage = ResId(STR_TRYLATER_MSG, *xManager.get()).toString();
+ : Translate::get( STR_UNKNOWNUSER,
+ aResLocale ) );
+ aMessage = Translate::get(STR_TRYLATER_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< TryLaterQueryBox > xDialog( pParent, xManager.get(), aMessage );
+ ScopedVclPtrInstance< TryLaterQueryBox > xDialog(pParent, aResLocale, aMessage);
nResult = xDialog->Execute();
}
else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
nMode == UUI_DOC_OWN_SAVE_LOCK )
{
aArguments.push_back( aInfo );
- aMessage = ResId(nMode == UUI_DOC_OWN_SAVE_LOCK
+ aMessage = Translate::get(nMode == UUI_DOC_OWN_SAVE_LOCK
? STR_ALREADYOPEN_SAVE_MSG
: STR_ALREADYOPEN_MSG,
- *xManager.get() ).toString();
+ aResLocale );
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
ScopedVclPtrInstance< AlreadyOpenQueryBox > xDialog( pParent,
- xManager.get(),
+ aResLocale,
aMessage,
nMode == UUI_DOC_OWN_SAVE_LOCK );
nResult = xDialog->Execute();
@@ -155,11 +153,8 @@ handleChangedByOthersRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
-
- ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, xManager.get());
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
+ ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, aResLocale);
sal_Int32 nResult = xDialog->Execute();
if ( nResult == RET_YES )
@@ -194,24 +189,21 @@ handleLockFileProblemRequest_(
try
{
SolarMutexGuard aGuard;
- std::unique_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- if (!xManager.get())
- return;
+ std::locale aResLocale = Translate::Create("uui", Application::GetSettings().GetUILanguageTag());
sal_Int32 nResult;
if (nWhichDlg == UUI_DOC_CreateErrDlg)
{
- ScopedVclPtrInstance< LockFailedQueryBox > xDialog(pParent, xManager.get());
+ ScopedVclPtrInstance< LockFailedQueryBox > xDialog(pParent, aResLocale);
nResult = xDialog->Execute();
}
else
{
- ScopedVclPtrInstance< LockCorruptQueryBox > xDialog(pParent, xManager.get());
+ ScopedVclPtrInstance< LockCorruptQueryBox > xDialog(pParent, aResLocale);
nResult = xDialog->Execute();
}
-
if ( nResult == RET_OK )
xApprove->select();
else