[Libreoffice-bugs] [Bug 90684] Hide decimal separator if number has no decimal part and no trailing zeroes are to be shown

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Oct 1 10:02:46 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=90684

ask4support at email.cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ask4support at email.cz

--- Comment #8 from ask4support at email.cz ---
Created attachment 136664
  --> https://bugs.documentfoundation.org/attachment.cgi?id=136664&action=edit
The file with the problem and workaround.

I have been dealing with the addition of units to decimal numbers in Calc. 






This is the description of my problem (You may want to skip this): 

When I need to add a unit to a whole number, I do the following: 
        Format → Cells → Number → Format Code → “# ##0" V"” → OK
                The value for “1” becomes “1 V”, which is OK. 

When I need to add a unit to a decimal number, I do the following: 
        Format → Cells → Number → Format Code → “# ##0,###" V"” → OK
                The value for “0,1” becomes “0,1 V”, which is OK as well. 

But when I need to add a unit to a whole or a decimal number (based on the
result of the formula, for example), I do the same as above: 
        Format → Cells → Number → Format Code → “# ##0,###" V"” → OK
                The value for “0,1” becomes “0,1 V”, this one is OK. 
                The value for “0” becomes “0, V”, but this one is not. 





This is the workaround (You may need to read the description above): 

So, when I need something universal that will work for both cases, the only way
to do so (that I can see) is by using conditional formatting: 
        (Select a SINGLE cell) → Format → Condition... 
                → Condition 1
                        → Cell value is → equal to → INT([Current cell, you can
copy it from the Range: field if you have selected one cell only])
                        → Apply Style → New Style... → Numbers → (Select the
first (user-defined) style (for whole numbers).)
                → Add → Condition 2
                        → Cell value is → not equal to → INT([Current cell, you
can copy it from the Range: field if you have selected one cell only])
                        → Apply Style → New Style... → Numbers → (Select the
second (user-defined) style (for decimal numbers).)
                → OK
        To apply that for other cells, I copy that cell and use Ctr + Shift + V
to paste only formats, this way it's possible to paste the format to multiple
cells at a time. 





Just in case your're a developer willing to change the issue: 

May you please add a conditional decimal separator, simple checkbox, a
formatting condition (something like “[IS_DECIMAL]# ##0,###" V";[IS_WHOLE]#
##0" V"”), or something like that? 
Or, perhaps, other GUI feature that will apply my workaround automatically?
(Which I suppose will not break compatibility.)





I am very sorry for my poor English, feel free to correct me if you don't mind. 
Thank you very much.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171001/0c5f9127/attachment.html>


More information about the Libreoffice-bugs mailing list