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 | |
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')
39 files changed, 114 insertions, 114 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 5dfd09bc10bb..e1a216d7ae3f 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -140,7 +140,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> GetDocumentPreview( const std::vector<PreviewPage*>& _rPreviewPages, - const boost::rational<sal_Int64>& _rScale, + const boost::rational<long>& _rScale, const SwPageFrm* _pSelectedPageFrm, const Size& _rPreviewWinSize ); @@ -249,7 +249,7 @@ public: // update preview data (and fire events if necessary) void UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages, - const boost::rational<sal_Int64>& _rScale, + const boost::rational<long>& _rScale, const SwPageFrm* _pSelectedPageFrm, const Size& _rPreviewWinSize ); diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 54783784534e..270f95ab18c2 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -279,12 +279,12 @@ class SwDrawVirtObj : public SdrVirtObj virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const SAL_OVERRIDE; virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const; virtual void NbcMove(const Size& rSiz) SAL_OVERRIDE; - virtual void NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) SAL_OVERRIDE; + virtual void NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) SAL_OVERRIDE; virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs) SAL_OVERRIDE; virtual void NbcMirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE; virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) SAL_OVERRIDE; virtual void Move(const Size& rSiz) 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; + virtual void Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative = true) SAL_OVERRIDE; virtual void Rotate(const Point& rRef, long nWink, double sn, double cs) SAL_OVERRIDE; virtual void Mirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE; virtual void Shear(const Point& rRef, long nWink, double tn, bool bVShear) SAL_OVERRIDE; diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 29c6df60bda5..a9a4fc79c6f3 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -46,7 +46,7 @@ class SW_DLLPUBLIC SwPageFtnInfo sal_uLong nLineWidth; ///< width of separator line editeng::SvxBorderStyle eLineStyle; ///< Style of the separator line Color aLineColor; ///< color of the separator line - boost::rational<sal_Int64> aWidth; ///< percentage width of the separator line. + boost::rational<long> aWidth; ///< percentage width of the separator line. SwFtnAdj eAdj; ///< line adjustment. SwTwips nTopDist; ///< distance between body and separator. SwTwips nBottomDist; ///< distance between separator and first footnote @@ -56,7 +56,7 @@ public: sal_uLong GetLineWidth() const { return nLineWidth; } const Color& GetLineColor() const { return aLineColor;} editeng::SvxBorderStyle GetLineStyle() const { return eLineStyle; } - const boost::rational<sal_Int64>& GetWidth() const { return aWidth; } + const boost::rational<long>& GetWidth() const { return aWidth; } SwFtnAdj GetAdj() const { return eAdj; } SwTwips GetTopDist()const { return nTopDist; } SwTwips GetBottomDist() const { return nBottomDist; } @@ -65,7 +65,7 @@ public: void SetLineWidth(sal_uLong nSet ) { nLineWidth = nSet; } void SetLineStyle( editeng::SvxBorderStyle eSet ) { eLineStyle = eSet; } void SetLineColor(const Color& rCol ) { aLineColor = rCol;} - void SetWidth( const boost::rational<sal_Int64> &rNew){ aWidth = rNew; } + void SetWidth( const boost::rational<long> &rNew){ aWidth = rNew; } void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; } void SetTopDist ( SwTwips nNew ) { nTopDist = nNew; } void SetBottomDist( SwTwips nNew ) { nBottomDist = nNew; } diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index a3a3b3db0a85..60a55430de1d 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -396,8 +396,8 @@ public: @return Point, start position for new scale */ - Point GetPreviewStartPosForNewScale( const boost::rational<sal_Int64>& _aNewScale, - const boost::rational<sal_Int64>& _aOldScale, + Point GetPreviewStartPosForNewScale( const boost::rational<long>& _aNewScale, + const boost::rational<long>& _aOldScale, const Size& _aNewWinSize ) const; /** determines, if page with given page number is visible in preview diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 5981a7a85d4d..63661e303225 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<sal_Int64> maScale; + boost::rational<long> maScale; const SwPageFrm *mpSelPage; @@ -630,7 +630,7 @@ public: void Update( const SwAccessibleMap& rAccMap, const std::vector<PreviewPage*>& _rPreviewPages, - const boost::rational<sal_Int64>& _rScale, + const boost::rational<long>& _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<sal_Int64>& _rScale, + const boost::rational<long>& _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<sal_Int64>& _rScale, + const boost::rational<long>& _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<sal_Int64>& _rScale, + const boost::rational<long>& _rScale, const SwPageFrm* _pSelectedPageFrm, const Size& _rPreviewWinSize ) { diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 7711f1a0ba7f..f7987da558e6 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<sal_Int64> aTmp( nMyOldH ); - aTmp *= boost::rational<sal_Int64>( nNewHeight, nOldHeight ); - aTmp += boost::rational<sal_Int64>( 1, 2 ); // round up if needed + boost::rational<long> aTmp( nMyOldH ); + aTmp *= boost::rational<long>( nNewHeight, nOldHeight ); + aTmp += boost::rational<long>( 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 1b9f5c169480..b9f1318f648e 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<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) +void SwDrawVirtObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& 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<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bUnsetRelative) +void SwDrawVirtObj::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& 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 8270911b6032..ad56718a900c 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<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) + const boost::rational<long>& xFact, const boost::rational<long>& 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<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool /*bUnsetRelative*/) + const boost::rational<long>& xFact, const boost::rational<long>& 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 b8db87a08419..0cbcb5e97636 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<sal_Int64> aScaleWidth( aOldObjSize.Width(), aNewSize.Width() ); - boost::rational<sal_Int64> aScaleHeight( aOldObjSize.Height(), aNewSize.Height()); + boost::rational<long> aScaleWidth( aOldObjSize.Width(), aNewSize.Width() ); + boost::rational<long> 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 06abfea069a5..d4cc181943f6 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<sal_Int64> aScaleX( 1, 1 ); - boost::rational<sal_Int64> aScaleY( 1, 1 ); + boost::rational<long> aScaleX( 1, 1 ); + boost::rational<long> 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<sal_Int64>( nGrfSize.Width(), nWidth ); + aScaleX = boost::rational<long>( nGrfSize.Width(), nWidth ); bScale = true; } } @@ -844,7 +844,7 @@ void SwGrfNode::ScaleImageMap() if( nGrfSize.Height() != nHeight ) { - aScaleY = boost::rational<sal_Int64>( nGrfSize.Height(), nHeight ); + aScaleY = boost::rational<long>( nGrfSize.Height(), nHeight ); bScale = true; } } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 81c8b02d42aa..79e9f37471d7 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<sal_Int64>& xFact, - const boost::rational<sal_Int64>& yFact) SAL_OVERRIDE; + virtual void NbcResize(const Point& rRef, const boost::rational<long>& xFact, + const boost::rational<long>& yFact) SAL_OVERRIDE; virtual void Move (const Size& rSiz) 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; + virtual void Resize(const Point& rRef, const boost::rational<long>& xFact, + const boost::rational<long>& 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 cda0e2b708f3..a1969879ff91 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<sal_Int64>& _rScale, + const boost::rational<long>& _rScale, const SwPageFrm* _pSelectedPageFrm, const Size& _rPreviewWinSize ); diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 129f75ea4b95..58fa20cac362 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<sal_Int64>( nTargetWidth, aCurrObjRect.GetWidth() ), - boost::rational<sal_Int64>( nTargetHeight, aCurrObjRect.GetHeight() ), false ); + boost::rational<long>( nTargetWidth, aCurrObjRect.GetWidth() ), + boost::rational<long>( 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 376a29e1d459..d0b8975ebda4 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<sal_Int64> aScaleX( rOld.GetWidth(), rNew.GetWidth() ); - boost::rational<sal_Int64> aScaleY( rOld.GetHeight(), rOld.GetHeight() ); + boost::rational<long> aScaleX( rOld.GetWidth(), rNew.GetWidth() ); + boost::rational<long> 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<sal_Int64> aScaleX( Frm().Width(), rSz.GetWidth() ); - boost::rational<sal_Int64> aScaleY( Frm().Height(), rSz.GetHeight() ); + boost::rational<long> aScaleX( Frm().Width(), rSz.GetWidth() ); + boost::rational<long> 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 d52b4da5d297..bbb2cda42a65 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<sal_Int64>& rFracX = rMapMode.GetScaleX(); - const boost::rational<sal_Int64>& rFracY = rMapMode.GetScaleY(); + const boost::rational<long>& rFracX = rMapMode.GetScaleX(); + const boost::rational<long>& 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 02c2aab3bd96..c7216d1e190c 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<sal_Int64> aTmp( 1, 1 ); + const boost::rational<long> 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 c95c07dc815f..4f2307c6e4c7 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<sal_Int64> aXScale( aWinSize.Width(), mnPreviewLayoutWidth ); - boost::rational<sal_Int64> aYScale( aWinSize.Height(), mnPreviewLayoutHeight ); + boost::rational<long> aXScale( aWinSize.Width(), mnPreviewLayoutWidth ); + boost::rational<long> aYScale( aWinSize.Height(), mnPreviewLayoutHeight ); if( aXScale < aYScale ) aYScale = aXScale; { // adjust scaling for Drawing layer. - aYScale *= boost::rational<sal_Int64>( 1000, 1 ); + aYScale *= boost::rational<long>( 1000, 1 ); long nNewNuminator = boost::rational_cast<long>(aYScale); if( nNewNuminator < 1 ) nNewNuminator = 1; - aYScale = boost::rational<sal_Int64>( nNewNuminator, 1000 ); + aYScale = boost::rational<long>( 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<sal_Int64>& _aNewScale, - const boost::rational<sal_Int64>& _aOldScale, + const boost::rational<long>& _aNewScale, + const boost::rational<long>& _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 d6db50690f5a..68725dbbda18 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<sal_Int64> aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1); - boost::rational<sal_Int64> aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1); + boost::rational<long> aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1); + boost::rational<long> 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<sal_Int64>& _rScale, + const boost::rational<long>& _rScale, const SwPageFrm* _pSelectedPageFrm, const Size& _rPreviewWinSize ) { diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index f470259c9222..2e086c4ede71 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<sal_Int64> aScX( aPrtSize.Width(), nMaxColSz ); - boost::rational<sal_Int64> aScY( aPrtSize.Height(), nMaxRowSz ); + boost::rational<long> aScX( aPrtSize.Width(), nMaxColSz ); + boost::rational<long> aScY( aPrtSize.Height(), nMaxRowSz ); if( aScX < aScY ) aScY = aScX; { // Round percentages for Drawings so that these can paint their objects properly - aScY *= boost::rational<sal_Int64>( 1000, 1 ); + aScY *= boost::rational<long>( 1000, 1 ); long nTmp = boost::rational_cast<long>(aScY); if( 1 < nTmp ) --nTmp; else nTmp = 1; - aScY = boost::rational<sal_Int64>( nTmp, 1000 ); + aScY = boost::rational<long>( nTmp, 1000 ); } aMapMode.SetScaleY( aScY ); diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index dbf48668440d..561bcd9027c9 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<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); + 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); 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<sal_Int64> aNewFactor( rOpt.GetZoom(), 100 ); + boost::rational<long> 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<sal_Int64> aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1); - boost::rational<sal_Int64> aSnGrWdtY(rSz.Height(), rOpt.GetDivisionY() + 1); + boost::rational<long> aSnGrWdtX(rSz.Width(), rOpt.GetDivisionX() + 1); + boost::rational<long> 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 0f1277336cea..4b38f181d0b8 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<sal_Int64> aNewFactor( mpOpt->GetZoom(), 100 ); + const boost::rational<long> aNewFactor( mpOpt->GetZoom(), 100 ); aMode.SetScaleX( aNewFactor ); aMode.SetScaleY( aNewFactor ); mpWin->SetMapMode( aMode ); diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 3f2a7ec7facb..17e207eed8b5 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1120,8 +1120,8 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con } while (bFound); bool bScale = false; - boost::rational<sal_Int64> aScaleX(1, 1); - boost::rational<sal_Int64> aScaleY(1, 1); + boost::rational<long> aScaleX(1, 1); + boost::rational<long> aScaleY(1, 1); const SwFmtFrmSize& rFrmSize = rFrmFmt.GetFrmSize(); const SvxBoxItem& rBox = rFrmFmt.GetBox(); @@ -1137,7 +1137,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con if (rRealSize.Width() != nWidth) { - aScaleX = boost::rational<sal_Int64>(nWidth, rRealSize.Width()); + aScaleX = boost::rational<long>(nWidth, rRealSize.Width()); bScale = true; } } @@ -1154,7 +1154,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con if (rRealSize.Height() != nHeight) { - aScaleY = boost::rational<sal_Int64>(nHeight, rRealSize.Height()); + aScaleY = boost::rational<long>(nHeight, rRealSize.Height()); bScale = true; } } diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 9de933c11aa6..3285e1379636 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -344,7 +344,7 @@ sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con { long nWidth = GetRawWidth( nCol, nColSpan ); - return (sal_uInt16) boost::rational_cast<long>(boost::rational<sal_Int64>(nWidth * 256 + GetBaseWidth() / 2, GetBaseWidth())); + return (sal_uInt16) boost::rational_cast<long>(boost::rational<long>(nWidth * 256 + GetBaseWidth() / 2, GetBaseWidth())); } sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const @@ -353,7 +353,7 @@ sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con // Looks funny, but is nothing more than // [(100 * nWidth) + .5] without rounding errors - return (sal_uInt16) boost::rational_cast<long>(boost::rational<sal_Int64>(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth())); + return (sal_uInt16) boost::rational_cast<long>(boost::rational<long>(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth())); } long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow, diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 18e4e5856822..aa0362d2191a 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -666,8 +666,8 @@ namespace sw { Polygon aPoly(PolygonFromPolyPolygon(rPolyPoly)); const Size &rOrigSize = pNd->GetGraphic().GetPrefSize(); - boost::rational<sal_Int64> aMapPolyX(ww::nWrap100Percent, rOrigSize.Width()); - boost::rational<sal_Int64> aMapPolyY(ww::nWrap100Percent, rOrigSize.Height()); + boost::rational<long> aMapPolyX(ww::nWrap100Percent, rOrigSize.Width()); + boost::rational<long> aMapPolyY(ww::nWrap100Percent, rOrigSize.Height()); aPoly.Scale(boost::rational_cast<double>(aMapPolyX), boost::rational_cast<double>(aMapPolyY)); /* @@ -678,13 +678,13 @@ namespace sw See the import for details */ const Size &rSize = pNd->GetTwipSize(); - boost::rational<sal_Int64> aMoveHack(ww::nWrap100Percent, rSize.Width()); - aMoveHack *= boost::rational<sal_Int64>(15, 1); + boost::rational<long> aMoveHack(ww::nWrap100Percent, rSize.Width()); + aMoveHack *= boost::rational<long>(15, 1); long nMove(boost::rational_cast<long>(aMoveHack)); - boost::rational<sal_Int64> aHackX(ww::nWrap100Percent + nMove, + boost::rational<long> aHackX(ww::nWrap100Percent + nMove, ww::nWrap100Percent); - boost::rational<sal_Int64> aHackY(ww::nWrap100Percent - nMove, + boost::rational<long> aHackY(ww::nWrap100Percent - nMove, ww::nWrap100Percent); aPoly.Scale(boost::rational_cast<double>(aHackX), boost::rational_cast<double>(aHackY)); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 893b1affb023..a259e9130d57 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2155,10 +2155,10 @@ void SwBasicEscherEx::Init() // MS-DFF-Properties sind grossteils in EMU (English Metric Units) angegeben // 1mm=36000emu, 1twip=635emu - boost::rational<sal_Int64> aFact(360, 1); + boost::rational<long> aFact(360, 1); aFact /= GetMapFactor(MAP_100TH_MM, eMap).X(); // create little values - aFact = boost::rational<sal_Int64>(aFact.numerator(), aFact.denominator()); + aFact = boost::rational<long>(aFact.numerator(), aFact.denominator()); mnEmuMul = aFact.numerator(); mnEmuDiv = aFact.denominator(); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 87bbd002d40e..02abc6c6f2d1 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1951,19 +1951,19 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, b) stretch bottom bound to where I think it should have been in the first place */ - boost::rational<sal_Int64> aMoveHack(ww::nWrap100Percent, rSize.Width()); - aMoveHack *= boost::rational<sal_Int64>(15, 1); + boost::rational<long> aMoveHack(ww::nWrap100Percent, rSize.Width()); + aMoveHack *= boost::rational<long>(15, 1); long nMove(boost::rational_cast<long>(aMoveHack)); aPoly.Move(nMove, 0); - boost::rational<sal_Int64> aHackX(ww::nWrap100Percent, ww::nWrap100Percent + nMove); - boost::rational<sal_Int64> aHackY(ww::nWrap100Percent, ww::nWrap100Percent - nMove); + boost::rational<long> aHackX(ww::nWrap100Percent, ww::nWrap100Percent + nMove); + boost::rational<long> aHackY(ww::nWrap100Percent, ww::nWrap100Percent - nMove); aPoly.Scale(boost::rational_cast<double>(aHackX), boost::rational_cast<double>(aHackY)); // Turn polygon back into units that match the graphic's const Size &rOrigSize = pNd->GetGraphic().GetPrefSize(); - boost::rational<sal_Int64> aMapPolyX(rOrigSize.Width(), ww::nWrap100Percent); - boost::rational<sal_Int64> aMapPolyY(rOrigSize.Height(), ww::nWrap100Percent); + boost::rational<long> aMapPolyX(rOrigSize.Width(), ww::nWrap100Percent); + boost::rational<long> aMapPolyY(rOrigSize.Height(), ww::nWrap100Percent); aPoly.Scale(boost::rational_cast<double>(aMapPolyX), boost::rational_cast<double>(aMapPolyY)); // #i47277# - contour is already in unit of the diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 7c589dc6a324..b7dcac3b7831 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -170,8 +170,8 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp, // neue Groesse am MetaFile setzen Size aOldSiz( rWMF.GetPrefSize() ); Size aNewSiz( pMfp->xExt, pMfp->yExt ); - boost::rational<sal_Int64> aFracX( aNewSiz.Width(), aOldSiz.Width() ); - boost::rational<sal_Int64> aFracY( aNewSiz.Height(), aOldSiz.Height() ); + boost::rational<long> aFracX( aNewSiz.Width(), aOldSiz.Width() ); + boost::rational<long> aFracY( aNewSiz.Height(), aOldSiz.Height() ); rWMF.Scale( aFracX, aFracY ); rWMF.SetPrefSize( aNewSiz ); @@ -326,8 +326,8 @@ bool SwWW8ImplReader::ImportOleWMF(SvStorageRef xSrc1,GDIMetaFile &rWMF, aFinalSize = OutputDevice::LogicToLogic( aFinalSize, MAP_TWIP, rWMF.GetPrefMapMode() ); aOrigSize = rWMF.GetPrefSize(); - boost::rational<sal_Int64> aScaleX(aFinalSize.Width(),aOrigSize.Width()); - boost::rational<sal_Int64> aScaleY(aFinalSize.Height(),aOrigSize.Height()); + boost::rational<long> aScaleX(aFinalSize.Width(),aOrigSize.Width()); + boost::rational<long> aScaleY(aFinalSize.Height(),aOrigSize.Height()); rWMF.Scale( aScaleX, aScaleY ); bOk = true; } diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index a3ec6003a2bf..0c5d52970705 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -243,7 +243,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) m_pLinePosBox->SelectEntryPos( static_cast< sal_Int32 >(pFtnInfo->GetAdj()) ); // width - boost::rational<sal_Int64> aTmp( 100, 1 ); + boost::rational<long> aTmp( 100, 1 ); aTmp *= pFtnInfo->GetWidth(); m_pLineLengthEdit->SetValue( boost::rational_cast<long>(aTmp) ); @@ -292,7 +292,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) rFtnInfo.SetAdj((SwFtnAdj)m_pLinePosBox->GetSelectEntryPos()); // Breite - rFtnInfo.SetWidth(boost::rational<sal_Int64>( static_cast< long >(m_pLineLengthEdit->GetValue()), 100)); + rFtnInfo.SetWidth(boost::rational<long>( static_cast< long >(m_pLineLengthEdit->GetValue()), 100)); const SfxPoolItem* pOldItem; if(0 == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) || 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()); } } } |