https://bugs.documentfoundation.org/show_bug.cgi?id=130104
Kevin Suo <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|FILESAVE: XLSX: problem |XLSX: cell indent
|with align+indent (cell |("stylesheet -> cellXfs ->
|indent increases on each |xf -> alignment: indent")
|save) |is increased by 3 times
| |upon FILEOPEN, and thus
| |resulted in wrong indent
| |attribute upon FILESAVE
--- Comment #13 from Kevin Suo <[email protected]> ---
I think I find the reason.
In sc/source/filter/oox/stylesbuffer.cxx:1184-1186, the code is:
> /* indentation: expressed as number of blocks of 3 space characters in
> OOXML. */
> sal_Int32 nIndent = getUnitConverter().scaleToMm100( 3.0 *
> maModel.mnIndent, Unit::Space );
This seems to be wrong code. In case maModel.mnIndent is 0 (i.e., the cell is
set to be no indent), it is fine because 3.0 * 0 is always 0. However, if
maModel.mnIndent is 1, then after calculation it will be 3, which makes the
indent shown to be 3 times wider than what it should be.
Steps to observe the impact of this code:
1. Unzip the simple "test-indent-original.xlsx" file. Go to the stylesheet in
xl/styles.xml.
--> Observe that there are 3 nodes within "cellXfs", and the 3rd one has:
> <alignment horizontal="left" vertical="center" textRotation="0"
> wrapText="false" indent="1" shrinkToFit="false"/>
this is used by xl/worksheets/sheet1.xml
2. Open this test xlsx file with Calc. Observe that the indent for the cell has
wide indent. If you hit 3 times the "decrease indent" toolbar icon to make it 0
indent, thus I can say that the indent is already set to 3 at the time of
fileopen, although it should be 1.
3. Save as "test-indent-firstSave.xlsx". Then unzip the resaved xlsx file with
Calc, and go to the style sheet.
--> the indent becomes:
> <alignment horizontal="left" vertical="center" textRotation="0"
> wrapText="false" indent="3" shrinkToFit="false"/>
As discussed on 2 above, this indent was already 3 when the file is opened,
thus it is not a filesave issue.
--
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