Bug 129780 - Bug / Feature ?? Input of (7) into calc cell results in -7 ,, if cell is not preformatted as text
Summary: Bug / Feature ?? Input of (7) into calc cell results in -7 ,, if cell is not...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-04 08:14 UTC by Karl
Modified: 2020-01-04 08:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl 2020-01-04 08:14:17 UTC
Description:
Hi folks, i dont know wether it is a bug ?!

cell input ->
(7)
cell output
-7

"minus seven" if cell is not preformatted as text

cell input ->
( )
cell output ->
( )
input seems to be detected as text

kind regards
jürgen

Actual Results:
input ->      (7)


Expected Results:
-7


Reproducible: Always


User Profile Reset: No



Additional Info:
(7)
i dont know
Comment 1 Kevin Suo 2020-01-04 08:41:54 UTC
I don't think this is a bug.

Numbers enclosed within Parentheses is a valid default negative number format. You can observe this on Format > Cells > Numbers, category "Numbers", and select "English (United States" in the language dropdown list.

This is no difference compared with typing "123,456" in the cell, in which case the input is recognized as a number rather than a string, as the comma "," is a number format string. Or, it is recognized as a date (stored as a number actually) if you type in "2020-1-1".

Expressing negative numbers by enclosing the numeber with parentheses is very common especially in finance. You may see that many companies represent their financial statements showing negative numbers in parentheses. This means that, if you copy-paste a this kind of numbers into Calc, it is correctly recognized as negative numbers rather than string.

See also https://support.office.com/en-ie/article/negative-numbers-aren-t-showing-with-parentheses-in-excel-682a1cc5-701a-4ce7-92db-cc9eebc5ffa0
Comment 2 Kevin Suo 2020-01-04 08:43:10 UTC
By the way, if you want to type in (7) as text rather than negative number, the best way is to add a ' before it, i.e. '(7)