diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-02-01 13:18:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2021-02-01 16:07:46 +0100 |
commit | 6aba07610969f34df006413b093c8bfcfee7eb12 (patch) | |
tree | 954ab9b3c295a3638e6819a666e06893fa6fa066 /sc | |
parent | ca9a84f82d2b2790a0ffc49d1e0157ff93852817 (diff) |
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@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
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), |