summaryrefslogtreecommitdiff
path: root/starmath/source/unomodel.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-11-03 21:36:26 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2022-11-04 05:32:27 +0100
commita37a979107a8643136ff3733b5b350b6b1be2bb7 (patch)
tree0e8cdf06b166177426bc51d18ccc97494ec5e43b /starmath/source/unomodel.cxx
parent5efb023c27e693654b09c45894a6f4a50f3d950e (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/unomodel.cxx')
-rw-r--r--starmath/source/unomodel.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 3c0d750f5737..51a5fc822af0 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -478,7 +478,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
if(nVal < 1)
throw IllegalArgumentException();
Size aSize = aFormat.GetBaseSize();
- aSize.setHeight( SmPtsTo100th_mm(nVal) );
+ aSize.setHeight(o3tl::convert(nVal, o3tl::Length::pt, o3tl::Length::mm100));
aFormat.SetBaseSize(aSize);
// apply base size to fonts
@@ -727,9 +727,8 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_BASE_FONT_HEIGHT :
{
// Point!
- *pValue <<= sal_Int16(
- SmRoundFraction(
- Sm100th_mmToPts(aFormat.GetBaseSize().Height())));
+ *pValue <<= sal_Int16(o3tl::convert(aFormat.GetBaseSize().Height(),
+ o3tl::Length::mm100, o3tl::Length::pt));
}
break;
case HANDLE_RELATIVE_FONT_HEIGHT_TEXT :