diff options
author | Attila Szűcs <szucs.attila3@nisz.hu> | 2021-09-22 13:19:23 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-10-13 16:57:35 +0200 |
commit | 537cb82be8fa021fd9382cca874645c75daaef20 (patch) | |
tree | 3e3f7921626f91deaad2625199ce78dea433cdef /sc/source | |
parent | 73f26b73aaf562bf934249460480b4a60937a438 (diff) |
tdf#144642 XLSX import: round down row height to 0.75 pt
like table layout of MSO does, e.g. 20 pt to 19.5 pt.
Changing table row height is only for interoperability.
To avoid of regressions, apply this workaround only for
documents created in MSO.
Note: likely this is an old adjustment for low-resolution
monitors, where 0.75 is the factor between 96 ppi of Windows
resolution and (originally) 72 ppi of monitor resolutions.
Co-authored-by: Tibor Nagy (NISZ)
Change-Id: Ie1e2c781d21174a877b18cd3250eb445222bd1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122428
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/oox/sheetdatacontext.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx index c2b47a130bf4..ddc3c9fd5eab 100644 --- a/sc/source/filter/oox/sheetdatacontext.cxx +++ b/sc/source/filter/oox/sheetdatacontext.cxx @@ -19,6 +19,7 @@ #include <sheetdatacontext.hxx> +#include <oox/core/xmlfilterbase.hxx> #include <oox/helper/attributelist.hxx> #include <oox/helper/binaryinputstream.hxx> #include <oox/token/namespaces.hxx> @@ -278,6 +279,11 @@ void SheetDataContext::importRow( const AttributeList& rAttribs ) aModel.mbThickTop = rAttribs.getBool( XML_thickTop, false ); aModel.mbThickBottom = rAttribs.getBool( XML_thickBot, false ); + if (aModel.mfHeight > 0 && getFilter().isMSODocument()) + { + aModel.mfHeight -= fmod(aModel.mfHeight, 0.75); //round down to 0.75pt + } + // decode the column spans (space-separated list of colon-separated integer pairs) OUString aColSpansText = rAttribs.getString( XML_spans, OUString() ); sal_Int32 nMaxCol = mrAddressConv.getMaxApiAddress().Col(); |