diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-07-14 03:09:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-07-17 12:30:17 +0200 |
commit | 1569b4b1813d44b38e250111411f3c75eeb0c483 (patch) | |
tree | 5ba5f16242396c066acb31987bba57439d0d9401 /sd | |
parent | ef576f69942ff5ffcdc22293c3a8d3a6a84cbca1 (diff) |
tdf#109107: Sidebar's fontheight field is not updated...
... by moving cursor in an Impress table
Table controller handles key and mouse events itself, but can't
do the invalidation of the slotids which would lead to update
sidebar corresponding widgets.
Change-Id: I0d1db58ecb714bb16dfb1b5662f0fba7ce69c06f
Reviewed-on: https://gerrit.libreoffice.org/39933
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 6feb40b950557dcfdc5249f22d72edad397d4c67)
Reviewed-on: https://gerrit.libreoffice.org/39949
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/futext.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/inc/futext.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 25 |
3 files changed, 34 insertions, 0 deletions
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index e794d2602479..96f595c6a12b 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1461,6 +1461,12 @@ void FuText::ChangeFontSize( bool bGrow, OutlinerView* pOLV, const FontList* pFo } } +void FuText::InvalidateBindings() +{ + mpViewShell->GetViewFrame()->GetBindings().Invalidate(SidArray); +} + + } // end of namespace sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index 281af763e1ec..3530dfb9fb01 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -69,6 +69,9 @@ public: static void ChangeFontSize( bool, OutlinerView*, const FontList*, ::sd::View* ); + void InvalidateBindings(); + + protected: FuText (ViewShell* pViewSh, ::sd::Window* pWin, diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index b741231d7986..ac4c4a08a08f 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -82,6 +82,7 @@ #include "Window.hxx" #include "fupoor.hxx" +#include "futext.hxx" #include <editeng/numitem.hxx> #include <editeng/eeitem.hxx> @@ -440,6 +441,12 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) else { bReturn = true; + if (HasCurrentFunction()) + { + FuText* pTextFunction = dynamic_cast<FuText*>(GetCurrentFunction().get()); + if(pTextFunction != nullptr) + pTextFunction->InvalidateBindings(); + } } } } @@ -498,6 +505,15 @@ void ViewShell::MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin) if(HasCurrentFunction()) GetCurrentFunction()->MouseButtonDown(rMEvt); } + else + { + if (HasCurrentFunction()) + { + FuText* pTextFunction = dynamic_cast<FuText*>(GetCurrentFunction().get()); + if (pTextFunction != nullptr) + pTextFunction->InvalidateBindings(); + } + } } } @@ -682,6 +698,15 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) if(HasCurrentFunction()) GetCurrentFunction()->MouseButtonUp(rMEvt); } + else + { + if (HasCurrentFunction()) + { + FuText* pTextFunction = dynamic_cast<FuText*>(GetCurrentFunction().get()); + if (pTextFunction != nullptr) + pTextFunction->InvalidateBindings(); + } + } } if ( ! mpImpl->mpUpdateLockForMouse.expired()) |