diff options
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
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; } |