sc/source/ui/undo/undotab.cxx | 14 ++++++++++++++ sc/source/ui/view/viewfun2.cxx | 7 +++++++ 2 files changed, 21 insertions(+)
New commits: commit 49aead6a7ff3933c127efe0f230a2630caa8f342 Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Mon Feb 26 14:36:12 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Mar 1 21:56:27 2024 +0100 lok: calc: tiles not invalidated on tab move This patch fixes a regression started from 9f3ee2b2 "don't invalidate when switching tabs" Change-Id: Icd560c73cff836b026b1ba69432bb712e36c035a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164164 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit cf4630887adcf3e9d8b7a2452f097bb2f564fc5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164190 Tested-by: Jenkins diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 4237aab46358..670769e70ffc 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -542,6 +542,20 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const } } + if (comphelper::LibreOfficeKit::isActive() && !mpNewTabs->empty()) + { + tools::Rectangle aRectangle(0, 0, 1000000000, 1000000000); + const auto newTabsMinIt = std::min_element(mpNewTabs->begin(), mpNewTabs->end()); + const auto oldTabsMinIt = std::min_element(mpOldTabs->begin(), mpOldTabs->end()); + SCTAB nTab = std::min(*newTabsMinIt, *oldTabsMinIt); + for (SCTAB nTabIndex = nTab; nTabIndex < rDoc.GetTableCount(); ++nTabIndex) + { + if (!rDoc.IsVisible(nTabIndex)) + continue; + pViewShell->libreOfficeKitViewInvalidateTilesCallback(&aRectangle, nTabIndex, 0); + } + } + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator pDocShell->PostPaintGridAll(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index b47bd907d1bd..19833c510599 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -91,6 +91,7 @@ #include <tools/json_writer.hxx> #include <officecfg/Office/Calc.hxx> +#include <sfx2/lokhelper.hxx> using namespace com::sun::star; using ::editeng::SvxBorderLine; @@ -3174,6 +3175,12 @@ void ScViewFunc::MoveTable(sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, SCTAB nTab = GetViewData().GetTabNo(); + if (comphelper::LibreOfficeKit::isActive() && !pSrcTabs->empty()) + { + ScModelObj* pModel = pDocShell->GetModel(); + SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); + } + if (bUndo) { if (bCopy)