summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/drawutil.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-23 17:41:47 +0200
committerJan Holesovsky <kendy@collabora.com>2014-10-23 18:34:39 +0200
commit31af61ea091cc895b893c849f2130aa35792b7db (patch)
tree6c7b63c5b538034bd5d356c5a8667b7e95d59b9c /sc/source/ui/view/drawutil.cxx
parente92c0d6f9b7a6251e00dc55219a203a7e53c96e2 (diff)
Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
Diffstat (limited to 'sc/source/ui/view/drawutil.cxx')
-rw-r--r--sc/source/ui/view/drawutil.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 21840f50ffaf..668337aac0da 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -27,9 +27,9 @@
void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
OutputDevice* pDev,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const Fraction& rZoomX, const Fraction& rZoomY,
double nPPTX, double nPPTY,
- boost::rational<long>& rScaleX, boost::rational<long>& rScaleY )
+ Fraction& rScaleX, Fraction& rScaleY )
{
long nPixelX = 0;
long nTwipsX = 0;
@@ -63,27 +63,27 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
// because ReduceInaccurate is called later anyway.
if ( aPixelLog.X() && nTwipsX )
- rScaleX = rational_FromDouble( ((double)aPixelLog.X()) *
- ((double)rZoomX.numerator()) /
+ rScaleX = Fraction( ((double)aPixelLog.X()) *
+ ((double)rZoomX.GetNumerator()) /
((double)nTwipsX) /
((double)HMM_PER_TWIPS) /
- ((double)rZoomX.denominator()) );
+ ((double)rZoomX.GetDenominator()) );
else
- rScaleX = boost::rational<long>( 1, 1 );
+ rScaleX = Fraction( 1, 1 );
if ( aPixelLog.Y() && nTwipsY )
- rScaleY = rational_FromDouble( ((double)aPixelLog.Y()) *
- ((double)rZoomY.numerator()) /
+ rScaleY = Fraction( ((double)aPixelLog.Y()) *
+ ((double)rZoomY.GetNumerator()) /
((double)nTwipsY) /
((double)HMM_PER_TWIPS) /
- ((double)rZoomY.denominator()) );
+ ((double)rZoomY.GetDenominator()) );
else
- rScaleY = boost::rational<long>( 1, 1 );
+ rScaleY = Fraction( 1, 1 );
// 25 bits of accuracy are needed to always hit the right part of
// cells in the last rows (was 17 before 1M rows).
- rational_ReduceInaccurate(rScaleX, 25);
- rational_ReduceInaccurate(rScaleY, 25);
+ rScaleX.ReduceInaccurate( 25 );
+ rScaleY.ReduceInaccurate( 25 );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */