diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-03-08 21:07:40 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-03-13 11:38:43 +0100 |
commit | 8938e8b153f32f3f5926baddb87cb76c8e72755a (patch) | |
tree | 022ec2f9cb76e4e0db2a1eaa73ce164b7e66b850 /sw | |
parent | e0d59468b156e5cc474b5540e05a6aa92ab5cfa0 (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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/olmenu.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewling.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index a407f618810f..d37eb2edbfb5 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -128,7 +128,7 @@ public: ~SwSpellPopup(); - Menu& GetMenu() + PopupMenu& GetMenu() { return *m_xPopupMenu.get(); } diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index b59abdc05042..8ac2ccd217de 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/linguistic2/ProofreadingResult.hpp> #include <com/sun/star/i18n/TextConversionOption.hpp> #include <linguistic/lngprops.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/propertysequence.hxx> @@ -710,11 +711,10 @@ bool SwView::ExecSpellPopup(const Point& rPt) aEvent.ExecutePosition.Y = aPixPos.Y(); ScopedVclPtr<Menu> pMenu; - OUString sMenuName = bUseGrammarContext ? + OUString sMenuName = bUseGrammarContext ? OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu"); if (TryContextMenuInterception(xPopup->GetMenu(), sMenuName, pMenu, aEvent)) { - //! happy hacking for context menu modifying extensions of this //! 'custom made' menu... *sigh* (code copied from sfx2 and framework) if ( pMenu ) @@ -762,6 +762,9 @@ bool SwView::ExecSpellPopup(const Point& rPt) } else { + if (comphelper::LibreOfficeKit::isActive()) + xPopup->GetMenu().SetLOKNotifier(SfxViewShell::Current()); + xPopup->Execute(aToFill.SVRect(), m_pEditWin); } } |