summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
commit91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch)
tree7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /sw/source/uibase/shells
parentReleasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff)
downloadlibreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz
libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/textsh.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 0924935b3d..97de985401 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) :