summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-23 17:22:06 +0200
committerJan Holesovsky <kendy@collabora.com>2014-10-23 18:34:34 +0200
commit858c2a2977d5e4671959724ecd2a453837dadddf (patch)
treea61e303e6e27cef015c50b38b23fc574ce64fcef /sw/source/uibase/uiview
parentff502f409fd73249a6a94c579d19905144aa5ba8 (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/uiview')
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/view.cxx2
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx2
-rw-r--r--sw/source/uibase/uiview/viewport.cxx12
4 files changed, 9 insertions, 9 deletions
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