diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2019-11-16 21:55:05 +0100 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-11-18 21:32:05 +0100 |
commit | bbfcada38c71ca8f0adf779e9fb66d577683ad71 (patch) | |
tree | 09fb9b017bde048c7fe1acaf8d7488883c499f3f /sc/source/filter | |
parent | 1aa0e52f70e62022cffb499a609ac2def6245166 (diff) |
tdf#103092 export uses MeasureUnit not FieldUnit
ctor of SvXMLExport expects a util::MeasureUnit, but getMetric() from
XGlobalSheetSettings returns a FieldUnit. The conversion was missing.
So FieldUnit::MM (=1) was treated as MeasureUnit::MM_10TH (=1). But
that one has no unit string, so the 'translate' transformation got
numbers without unit, which then were wrongly interpreted.
Change-Id: I433c7534be21655887863005f14836d2b733cf1f
Reviewed-on: https://gerrit.libreoffice.org/83004
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
(cherry picked from commit 58ee73068fa881950e42cca22ed17cf5829b8d14)
Reviewed-on: https://gerrit.libreoffice.org/83099
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index fc12af17c4b1..a1fdf72f53b1 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -103,6 +103,7 @@ #include <xmloff/ProgressBarHelper.hxx> #include <sax/tools/converter.hxx> +#include <tools/fldunit.hxx> #include <rtl/ustring.hxx> @@ -326,7 +327,8 @@ sal_Int16 ScXMLExport::GetMeasureUnit() { css::uno::Reference<css::sheet::XGlobalSheetSettings> xProperties = css::sheet::GlobalSheetSettings::create( comphelper::getProcessComponentContext() ); - return xProperties->getMetric(); + const FieldUnit eFieldUnit = static_cast<FieldUnit>(xProperties->getMetric()); + return SvXMLUnitConverter::GetMeasureUnit(eFieldUnit); } static const OUStringLiteral gsLayerID( SC_LAYERID ); |