diff options
author | Rodolfo Ribeiro Gomes <rodolforg@gmail.com> | 2012-12-20 10:18:47 -0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-12-20 13:23:39 +0000 |
commit | 9123db4ce8f1c20cf7b4f5a8ceaa66b6321ede14 (patch) | |
tree | 964ba97e5d649eb76ddbefa00a740111bd2851a0 | |
parent | 357bb0d5afc44f74eafca4c9c28619226f5610f8 (diff) |
Group undo actions when showing/hiding several notes once, fdo#39454
This is a complement for fdo#39454 bugfix.
Change-Id: I3f406ae151b92419a86abb8f050c8b032d080838
Reviewed-on: https://gerrit.libreoffice.org/1452
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index f1d359483242..16e0b0654eaf 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2061,6 +2061,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScRangeList aRanges = *aRangesRef; size_t nRangeSize = aRanges.size(); + String aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE ); + pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo ); + for ( size_t i = 0; i < nRangeSize; ++i ) { const ScRange * pRange = aRanges[i]; @@ -2107,6 +2110,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } } + pData->GetDocShell()->GetUndoManager()->LeaveListAction(); + if ( bDone ) { rReq.Done(); |