summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/report/ViewsWindow.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 /reportdesign/source/ui/report/ViewsWindow.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 'reportdesign/source/ui/report/ViewsWindow.cxx')
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 8c0e49f4eb86..5fb908d71dee 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -206,7 +206,7 @@ void OViewsWindow::impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Poin
aSectionSize.Height() = nMinHeight;
}
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- aSectionSize.Height() += (long)(rSettings.GetSplitSize() * boost::rational_cast<double>(_rSectionWindow.GetMapMode().GetScaleY()));
+ aSectionSize.Height() += (long)(rSettings.GetSplitSize() * (double)_rSectionWindow.GetMapMode().GetScaleY());
if ( _bSet )
_rSectionWindow.SetPosSizePixel(_rStartPoint,aSectionSize);
@@ -263,13 +263,13 @@ void OViewsWindow::Paint( const Rectangle& rRect )
Window::Paint( rRect );
Size aOut = GetOutputSizePixel();
- boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH));
+ Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
aStartWidth *= GetMapMode().GetScaleX();
- aOut.Width() -= boost::rational_cast<long>(aStartWidth);
+ aOut.Width() -= (long)aStartWidth;
aOut = PixelToLogic(aOut);
- Rectangle aRect(PixelToLogic(Point(boost::rational_cast<long>(aStartWidth),0)),aOut);
+ Rectangle aRect(PixelToLogic(Point(aStartWidth,0)),aOut);
Wallpaper aWall( m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor );
DrawWallpaper(aRect,aWall);
}
@@ -1685,11 +1685,11 @@ void OViewsWindow::collapseSections(const uno::Sequence< beans::PropertyValue>&
}
}
-void OViewsWindow::zoom(const boost::rational<long>& _aZoom)
+void OViewsWindow::zoom(const Fraction& _aZoom)
{
const MapMode& aMapMode = GetMapMode();
- boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH));
+ Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
if ( _aZoom < aMapMode.GetScaleX() )
aStartWidth *= aMapMode.GetScaleX();
else
@@ -1707,7 +1707,7 @@ void OViewsWindow::zoom(const boost::rational<long>& _aZoom)
Resize();
Size aOut = GetOutputSizePixel();
- aOut.Width() = boost::rational_cast<long>(aStartWidth);
+ aOut.Width() = aStartWidth;
aOut = PixelToLogic(aOut);
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);