[Libreoffice-commits] core.git: sd/source

Tamás Zolnai tamas.zolnai at collabora.com
Fri Jul 14 09:48:01 UTC 2017


 sd/source/ui/func/futext.cxx   |    6 ++++++
 sd/source/ui/inc/futext.hxx    |    3 +++
 sd/source/ui/view/viewshel.cxx |   25 +++++++++++++++++++++++++
 3 files changed, 34 insertions(+)

New commits:
commit 6feb40b950557dcfdc5249f22d72edad397d4c67
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Fri Jul 14 03:09:33 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 326f7228bd56..f4ccb45eb6c2 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1456,6 +1456,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 f9d9fb56df6a..b19c6a18644b 100644
--- a/sd/source/ui/inc/futext.hxx
+++ b/sd/source/ui/inc/futext.hxx
@@ -68,6 +68,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 a0e86368021f..ef5e71171ad6 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>
@@ -438,6 +439,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();
+                    }
                 }
             }
         }
@@ -496,6 +503,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();
+            }
+        }
     }
 }
 
@@ -680,6 +696,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())


More information about the Libreoffice-commits mailing list