summaryrefslogtreecommitdiff
path: root/starmath/source/mathml/mathmlexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/mathml/mathmlexport.cxx')
-rw-r--r--starmath/source/mathml/mathmlexport.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx
index d0f5089e241c..ca9453d8d0ab 100644
--- a/starmath/source/mathml/mathmlexport.cxx
+++ b/starmath/source/mathml/mathmlexport.cxx
@@ -1171,12 +1171,12 @@ void SmXMLExport::ExportFont(const SmNode* pNode, int nLevel)
{
case FontSizeType::MULTIPLY:
::sax::Converter::convertDouble(sStrBuf,
- static_cast<double>(aFrac * Fraction(100.00)));
+ static_cast<double>(aFrac * Fraction(100, 1)));
sStrBuf.append('%');
break;
case FontSizeType::DIVIDE:
::sax::Converter::convertDouble(sStrBuf,
- static_cast<double>(Fraction(100.00) / aFrac));
+ static_cast<double>(Fraction(100, 1) / aFrac));
sStrBuf.append('%');
break;
case FontSizeType::ABSOLUT:
@@ -1191,14 +1191,14 @@ void SmXMLExport::ExportFont(const SmNode* pNode, int nLevel)
//value specified in points.
//Must fix StarMath to retain the original pt values
- Fraction aTemp = Sm100th_mmToPts(pFontNode->GetFont().GetFontSize().Height());
+ double mytest
+ = o3tl::convert<double>(pFontNode->GetFont().GetFontSize().Height(),
+ o3tl::Length::mm100, o3tl::Length::pt);
if (pFontNode->GetSizeType() == FontSizeType::MINUS)
- aTemp -= aFrac;
+ mytest -= static_cast<double>(aFrac);
else
- aTemp += aFrac;
-
- double mytest = static_cast<double>(aTemp);
+ mytest += static_cast<double>(aFrac);
mytest = ::rtl::math::round(mytest, 1);
::sax::Converter::convertDouble(sStrBuf, mytest);