summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2022-07-15 16:25:06 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2022-07-23 12:35:25 +0200
commit9a612ce3d1d025d5f553cc348feaedeea37fc822 (patch)
treec9da32b9906496e2558da8075f5522ef0a6c243d /editeng
parent28a947c8ceae8bb4b9306801ff4503970e9b1e76 (diff)
tdf#135761 - Calc cell editing: change search preference for the word boundary
Since ImpEditEngine::StartOfWord is only used when a selection is deleted at the left, change the search preference of the word boundary from forward to backward. For further details of a deletion of a selection check ImpEditEngine::DeleteLeftOrRight. Change-Id: Ic68901cc04e5057e058ff03304f68eef1dca7a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137108 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index c731932c51ec..8dbbc42f7ce7 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1533,8 +1533,11 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM )
lang::Locale aLocale( GetLocale( aTmpPaM ) );
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
+ // tdf#135761 - since this function is only used when a selection is deleted at the left,
+ // change the search preference of the word boundary from forward to backward.
+ // For further details of a deletion of a selection check ImpEditEngine::DeleteLeftOrRight.
i18n::Boundary aBoundary = _xBI->getWordBoundary(
- rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
+ rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, false);
aNewPaM.SetIndex( aBoundary.startPos );
return aNewPaM;