summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/dispatch/closedispatcher.cxx9
-rw-r--r--framework/source/loadenv/loadenv.cxx4
-rw-r--r--include/vcl/dialog.hxx8
-rw-r--r--include/vcl/msgbox.hxx5
-rw-r--r--include/vcl/svapp.hxx6
-rw-r--r--uui/source/iahndl.cxx33
-rw-r--r--vcl/source/app/svapp.cxx16
-rw-r--r--vcl/source/window/dialog.cxx10
-rw-r--r--vcl/source/window/msgbox.cxx6
9 files changed, 12 insertions, 85 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 2055cdc5d517..70d40f58f1cc 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -38,7 +38,6 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
-#include <vcl/dialog.hxx>
#include <unotools/moduleoptions.hxx>
#include <comphelper/processfactory.hxx>
@@ -367,14 +366,6 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void)
}
}
- // if we still have dialogs open, temporary suppress termination
- if (bTerminateApp && Dialog::AreDialogsOpen())
- {
- Application::SetShutdownDelayed();
- bCloseFrame = true;
- bTerminateApp = false;
- }
-
// Do it now ...
bool bSuccess = false;
if (bCloseFrame)
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 3d6da4e3e003..3bfd87e3244c 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -371,10 +371,6 @@ void LoadEnv::startLoading()
if (!bStarted)
bStarted = impl_loadContent();
- // This may have triggered Dialogs (error cases) that may have
- // delayed the shutdown, so give delayed shutdown a chance
- Application::TriggerShutdownDelayed();
-
// not started => general error
// We can't say - what was the reason for.
if (!bStarted)
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index d7d7ce292cf6..d28ff0ac6d64 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -39,11 +39,8 @@ public:
/** Use given parent or get a default one using GetDefaultParent(...) */
Default,
- /** Suppress Parent so that Parent is not blocked (kind of modal mode) */
- NoParent,
-
- /** Suppress Parent (no modal, see above) and additionally center on default parent */
- NoParentCentered
+ /** No Parent */
+ NoParent
};
private:
@@ -168,7 +165,6 @@ public:
void EndDialog( long nResult = 0 );
static void EndAllDialogs( vcl::Window const * pParent );
- static bool AreDialogsOpen();
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx
index 7c377170566c..18b869318b90 100644
--- a/include/vcl/msgbox.hxx
+++ b/include/vcl/msgbox.hxx
@@ -69,9 +69,8 @@ protected:
SAL_DLLPRIVATE void ImplPosControls();
public:
- MessBox( vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits n,
- const OUString& rTitle, const OUString& rMessage,
- Dialog::InitFlag eInitFlag = Dialog::InitFlag::NoParentCentered);
+ MessBox(vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits n,
+ const OUString& rTitle, const OUString& rMessage);
virtual ~MessBox() override;
virtual void dispose() override;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index e895dde09a7d..dd10349a41b2 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1384,12 +1384,6 @@ public:
// For vclbootstrapprotector:
static void setDeInitHook(Link<LinkParamNone*,void> const & hook);
- // for delayed shutdown: set using SetShutdownDelayed, then
- // trigger using TriggerShutdownDelayed which may actually shutdown
- // when SetShutdownDelayed is set
- static void SetShutdownDelayed();
- static void TriggerShutdownDelayed();
-
private:
DECL_STATIC_LINK( Application, PostEventHandler, void*, void );
};
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index d53d01a513ba..27a10becaf88 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -959,35 +959,12 @@ executeMessageBox(
vcl::Window * pParent,
OUString const & rTitle,
OUString const & rMessage,
- MessBoxStyle nButtonMask,
- Dialog::InitFlag eInitFlag)
+ MessBoxStyle nButtonMask)
{
SolarMutexGuard aGuard;
WinBits nStyle(0);
- ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, nStyle, rTitle, rMessage, eInitFlag);
-
- if (Dialog::InitFlag::NoParentCentered == eInitFlag)
- {
- vcl::Window* pDefaultParent = Dialog::GetDefaultParent(nStyle);
-
- if (pDefaultParent)
- {
- // need to 'Show' to have the following tasks do something, 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 aMessResult = xBox->Execute();
DialogMask aResult = DialogMask::NONE;
@@ -1131,8 +1108,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
aTitle += " - " ;
aTitle += aErrTitle;
- executeMessageBox(
- getParentProperty(), aTitle, aErrorString, MessBoxStyle::Ok, Dialog::InitFlag::NoParentCentered);
+ executeMessageBox(getParentProperty(), aTitle, aErrorString, MessBoxStyle::Ok);
}
else
ErrorHandler::HandleError(nErrorCode);
@@ -1247,8 +1223,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
" " +
utl::ConfigManager::getProductVersion() );
- switch (
- executeMessageBox( getParentProperty(), title, aMessage, nButtonMask, Dialog::InitFlag::NoParentCentered) )
+ switch (executeMessageBox(getParentProperty(), title, aMessage, nButtonMask))
{
case DialogMask::ButtonsOk:
OSL_ENSURE( xAbort.is(), "unexpected situation" );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ad5beddb1c83..351a5bfa2f77 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1642,20 +1642,4 @@ void Application::setDeInitHook(Link<LinkParamNone*,void> const & hook) {
pSVData->maAppData.mbInAppMain = true;
}
-void Application::SetShutdownDelayed()
-{
- ImplSVData * pSVData = ImplGetSVData();
- pSVData->maAppData.mbShutdownDelayed = true;
-}
-
-void Application::TriggerShutdownDelayed()
-{
- ImplSVData * pSVData = ImplGetSVData();
-
- if (pSVData->maAppData.mbShutdownDelayed && !Dialog::AreDialogsOpen())
- {
- Application::PostUserEvent(LINK(nullptr, ImplSVAppData, ImplPrepareExitMsg));
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 43e3ff7362ff..9be733fbb4d0 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -412,7 +412,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
// Now, all Dialogs are per default system windows !!!
nStyle |= WB_SYSTEMWINDOW;
- if (InitFlag::NoParent == eFlag || InitFlag::NoParentCentered == eFlag)
+ if (InitFlag::NoParent == eFlag)
{
pParent = nullptr;
}
@@ -1179,14 +1179,6 @@ void Dialog::EndAllDialogs( vcl::Window const * pParent )
}
}
-bool Dialog::AreDialogsOpen()
-{
- ImplSVData* pSVData = ImplGetSVData();
- Dialog* pModDialog = pSVData->maWinData.mpLastExecuteDlg;
-
- return (nullptr != pModDialog);
-}
-
void Dialog::SetModalInputMode( bool bModal )
{
if ( bModal == mbModalMode )
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 8b9f4b515130..67b3edf1df37 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -122,15 +122,15 @@ void MessBox::ImplInitButtons()
}
}
-MessBox::MessBox( vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits nWinBits,
- const OUString& rTitle, const OUString& rMessage, Dialog::InitFlag eInitFlag) :
+MessBox::MessBox(vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits nWinBits,
+ const OUString& rTitle, const OUString& rMessage) :
ButtonDialog( WindowType::MESSBOX ),
mbHelpBtn( false ),
mbCheck( false ),
mnMessBoxStyle( nMessBoxStyle ),
maMessText( rMessage )
{
- ImplInit( pParent, nWinBits | WB_MOVEABLE | WB_HORZ | WB_CENTER, eInitFlag);
+ ImplInit(pParent, nWinBits | WB_MOVEABLE | WB_HORZ | WB_CENTER);
ImplInitButtons();
if ( !rTitle.isEmpty() )