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 07:33:41 +0100
commit8548e3caa8ed6d4e77d136e1b8d3c3b18cf074bb (patch)
treee05dc9f564fb0f788a355e375eb81ebfc1917d63 /starmath/source/unomodel.cxx
parent807888b849187eaf5d1c0e4a064f66702180a8e9 (diff)
Use o3tl::convert in Mathcp-22.05.8-1
... 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> (cherry picked from commit a37a979107a8643136ff3733b5b350b6b1be2bb7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142208 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.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 4b32900cbf26..09f00170bca9 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -482,7 +482,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
@@ -731,9 +731,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 :