diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-03 21:36:26 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-04 05:32:27 +0100 |
commit | a37a979107a8643136ff3733b5b350b6b1be2bb7 (patch) | |
tree | 0e8cdf06b166177426bc51d18ccc97494ec5e43b /starmath/source/cfgitem.cxx | |
parent | 5efb023c27e693654b09c45894a6f4a50f3d950e (diff) |
Use o3tl::convert in Math
... and use our standard definition of pt.
Change-Id: I5a162b137360210335b84de33606dc7404cfc2de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142204
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath/source/cfgitem.cxx')
-rw-r--r-- | starmath/source/cfgitem.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index a8c0e5fcae38..9b6a4eadd184 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -988,7 +988,7 @@ void SmMathConfig::LoadFormat() ++pVal; // StandardFormat/BaseSize if (pVal->hasValue() && (*pVal >>= nTmp16)) - pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) ); + pFormat->SetBaseSize(Size(0, o3tl::convert(nTmp16, o3tl::Length::pt, o3tl::Length::mm100))); ++pVal; sal_uInt16 i; @@ -1059,8 +1059,8 @@ void SmMathConfig::SaveFormat() // StandardFormat/HorizontalAlignment *pValue++ <<= static_cast<sal_Int16>(pFormat->GetHorAlign()); // StandardFormat/BaseSize - *pValue++ <<= static_cast<sal_Int16>(SmRoundFraction( Sm100th_mmToPts( - pFormat->GetBaseSize().Height() ) )); + *pValue++ <<= static_cast<sal_Int16>( + o3tl::convert(pFormat->GetBaseSize().Height(), o3tl::Length::mm100, o3tl::Length::pt)); sal_uInt16 i; for (i = SIZ_BEGIN; i <= SIZ_END; ++i) |