summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorOnur Yilmaz <onuryilmaz0750@gmail.com>2020-01-27 12:04:16 +0300
committerStephan Bergmann <sbergman@redhat.com>2020-01-28 14:54:10 +0100
commit2065cbf576e7d3257e7da2151419404928326df3 (patch)
tree6158b349b13e2270d6f6bff9a6bd02ee6543f2e7 /starmath
parent6dc77b9f16e0b3fba6f801a3c307786a7c8a8ddd (diff)
tdf#96505: Get rid of cargo cult long integer literals
I checked return values. Long variables didn't affect the calculation. Change-Id: I1d5b5cffa291c20f7940dc14efa05cc64f3ff1ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87499 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/view.cxx8
-rw-r--r--starmath/source/visitors.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 54e6122c8873..a76a6e82b83b 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1197,8 +1197,8 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MapUnit::Map100thMM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MapUnit::Map100thMM)));
- sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100L, GraphicSize.Width())),
- long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height()))));
+ sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
+ long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
nZ -= 10;
Fraction aFraction (std::max(MINZOOM, std::min(MAXZOOM, nZ)), 100);
@@ -2019,8 +2019,8 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100L, GraphicSize.Width())),
- long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height()))));
+ sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
+ long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
mpGraphic->SetZoom (nZ);
break;
}
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index a950046162bf..dcf36497a4eb 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -406,7 +406,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
// _unscaled_ font height to be used, we use that to calculate the
// bar height. Thus it is independent of the arguments height.
// ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
- long nBarHeight = pNode->GetWidth( ) * 7L / 100L;
+ long nBarHeight = pNode->GetWidth( ) * 7 / 100;
long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) );
Point aBarPos( maPosition + aBarOffset );