https://bugs.freedesktop.org/show_bug.cgi?id=82765

--- Comment #8 from Renato Ferreira <[email protected]> ---
I could replicate the behaviour described in the attachment above.

My understanding is that "non-canonical" user-defined styles are, first,
identified as number styles, and those are defined in the code by the set:
(flag) show thousand separator, (flag) show red negative numbers, (int)
precision, (int) leading zeroes. Then when the user tries to edit their strange
style (in this case containing spaces, but could be any characters) using the
UI selectors, basically those variables get changed accordingly, but a new,
"canonical" style is generated instead (thus without the user-defined
features).

I propose that, since those strange styles could be really anything, to disable
the UI selectors if the user is defining one of those non-canonical styles.
That is, a style such as #0"mysep".00 can be defined and works, but the user is
not led into trying to edit the style using the UI selectors, just to have it
broken as described. If, however, the user defines a canonical style such as
0.0000, they still get to edit it using the UI elements normally.

I have prepared a patch that causes this behaviour, in case anyone would like
to give it a try.

The only issue is that I am not sure, at the moment, how to do the same in the
sidebar style selector. I looked at the code and it seems very detached from
the rest, only receiving a few variables, and it seems not to have access to
the format string itself, which would be necessary to induce the same
behaviour.

If you think this is a good solution, I would welcome directions on how to deal
with the sidebar issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to