diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 17:22:06 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 18:34:34 +0200 |
commit | 858c2a2977d5e4671959724ecd2a453837dadddf (patch) | |
tree | a61e303e6e27cef015c50b38b23fc574ce64fcef /reportdesign/source/ui/report | |
parent | ff502f409fd73249a6a94c579d19905144aa5ba8 (diff) |
Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.
Conflicts:
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
Diffstat (limited to 'reportdesign/source/ui/report')
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/EndMarker.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 20 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 2 |
10 files changed, 28 insertions, 28 deletions
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 09d0626c16cd..853358ef6ccc 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -684,7 +684,7 @@ sal_uInt32 ODesignView::getMarkedObjectCount() const return m_aScrollWindow.getMarkedObjectCount(); } -void ODesignView::zoom(const boost::rational<sal_Int64>& _aZoom) +void ODesignView::zoom(const boost::rational<long>& _aZoom) { m_aScrollWindow.zoom(_aZoom); } diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index ec3851be4173..eacba6c64ffe 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -45,7 +45,7 @@ OEndMarker::~OEndMarker() void OEndMarker::Paint( const Rectangle& /*rRect*/ ) { - boost::rational<sal_Int64> aCornerSpace(long(CORNER_SPACE)); + boost::rational<long> aCornerSpace(long(CORNER_SPACE)); aCornerSpace *= GetMapMode().GetScaleX(); const long nCornerSpace = boost::rational_cast<long>(aCornerSpace); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 429997df2d21..a68469bd0df1 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -4171,7 +4171,7 @@ void OReportController::impl_fillState_nothrow(const OUString& _sProperty,dbaui: void OReportController::impl_zoom_nothrow() { - boost::rational<sal_Int64> aZoom(m_nZoomValue,100); + boost::rational<long> aZoom(m_nZoomValue,100); setZoomFactor( aZoom,*getDesignView() ); getDesignView()->zoom(aZoom); InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(), true); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 7381ef6e78de..8a54f979f537 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -202,8 +202,8 @@ void OReportSection::fill() m_pView->SetGridFine(aGridSizeFine); // #i93595# set snap grid width to snap to all existing subdivisions - const boost::rational<sal_Int64> aX(aGridSizeFine.A()); - const boost::rational<sal_Int64> aY(aGridSizeFine.B()); + const boost::rational<long> aX(aGridSizeFine.A()); + const boost::rational<long> aY(aGridSizeFine.B()); m_pView->SetSnapGridWidth(aX, aY); m_pView->SetGridSnap( pDesignView->isGridSnap() ); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index db1b6aa13aaa..57afd5c0dcba 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -141,10 +141,10 @@ void OReportWindow::showRuler(bool _bShow) sal_Int32 OReportWindow::getMaxMarkerWidth(bool _bWithEnd) const { - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_aViewsWindow.GetMapMode().GetScaleX(); if ( _bWithEnd ) - aStartWidth += boost::rational<sal_Int64>(long(REPORT_ENDMARKER_WIDTH)); + aStartWidth += boost::rational<long>(long(REPORT_ENDMARKER_WIDTH)); return sal_Int32(boost::rational_cast<long>(aStartWidth)); } @@ -153,11 +153,11 @@ sal_Int32 OReportWindow::GetTotalWidth() const sal_Int32 nWidth = 0; if ( !m_aViewsWindow.empty() ) { - boost::rational<sal_Int64> aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); - const boost::rational<sal_Int64> aZoom(m_pView->getController().getZoomValue(),100); + boost::rational<long> aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); + const boost::rational<long> aZoom(m_pView->getController().getZoomValue(),100); aStartWidth *= aZoom; const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; - boost::rational<sal_Int64> aPaperWidth(nPaperWidth,1); + boost::rational<long> aPaperWidth(nPaperWidth,1); aPaperWidth *= aZoom; const Size aPageSize = LogicToPixel(Size(boost::rational_cast<long>(aPaperWidth),0)); nWidth = aPageSize.Width() + boost::rational_cast<long>(aStartWidth); @@ -171,7 +171,7 @@ void OReportWindow::Resize() if ( !m_aViewsWindow.empty() ) { const Size aTotalOutputSize = GetOutputSizePixel(); - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MAP_APPFONT ); Point aStartPoint(boost::rational_cast<long>(aStartWidth) + aOffset.X(),0); @@ -372,7 +372,7 @@ sal_uInt32 OReportWindow::getMarkedObjectCount() const return m_aViewsWindow.getMarkedObjectCount(); } -void OReportWindow::zoom(const boost::rational<sal_Int64>& _aZoom) +void OReportWindow::zoom(const boost::rational<long>& _aZoom) { m_aHRuler.SetZoom(_aZoom); m_aHRuler.Invalidate(); @@ -414,14 +414,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const break; case SVX_ZOOM_WHOLEPAGE: { - nZoom = (sal_uInt16) boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Width() * 100, impl_getRealPixelWidth()) ); + nZoom = (sal_uInt16) boost::rational_cast<long>( boost::rational<long>(aSize.Width() * 100, impl_getRealPixelWidth()) ); MapMode aMap( MAP_100TH_MM ); const Size aHeight = m_aViewsWindow.LogicToPixel(m_aViewsWindow.PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler.GetSizePixel().Height())),aMap); - nZoom = ::std::min(nZoom, (sal_uInt16) boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Height() * 100, aHeight.Height()) )); + nZoom = ::std::min(nZoom, (sal_uInt16) boost::rational_cast<long>( boost::rational<long>(aSize.Height() * 100, aHeight.Height()) )); } break; case SVX_ZOOM_PAGEWIDTH: - nZoom = (sal_uInt16)boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Width() * 100, this->impl_getRealPixelWidth()) ); + nZoom = (sal_uInt16)boost::rational_cast<long>( boost::rational<long>(aSize.Width() * 100, this->impl_getRealPixelWidth()) ); break; default: break; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 0fc05318bb64..d8f1633d366b 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -101,7 +101,7 @@ void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight) m_aTotalPixelSize.Height() = _nHeight; // now set the ranges without start marker - boost::rational<sal_Int64> aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); + boost::rational<long> aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); long nWidth = long(_nWidth - boost::rational_cast<double>(aStartWidth)); m_aHScroll.SetRangeMax( nWidth ); m_aVScroll.SetRangeMax( m_aTotalPixelSize.Height() ); @@ -163,7 +163,7 @@ Size OScrollWindowHelper::ResizeScrollBars() const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT ); // resize scrollbars and set their ranges { - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X() - boost::rational_cast<long>(aStartWidth); lcl_setScrollBar(nNewWidth,Point( boost::rational_cast<long>(aStartWidth) + aOffset.X(), aOutPixSz.Height() ),Size( nNewWidth, nScrSize ),m_aHScroll); } @@ -383,7 +383,7 @@ sal_uInt32 OScrollWindowHelper::getMarkedObjectCount() const return m_aReportWindow.getMarkedObjectCount(); } -void OScrollWindowHelper::zoom(const boost::rational<sal_Int64>& _aZoom) +void OScrollWindowHelper::zoom(const boost::rational<long>& _aZoom) { m_aReportWindow.zoom(_aZoom); Resize(); diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 7c07993dad73..1d82b716cd5e 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -220,7 +220,7 @@ void OSectionWindow::Resize() Window::Resize(); Size aOutputSize = GetOutputSizePixel(); - boost::rational<sal_Int64> aEndWidth(long(REPORT_ENDMARKER_WIDTH)); + boost::rational<long> aEndWidth(long(REPORT_ENDMARKER_WIDTH)); aEndWidth *= GetMapMode().GetScaleX(); const Point aThumbPos = m_pParent->getView()->getThumbPos(); @@ -236,7 +236,7 @@ void OSectionWindow::Resize() { const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aThumbPos.X() + aOutputSize.Width() ); - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); // set start marker @@ -299,7 +299,7 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker ) return 0L; } -void OSectionWindow::zoom(const boost::rational<sal_Int64>& _aZoom) +void OSectionWindow::zoom(const boost::rational<long>& _aZoom) { setZoomFactor(_aZoom,*this); m_aStartMarker.zoom(_aZoom); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 75b30f7e619f..bc7fc19a6efd 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -89,7 +89,7 @@ OStartMarker::~OStartMarker() sal_Int32 OStartMarker::getMinHeight() const { - boost::rational<sal_Int64> aExtraWidth(long(2*REPORT_EXTRA_SPACE)); + boost::rational<long> aExtraWidth(long(2*REPORT_EXTRA_SPACE)); aExtraWidth *= GetMapMode().GetScaleX(); return LogicToPixel(Size(0,m_aText.GetTextHeight())).Height() + boost::rational_cast<long>(aExtraWidth); } @@ -221,7 +221,7 @@ void OStartMarker::Resize() aImageSize.Width() = long(aImageSize.Width() * boost::rational_cast<double>(rMapMode.GetScaleX())); aImageSize.Height() = long(aImageSize.Height() * boost::rational_cast<double>(rMapMode.GetScaleY())); - boost::rational<sal_Int64> aExtraWidth(long(REPORT_EXTRA_SPACE)); + boost::rational<long> aExtraWidth(long(REPORT_EXTRA_SPACE)); aExtraWidth *= rMapMode.GetScaleX(); Point aPos(aImageSize.Width() + boost::rational_cast<long>((aExtraWidth + aExtraWidth)), boost::rational_cast<long>(aExtraWidth)); @@ -281,7 +281,7 @@ void OStartMarker::setCollapsed(bool _bCollapsed) changeImage(); } -void OStartMarker::zoom(const boost::rational<sal_Int64>& _aZoom) +void OStartMarker::zoom(const boost::rational<long>& _aZoom) { setZoomFactor(_aZoom,*this); m_aVRuler.SetZoom(_aZoom); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 8f0dd2a76b4f..8c0e49f4eb86 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -263,7 +263,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) Window::Paint( rRect ); Size aOut = GetOutputSizePixel(); - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); aOut.Width() -= boost::rational_cast<long>(aStartWidth); @@ -1685,11 +1685,11 @@ void OViewsWindow::collapseSections(const uno::Sequence< beans::PropertyValue>& } } -void OViewsWindow::zoom(const boost::rational<sal_Int64>& _aZoom) +void OViewsWindow::zoom(const boost::rational<long>& _aZoom) { const MapMode& aMapMode = GetMapMode(); - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); if ( _aZoom < aMapMode.GetScaleX() ) aStartWidth *= aMapMode.GetScaleX(); else diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index b8274f5e81a0..33b12ae54a00 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -78,7 +78,7 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) OScrollWindowHelper* pScrollWindow = pReportWindow->getScrollWindow(); Size aOut = pReportWindow->GetOutputSizePixel(); - boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_pParent->GetMapMode().GetScaleX(); aOut.Width() -= boost::rational_cast<long>(aStartWidth); |