summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-03-08 21:07:40 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-27 12:22:56 +0200
commit43770a7aece6708d5ae6a55339e35f7145e85c6f (patch)
tree37f96bd6bd99c2e34afb9a58def57783cb212eee /vcl/source/window
parent7337baa159ff11b037e688d37e2ee59d24b553e2 (diff)
lokdialog: Tunnel the spell-checking context menu with recommendations.
Change-Id: I1a7952e88a3f89346c97d2516628b4a7a0423de6 Reviewed-on: https://gerrit.libreoffice.org/51062 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/51166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 8938e8b153f32f3f5926baddb87cb76c8e72755a)
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/menu.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 61957f56cd6f..c9e1152a2d8a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -20,6 +20,7 @@
#include <tools/diagnose_ex.h>
#include <tools/stream.hxx>
+#include <comphelper/lok.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/image.hxx>
@@ -40,6 +41,7 @@
#include <vcl/dockingarea.hxx>
#include <vcl/settings.hxx>
#include <vcl/commandinfoprovider.hxx>
+#include <vcl/IDialogRenderable.hxx>
#include <salinst.hxx>
#include <svdata.hxx>
@@ -2693,12 +2695,14 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {
}
PopupMenu::PopupMenu()
+ : mpLOKNotifier(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
}
PopupMenu::PopupMenu( const PopupMenu& rMenu )
- : Menu()
+ : Menu(),
+ mpLOKNotifier(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
*this = rMenu;
@@ -2899,6 +2903,9 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
}
VclPtrInstance<MenuFloatingWindow> pWin( this, pW, WB_BORDER | WB_SYSTEMWINDOW );
+ if (comphelper::LibreOfficeKit::isActive() && mpLOKNotifier)
+ pWin->SetLOKNotifier(mpLOKNotifier);
+
if( pSVData->maNWFData.mbFlatMenu )
pWin->SetBorderStyle( WindowBorderStyle::NOBORDER );
else