Basic IDE problem: If we place cursor on variable with underscores in name and click "Enable Watch (F7)" for adding variable to Watch window, it performs incorrectly. Adds only part of name.
Problem seen also if double click on such variable name in program's text. Only part of name selected.
Steps to reproduce:
0. Start any LO module, for example, Writer
1. Press Alt-F11, in dialog "LibreOffice Basic Macros" press "New" and then "Ok"
2. In Basic IDE enter something like this:
3. Place cursor on variable name and press "Enable Watch (F7)"
Expected: added variable with correct name to window "Watch"
Actually: added only part of name, for example First instead of First_Result
reproduced in 3.4.2 on Windows XP 32 bit and in 3.6.3 on RFR 17 64 bit
Workaround: select correct name of variable manually and press F7
Confirmed in build from 12/20 master. This issue is a more general IDE interface issue of selecting whole identifiers (on dbl click, on add to watch, ???).
Selection in BASIC IDE should extend the selection from cursor to cover an entire identifier that contains any legal character. This should include extending the selection to whole keywords that contain other chars invalid for identifiers (like the $ at the end of CHR$()). I can confirm that is a long-standing issue. Moved to NEW.
Created attachment 72513 [details]
Shows all manner of selected dreck in the Watch Window including: parts of vars, parts of multiple vars, etc.
** Please read this message in its entirety before responding **
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present on a currently supported version of LibreOffice (4.3.5 or later): https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)
Thank you for your help!
-- The LibreOffice QA Team
Still doing it.
Win 7 Pro 64-bit Version: 22.214.171.124.alpha0+
Build ID: 07e84cae983c08afdba03018413a19d01abb3006
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-19_06:15:38
The selection in the Basic IDE is done with a generic method in
TextView::MouseButtonDown(const MouseEvent & rMouseEvent) (vcl/source/edit/textview.cxx) using the i18n::XBreakIterator implementation.
For Basic there should be the possibility to call a custom 'select word' method.
WIN 10 32&64bit LO CALC 126.96.36.199 BASIC IN IDE: When stepping thru a program, hovering over variablenames containing an internal underscore: the values do not popup. Works fine for variablenames without underscores.
Simple Test: Variables named A and B and A_B even tried [A_B] but hovering over A_B or [A_B] produces no popup except individually on the A or B within the A_B or [A_B] and they were the values of the singleletter variablenames.
Further on the program utilizes the value of the A_B variablename correctly
WIN 10 PRO 32&64 Bit Also tried A__B (double underscore) and [A B]
blank not underscore in variablename in Brackets. Both these fail in the same way.
Setting Assignee back to default. Please assign it back to yourself if you're
still working on this issue
Might be related to this bug: variable selection is not easy in the IDE when variables contain underscores. A triple click selects the whole line instead of selecting the identifier only.
Second, this is not consistent with Calc and Writer where a triple click actually selects "words" containing underscores.
Wanted behaviour: triple-clicking an identifier containing underscore(s) selects the identifier only.
Current behaviour: selects the whole line.
When your selection length is 0, Basic IDE tries to find what is the name of the identifier
2. it relies on BreakIterator for Word Break
3. BreakIterator uses data for "edit_word" (I'm not so sure)
4. So-called underscore,whose official name is U+005F LOW LINE and who is in "Punctuation, Connector [Pc]" Category is categorized into ExtendNumLet in UAX#29
5. WB13a and WB13b says this character breaks neither before and after alphabets.
While icu4c's official data has a section for WB13a/WB13b,
LibreOffice does not have such a section.
Can this be the cause?
ICU's break iterator does not consider underscores as word-breaking punctuation
I committed a patch related to this issue (https://bugs.documentfoundation.org/show_bug.cgi?id=57879), but I am not satisfied with the change: https://gerrit.libreoffice.org/#/c/core/+/86362/
Should we add a function just to the edit engine, because this functionality is needed in many places? Or extend the Breakiterator interface with a function, e.g., expandWord?