Broadcast changes on undo / redo of cell range deletion.
Change-Id: I48141ca77277c2de5b3526358cfadb12e3f4fbdd
This commit is contained in:
@@ -57,6 +57,8 @@ protected:
|
||||
void BeginRedo();
|
||||
void EndRedo();
|
||||
|
||||
void BroadcastChanges( const ScRange& rRange );
|
||||
|
||||
static void ShowTable( SCTAB nTab );
|
||||
static void ShowTable( const ScRange& rRange );
|
||||
};
|
||||
|
@@ -142,6 +142,28 @@ void ScSimpleUndo::EndRedo()
|
||||
pDocShell->SetInUndo( false );
|
||||
}
|
||||
|
||||
void ScSimpleUndo::BroadcastChanges( const ScRange& rRange )
|
||||
{
|
||||
ScDocument* pDoc = pDocShell->GetDocument();
|
||||
pDoc->CellContentModified();
|
||||
|
||||
ScHint aHint(SC_HINT_DATACHANGED, ScAddress());
|
||||
ScAddress& rPos = aHint.GetAddress();
|
||||
for (SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab)
|
||||
{
|
||||
rPos.SetTab(nTab);
|
||||
for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol)
|
||||
{
|
||||
rPos.SetCol(nCol);
|
||||
for (SCROW nRow = rRange.aStart.Row(); nRow <= rRange.aEnd.Row(); ++nRow)
|
||||
{
|
||||
rPos.SetRow(nRow);
|
||||
pDoc->Broadcast(aHint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScSimpleUndo::ShowTable( SCTAB nTab )
|
||||
{
|
||||
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
|
||||
|
@@ -182,6 +182,7 @@ void ScUndoDeleteContents::Undo()
|
||||
DoChange( sal_True );
|
||||
EndUndo();
|
||||
|
||||
BroadcastChanges(aRange);
|
||||
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
|
||||
}
|
||||
|
||||
@@ -191,6 +192,7 @@ void ScUndoDeleteContents::Redo()
|
||||
DoChange( false );
|
||||
EndRedo();
|
||||
|
||||
BroadcastChanges(aRange);
|
||||
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user