summaryrefslogtreecommitdiff
path: root/sw
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
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')
-rw-r--r--sw/inc/accmap.hxx4
-rw-r--r--sw/inc/dcontact.hxx4
-rw-r--r--sw/inc/pagedesc.hxx6
-rw-r--r--sw/inc/pagepreviewlayout.hxx4
-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
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx8
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx4
-rw-r--r--sw/source/filter/ww1/w1filter.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx8
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx10
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx10
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/view.hxx2
-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
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx8
40 files changed, 116 insertions, 116 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index e1a216d7ae3f..5dfd09bc10bb 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<long>& _rScale,
+ const boost::rational<sal_Int64>& _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<long>& _rScale,
+ const boost::rational<sal_Int64>& _rScale,
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPreviewWinSize );
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 270f95ab18c2..54783784534e 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<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 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<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;
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 a9a4fc79c6f3..29c6df60bda5 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<long> aWidth; ///< percentage width of the separator line.
+ boost::rational<sal_Int64> 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<long>& GetWidth() const { return aWidth; }
+ const boost::rational<sal_Int64>& 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<long> &rNew){ aWidth = rNew; }
+ void SetWidth( const boost::rational<sal_Int64> &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 60a55430de1d..a3a3b3db0a85 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<long>& _aNewScale,
- const boost::rational<long>& _aOldScale,
+ Point GetPreviewStartPosForNewScale( const boost::rational<sal_Int64>& _aNewScale,
+ const boost::rational<sal_Int64>& _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 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 );
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 17e207eed8b5..3f2a7ec7facb 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<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 = 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<long>(nWidth, rRealSize.Width());
+ aScaleX = boost::rational<sal_Int64>(nWidth, rRealSize.Width());
bScale = true;
}
}
@@ -1154,7 +1154,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con
if (rRealSize.Height() != nHeight)
{
- aScaleY = boost::rational<long>(nHeight, rRealSize.Height());
+ aScaleY = boost::rational<sal_Int64>(nHeight, rRealSize.Height());
bScale = true;
}
}
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 3285e1379636..9de933c11aa6 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<long>(nWidth * 256 + GetBaseWidth() / 2, GetBaseWidth()));
+ return (sal_uInt16) boost::rational_cast<long>(boost::rational<sal_Int64>(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<long>(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth()));
+ return (sal_uInt16) boost::rational_cast<long>(boost::rational<sal_Int64>(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth()));
}
long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow,
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 937b4b260bc6..1e2e28998d50 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1878,8 +1878,8 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
aWMF.SetPrefMapMode(MapMode(MAP_100TH_MM));
Size aOldSiz(aWMF.GetPrefSize());
Size aNewSiz(pPic->mfp.xExtGet(), pPic->mfp.yExtGet());
- boost::rational<long> aFracX(aNewSiz.Width(), aOldSiz.Width());
- boost::rational<long> aFracY(aNewSiz.Height(), aOldSiz.Height());
+ boost::rational<sal_Int64> aFracX(aNewSiz.Width(), aOldSiz.Width());
+ boost::rational<sal_Int64> aFracY(aNewSiz.Height(), aOldSiz.Height());
aWMF.Scale(aFracX, aFracY);
aWMF.SetPrefSize(aNewSiz);
pGraphic = new Graphic(aWMF);
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index aa0362d2191a..18e4e5856822 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<long> aMapPolyX(ww::nWrap100Percent, rOrigSize.Width());
- boost::rational<long> aMapPolyY(ww::nWrap100Percent, rOrigSize.Height());
+ boost::rational<sal_Int64> aMapPolyX(ww::nWrap100Percent, rOrigSize.Width());
+ boost::rational<sal_Int64> 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<long> aMoveHack(ww::nWrap100Percent, rSize.Width());
- aMoveHack *= boost::rational<long>(15, 1);
+ boost::rational<sal_Int64> aMoveHack(ww::nWrap100Percent, rSize.Width());
+ aMoveHack *= boost::rational<sal_Int64>(15, 1);
long nMove(boost::rational_cast<long>(aMoveHack));
- boost::rational<long> aHackX(ww::nWrap100Percent + nMove,
+ boost::rational<sal_Int64> aHackX(ww::nWrap100Percent + nMove,
ww::nWrap100Percent);
- boost::rational<long> aHackY(ww::nWrap100Percent - nMove,
+ boost::rational<sal_Int64> 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 a259e9130d57..893b1affb023 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<long> aFact(360, 1);
+ boost::rational<sal_Int64> aFact(360, 1);
aFact /= GetMapFactor(MAP_100TH_MM, eMap).X();
// create little values
- aFact = boost::rational<long>(aFact.numerator(), aFact.denominator());
+ aFact = boost::rational<sal_Int64>(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 02abc6c6f2d1..87bbd002d40e 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<long> aMoveHack(ww::nWrap100Percent, rSize.Width());
- aMoveHack *= boost::rational<long>(15, 1);
+ boost::rational<sal_Int64> aMoveHack(ww::nWrap100Percent, rSize.Width());
+ aMoveHack *= boost::rational<sal_Int64>(15, 1);
long nMove(boost::rational_cast<long>(aMoveHack));
aPoly.Move(nMove, 0);
- boost::rational<long> aHackX(ww::nWrap100Percent, ww::nWrap100Percent + nMove);
- boost::rational<long> aHackY(ww::nWrap100Percent, ww::nWrap100Percent - nMove);
+ boost::rational<sal_Int64> aHackX(ww::nWrap100Percent, ww::nWrap100Percent + nMove);
+ boost::rational<sal_Int64> 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<long> aMapPolyX(rOrigSize.Width(), ww::nWrap100Percent);
- boost::rational<long> aMapPolyY(rOrigSize.Height(), ww::nWrap100Percent);
+ boost::rational<sal_Int64> aMapPolyX(rOrigSize.Width(), ww::nWrap100Percent);
+ boost::rational<sal_Int64> 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 b7dcac3b7831..7c589dc6a324 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<long> aFracX( aNewSiz.Width(), aOldSiz.Width() );
- boost::rational<long> aFracY( aNewSiz.Height(), aOldSiz.Height() );
+ boost::rational<sal_Int64> aFracX( aNewSiz.Width(), aOldSiz.Width() );
+ boost::rational<sal_Int64> 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<long> aScaleX(aFinalSize.Width(),aOrigSize.Width());
- boost::rational<long> aScaleY(aFinalSize.Height(),aOrigSize.Height());
+ boost::rational<sal_Int64> aScaleX(aFinalSize.Width(),aOrigSize.Width());
+ boost::rational<sal_Int64> 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 0c5d52970705..a3ec6003a2bf 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<long> aTmp( 100, 1 );
+ boost::rational<sal_Int64> 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<long>( static_cast< long >(m_pLineLengthEdit->GetValue()), 100));
+ rFtnInfo.SetWidth(boost::rational<sal_Int64>( 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 24880c94b6b5..18a2e1b4fe2b 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<long>& f( mpEditWin->GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() );
return POSTIT_INITIAL_ANCHOR_DISTANCE * f.numerator() / f.denominator();
}
sal_Int32 SwPostItMgr::GetSpaceBetween() const
{
- const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() );
return ( POSTIT_SPACE_BETWEEN ) * f.numerator() / f.denominator();
}
sal_Int32 SwPostItMgr::GetScrollSize() const
{
- const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() );
return ( POSTIT_SPACE_BETWEEN + POSTIT_MINIMUMSIZE_WITH_META ) * f.numerator() / f.denominator();
}
sal_Int32 SwPostItMgr::GetMinimumSizeWithMeta() const
{
- const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& f( mpEditWin->GetMapMode().GetScaleY() );
return POSTIT_MINIMUMSIZE_WITH_META * f.numerator() / f.denominator();
}
sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const
{
- const boost::rational<long>& f( mpEditWin->GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& 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 e97589c76384..aee3c3b798e9 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<long>& fx( GetMapMode().GetScaleX() );
- const boost::rational<long>& fy( GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& fx( GetMapMode().GetScaleX() );
+ const boost::rational<sal_Int64>& 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<long>& f( GetMapMode().GetScaleX() );
+ const boost::rational<sal_Int64>& 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<long>& f( GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& 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<long>& f( GetMapMode().GetScaleY() );
+ const boost::rational<sal_Int64>& 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 2bdec9a95915..cb458c53ff1c 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<long> aScale( m_aWinSize.Height(), nHeight );
+ boost::rational<sal_Int64> 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 96eb7760ef9d..19f005a5b024 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<long> maScale;
+ boost::rational<sal_Int64> maScale;
SwPagePreview& mrView;
bool mbCalcScaleForPreviewLayout;
Rectangle maPaintedPreviewDocRect;
diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx
index 64040606ccf7..b84bc8be9ccb 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<long> &rX, const boost::rational<long> & ) SAL_OVERRIDE;
+ virtual void SetZoomFactor( const boost::rational<sal_Int64> &rX, const boost::rational<sal_Int64> & ) 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 912be1e4cedf..464cab290b85 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<long> aNewScale( _nZoomFactor, 100 );
+ boost::rational<sal_Int64> 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 7be4f15c7efd..2ce3d09188a5 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<long> aZoomFract( aUsrPref.GetZoom(), 100 );
+ boost::rational<sal_Int64> 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 a8043956e0d3..be64b4af30aa 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<long> aFrac( nFac, 100 );
+ const boost::rational<sal_Int64> 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 1002cdceb769..9ef2c9b42e1b 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<long>( aSize.Width(), aObjSizePixel.Width() ),
- boost::rational<long>( aSize.Height(), aObjSizePixel.Height() ) );
+ SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aSize.Width(), aObjSizePixel.Width() ),
+ boost::rational<sal_Int64>( 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<long>& rFrac = GetEditWin().GetMapMode().GetScaleX();
+ const boost::rational<sal_Int64>& rFrac = GetEditWin().GetMapMode().GetScaleX();
long nZoom = rFrac.numerator() * 100L / rFrac.denominator();
- const boost::rational<long> aFrac( nZoom, 100 );
+ const boost::rational<sal_Int64> 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<long>& rX, const boost::rational<long>& rY )
+void SwView::SetZoomFactor( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY )
{
- const boost::rational<long>&rFrac = rX < rY ? rX : rY;
+ const boost::rational<sal_Int64>&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 a15c23091ceb..03bf1d62d996 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<long> aTmp( 100, 1 );
+ boost::rational<sal_Int64> 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<long>(nSet, 100));
+ aFtnInfo.SetWidth(boost::rational<sal_Int64>(nSet, 100));
}
break;
case MID_LINE_ADJUST :
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 3a7ddf2860cf..4322b99d6a3d 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<long> aScaleWidth( 1, 1 );
- boost::rational<long> aScaleHeight( 1, 1 );
+ boost::rational<sal_Int64> aScaleWidth( 1, 1 );
+ boost::rational<sal_Int64> aScaleHeight( 1, 1 );
bool bUseObjectSize = false;
@@ -777,8 +777,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
else
{
- aScaleWidth = boost::rational<long>( aObjArea.Width(), _aVisArea.Width() );
- aScaleHeight = boost::rational<long>( aObjArea.Height(), _aVisArea.Height());
+ aScaleWidth = boost::rational<sal_Int64>( aObjArea.Width(), _aVisArea.Width() );
+ aScaleHeight = boost::rational<sal_Int64>( aObjArea.Height(), _aVisArea.Height());
}
}
}