Bug 106766 - text(0,"#") returns empty text, rather than the text "0".
Summary: text(0,"#") returns empty text, rather than the text "0".
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.6.2 release
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-25 17:45 UTC by Larry
Modified: 2017-03-28 07:27 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 Larry 2017-03-25 17:45:41 UTC
Description:
The text() function with the pound-sign format appears to handle the number zero improperly.  Instead of displaying the number in text form, as it does with the other numbers, the resulting cell is blank.

It is returning something at least, since the formula =istext(text(0,"#")) returns "TRUE".

The issue only exists with the format parameter given with the pound sign.  The formula =text(0,"0") returns the text "0" as expected.  Since by design "0" shows leading zeros and "#" doesn't show leading zeros, it appears that "#" eats the zero even if it is the only character in the number.

Steps to Reproduce:
The formula =text(0,"#").

Actual Results:  
"" - a blank text string

Expected Results:
The text "0".


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Comment 1 Xisco Faulí 2017-03-28 07:27:59 UTC
The correct expression is =TEXT(0;"#") and it can be reproduced back to 

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

Testing with MSO 2010 it returns the same value, so I would consider this a NOTABUG