summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-07 09:32:48 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-07 14:30:06 +0100
commit258b4b1ef60e5153c1c33444010c1385f46475d6 (patch)
tree8ff2dc1ad9e7376f9a82b7bf8b410a7bc1fc214a /uui
parent64d2902a61f6aa90554bc76fe70aee78bba6b3dd (diff)
Resolves: tdf#113160 changing all warning dialogs to non-modal is unsafe
existing code doesn't expect that so stuff crashes partial revert of... commit db6b703d391838c481fd090065f6d329edcd4efa Date: Thu Aug 24 18:32:38 2017 +0200 Allow non-modal Dialogs during FileImport/Load Reviewed-on: https://gerrit.libreoffice.org/44227 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Conflicts: framework/source/dispatch/closedispatcher.cxx include/vcl/dialog.hxx include/vcl/msgbox.hxx uui/source/iahndl.cxx vcl/source/window/msgbox.cxx Change-Id: I152feb849186cf035664a700d3f94ee049cdf6d3
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl.cxx32
1 files changed, 5 insertions, 27 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index b53f5b474323..5abc43a88368 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -998,33 +998,12 @@ executeMessageBox(
vcl::Window * pParent,
OUString const & rTitle,
OUString const & rMessage,
- WinBits nButtonMask,
- Dialog::InitFlag eInitFlag)
+ WinBits nButtonMask)
{
SolarMutexGuard aGuard;
- ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, rTitle, rMessage, eInitFlag);
+ WinBits nStyle(0);
- if (Dialog::InitFlag::NoParentCentered == eInitFlag)
- {
- vcl::Window* pDefaultParent = Dialog::GetDefaultParent(nButtonMask);
-
- if (pDefaultParent)
- {
- // need to 'Show' to have the following tasks do someting, does
- // not work without and may even stumble on nullptrs/errors
- xBox->Show();
-
- // center on parent window
- const Point aP(pDefaultParent->GetPosPixel());
- const Size aS(pDefaultParent->GetSizePixel());
- const Size aMySize(xBox->GetSizePixel());
-
- xBox->SetPosPixel(
- Point(
- aP.X() + ((aS.Width() - aMySize.Width()) >> 1),
- aP.Y() + ((aS.Height() - aMySize.Height()) >> 1)));
- }
- }
+ ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, nStyle, rTitle, rMessage);
sal_uInt16 aResult = xBox->Execute();
switch( aResult )
@@ -1176,7 +1155,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
aTitle += aErrTitle;
executeMessageBox(
- getParentProperty(), aTitle, aErrorString, WB_OK, Dialog::InitFlag::NoParentCentered);
+ getParentProperty(), aTitle, aErrorString, WB_OK);
}
else
ErrorHandler::HandleError(nErrorCode);
@@ -1299,8 +1278,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
" " +
utl::ConfigManager::getProductVersion() );
- switch (
- executeMessageBox( getParentProperty(), title, aMessage, nButtonMask, Dialog::InitFlag::NoParentCentered) )
+ switch (executeMessageBox(getParentProperty(), title, aMessage, nButtonMask))
{
case ERRCODE_BUTTON_OK:
OSL_ENSURE( xAbort.is(), "unexpected situation" );