diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2018-04-18 02:49:37 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2018-04-26 22:14:45 +0200 |
commit | 9d9076cb00c474ba7f13d458f1e280e31f5d4bac (patch) | |
tree | 51a601f5304de1b6fe5f75d7a0f8c270e11b947c /sc/source | |
parent | 4af174f659ecd1ae8338865a17e436aba9e74685 (diff) |
tdf#57000 Add a context menu to the formula bar input field
As a side effect also fixes tdf#70597
Change-Id: Idd872d93f7a9da50f67c91a11e7e0231c7ac924e
Reviewed-on: https://gerrit.libreoffice.org/53513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index fd97dc58d21c..4389cb643cec 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1418,6 +1418,20 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT ); } } + else if ( nCommand == CommandEventId::ContextMenu ) + { + SfxViewFrame* pViewFrm = SfxViewFrame::Current(); + if (pViewFrm) + { + Point aPos = rCEvt.GetMousePosPixel(); + if (!rCEvt.IsMouseEvent()) + { + Size aSize = GetOutputSizePixel(); + aPos = Point(aSize.Width() / 2, aSize.Height() / 2); + } + pViewFrm->GetDispatcher()->ExecutePopup("formulabar", this, &aPos); + } + } else if ( nCommand == CommandEventId::Wheel ) { //don't call InputChanged for CommandEventId::Wheel |