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

            Bug ID: 101363
           Summary: FILESAVE: Precision of column width is not limited
                    during .xlsx export
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

In MS specification the output value is set with double precision after
delimiter, according to formula:
 =Truncate(({width in pixels} - 5)/{Maximum Digit Width} * 100 + 0.5)/100

Explanation of magic numbers:
            // 5 number - are 4 pixels of margin padding (two on each side),
plus 1 pixel padding for the gridlines. It is still unknown if it should be
applied during LibreOffice export
            // 100 number - used to limit precision to 0.01 with formula
=Truncate( {value} * 100 ) / 100
            // 0.5 number (0.005 to output value) - used to increase value
before truncating, to avoid situation when 2.997 will be truncated to 2.99 and
not to 3


We should also apply such precision for LibreOffice.
So instead of values like:
   <col collapsed="false" customWidth="true" hidden="false" outlineLevel="0"
max="2" min="1" style="0" width="8.50510204081633"/>

It will be rounded to:
        <col collapsed="false" customWidth="true" hidden="false"
outlineLevel="0" max="1025" min="1" style="0" width="8.50"/>

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

Reply via email to