Bug Hunting Session
Bug 51611 - Macros: Cursor's GotoEndOfWord selects dot
Summary: Macros: Cursor's GotoEndOfWord selects dot
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: Other All
: medium minor
Assignee: Andreas Heinisch
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2012-07-01 01:39 UTC by Mirosław Zalewski
Modified: 2019-09-19 12:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirosław Zalewski 2012-07-01 01:39:50 UTC
Problem description: 
Function GotoEndOfWord selects dot after the word.
Please try following macro:
#v+
Sub Main
Dim sText As String
xDoc=ThisComponent
oText=xDoc.Text
xSelection = xDoc.CurrentController.getSelection
xRange=xSelection(0)
xCursor=xRange.getText.createTextCursorByRange(xRange)
xCursor.gotoStartOfWord(False)
xCursor.GotoEndOfWord(True)
sText=xCursor.GetString()
msgbox("sText:" + sText)
End Sub
#v-

When cursor is in word that ends with dot, dot is treated as part of word and displayed. I have also checked other characters:
, : ; | „ ” " ` ' ] ) -
every one of these is not treated as part of the word by above macro.

Dot is NOT selected when I double-click in middle of the word.

This may or may not be related to #49629

Expected behavior:
Dot is definitely not part of word, so it should not be treated as such.

Platform (if different from the browser): 
Browser: Opera/9.80 (X11; Linux x86_64; U; pl) Presto/2.10.289 Version/12.00
OS: Debian wheezy (testing) amd64
LO: 3.5.4 from Debian repo
Comment 1 bfoman (inactive) 2013-01-21 11:33:23 UTC
Confirmed with:
LO 4.0.0.1
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Dot is treated as part of word and displayed.
Comment 2 QA Administrators 2015-02-19 15:34:50 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2015-03-07 12:21:31 UTC
Confirmed.

Win 7 Pro 64-bit, LibO Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI
Comment 4 tommy27 2016-04-16 07:24:22 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2017-05-22 13:25:18 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2019-08-11 10:30:46 UTC
Still repro.

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503
CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 6 August 2019
Comment 7 Andreas Heinisch 2019-08-29 10:47:32 UTC
https://gerrit.libreoffice.org/#/c/78269/