[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 1 15:08:21 UTC 2021


 sc/source/ui/docshell/docfunc.cxx |   29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 6aba07610969f34df006413b093c8bfcfee7eb12
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Feb 1 13:18:23 2021 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Feb 1 16:07:46 2021 +0100

    Probably this LOK invalidation should be done only if something changed
    
    Change-Id: I0164ac8d74c08abce0a1d8c2e7a7dd9679da91fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110256
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 98af89bbbafc..493a5e59d6b6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -151,20 +151,6 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint )
     SCROW nStartRow = rRange.aStart.Row();
     SCROW nEndRow   = rRange.aEnd.Row();
 
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        SfxViewShell* pViewShell = SfxViewShell::GetFirst();
-        while (pViewShell)
-        {
-            ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
-            if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId())
-            {
-                pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)->invalidateByIndex(nStartRow);
-            }
-            pViewShell = SfxViewShell::GetNext(*pViewShell);
-        }
-    }
-
     ScSizeDeviceProvider aProv( &rDocShell );
     Fraction aOne(1,1);
 
@@ -172,7 +158,22 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint )
     bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab);
     // tdf#76183: recalculate objects' positions
     if (bChanged)
+    {
+        if (comphelper::LibreOfficeKit::isActive())
+        {
+            SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+            while (pViewShell)
+            {
+                ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
+                if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId())
+                {
+                    pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)->invalidateByIndex(nStartRow);
+                }
+                pViewShell = SfxViewShell::GetNext(*pViewShell);
+            }
+        }
         rDoc.SetDrawPageSize(nTab);
+    }
 
     if ( bPaint && bChanged )
         rDocShell.PostPaint(ScRange(0, nStartRow, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab),


More information about the Libreoffice-commits mailing list