[Libreoffice-ux-advise] [Bug 116261] CALC FORMATTING changing the format of some characters of a text cell (interpreted as formula?)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue May 23 13:41:43 UTC 2023
https://bugs.documentfoundation.org/show_bug.cgi?id=116261
--- Comment #18 from Eike Rathke <erack at redhat.com> ---
(In reply to Stéphane Guillou (stragu) from comment #15)
> I have noticed that using the formula bar vs editing directly in the cell
> does matter for reproducing the bug, and that this is not just about
> formulas in 7.6 anymore.
Indeed, editing in the Input Line (what you call formula bar) discards all
in-cell formatting, apparently the Input Line does not know about character
attributes.
(In reply to Stéphane Guillou (stragu) from comment #17)
> Oof, it's GTK-only. Thanks for testing. Not reproduced on kf5 or gen.
Geez, that's even more twisted..
> 2. enter the following string in a cell, but don't press Enter: + one A1 two
> 3. make "one" red, press Enter
> -> quote prefix is not added even though the formula is not valid;
Correct observation but wrong conclusion. It's not about the formula being
valid or not, it's not a formula at all because entering attributed text forces
a rich text edit cell instead of a formula cell.
> 4. select cell, and _in the formula bar_ add a space at the end of the string
> -> partial direct formatting is lost; prefix is again hidden when out of
> edit mode
>
> So it seems that editing the value in the formula bar automatically
> interprets it as a formula, and therefore removes the formatting, even if
> the end result is still an invalid formula.
Yes. Just that it removes the formatting regardless whether it would be a
formula or not or a valid formula or not.
> Somewhat related:
>
> Steps:
> 1. Open Calc
> 2. enter the following string in a cell and press Enter: + one A1 two
> -> note the ' prefix is automatically added, because not a valid formula
No, because the cell content is text that with a non-Text number format because
of the leading + could be interpreted as formula when editing. The cell content
became text because the input didn't form a valid formula.
> 3. make "one" red, press Enter
> -> quote prefix does not automatically hide anymore when out of edit mode
Because with the attributed characters a rich text cell is created of all
input. We should maybe implement the same behaviour there as for any other text
input: discard a leading ' apostrophe if the cell wasn't already formatted as
text. On the other hand, such attributed content is never converted to numeric
or other data types.
> 4. add a space at the end of the string
> -> partial direct formatting is lost; prefix is again hidden when out of
> edit mode
Because editing in the Input Line removes attribution,,
> (In reply to Eike Rathke from comment #14)
> > I don't understand the question. How do +/- and = differ?
>
> I was thinking of the difference in output between these two formulas:
> =2+test
> +2+test
>
> ...but I realise now that a single quote should always be prepended when the
> formula is not valid, whereas an equal sign is prepended when it is. So
> scrap that comment :)
See above, it's actually text cell content vs formula content.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libreoffice-ux-advise
mailing list