sc/source/ui/undo/undoblk.cxx | 24 ++++++++++++++++++++++++ sc/source/ui/view/cliputil.cxx | 3 +++ sc/source/ui/view/viewfun3.cxx | 7 +++++-- 3 files changed, 32 insertions(+), 2 deletions(-)
New commits: commit 42cf11e7ddb5a43d0356aefb03ccc439b2a86e18 Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Tue Jan 30 14:54:18 2024 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jan 31 14:33:28 2024 +0100 lok: calc: missing update of sheet geometry data on undo a drag and drop When undo/redo a drag and drop of a block of cells sheet geometry data was not invalidated. Change-Id: I0579de814ed61357c70a64d0e4ebf862525d3c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162776 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 0ef3e22f66b1..2a92d87361fc 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1349,6 +1349,12 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) pDocShell->UpdatePaintExt(mnPaintExtFlags, aPaintRange); maPaintRanges.Join(aPaintRange); + + ScTabViewShell::notifyAllViewsSheetGeomInvalidation( + ScTabViewShell::GetActiveViewShell(), + true /* bColumns */, true /* bRows */, + true /* bSizes */, true /* bHidden */, true /* bFiltered */, + true /* bGroups */, aPaintRange.aStart.Tab()); } void ScUndoDragDrop::Undo() @@ -1496,6 +1502,24 @@ void ScUndoDragDrop::Redo() EndRedo(); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); + + if (comphelper::LibreOfficeKit::isActive()) + { + SCTAB nStartTab = aDestRange.aStart.Tab(); + SCTAB nEndTab = aDestRange.aEnd.Tab(); + if (bCut) + { + nStartTab = std::min(nStartTab, aSrcRange.aStart.Tab()); + nEndTab = std::max(nEndTab, aSrcRange.aEnd.Tab()); + } + for (nTab = nStartTab; nTab <= nEndTab; ++nTab) + { + ScTabViewShell::notifyAllViewsSheetGeomInvalidation( + ScTabViewShell::GetActiveViewShell(), true /* bColumns */, true /* bRows */, + true /* bSizes */, true /* bHidden */, true /* bFiltered */, true /* bGroups */, + nTab); + } + } } void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */) commit 35fa0bd6a2fe6f76ecbfd56b5c5100b40883d67f Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Tue Jan 30 14:51:56 2024 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jan 31 14:33:17 2024 +0100 lok: calc: missing invalidation of cached positions When executing an external paste position cached by ScPositionHelper where not invalidated causing misplaced tile rendering Change-Id: Ia707e8de5a870f42a6dd303d87694f7ec8f0a105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162775 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 770e309dbe97..4841ee2374c7 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -126,6 +126,9 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab const SfxBoolItem* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, nThisTab, ATTR_LINEBREAK); if (pItem->GetValue() || entireColumnOrRowSelected) { + pTabViewShell->OnLOKSetWidthOrHeight(nThisCol, true); + pTabViewShell->OnLOKSetWidthOrHeight(nThisRow, false); + ScTabViewShell::notifyAllViewsSheetGeomInvalidation( pTabViewShell, true /* bColumns */, true /* bRows */, true /* bSizes*/, true /* bHidden */, true /* bFiltered */, true /* bGroups */, nThisTab); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 11c4096c1445..6c78018a64d5 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -759,8 +759,11 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi ) } else if (comphelper::LibreOfficeKit::isActive()) { - SfxViewShell* pViewShell = rViewData.GetViewShell(); - ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, true /* bColumns */, true /* bRows */, + ScTabViewShell* pTabViewShell = rViewData.GetViewShell(); + pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurX(), true); + pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurY(), false); + + ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pTabViewShell, true /* bColumns */, true /* bRows */, true /* bSizes */, false /* bHidden */, false /* bFiltered */, false /* bGroups */, rViewData.GetTabNo()); } }