Kaydet (Commit) 6e3f9d38 authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Marco Cecchetti

lok: sc: invalidate col/row header on undo row/col operations

Change-Id: Ia0b2174cfcc3f2b3075e8f6eee1eb0f56b64db44
Reviewed-on: https://gerrit.libreoffice.org/37686Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
üst ad605e2e
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <editeng/boxitem.hxx> #include <editeng/boxitem.hxx>
#include <editeng/justifyitem.hxx> #include <editeng/justifyitem.hxx>
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>
#include "undoblk.hxx" #include "undoblk.hxx"
#include "undoutil.hxx" #include "undoutil.hxx"
...@@ -257,7 +259,19 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) ...@@ -257,7 +259,19 @@ void ScUndoInsertCells::DoChange( const bool bUndo )
} }
pDocShell->PostDataChanged(); pDocShell->PostDataChanged();
if (pViewShell) if (pViewShell)
{
pViewShell->CellContentChanged(); 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() void ScUndoInsertCells::Undo()
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "undoolk.hxx" #include "undoolk.hxx"
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>
/** Change column widths or row heights */ /** Change column widths or row heights */
ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell, ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
...@@ -94,6 +96,7 @@ void ScUndoWidthOrHeight::Undo() ...@@ -94,6 +96,7 @@ void ScUndoWidthOrHeight::Undo()
if (pUndoTab) // Outlines are included when saving ? if (pUndoTab) // Outlines are included when saving ?
rDoc.SetOutlineTable( nStartTab, pUndoTab ); rDoc.SetOutlineTable( nStartTab, pUndoTab );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCTAB nTabCount = rDoc.GetTableCount(); SCTAB nTabCount = rDoc.GetTableCount();
ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr) for (; itr != itrEnd && *itr < nTabCount; ++itr)
...@@ -117,7 +120,6 @@ void ScUndoWidthOrHeight::Undo() ...@@ -117,7 +120,6 @@ void ScUndoWidthOrHeight::Undo()
DoSdrUndoAction( pDrawUndo, &rDoc ); DoSdrUndoAction( pDrawUndo, &rDoc );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell) if (pViewShell)
{ {
pViewShell->UpdateScrollBars(); pViewShell->UpdateScrollBars();
...@@ -125,6 +127,12 @@ void ScUndoWidthOrHeight::Undo() ...@@ -125,6 +127,12 @@ void ScUndoWidthOrHeight::Undo()
SCTAB nCurrentTab = pViewShell->GetViewData().GetTabNo(); SCTAB nCurrentTab = pViewShell->GetViewData().GetTabNo();
if ( nCurrentTab < nStartTab || nCurrentTab > nEndTab ) if ( nCurrentTab < nStartTab || nCurrentTab > nEndTab )
pViewShell->SetTabNo( nStartTab ); pViewShell->SetTabNo( nStartTab );
if (comphelper::LibreOfficeKit::isActive())
{
OString aPayload = bWidth ? "column" : "row";
ScTabViewShell::notifyAllViewsHeaderInvalidation(aPayload, pViewShell->GetViewData().GetTabNo());
}
} }
EndUndo(); EndUndo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment