diff options
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), |