Bug 97180 - parenthesis in text are randomly bold
Summary: parenthesis in text are randomly bold
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 152271 (view as bug list)
Depends on:
Blocks: Calc-UX
  Show dependency treegraph
 
Reported: 2016-01-16 12:57 UTC by teo8976
Modified: 2023-04-19 05:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
printscreen (78.56 KB, image/png)
2016-01-20 18:24 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description teo8976 2016-01-16 12:57:44 UTC
When I enter text in a cell starting with a "+" or a "-" (but NOT a valid formula, so it's text) which contains parenthesis "(" and ")", one of three things may happen, and I can't see a pattern:

A- nothing special: the text is left as is, as it should be
B- while typing, parenthesis that match become bold; but when you are finished editing, the bold disappears. This could be OK if you were entering a formula.
C- same as B, but they do remain bold forever after you are finished editing

This seems to have to do with the fact that when the input starts with + or - it is attempted to be interpreted as a formula. So, B might be expected behavior if the decision whether the input is a valid formula is taken only at the end.

However, if the entered text is not a valid formula and turns out to be text (the proof being, that when you re-edit it, there's no added "=" sign at the beginning in the input field on the top of the screen), there's no reason for behavior C.
Comment 1 teo8976 2016-01-16 12:58:33 UTC
After some more tests, there might actually be a pattern: B seems to happen when the text starts with a "+", while C seems to happen when it starts with a "-".

Equally nonsense.
Comment 2 Jean-Baptiste Faure 2016-01-17 09:00:56 UTC
I always have the case B. I think it is the highlighting of matching parenthesis.
So not a bug.

Tested with LO 5.1.1.0.0+ under Ubuntu 15.10 x86-64. Could you try with LO 5.1.0 RC2 ?

Best regards. JBF
Comment 3 teo8976 2016-01-18 23:38:11 UTC
I can't test the version you ask me, but I've just upgraded Ubuntu to 15.10 and tested 5.0.2.2 and the issue persists.

I was wrong about this:
> B seems to happen when the text starts with a "+", 
> while C seems to happen when it starts with a "-"

I get C also in cases where the text starts with a "+". 

It's totally random, I have just observed the issue disappear on a cell after editing the contents, and then edited again to the exact original value and the issue did not reappear.

For example, say the contents of the cell were:
-(foobar)
the parenthesis remained bold. Then I changed the content to:
-(foo)
the bold disappeared after editing. I restored the original value:
-(foobar)
the bold did not reappear.
Comment 4 raal 2016-01-20 18:24:29 UTC
Created attachment 122120 [details]
printscreen

I can confirm with Version: 5.2.0.0.alpha0+
Build ID: d95d9d7f908419f397941ef60ac6ced3261c9b87
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-19_00:40:21
LibreOffice 3.5.0 
Build ID: d6cde02

C- same as B, but they do remain bold forever after you are finished editing
Comment 5 QA Administrators 2017-03-06 14:10:36 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2019-12-03 14:55:29 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2021-12-03 04:43:38 UTC Comment hidden (obsolete)
Comment 8 teo8976 2021-12-03 09:33:01 UTC
Issue still exists in version:

Version: 7.2.3.1 / LibreOffice Community
Build ID: 20(Build:1)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: an-ES (an_ES.UTF-8); UI: en-US
Calc: threaded
Comment 9 Buovjaga 2023-03-09 12:10:56 UTC
*** Bug 152271 has been marked as a duplicate of this bug. ***
Comment 10 ady 2023-03-09 13:31:29 UTC
Still repro:

Version: 7.4.5.1 (x64) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL

Steps (case A):
1. New Calc
2. A1: -(foobar) [ENTER] > parentheses are bold; this boldness is displayed immediately after the second parentheses is typed-in, not before.
3. A1: Click on the formula bar at the right-side of the closing parentheses (do _not_ use F2).
4 You might notice that the "B" icon is not indicating that the parentheses is bold. Move around the characters, back and forth if you need to. Press [ESC] without editing anything.
5. Click again on the formula bar at the right-side of the closing parentheses (do _not_ use F2). After a split second, note that the "B" icon shows that the ")" is bold. Move the cursor around and it is clear that both parentheses are bold whereas the rest of the text is not. Don't press [ENTER] yet.
6. Edit the text from "foobar" to "foo". Don't press [ENTER] yet.
7. Move the cursor to the end of the inputwin, to the right-side of the closing parentheses. Note the "B" icon is still "on". Now press [ENTER]. Note that the bold attribute remains for both parentheses.
8. You can now edit the cell, whether by clicking on the formula bar or by F2; the parentheses are left as bold. The only remedy is to either select each and make them regular (i.e. _select_ one parentheses, click on the "B" icon twice or press [CTRL]+[B] twice, repeat for the other parentheses), or alternatively delete both parentheses, press [ENTER] and add them again.


Please note that in step 3 above, I do not use F2. Now you can repeat the whole procedure, except that in step 3 use F2 to enter into edit mode, instead of using the mouse – lets call this case B. Use then only the arrows in your keyboard to edit the text from "foobar" to "foo" and press [ENTER].

In case B, the parentheses are no longer bold. They were bold initially, as if you were typing a possible formula. This is OK, until the first [ENTER], when the cell is no longer considered a potential formula but an established text. Unless the user sets the bold attribute to a character, it should not remain bold after pressing [ENTER].

In case A, the parentheses, as text/characters, have the bold attribute fixed, so it is as if you have manually already set this attribute to that characters. But this attribute seems to be assigned to the parentheses at the moment when clicking on the formula bar, which is the difference between case A and case B, because before that moment, case B shows that the bold attribute was not still assigned (or, alternatively, it gets unassigned).

There are 2 more tests, and that is with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0484a9a3f5e2ecb678f6fb41bbb251529e89c00d
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded
Built 2023.03.07

...in which the apostrophe plays a role.

With the mouse (as in case A above), all is the same. With F2, an apostrophe is eventually shown in the formula bar. You have to edit the cell and press [ENTER] in order for the apostrophe to be displayed in the inputwin. Although I have not tested with LO 7.5, I guess this will happen in that version too, because the modified behavior was introduced for that version.