diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-06-26 12:15:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-26 16:22:38 +0100 |
commit | 25d84e2826de81d1e7a55ff0fdab7845b7a78e74 (patch) | |
tree | 904e93931dd60504341c9a710aad5140784222da /sw/source/ui/shells | |
parent | 19694e844942d44d2c2d5e1d1b95b49d03916573 (diff) |
Resolves: #i121751# restore cursor/selection on Undo/Redo language...
change for all text
- group intrinsic actions of language change for all text into one Undo action
- secure <SwRootFrm::CalcRects(..)> - catch NULL pointer
- correct <CursorGuard> - really restore the cursor
(cherry picked from commit 4207db473430e02a65a5f4d57db6e46a8db29a19)
Conflicts:
svl/inc/svl/undo.hxx
svl/source/undo/undo.cxx
sw/inc/IDocumentUndoRedo.hxx
sw/source/core/edit/edundo.cxx
sw/source/core/inc/UndoManager.hxx
sw/source/core/layout/trvlfrm.cxx
sw/source/core/undo/docundo.cxx
Change-Id: I972988bbc21a519e0956ff196aa93a46287b9a2e
Diffstat (limited to 'sw/source/ui/shells')
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 340e938ddac6..2ac65fd9f2a3 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -328,6 +328,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.StartAction(); // prevent view from jumping because of (temporary) selection changes rWrtSh.LockView( sal_True ); + // save selection for later restoration rWrtSh.Push(); @@ -377,12 +378,16 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.SelAll(); rWrtSh.ExtendedSelectAll(); } + + rWrtSh.StartUndo( ( !bForParagraph && !bForSelection ) ? UNDO_SETDEFTATTR : UNDO_EMPTY ); if (aNewLangTxt == aStrNone) SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet ); else if (aNewLangTxt == aStrResetLangs) SwLangHelper::ResetLanguages( rWrtSh, bForSelection ); else SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet ); + rWrtSh.EndUndo(); + } // restore selection... |