https://bugs.documentfoundation.org/show_bug.cgi?id=173873
Bug ID: 173873
Summary: Enhancement: Add configuration option to use
typographic minus sign (U+2212) for default negative
number rendering in Calc
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
Currently, LibreOffice Calc defaults strictly to using the standard ASCII
hyphen-minus (U+002D) prefix for all default negative number rendering. While
mathematically required for formula parsing and text portability (e.g.,
copy-pasting to terminal environments or scripts), it is visually suboptimal
for professional typography, desktop publishing, and localized presentations
which dictate a true typographic minus sign (U+2212).
While users can manually configure custom cell formats (e.g.,
'Standard;−Standard') to force a typographic minus sign, this behavior resets
when standard digits are manipulated or when default cell styles are cleared.
To solve this, I would like to propose a compromise that preserves mathematical
core integrity while improving professional presentation layer aesthetics.
Proposed Solution:
Add a application-wide localized configuration toggle (for example, under Tools
> Options > LibreOffice Calc > Calculate or View) titled:
"Use typographic minus sign (U+2212) for negative number display formatting"
Behavioral Specification:
1. When DISABLED (Default): Calc behaves exactly as it does now, using U+002D
for both internal math and visual strings.
2. When ENABLED: The core storage engine continues to read and interpret cell
values using the functional math hyphen (U+002D) to maintain perfect backward
compatibility with formula engines and Microsoft Excel (.xlsx export). However,
the formatting layer (e.g., via adjustments in
`svl/source/numbers/zforlist.cxx`) will catch the default output string and
swap the rendering prefix to U+2212 strictly for visual presentation on the
grid and layout outputs.
This preserves data portability while giving layout-oriented users a clean,
automated presentation out-of-the-box without manual, fragile number-formatting
hacks.
If gree-lighted, I will examine the svl formatting engine codebase and to then
submit a patch via Gerrit, targeting master. Feedback on the UI configuration
placement or architectural boundaries is highly welcome.
Please note that a separate ticket was opened to allow calc to **input** U+2212
as minus (which I tend to agree):
https://bugs.documentfoundation.org/show_bug.cgi?id=163587
I think the two are loosely correlated, and can be discussed/implemented
independently.
Actual Results:
=4-5 is displayed as
-1
Expected Results:
=4-5 should displayed as
−1
Reproducible: Always
User Profile Reset: No
Additional Info:
N/A
--
You are receiving this mail because:
You are the assignee for the bug.