From 537cb82be8fa021fd9382cca874645c75daaef20 Mon Sep 17 00:00:00 2001 From: Attila Szűcs Date: Wed, 22 Sep 2021 13:19:23 +0200 Subject: tdf#144642 XLSX import: round down row height to 0.75 pt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: László Németh --- sc/source/filter/oox/sheetdatacontext.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sc/source') 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 +#include #include #include #include @@ -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(); -- cgit