summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-08-07 21:00:01 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2022-08-09 10:47:47 +0200
commit4da48ee1fea74b2712bd5edf83e2a94d6aab1b8a (patch)
treed2b732a2ab14de1494c4b7c85c045bc54132d72b /svx
parent8e5886ad0993a360f24a83de9bc2645271e92185 (diff)
tdf#150293: setPropertyValue(WID_TXTCOL_LINE_WIDTH) takes mm100
Before commit 95ebd24a629b4c8cd62cc20c0701683512cc8fa0 Author Mike Kaganski <mike.kaganski@collabora.com> Date Thu May 27 13:00:10 2021 +0300 editengine-columns: ODF support [API CHANGE] SwXTextColumns crtor took SwFormatCol, and stored line width in the same units as in SwFormatCol - in twips; conversion to mm100 only happened at export stage in SwXTextColumns::getPropertyValue. The mentioned commit changed to SvxXTextColumns::setPropertyValue, passing the line width from SwFormatCol also without any conversion; but SvxXTextColumns::setPropertyValue expects mm100, so the result was wrong. So perform the proper conversion at SwFormatCol::QueryValue and SwFormatCol::PutValue, and also store the line width in mm100 in SvxXTextColumns, to avoid useless extra conversion. Change-Id: Idfd62a7563f9d3aa5947c1149572a8b8b696b179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137931 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 47b4c9bb7f0ef0175e55acaf22c740d11f6e9474) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137827 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit fcd541901d17b920aff7069131d3dc4b84adf264) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137828
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/SvxXTextColumns.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/unodraw/SvxXTextColumns.cxx b/svx/source/unodraw/SvxXTextColumns.cxx
index 00971bc7bc87..a0e399bd4cbb 100644
--- a/svx/source/unodraw/SvxXTextColumns.cxx
+++ b/svx/source/unodraw/SvxXTextColumns.cxx
@@ -210,7 +210,7 @@ void SvxXTextColumns::setPropertyValue(const OUString& rPropertyName, const css:
sal_Int32 nTmp;
if (!(aValue >>= nTmp) || nTmp < 0)
throw css::lang::IllegalArgumentException();
- m_nSepLineWidth = o3tl::toTwips(nTmp, o3tl::Length::mm100);
+ m_nSepLineWidth = nTmp;
break;
}
case WID_TXTCOL_LINE_COLOR:
@@ -271,7 +271,7 @@ css::uno::Any SvxXTextColumns::getPropertyValue(const OUString& rPropertyName)
switch (pEntry->nWID)
{
case WID_TXTCOL_LINE_WIDTH:
- aRet <<= o3tl::narrowing<sal_Int32>(convertTwipToMm100(m_nSepLineWidth));
+ aRet <<= m_nSepLineWidth;
break;
case WID_TXTCOL_LINE_COLOR:
aRet <<= m_nSepLineColor;