summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undodat.cxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-05-19 12:42:33 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-07-04 15:27:29 +0200
commit2c798d6715194e910cef9cad1039f464d86dc06f (patch)
tree89f2b6d817392cba0c27ea276ae59d8fa29b24e2 /sc/source/ui/undo/undodat.cxx
parentb6d8dd62dd0892b9a2eeac68fe2e2ee366d59057 (diff)
lokit: add new callback type LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY
This is to notify the clients about changes in current sheet's geometry data. Use this to notify clients of various sheet geometry invalidations if the new feature flag scPrintTwipsMsgs is set. Change-Id: I478d2e646606320399905d7b15881a165a53146d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96969 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 7d0181f519f83b978b9040986738ad0cedc020ba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97956 Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/undo/undodat.cxx')
-rw-r--r--sc/source/ui/undo/undodat.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index d83f1948cc6c..eb356af9da62 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -100,6 +100,9 @@ void ScUndoDoOutline::Undo()
else
pUndoDoc->CopyToDocument(0, nStart, nTab, rDoc.MaxCol(), nEnd, nTab, InsertDeleteFlags::NONE, false, rDoc);
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, bColumns, !bColumns,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ true /* bGroups */, nTab);
pViewShell->UpdateScrollBars();
pDocShell->PostPaint(0,0,nTab,rDoc.MaxCol(),rDoc.MaxRow(),nTab,PaintPartFlags::Grid|PaintPartFlags::Left|PaintPartFlags::Top);
@@ -180,6 +183,11 @@ void ScUndoMakeOutline::Undo()
pDocShell->PostPaint(0,0,nTab,rDoc.MaxCol(),rDoc.MaxRow(),nTab,PaintPartFlags::Grid|PaintPartFlags::Left|PaintPartFlags::Top|PaintPartFlags::Size);
ScTabViewShell::notifyAllViewsHeaderInvalidation( pViewShell, bColumns ? COLUMN_HEADER : ROW_HEADER, nTab );
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pViewShell,
+ bColumns /* bColumns */, !bColumns /* bRows */,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ true /* bGroups */, nTab);
EndUndo();
}
@@ -262,6 +270,9 @@ void ScUndoOutlineLevel::Undo()
rDoc.UpdatePageBreaks( nTab );
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, bColumns, !bColumns,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ true /* bGroups */, nTab);
pViewShell->UpdateScrollBars();
SCTAB nVisTab = pViewShell->GetViewData().GetTabNo();
@@ -354,6 +365,9 @@ void ScUndoOutlineBlock::Undo()
rDoc.UpdatePageBreaks( nTab );
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, true /* bColumns */, true /* bRows */,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ true /* bGroups */, nTab);
pViewShell->UpdateScrollBars();
SCTAB nVisTab = pViewShell->GetViewData().GetTabNo();
@@ -450,6 +464,11 @@ void ScUndoRemoveAllOutlines::Undo()
pDocShell->PostPaint(0,0,nTab,rDoc.MaxCol(),rDoc.MaxRow(),nTab,PaintPartFlags::Grid|PaintPartFlags::Left|PaintPartFlags::Top|PaintPartFlags::Size);
ScTabViewShell::notifyAllViewsHeaderInvalidation(pViewShell, BOTH_HEADERS, nTab);
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pViewShell,
+ true /* bColumns */, true /* bRows */,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ true /* bGroups */, nTab);
EndUndo();
}
@@ -815,6 +834,11 @@ void ScUndoQuery::Undo()
// invalidate cache positions and update cursor and selection
pViewShell->OnLOKShowHideColRow(/*bColumns*/ false, aQueryParam.nRow1 - 1);
ScTabViewShell::notifyAllViewsHeaderInvalidation(pViewShell, ROW_HEADER, nTab);
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pViewShell,
+ false /* bColumns */, true /* bRows */,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ false /* bGroups */, nTab);
// Paint
@@ -1333,6 +1357,10 @@ void ScUndoRepeatDB::Undo()
if (xUndoDB)
rDoc.SetDBCollection(std::unique_ptr<ScDBCollection>(new ScDBCollection(*xUndoDB)), true);
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, false /* bColumns */, true /* bRows */,
+ false /* bSizes*/, true /* bHidden */, true /* bFiltered */,
+ false /* bGroups */, nTab);
+
SCTAB nVisTab = pViewShell->GetViewData().GetTabNo();
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );