sd/source/ui/view/drviewse.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 6f99187ec29e8716e1fb9ffa18b1830048608fbc Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Mon Apr 15 11:40:12 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Mon Apr 15 19:01:24 2024 +0200 Case rotation in Impress: skip sentence case Sentence case does not make sense if a selection contains less than two words. Rotation then skkips to the next case mode. Change-Id: I79d6560c494b716a53bfed654027f6f37dc6c362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166115 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index da0dbedd1195..a49ce83b15e3 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1474,8 +1474,14 @@ void DrawViewShell::FuSupportRotate(SfxRequest const &rReq) if (!pOLV) return; - - pOLV->TransliterateText( m_aRotateCase.getNextMode() ); + TransliterationFlags transFlags = m_aRotateCase.getNextMode(); + if (TransliterationFlags::SENTENCE_CASE == transFlags) + { + OUString SelectedText = pOLV->GetSelected().trim(); + if (SelectedText.getLength() <= 2 || (SelectedText.indexOf(' ') < 0 && SelectedText.indexOf(' ') < 0)) + transFlags = m_aRotateCase.getNextMode(); + } + pOLV->TransliterateText( transFlags ); } void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,