From 9123db4ce8f1c20cf7b4f5a8ceaa66b6321ede14 Mon Sep 17 00:00:00 2001 From: Rodolfo Ribeiro Gomes Date: Thu, 20 Dec 2012 10:18:47 -0200 Subject: 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 Tested-by: Eike Rathke --- sc/source/ui/view/cellsh1.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- cgit