summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-03-19 09:19:38 +0100
committerAndras Timar <andras.timar@collabora.com>2024-04-07 13:58:05 +0200
commit53cf1407f387f5910133507f404f72ae4940382b (patch)
tree76785e7c8f4ddf1f1fd47a9d1c6102fdcaa79de2 /editeng
parent157f1ad409d10baf7df9f445b181569917990e7f (diff)
tdf#63259 cycle case on sentences
Cycle case will be applied to the sentence if the cursor is at a sentence end. Writer now also keeps the word/sentence selection after case change. Change-Id: I9dd561775ac612689526bcb118533ba81b5722be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165018 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165800
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit4.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 3c92a7abfede..0258900725ea 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2702,6 +2702,11 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
if ( !aSel.HasRange() )
{
aSel = SelectWord( aSel, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true, true );
+ if (!aSel.HasRange() && aSel.Min().GetIndex() > 0 &&
+ OUString(".!?").indexOf(aSel.Min().GetNode()->GetChar(aSel.Min().GetIndex() - 1)) > -1 )
+ {
+ aSel = SelectSentence(aSel);
+ }
}
// tdf#107176: if there's still no range, just return aSel