summaryrefslogtreecommitdiff
path: root/uui/source/iahndl-locking.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-26 16:53:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-27 11:22:49 +0100
commit082e69fefb7439fd4f3d543f0c402039e94c1e9c (patch)
tree8348cacdc54a15dae722b93fc198995756924fc0 /uui/source/iahndl-locking.cxx
parentf41a08183504a59d6ffc7a00ed7f24e6b19995ab (diff)
convert various MessBox to weld::MessageDialog
Change-Id: I4d2d0393c753114aeb9bb7e646dfdc810f6caa38 Reviewed-on: https://gerrit.libreoffice.org/50398 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 'uui/source/iahndl-locking.cxx')
-rw-r--r--uui/source/iahndl-locking.cxx51
1 files changed, 27 insertions, 24 deletions
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index ecd49ea55baf..d52142da4667 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -57,7 +57,7 @@ namespace {
void
handleLockedDocumentRequest_(
- vcl::Window * pParent,
+ weld::Window * pParent,
const OUString& aDocumentURL,
const OUString& aInfo,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
@@ -96,8 +96,8 @@ handleLockedDocumentRequest_(
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, aResLocale, aMessage, xRetry.is());
- nResult = xDialog->Execute();
+ OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
+ nResult = aDialog.run();
}
else if ( nMode == UUI_DOC_SAVE_LOCK )
{
@@ -110,8 +110,8 @@ handleLockedDocumentRequest_(
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< TryLaterQueryBox > xDialog(pParent, aResLocale, aMessage, xRetry.is());
- nResult = xDialog->Execute();
+ TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
+ nResult = aDialog.run();
}
else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
nMode == UUI_DOC_OWN_SAVE_LOCK )
@@ -124,11 +124,8 @@ handleLockedDocumentRequest_(
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
- ScopedVclPtrInstance< AlreadyOpenQueryBox > xDialog( pParent,
- aResLocale,
- aMessage,
- nMode == UUI_DOC_OWN_SAVE_LOCK );
- nResult = xDialog->Execute();
+ AlreadyOpenQueryBox aDialog(pParent, aResLocale, aMessage, nMode == UUI_DOC_OWN_SAVE_LOCK);
+ nResult = aDialog.run();
}
if ( nResult == RET_YES )
@@ -148,7 +145,7 @@ handleLockedDocumentRequest_(
void
handleChangedByOthersRequest_(
- vcl::Window * pParent,
+ weld::Window * pParent,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations )
{
@@ -163,8 +160,8 @@ handleChangedByOthersRequest_(
{
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
- ScopedVclPtrInstance< FileChangedQueryBox > xDialog(pParent, aResLocale);
- sal_Int32 nResult = xDialog->Execute();
+ FileChangedQueryBox aDialog(pParent, aResLocale);
+ sal_Int32 nResult = aDialog.run();
if ( nResult == RET_YES )
xApprove->select();
@@ -184,7 +181,7 @@ const sal_uInt16 UUI_DOC_CorruptErrDlg = 1;
void
handleLockFileProblemRequest_(
- vcl::Window * pParent,
+ weld::Window * pParent,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations, sal_uInt16 nWhichDlg )
{
@@ -204,13 +201,13 @@ handleLockFileProblemRequest_(
if (nWhichDlg == UUI_DOC_CreateErrDlg)
{
- ScopedVclPtrInstance< LockFailedQueryBox > xDialog(pParent, aResLocale);
- nResult = xDialog->Execute();
+ LockFailedQueryBox aDialog(pParent, aResLocale);
+ nResult = aDialog.run();
}
else
{
- ScopedVclPtrInstance< LockCorruptQueryBox > xDialog(pParent, aResLocale);
- nResult = xDialog->Execute();
+ LockCorruptQueryBox aDialog(pParent, aResLocale);
+ nResult = aDialog.run();
}
if ( nResult == RET_OK )
@@ -235,7 +232,8 @@ UUIInteractionHelper::handleLockedDocumentRequest(
document::LockedDocumentRequest aLockedDocumentRequest;
if (aAnyRequest >>= aLockedDocumentRequest )
{
- handleLockedDocumentRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aLockedDocumentRequest.DocumentURL,
aLockedDocumentRequest.UserInfo,
rRequest->getContinuations(),
@@ -246,7 +244,8 @@ UUIInteractionHelper::handleLockedDocumentRequest(
document::OwnLockOnDocumentRequest aOwnLockOnDocumentRequest;
if (aAnyRequest >>= aOwnLockOnDocumentRequest )
{
- handleLockedDocumentRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aOwnLockOnDocumentRequest.DocumentURL,
aOwnLockOnDocumentRequest.TimeInfo,
rRequest->getContinuations(),
@@ -259,7 +258,8 @@ UUIInteractionHelper::handleLockedDocumentRequest(
document::LockedOnSavingRequest aLockedOnSavingRequest;
if (aAnyRequest >>= aLockedOnSavingRequest )
{
- handleLockedDocumentRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aLockedOnSavingRequest.DocumentURL,
aLockedOnSavingRequest.UserInfo,
rRequest->getContinuations(),
@@ -278,7 +278,8 @@ UUIInteractionHelper::handleChangedByOthersRequest(
document::ChangedByOthersRequest aChangedByOthersRequest;
if (aAnyRequest >>= aChangedByOthersRequest )
{
- handleChangedByOthersRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleChangedByOthersRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations() );
return true;
}
@@ -295,7 +296,8 @@ UUIInteractionHelper::handleLockFileProblemRequest(
document::LockFileIgnoreRequest aLockFileIgnoreRequest;
if (aAnyRequest >>= aLockFileIgnoreRequest )
{
- handleLockFileProblemRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleLockFileProblemRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations(), UUI_DOC_CreateErrDlg );
return true;
}
@@ -303,7 +305,8 @@ UUIInteractionHelper::handleLockFileProblemRequest(
document::LockFileCorruptRequest aLockFileCorruptRequest;
if (aAnyRequest >>= aLockFileCorruptRequest )
{
- handleLockFileProblemRequest_( getParentProperty(),
+ vcl::Window* pWin = getParentProperty();
+ handleLockFileProblemRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations(), UUI_DOC_CorruptErrDlg );
return true;
}