sc/source/ui/inc/gridwin.hxx   |    3 +--
 sc/source/ui/view/tabview3.cxx |    7 ++++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 34d32740d89876c3d4fd2743a07d6e2578601683
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 17 20:43:22 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 18 23:00:57 2023 +0200

    on invalidating other views, specific what Tab is invalidated
    
    the other views might be viewing other tabs and it is only
    the tab ('part') this view is on which is invalidated
    
    Change-Id: I9f054ffa6158a6bc62e3eb7b7170450e26870b54
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155816
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 979767c6801b..deb3264c7759 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -320,8 +320,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public 
vcl::DocWindow, public DropTarget
     void            SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab);
     DECL_DLLPRIVATE_LINK(InitiatePageBreaksTimer, Timer*, void);
 
-    void            LogicInvalidatePart(const tools::Rectangle* pRectangle, 
int nPart);
-
 protected:
     virtual void    PrePaint(vcl::RenderContext& rRenderContext) override;
     virtual void    Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
@@ -380,6 +378,7 @@ public:
 
     /// @see Window::LogicInvalidate().
     void LogicInvalidate(const tools::Rectangle* pRectangle) override;
+    void LogicInvalidatePart(const tools::Rectangle* pRectangle, int nPart);
 
     /// Update the cell selection according to what handles have been dragged.
     /// @see vcl::ITiledRenderable::setTextSelection() for the values of nType.
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 38c8fcca449e..9a321f73eefe 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2200,6 +2200,7 @@ void ScTabView::KillEditView( bool bNoPaint )
     SCROW nRow1 = aViewData.GetEditStartRow();
     SCCOL nCol2 = aViewData.GetEditEndCol();
     SCROW nRow2 = aViewData.GetEditEndRow();
+    SCTAB nTab = aViewData.GetTabNo();
     bool bPaint[4];
     bool bNotifyAcc = false;
     tools::Rectangle aRectangle[4];
@@ -2237,16 +2238,16 @@ void ScTabView::KillEditView( bool bNoPaint )
             if (comphelper::LibreOfficeKit::isActive())
             {
                 const tools::Rectangle& rInvRect = aRectangle[i];
-                pGridWin[i]->LogicInvalidate(&rInvRect);
+                pGridWin[i]->LogicInvalidatePart(&rInvRect, nTab);
 
                 // invalidate other views
                 auto lInvalidateWindows =
-                        [&rInvRect] (ScTabView* pTabView)
+                        [nTab, &rInvRect] (ScTabView* pTabView)
                         {
                             for (VclPtr<ScGridWindow> const & pWin: 
pTabView->pGridWin)
                             {
                                 if (pWin)
-                                    pWin->LogicInvalidate(&rInvRect);
+                                    pWin->LogicInvalidatePart(&rInvRect, nTab);
                             }
                         };
 
commit a35311beef378c15ecbb3bb0560035c17f4657ca
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 17 20:33:14 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 18 23:00:48 2023 +0200

    for LibreOfficeKit::isActive we can skip to LogicInvalidate
    
    it should be the same effect
    
    Change-Id: I2faa0b728fdebe837855e1f23e066ae8b1a2bde6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155815
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 03a15b4437d9..38c8fcca449e 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2237,7 +2237,7 @@ void ScTabView::KillEditView( bool bNoPaint )
             if (comphelper::LibreOfficeKit::isActive())
             {
                 const tools::Rectangle& rInvRect = aRectangle[i];
-                pGridWin[i]->Invalidate(rInvRect);
+                pGridWin[i]->LogicInvalidate(&rInvRect);
 
                 // invalidate other views
                 auto lInvalidateWindows =
@@ -2246,7 +2246,7 @@ void ScTabView::KillEditView( bool bNoPaint )
                             for (VclPtr<ScGridWindow> const & pWin: 
pTabView->pGridWin)
                             {
                                 if (pWin)
-                                    pWin->Invalidate(rInvRect);
+                                    pWin->LogicInvalidate(&rInvRect);
                             }
                         };
 

Reply via email to