diff options
author | jp <jp@openoffice.org> | 2000-12-21 12:10:38 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2000-12-21 12:10:38 +0000 |
commit | 627c3b28884bf7f66e3d73b02cbea69f6fef124a (patch) | |
tree | 751d12680d2ad1a4c98524bb836422d4840f2312 | |
parent | f843b98b5579f8e07226a9521da0248bb8f3dbf4 (diff) |
TransliterateText: enclose with undo if we have a multiselection
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 1e45b6b5cb55..b76f9fbb2739 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editsh.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: jp $ $Date: 2000-12-21 09:32:08 $ + * last change: $Author: jp $ $Date: 2000-12-21 13:10:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1102,11 +1102,22 @@ void SwEditShell::TransliterateText( sal_uInt32 nType ) ::comphelper::getProcessServiceFactory(), nType ); StartAllAction(); SET_CURR_SHELL( this ); - FOREACHPAM_START( this ) - GetDoc()->TransliterateText( *PCURCRSR, aTrans ); + SwPaM* pCrsr = GetCrsr(); + if( pCrsr->GetNext() != pCrsr ) + { + GetDoc()->StartUndo(); + FOREACHPAM_START( this ) + + if( PCURCRSR->HasMark() ) + GetDoc()->TransliterateText( *PCURCRSR, aTrans ); + + FOREACHPAM_END() + GetDoc()->EndUndo(); + } + else + GetDoc()->TransliterateText( *pCrsr, aTrans ); - FOREACHPAM_END() EndAllAction(); } |