summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 5306908cefbe..d7615befe26d 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -134,8 +134,8 @@ void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType)
if (!(Flags() & FontChangeMask::Size))
{
- Fraction aVal (SmPtsTo100th_mm(rSize.GetNumerator()),
- rSize.GetDenominator());
+ constexpr auto md = o3tl::getConversionMulDiv(o3tl::Length::pt, o3tl::Length::mm100);
+ Fraction aVal (Fraction(md.first, md.second) * rSize);
tools::Long nHeight = static_cast<tools::Long>(aVal);
aFntSize = GetFont().GetFontSize();
@@ -167,7 +167,7 @@ void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType)
}
// check the requested size against maximum value
- static int const nMaxVal = SmPtsTo100th_mm(128);
+ constexpr int nMaxVal = o3tl::convert(128, o3tl::Length::pt, o3tl::Length::mm100);
if (aFntSize.Height() > nMaxVal)
aFntSize.setHeight( nMaxVal );