diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-05-03 17:22:27 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-16 13:58:39 +0200 |
commit | e4168d69d7edfdf3d59a82de80f89d29aefae268 (patch) | |
tree | 71ef9af95b6c7ed0a6b3701808ead64bb5148d59 /sc/source | |
parent | 8deb22a2cee0a931b98c359246535c9d52678f99 (diff) |
lok: sc: invalidate col/row header on undo row/col operations
Change-Id: Ifabce9941541a615840163168af6fedaf54575cd
Reviewed-on: https://gerrit.libreoffice.org/37256
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk2.cxx | 10 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 6d0466dd1dd3..d79fd8335c0c 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -23,6 +23,8 @@ #include <editeng/boxitem.hxx> #include <editeng/justifyitem.hxx> #include <sfx2/app.hxx> +#include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include "undoblk.hxx" #include "undoutil.hxx" @@ -257,7 +259,19 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) } pDocShell->PostDataChanged(); if (pViewShell) + { pViewShell->CellContentChanged(); + + if (comphelper::LibreOfficeKit::isActive()) + { + if (eCmd == INS_INSCOLS_BEFORE || eCmd == INS_INSCOLS_AFTER || eCmd == INS_CELLSRIGHT) + ScTabViewShell::notifyAllViewsHeaderInvalidation("column", pViewShell->GetViewData().GetTabNo()); + + if (eCmd == INS_INSROWS_BEFORE || eCmd == INS_INSROWS_AFTER || eCmd == INS_CELLSDOWN) + ScTabViewShell::notifyAllViewsHeaderInvalidation("row", pViewShell->GetViewData().GetTabNo()); + } + + } } void ScUndoInsertCells::Undo() diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 50404d5e09fc..cdf75b9f1882 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -30,6 +30,8 @@ #include "undoolk.hxx" +#include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> /** Change column widths or row heights */ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell, @@ -94,6 +96,7 @@ void ScUndoWidthOrHeight::Undo() if (pUndoTab) // Outlines are included when saving ? rDoc.SetOutlineTable( nStartTab, pUndoTab ); + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); SCTAB nTabCount = rDoc.GetTableCount(); ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); for (; itr != itrEnd && *itr < nTabCount; ++itr) @@ -117,7 +120,6 @@ void ScUndoWidthOrHeight::Undo() DoSdrUndoAction( pDrawUndo, &rDoc ); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { pViewShell->UpdateScrollBars(); @@ -125,6 +127,12 @@ void ScUndoWidthOrHeight::Undo() SCTAB nCurrentTab = pViewShell->GetViewData().GetTabNo(); if ( nCurrentTab < nStartTab || nCurrentTab > nEndTab ) pViewShell->SetTabNo( nStartTab ); + + if (comphelper::LibreOfficeKit::isActive()) + { + OString aPayload = bWidth ? "column" : "row"; + ScTabViewShell::notifyAllViewsHeaderInvalidation(aPayload, pViewShell->GetViewData().GetTabNo()); + } } EndUndo(); |