From 017ae620604de06414dc3f780804c241b87e45c6 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Wed, 5 Feb 2020 11:33:26 +0100 Subject: lok: writer: Convert row height / cloumn width to the correct unit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In online, the mobile wizad displayed these attributes in the wrong unit. Change-Id: I165a8ee17bebbbfd8962ac9addc89df39c77851a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88004 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- sfx2/source/control/unoctitm.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 36f6e5d4250b..28276ddf3df7 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1205,6 +1205,18 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c } } } + else if (aEvent.FeatureURL.Path == "TableColumWidth" || + aEvent.FeatureURL.Path == "TableRowHeight") + { + sal_Int32 nValue; + if (aEvent.State >>= nValue) + { + float nScaleValue = 1000.0; + nValue *= nScaleValue; + sal_Int32 nConvertedValue = OutputDevice::LogicToLogic(nValue, MapUnit::MapTwip, MapUnit::MapInch); + aBuffer.append(OUString::number(nConvertedValue / nScaleValue)); + } + } else { // Try to send JSON state version -- cgit