summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-19 15:41:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-19 15:42:51 +0100
commit7fb1b147507ad991de974c7c331816225dc5c088 (patch)
tree4f1822e4898eafd7828ad1493c4499976e2e5b8d /vcl/source
parent6c39f7bba64fd55488f840675fa83c3ba241bc74 (diff)
add Application::EndAllPopups
Change-Id: Id4548aa2e32f736f4cd332ba824137d88fe963fc
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svapp.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 16467e87a27b..7a474de52303 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -37,6 +37,7 @@
#include <unotools/syslocaleoptions.hxx>
#include "vcl/dialog.hxx"
+#include "vcl/floatwin.hxx"
#include "vcl/settings.hxx"
#include "vcl/keycod.hxx"
#include "vcl/event.hxx"
@@ -328,6 +329,13 @@ const vcl::KeyCode* Application::GetReservedKeyCode( sal_uLong i )
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
+IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplEndAllPopupsMsg, void*, void )
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ while (pSVData->maWinData.mpFirstFloat)
+ pSVData->maWinData.mpFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel);
+}
+
IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplEndAllDialogsMsg, void*, void )
{
vcl::Window* pAppWindow = Application::GetFirstTopLevelWindow();
@@ -343,6 +351,12 @@ void Application::EndAllDialogs()
Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllDialogsMsg ) );
}
+void Application::EndAllPopups()
+{
+ Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllPopupsMsg ) );
+}
+
+
namespace
{
bool InjectKeyEvent(SvStream& rStream)
@@ -382,6 +396,7 @@ namespace
void CloseDialogsAndQuit()
{
+ Application::EndAllPopups();
Application::EndAllDialogs();
Application::Quit();
}