sw/source/uibase/shells/textsh.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
New commits: commit 125fc2ce861c82592b261f2992c893b414396e56 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Thu Jan 18 15:48:04 2024 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Wed Feb 14 00:52:53 2024 +0100 tdf#63259 rotate case also at start/end of a word Rotate either rotates the selection or the word the cursor is directly before, inside or directly after Change-Id: Ia21e3120d2b00978b9f4ce06738b42e90d2ada62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162256 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index c2d1d44068d9..c743ee3ffed7 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -877,7 +877,20 @@ void SwTextShell::ExecTransliteration( SfxRequest const & rReq ) void SwTextShell::ExecRotateTransliteration( SfxRequest const & rReq ) { if( rReq.GetSlot() == SID_TRANSLITERATE_ROTATE_CASE ) - GetShell().TransliterateText( m_aRotateCase.getNextMode() ); + { + SwWrtShell& rSh = GetShell(); + if (rSh.HasSelection()) + { + rSh.TransliterateText(m_aRotateCase.getNextMode()); + } + else + { + rSh.Push(); // save cur cursor + if ((rSh.IsEndWrd() || rSh.IsStartWord() || rSh.IsInWord()) && rSh.SelWrd()) + rSh.TransliterateText(m_aRotateCase.getNextMode()); + rSh.Pop(SwCursorShell::PopMode::DeleteCurrent); + } + } } SwTextShell::SwTextShell(SwView &_rView) :