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 /sw/source/uibase | |
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 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarWin.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/frmdlg/colex.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/pview.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uiitems.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 8 |
11 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 18a2e1b4fe2b..24880c94b6b5 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1904,31 +1904,31 @@ void SwPostItMgr::Rescale() sal_Int32 SwPostItMgr::GetInitialAnchorDistance() const { - const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() ); + const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() ); return POSTIT_INITIAL_ANCHOR_DISTANCE * f.numerator() / f.denominator(); } sal_Int32 SwPostItMgr::GetSpaceBetween() const { - const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() ); + const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() ); return ( POSTIT_SPACE_BETWEEN ) * f.numerator() / f.denominator(); } sal_Int32 SwPostItMgr::GetScrollSize() const { - const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() ); + const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() ); return ( POSTIT_SPACE_BETWEEN + POSTIT_MINIMUMSIZE_WITH_META ) * f.numerator() / f.denominator(); } sal_Int32 SwPostItMgr::GetMinimumSizeWithMeta() const { - const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() ); + const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() ); return POSTIT_MINIMUMSIZE_WITH_META * f.numerator() / f.denominator(); } sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const { - const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() ); + const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() ); return POSTIT_SCROLL_SIDEBAR_HEIGHT * f.numerator() / f.denominator(); } diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index aee3c3b798e9..e97589c76384 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -780,8 +780,8 @@ void SwSidebarWin::DoResize() mpVScrollbar->SetRange( Range(0, mpOutliner->GetTextHeight())); //calculate rects for meta- button - const boost::rational<sal_Int64>& fx( GetMapMode().GetScaleX() ); - const boost::rational<sal_Int64>& fy( GetMapMode().GetScaleY() ); + const boost::rational<long>& fx( GetMapMode().GetScaleX() ); + const boost::rational<long>& fy( GetMapMode().GetScaleY() ); const Point aPos( mpMetadataAuthor->GetPosPixel()); Rectangle aRectMetaButton; @@ -1208,7 +1208,7 @@ sal_Int32 SwSidebarWin::GetScrollbarWidth() sal_Int32 SwSidebarWin::GetMetaButtonAreaWidth() { - const boost::rational<sal_Int64>& f( GetMapMode().GetScaleX() ); + const boost::rational<long>& f( GetMapMode().GetScaleX() ); if (IsPreview()) return 3 * METABUTTON_AREA_WIDTH * f.numerator() / f.denominator(); else @@ -1217,7 +1217,7 @@ sal_Int32 SwSidebarWin::GetMetaButtonAreaWidth() sal_Int32 SwSidebarWin::GetMetaHeight() { - const boost::rational<sal_Int64>& f( GetMapMode().GetScaleY() ); + const boost::rational<long>& f( GetMapMode().GetScaleY() ); return POSTIT_META_HEIGHT * f.numerator() / f.denominator(); } @@ -1228,7 +1228,7 @@ sal_Int32 SwSidebarWin::GetMinimumSizeWithMeta() sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta() { - const boost::rational<sal_Int64>& f( GetMapMode().GetScaleY() ); + const boost::rational<long>& f( GetMapMode().GetScaleY() ); return POSTIT_MINIMUMSIZE_WITHOUT_META * f.numerator() / f.denominator(); } diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index ab3a27ce7eab..ba6af859461a 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -336,7 +336,7 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width()); long nHeight = m_aFrmSize.Height(); - boost::rational<sal_Int64> aScale( m_aWinSize.Height(), nHeight ); + boost::rational<long> aScale( m_aWinSize.Height(), nHeight ); MapMode aMapMode( GetMapMode() ); aMapMode.SetScaleX( aScale ); aMapMode.SetScaleY( aScale ); diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 19f005a5b024..96eb7760ef9d 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -48,7 +48,7 @@ class SwPagePreviewWin : public vcl::Window sal_uInt16 mnSttPage; sal_uInt8 mnRow, mnCol; Size maPxWinSize; - boost::rational<sal_Int64> maScale; + boost::rational<long> maScale; SwPagePreview& mrView; bool mbCalcScaleForPreviewLayout; Rectangle maPaintedPreviewDocRect; diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index b84bc8be9ccb..64040606ccf7 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -492,7 +492,7 @@ public: void InsFrmMode(sal_uInt16 nCols); void SetZoom( SvxZoomType eZoomType, short nFactor = 100, bool bViewOnly = false); - virtual void SetZoomFactor( const boost::rational<sal_Int64> &rX, const boost::rational<sal_Int64> & ) SAL_OVERRIDE; + virtual void SetZoomFactor( const boost::rational<long> &rX, const boost::rational<long> & ) SAL_OVERRIDE; void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly = false ); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 464cab290b85..912be1e4cedf 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1741,7 +1741,7 @@ void SwPagePreviewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor, else if ( _nZoomFactor != 0 ) { // calculate new scaling and set mapping mode appropriately. - boost::rational<sal_Int64> aNewScale( _nZoomFactor, 100 ); + boost::rational<long> aNewScale( _nZoomFactor, 100 ); MapMode aNewMapMode = GetMapMode(); aNewMapMode.SetScaleX( aNewScale ); aNewMapMode.SetScaleY( aNewScale ); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 2ce3d09188a5..7be4f15c7efd 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -892,7 +892,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) StartListening( *pDocSh, true ); // Set Zoom-factor from HRuler - boost::rational<sal_Int64> aZoomFract( aUsrPref.GetZoom(), 100 ); + boost::rational<long> aZoomFract( aUsrPref.GetZoom(), 100 ); m_pHRuler->SetZoom( aZoomFract ); m_pVRuler->SetZoom( aZoomFract ); m_pHRuler->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick )); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index be64b4af30aa..a8043956e0d3 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -192,7 +192,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, m_pWrtShell->ApplyViewOptions( aOpt ); } - const boost::rational<sal_Int64> aFrac( nFac, 100 ); + const boost::rational<long> aFrac( nFac, 100 ); m_pVRuler->SetZoom( aFrac ); m_pVRuler->ForceUpdate(); m_pHRuler->SetZoom( aFrac ); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 9ef2c9b42e1b..1002cdceb769 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -947,8 +947,8 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) aSize.Width() -= (aBorder.Left() + aBorder.Right()); aSize.Height() -= (aBorder.Top() + aBorder.Bottom()); Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MAP_TWIP ); - SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aSize.Width(), aObjSizePixel.Width() ), - boost::rational<sal_Int64>( aSize.Height(), aObjSizePixel.Height() ) ); + SfxViewShell::SetZoomFactor( boost::rational<long>( aSize.Width(), aObjSizePixel.Width() ), + boost::rational<long>( aSize.Height(), aObjSizePixel.Height() ) ); } m_bInInnerResizePixel = true; @@ -985,10 +985,10 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) if( m_pHRuler->IsVisible() || m_pVRuler->IsVisible() ) { - const boost::rational<sal_Int64>& rFrac = GetEditWin().GetMapMode().GetScaleX(); + const boost::rational<long>& rFrac = GetEditWin().GetMapMode().GetScaleX(); long nZoom = rFrac.numerator() * 100L / rFrac.denominator(); - const boost::rational<sal_Int64> aFrac( nZoom, 100 ); + const boost::rational<long> aFrac( nZoom, 100 ); m_pVRuler->SetZoom( aFrac ); m_pHRuler->SetZoom( aFrac ); InvalidateRulerPos(); // Invalidate content. @@ -1134,9 +1134,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) } } -void SwView::SetZoomFactor( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY ) +void SwView::SetZoomFactor( const boost::rational<long>& rX, const boost::rational<long>& rY ) { - const boost::rational<sal_Int64>&rFrac = rX < rY ? rX : rY; + const boost::rational<long>&rFrac = rX < rY ? rX : rY; SetZoom( SVX_ZOOM_PERCENT, (short) boost::rational_cast<long>(rFrac * 100) ); // To minimize rounding errors we also adjust the odd values diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 03bf1d62d996..a15c23091ceb 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -88,7 +88,7 @@ bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const case MID_LINE_COLOR : rVal <<= (sal_Int32)aFtnInfo.GetLineColor().GetColor();break; case MID_LINE_RELWIDTH : { - boost::rational<sal_Int64> aTmp( 100, 1 ); + boost::rational<long> aTmp( 100, 1 ); aTmp *= aFtnInfo.GetWidth(); rVal <<= (sal_Int8)boost::rational_cast<long>(aTmp); } @@ -158,7 +158,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) if(nSet < 0) bRet = false; else - aFtnInfo.SetWidth(boost::rational<sal_Int64>(nSet, 100)); + aFtnInfo.SetWidth(boost::rational<long>(nSet, 100)); } break; case MID_LINE_ADJUST : diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 472f8aa9e85f..9e8dfff229eb 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -743,8 +743,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, Size _aVisArea( aSize.Width, aSize.Height ); - boost::rational<sal_Int64> aScaleWidth( 1, 1 ); - boost::rational<sal_Int64> aScaleHeight( 1, 1 ); + boost::rational<long> aScaleWidth( 1, 1 ); + boost::rational<long> aScaleHeight( 1, 1 ); bool bUseObjectSize = false; @@ -777,8 +777,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, } else { - aScaleWidth = boost::rational<sal_Int64>( aObjArea.Width(), _aVisArea.Width() ); - aScaleHeight = boost::rational<sal_Int64>( aObjArea.Height(), _aVisArea.Height()); + aScaleWidth = boost::rational<long>( aObjArea.Width(), _aVisArea.Width() ); + aScaleHeight = boost::rational<long>( aObjArea.Height(), _aVisArea.Height()); } } } |