[Libreoffice-commits] core.git: basctl/source

Andreas Heinisch (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 13 06:20:51 UTC 2020


 basctl/source/basicide/baside2.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit d75781dcd619a747b17b6c897ba44dc6ff8b5c7e
Author:     Andreas Heinisch <andreas.heinisch at yahoo.de>
AuthorDate: Wed Feb 12 22:48:45 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 13 07:20:20 2020 +0100

    tdf#57307 - Expand word boundaries to include connector punctuations
    
    Include connector punctuations when adding a variable to the watch
    window using "Enable Watch (F7)" in order to add the correct variable name.
    
    Change-Id: Idaf7699dde3f4147d603c6aea4b2381e2af497a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88575
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 5d3bb561b275..85db57dfbfdd 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -695,14 +695,11 @@ void ModulWindow::BasicAddWatch()
     bool bAdd = true;
     if ( !GetEditView()->HasSelection() )
     {
-        TextPaM aWordStart;
-        OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart );
+        // tdf#57307 - expand selection to include connector punctuations
+        TextSelection aSel;
+        OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aSel.GetStart(), &aSel.GetEnd() );
         if ( !aWord.isEmpty() )
-        {
-            TextSelection aSel( aWordStart );
-            aSel.GetEnd().GetIndex() += aWord.getLength();
             GetEditView()->SetSelection( aSel );
-        }
         else
             bAdd = false;
     }


More information about the Libreoffice-commits mailing list