sc/source/ui/docshell/docfunc.cxx | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-)
New commits: commit 6aba07610969f34df006413b093c8bfcfee7eb12 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Feb 1 13:18:23 2021 +0200 Commit: Michael Meeks <michael.me...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@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), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits