summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-16 15:30:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-16 17:44:44 +0200
commit582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch)
tree80c42b34da7e7ee05843b572f7311b3c230de9dd /sw/source/core
parentada4862afc3227b04c12960ded761db24f61257e (diff)
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accmap.cxx10
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx4
-rw-r--r--sw/source/core/graphic/ndgrf.cxx8
-rw-r--r--sw/source/core/inc/dflyobj.hxx8
-rw-r--r--sw/source/core/inc/viewimp.hxx2
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/fly.cxx8
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx12
-rw-r--r--sw/source/core/view/viewimp.cxx6
-rw-r--r--sw/source/core/view/viewpg.cxx8
-rw-r--r--sw/source/core/view/viewsh.cxx10
-rw-r--r--sw/source/core/view/vnew.cxx2
17 files changed, 51 insertions, 51 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 63661e303225..5981a7a85d4d 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -602,7 +602,7 @@ class SwAccPreviewData
Rectangles maLogicRects;
SwRect maVisArea;
- boost::rational<long> maScale;
+ boost::rational<sal_Int64> maScale;
const SwPageFrm *mpSelPage;
@@ -630,7 +630,7 @@ public:
void Update( const SwAccessibleMap& rAccMap,
const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize );
@@ -661,7 +661,7 @@ SwAccPreviewData::~SwAccPreviewData()
void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap,
const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize )
{
@@ -1801,7 +1801,7 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( )
uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize )
{
@@ -2964,7 +2964,7 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm,
}
void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize )
{
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index f7987da558e6..7711f1a0ba7f 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -3986,9 +3986,9 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
else
{
// Calculate as exactly as possible
- boost::rational<long> aTmp( nMyOldH );
- aTmp *= boost::rational<long>( nNewHeight, nOldHeight );
- aTmp += boost::rational<long>( 1, 2 ); // round up if needed
+ boost::rational<sal_Int64> aTmp( nMyOldH );
+ aTmp *= boost::rational<sal_Int64>( nNewHeight, nOldHeight );
+ aTmp += boost::rational<sal_Int64>( 1, 2 ); // round up if needed
nMyNewH = boost::rational_cast<long>(aTmp);
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index b9f1318f648e..1b9f5c169480 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2372,7 +2372,7 @@ void SwDrawVirtObj::NbcMove(const Size& rSiz)
SdrObject::NbcMove( rSiz );
}
-void SwDrawVirtObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact)
+void SwDrawVirtObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact)
{
rRefObj.NbcResize(rRef - GetOffset(), xFact, yFact);
SetRectsDirty();
@@ -2401,7 +2401,7 @@ void SwDrawVirtObj::Move(const Size& rSiz)
SdrObject::Move( rSiz );
}
-void SwDrawVirtObj::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative)
+void SwDrawVirtObj::Resize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bUnsetRelative)
{
if(xFact.numerator() != xFact.denominator() || yFact.numerator() != yFact.denominator())
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index ad56718a900c..8270911b6032 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -731,7 +731,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
- const boost::rational<long>& xFact, const boost::rational<long>& yFact)
+ const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact)
{
ResizeRect( aOutRect, rRef, xFact, yFact );
@@ -843,7 +843,7 @@ void SwVirtFlyDrawObj::Move(const Size& rSiz)
}
void SwVirtFlyDrawObj::Resize(const Point& rRef,
- const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool /*bUnsetRelative*/)
+ const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool /*bUnsetRelative*/)
{
NbcResize( rRef, xFact, yFact );
SetChanged();
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 0cbcb5e97636..b8db87a08419 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1389,8 +1389,8 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
Rectangle aNewRect( pNewObj->GetCurrentBoundRect() );
Size aNewSize( aNewRect.GetSize() );
- boost::rational<long> aScaleWidth( aOldObjSize.Width(), aNewSize.Width() );
- boost::rational<long> aScaleHeight( aOldObjSize.Height(), aNewSize.Height());
+ boost::rational<sal_Int64> aScaleWidth( aOldObjSize.Width(), aNewSize.Width() );
+ boost::rational<sal_Int64> aScaleHeight( aOldObjSize.Height(), aNewSize.Height());
pNewObj->NbcResize( aNewRect.TopLeft(), aScaleWidth, aScaleHeight);
Point aVec = aOldObjRect.TopLeft() - aNewRect.TopLeft();
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index d4cc181943f6..06abfea069a5 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -812,8 +812,8 @@ void SwGrfNode::ScaleImageMap()
return;
bool bScale = false;
- boost::rational<long> aScaleX( 1, 1 );
- boost::rational<long> aScaleY( 1, 1 );
+ boost::rational<sal_Int64> aScaleX( 1, 1 );
+ boost::rational<sal_Int64> aScaleY( 1, 1 );
const SwFmtFrmSize& rFrmSize = pFmt->GetFrmSize();
const SvxBoxItem& rBox = pFmt->GetBox();
@@ -829,7 +829,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Width() != nWidth )
{
- aScaleX = boost::rational<long>( nGrfSize.Width(), nWidth );
+ aScaleX = boost::rational<sal_Int64>( nGrfSize.Width(), nWidth );
bScale = true;
}
}
@@ -844,7 +844,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Height() != nHeight )
{
- aScaleY = boost::rational<long>( nGrfSize.Height(), nHeight );
+ aScaleY = boost::rational<sal_Int64>( nGrfSize.Height(), nHeight );
bScale = true;
}
}
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index 79e9f37471d7..81c8b02d42aa 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -99,11 +99,11 @@ public:
virtual void NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE;
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const SAL_OVERRIDE;
virtual void NbcMove (const Size& rSiz) SAL_OVERRIDE;
- virtual void NbcResize(const Point& rRef, const boost::rational<long>& xFact,
- const boost::rational<long>& yFact) SAL_OVERRIDE;
+ virtual void NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact,
+ const boost::rational<sal_Int64>& yFact) SAL_OVERRIDE;
virtual void Move (const Size& rSiz) SAL_OVERRIDE;
- virtual void Resize(const Point& rRef, const boost::rational<long>& xFact,
- const boost::rational<long>& yFact, bool bUnsetRelative = true) SAL_OVERRIDE;
+ virtual void Resize(const Point& rRef, const boost::rational<sal_Int64>& xFact,
+ const boost::rational<sal_Int64>& yFact, bool bUnsetRelative = true) SAL_OVERRIDE;
const SwFrmFmt *GetFmt() const;
SwFrmFmt *GetFmt();
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index a1969879ff91..cda0e2b708f3 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -262,7 +262,7 @@ public:
/// update data for accessible preview
/// change method signature due to new page preview functionality
void UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize );
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 58fa20cac362..129f75ea4b95 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -661,8 +661,8 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrm()->GetFmt()->GetDoc());
bool bModified = pDoc->getIDocumentState().IsModified();
const_cast< SdrObject* >( GetDrawObj() )->Resize( aCurrObjRect.TopLeft(),
- boost::rational<long>( nTargetWidth, aCurrObjRect.GetWidth() ),
- boost::rational<long>( nTargetHeight, aCurrObjRect.GetHeight() ), false );
+ boost::rational<sal_Int64>( nTargetWidth, aCurrObjRect.GetWidth() ),
+ boost::rational<sal_Int64>( nTargetHeight, aCurrObjRect.GetHeight() ), false );
if (!bModified)
pDoc->getIDocumentState().ResetModified();
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index d0b8975ebda4..376a29e1d459 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -875,8 +875,8 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( rOld.GetWidth() && rOld.GetHeight() )
{
- boost::rational<long> aScaleX( rOld.GetWidth(), rNew.GetWidth() );
- boost::rational<long> aScaleY( rOld.GetHeight(), rOld.GetHeight() );
+ boost::rational<sal_Int64> aScaleX( rOld.GetWidth(), rNew.GetWidth() );
+ boost::rational<sal_Int64> aScaleY( rOld.GetHeight(), rOld.GetHeight() );
aURL.GetMap()->Scale( aScaleX, aScaleY );
SwFrmFmt *pFmt = GetFmt();
pFmt->LockModify();
@@ -1002,8 +1002,8 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
rSz.GetWidth() != Frm().Width() )
{
SwFmtURL aURL( GetFmt()->GetURL() );
- boost::rational<long> aScaleX( Frm().Width(), rSz.GetWidth() );
- boost::rational<long> aScaleY( Frm().Height(), rSz.GetHeight() );
+ boost::rational<sal_Int64> aScaleX( Frm().Width(), rSz.GetWidth() );
+ boost::rational<sal_Int64> aScaleY( Frm().Height(), rSz.GetHeight() );
aURL.GetMap()->Scale( aScaleX, aScaleY );
SwFrmFmt *pFmt = GetFmt();
pFmt->LockModify();
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index bbb2cda42a65..d52b4da5d297 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2960,8 +2960,8 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
SwViewShell* pViewShell = mrTabFrm.getRootFrm()->GetCurrShell();
OutputDevice* pOutDev = pViewShell->GetOut();
const MapMode& rMapMode = pOutDev->GetMapMode();
- const boost::rational<long>& rFracX = rMapMode.GetScaleX();
- const boost::rational<long>& rFracY = rMapMode.GetScaleY();
+ const boost::rational<sal_Int64>& rFracX = rMapMode.GetScaleX();
+ const boost::rational<sal_Int64>& rFracY = rMapMode.GetScaleY();
svx::frame::Style aL(rBoxItem.GetLeft());
aL.SetPatternScale(boost::rational_cast<double>(rFracY));
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index c7216d1e190c..02c2aab3bd96 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1131,7 +1131,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( bDirectPrint )
{
- const boost::rational<long> aTmp( 1, 1 );
+ const boost::rational<sal_Int64> aTmp( 1, 1 );
bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
&& ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() );
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 4f2307c6e4c7..c95c07dc815f 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -215,17 +215,17 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
// calculate scaling
MapMode aMapMode( MAP_TWIP );
Size aWinSize = mrParentViewShell.GetOut()->PixelToLogic( _rPxWinSize, aMapMode );
- boost::rational<long> aXScale( aWinSize.Width(), mnPreviewLayoutWidth );
- boost::rational<long> aYScale( aWinSize.Height(), mnPreviewLayoutHeight );
+ boost::rational<sal_Int64> aXScale( aWinSize.Width(), mnPreviewLayoutWidth );
+ boost::rational<sal_Int64> aYScale( aWinSize.Height(), mnPreviewLayoutHeight );
if( aXScale < aYScale )
aYScale = aXScale;
{
// adjust scaling for Drawing layer.
- aYScale *= boost::rational<long>( 1000, 1 );
+ aYScale *= boost::rational<sal_Int64>( 1000, 1 );
long nNewNuminator = boost::rational_cast<long>(aYScale);
if( nNewNuminator < 1 )
nNewNuminator = 1;
- aYScale = boost::rational<long>( nNewNuminator, 1000 );
+ aYScale = boost::rational<sal_Int64>( nNewNuminator, 1000 );
// propagate scaling as zoom percentage to view options for font cache
_ApplyNewZoomAtViewShell( static_cast<sal_uInt8>(nNewNuminator/10) );
}
@@ -740,8 +740,8 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
OD 12.12.2002 #103492#
*/
Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
- const boost::rational<long>& _aNewScale,
- const boost::rational<long>& _aOldScale,
+ const boost::rational<sal_Int64>& _aNewScale,
+ const boost::rational<sal_Int64>& _aOldScale,
const Size& _aNewWinSize ) const
{
Point aNewPaintStartPos = maPaintedPreviewDocRect.TopLeft();
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 68725dbbda18..d6db50690f5a 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -70,8 +70,8 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
( rSz.Width() ? rSz.Width() /std::max(short(1),pNewOpt->GetDivisionX()):0,
rSz.Height()? rSz.Height()/std::max(short(1),pNewOpt->GetDivisionY()):0);
pDrawView->SetGridFine( aFSize );
- boost::rational<long> aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1);
- boost::rational<long> aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1);
+ boost::rational<sal_Int64> aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1);
+ boost::rational<sal_Int64> aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1);
pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
if ( pRoot->Frm().HasArea() )
@@ -432,7 +432,7 @@ void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
// OD 15.01.2003 #103492# - method signature change due to new page preview functionality
void SwViewImp::UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages,
- const boost::rational<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize )
{
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 2e086c4ede71..f470259c9222 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -175,20 +175,20 @@ void SwViewShell::PrintProspect(
// set the MapMode
aMapMode.SetOrigin( Point() );
{
- boost::rational<long> aScX( aPrtSize.Width(), nMaxColSz );
- boost::rational<long> aScY( aPrtSize.Height(), nMaxRowSz );
+ boost::rational<sal_Int64> aScX( aPrtSize.Width(), nMaxColSz );
+ boost::rational<sal_Int64> aScY( aPrtSize.Height(), nMaxRowSz );
if( aScX < aScY )
aScY = aScX;
{
// Round percentages for Drawings so that these can paint their objects properly
- aScY *= boost::rational<long>( 1000, 1 );
+ aScY *= boost::rational<sal_Int64>( 1000, 1 );
long nTmp = boost::rational_cast<long>(aScY);
if( 1 < nTmp )
--nTmp;
else
nTmp = 1;
- aScY = boost::rational<long>( nTmp, 1000 );
+ aScY = boost::rational<sal_Int64>( nTmp, 1000 );
}
aMapMode.SetScaleY( aScY );
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 561bcd9027c9..dbf48668440d 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1775,8 +1775,8 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// Scaling. Must convert from pixels to twips. We know
// that VirtualDevises use a DPI of 96.
- boost::rational<long> scaleX = boost::rational<long>(contextWidth, 96) * boost::rational<long>(1440L) / boost::rational<long>(tileWidth);
- boost::rational<long> scaleY = boost::rational<long>(contextHeight, 96) * boost::rational<long>(1440L) / boost::rational<long>(tileHeight);
+ boost::rational<sal_Int64> scaleX = boost::rational<sal_Int64>(contextWidth, 96) * boost::rational<sal_Int64>(1440L) / boost::rational<sal_Int64>(tileWidth);
+ boost::rational<sal_Int64> scaleY = boost::rational<sal_Int64>(contextHeight, 96) * boost::rational<sal_Int64>(1440L) / boost::rational<sal_Int64>(tileHeight);
aMapMode.SetScaleX(scaleX);
aMapMode.SetScaleY(scaleY);
rDevice.SetMapMode(aMapMode);
@@ -2131,7 +2131,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( mpOpt->GetZoom() != rOpt.GetZoom() && !IsPreview() )
{
MapMode aMode( pMyWin->GetMapMode() );
- boost::rational<long> aNewFactor( rOpt.GetZoom(), 100 );
+ boost::rational<sal_Int64> aNewFactor( rOpt.GetZoom(), 100 );
aMode.SetScaleX( aNewFactor );
aMode.SetScaleY( aNewFactor );
pMyWin->SetMapMode( aMode );
@@ -2172,8 +2172,8 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
( rSz.Width() ? rSz.Width() / (rOpt.GetDivisionX()+1) : 0,
rSz.Height()? rSz.Height()/ (rOpt.GetDivisionY()+1) : 0);
pDView->SetGridFine( aFSize );
- boost::rational<long> aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1);
- boost::rational<long> aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1);
+ boost::rational<sal_Int64> aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1);
+ boost::rational<sal_Int64> aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1);
pDView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
// set handle size to 9 pixels, always
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 4b38f181d0b8..0f1277336cea 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -65,7 +65,7 @@ void SwViewShell::Init( const SwViewOption *pNewOpt )
if( GetWin() && 100 != mpOpt->GetZoom() )
{
MapMode aMode( mpWin->GetMapMode() );
- const boost::rational<long> aNewFactor( mpOpt->GetZoom(), 100 );
+ const boost::rational<sal_Int64> aNewFactor( mpOpt->GetZoom(), 100 );
aMode.SetScaleX( aNewFactor );
aMode.SetScaleY( aNewFactor );
mpWin->SetMapMode( aMode );