diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-16 15:30:32 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-16 17:44:44 +0200 |
commit | 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch) | |
tree | 80c42b34da7e7ee05843b572f7311b3c230de9dd /svx | |
parent | ada4862afc3227b04c12960ded761db24f61257e (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 'svx')
58 files changed, 219 insertions, 219 deletions
diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx index ff745bf48024..83cf3609824b 100644 --- a/svx/inc/sdr/properties/itemsettools.hxx +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -56,7 +56,7 @@ namespace sdr { namespace properties { - void ScaleItemSet(SfxItemSet& rSet, const boost::rational<long>& rScale); + void ScaleItemSet(SfxItemSet& rSet, const boost::rational<sal_Int64>& rScale); } // end of namespace properties } // end of namespace sdr diff --git a/svx/inc/svdoopengl.hxx b/svx/inc/svdoopengl.hxx index 30fd2c86abb5..cec7296528a1 100644 --- a/svx/inc/svdoopengl.hxx +++ b/svx/inc/svdoopengl.hxx @@ -32,7 +32,7 @@ public: OpenGLContext* getOpenGLContext() { return mpContext;} - 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; void setRenderer(IOpenGLRenderer* pRenderer); IOpenGLRenderer* getRenderer(); diff --git a/svx/inc/sxmsitm.hxx b/svx/inc/sxmsitm.hxx index b262b02362bd..14fed0a598c9 100644 --- a/svx/inc/sxmsitm.hxx +++ b/svx/inc/sxmsitm.hxx @@ -27,8 +27,8 @@ // Instead, we multiply them with each other. class SdrMeasureScaleItem: public SdrScaleItem { public: - SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,boost::rational<long>(1,1)) {} - SdrMeasureScaleItem(const boost::rational<long>& rFr): SdrScaleItem(SDRATTR_MEASURESCALE,rFr) {} + SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,boost::rational<sal_Int64>(1,1)) {} + SdrMeasureScaleItem(const boost::rational<sal_Int64>& rFr): SdrScaleItem(SDRATTR_MEASURESCALE,rFr) {} SdrMeasureScaleItem(SvStream& rIn) : SdrScaleItem(SDRATTR_MEASURESCALE,rIn) {} }; diff --git a/svx/inc/sxreaitm.hxx b/svx/inc/sxreaitm.hxx index 0f9a216fc359..7c25de07f116 100644 --- a/svx/inc/sxreaitm.hxx +++ b/svx/inc/sxreaitm.hxx @@ -25,15 +25,15 @@ class SdrResizeXAllItem: public SdrFractionItem { public: - SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,boost::rational<long>(1,1)) {} - SdrResizeXAllItem(const boost::rational<long>& rFact): SdrFractionItem(SDRATTR_RESIZEXALL,rFact) {} + SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,boost::rational<sal_Int64>(1,1)) {} + SdrResizeXAllItem(const boost::rational<sal_Int64>& rFact): SdrFractionItem(SDRATTR_RESIZEXALL,rFact) {} SdrResizeXAllItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEXALL,rIn) {} }; class SdrResizeYAllItem: public SdrFractionItem { public: - SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,boost::rational<long>(1,1)) {} - SdrResizeYAllItem(const boost::rational<long>& rFact): SdrFractionItem(SDRATTR_RESIZEYALL,rFact) {} + SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,boost::rational<sal_Int64>(1,1)) {} + SdrResizeYAllItem(const boost::rational<sal_Int64>& rFact): SdrFractionItem(SDRATTR_RESIZEYALL,rFact) {} SdrResizeYAllItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEYALL,rIn) {} }; diff --git a/svx/inc/sxreoitm.hxx b/svx/inc/sxreoitm.hxx index fe935cf3b5c2..f10167332e34 100644 --- a/svx/inc/sxreoitm.hxx +++ b/svx/inc/sxreoitm.hxx @@ -25,15 +25,15 @@ class SdrResizeXOneItem: public SdrFractionItem { public: - SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,boost::rational<long>(1,1)) {} - SdrResizeXOneItem(const boost::rational<long>& rFact): SdrFractionItem(SDRATTR_RESIZEXONE,rFact) {} + SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,boost::rational<sal_Int64>(1,1)) {} + SdrResizeXOneItem(const boost::rational<sal_Int64>& rFact): SdrFractionItem(SDRATTR_RESIZEXONE,rFact) {} SdrResizeXOneItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEXONE,rIn) {} }; class SdrResizeYOneItem: public SdrFractionItem { public: - SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,boost::rational<long>(1,1)) {} - SdrResizeYOneItem(const boost::rational<long>& rFact): SdrFractionItem(SDRATTR_RESIZEYONE,rFact) {} + SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,boost::rational<sal_Int64>(1,1)) {} + SdrResizeYOneItem(const boost::rational<sal_Int64>& rFact): SdrFractionItem(SDRATTR_RESIZEYONE,rFact) {} SdrResizeYOneItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEYONE,rIn) {} }; diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 0a810de128d1..0c683d7e5860 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -262,7 +262,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con if ( pModel ) { fMap = 1.0; - boost::rational<long> aFraction( pModel->GetScaleFraction() ); + boost::rational<sal_Int64> aFraction( pModel->GetScaleFraction() ); if ( ( aFraction.numerator() ) != 1 || ( aFraction.denominator() != 1 ) ) { fMap *= aFraction.numerator(); diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 661af54f66e8..2b1195125725 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -116,7 +116,7 @@ public: virtual EnhancedCustomShapeParameter fillNode( std::vector< EnhancedCustomShapeEquation >& rEquations, ExpressionNode* /* pOptionalArg */, sal_uInt32 /* nFlags */ ) SAL_OVERRIDE { EnhancedCustomShapeParameter aRet; - boost::rational<long> aFract( maValue ); + boost::rational<sal_Int64> aFract( maValue ); if ( aFract.denominator() == 1 ) { aRet.Type = EnhancedCustomShapeParameterType::NORMAL; diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 97454dc46219..eb4973b7489d 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -113,9 +113,9 @@ void SvxXConnectionPreview::AdaptSize() aNewSize.Height()= (long) ( (double) nWidth / fRectWH ); } - boost::rational<long> aFrac1( aWinSize.Width(), aRect.GetWidth() ); - boost::rational<long> aFrac2( aWinSize.Height(), aRect.GetHeight() ); - boost::rational<long> aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 ); + boost::rational<sal_Int64> aFrac1( aWinSize.Width(), aRect.GetWidth() ); + boost::rational<sal_Int64> aFrac2( aWinSize.Height(), aRect.GetHeight() ); + boost::rational<sal_Int64> aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 ); // Implement MapMode aDisplayMap.SetScaleX( aMinFrac ); @@ -261,23 +261,23 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bZoomIn || bZoomOut ) { MapMode aMapMode = GetMapMode(); - boost::rational<long> aXFrac = aMapMode.GetScaleX(); - boost::rational<long> aYFrac = aMapMode.GetScaleY(); - boost::scoped_ptr<boost::rational<long>> pMultFrac; + boost::rational<sal_Int64> aXFrac = aMapMode.GetScaleX(); + boost::rational<sal_Int64> aYFrac = aMapMode.GetScaleY(); + boost::scoped_ptr<boost::rational<sal_Int64>> pMultFrac; if( bZoomIn ) { if( bCtrl ) - pMultFrac.reset(new boost::rational<long>( 3, 2 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 3, 2 )); else - pMultFrac.reset(new boost::rational<long>( 11, 10 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 11, 10 )); } else { if( bCtrl ) - pMultFrac.reset(new boost::rational<long>( 2, 3 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 2, 3 )); else - pMultFrac.reset(new boost::rational<long>( 10, 11 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 10, 11 )); } aXFrac *= *pMultFrac; diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 59f402538299..d272e232b8da 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -128,7 +128,7 @@ void GraphCtrl::InitSdrModel() pModel = new SdrModel; pModel->GetItemPool().FreezeIdRanges(); pModel->SetScaleUnit( aMap100.GetMapUnit() ); - pModel->SetScaleFraction( boost::rational<long>( 1, 1 ) ); + pModel->SetScaleFraction( boost::rational<sal_Int64>( 1, 1 ) ); pModel->SetDefaultFontHeight( 500 ); pPage = new SdrPage( *pModel ); @@ -225,8 +225,8 @@ void GraphCtrl::Resize() aNewPos.Y() = ( nHeight - aNewSize.Height() ) >> 1; // Implementing MapMode for Engine - aDisplayMap.SetScaleX( boost::rational<long>( aNewSize.Width(), aGraphSize.Width() ) ); - aDisplayMap.SetScaleY( boost::rational<long>( aNewSize.Height(), aGraphSize.Height() ) ); + aDisplayMap.SetScaleX( boost::rational<sal_Int64>( aNewSize.Width(), aGraphSize.Width() ) ); + aDisplayMap.SetScaleY( boost::rational<sal_Int64>( aNewSize.Height(), aGraphSize.Height() ) ); aDisplayMap.SetOrigin( LogicToLogic( aNewPos, aMap100, aDisplayMap ) ); SetMapMode( aDisplayMap ); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 8206ea373637..e070cf212b66 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -34,8 +34,8 @@ SvxXMeasurePreview::SvxXMeasurePreview( vcl::Window* pParent, WinBits nStyle) // Scale: 1:2 MapMode aMapMode = GetMapMode(); - aMapMode.SetScaleX( boost::rational<long>( 1, 2 ) ); - aMapMode.SetScaleY( boost::rational<long>( 1, 2 ) ); + aMapMode.SetScaleX( boost::rational<sal_Int64>( 1, 2 ) ); + aMapMode.SetScaleY( boost::rational<sal_Int64>( 1, 2 ) ); SetMapMode( aMapMode ); Size aSize = GetOutputSize(); @@ -109,23 +109,23 @@ void SvxXMeasurePreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bZoomIn || bZoomOut ) { MapMode aMapMode = GetMapMode(); - boost::rational<long> aXFrac = aMapMode.GetScaleX(); - boost::rational<long> aYFrac = aMapMode.GetScaleY(); - boost::scoped_ptr<boost::rational<long>> pMultFrac; + boost::rational<sal_Int64> aXFrac = aMapMode.GetScaleX(); + boost::rational<sal_Int64> aYFrac = aMapMode.GetScaleY(); + boost::scoped_ptr<boost::rational<sal_Int64>> pMultFrac; if( bZoomIn ) { if( bCtrl ) - pMultFrac.reset(new boost::rational<long>( 3, 2 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 3, 2 )); else - pMultFrac.reset(new boost::rational<long>( 11, 10 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 11, 10 )); } else { if( bCtrl ) - pMultFrac.reset(new boost::rational<long>( 2, 3 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 2, 3 )); else - pMultFrac.reset(new boost::rational<long>( 10, 11 )); + pMultFrac.reset(new boost::rational<sal_Int64>( 10, 11 )); } aXFrac *= *pMultFrac; diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 998271eafb3d..1da00e992e20 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -102,8 +102,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPageWindow(vcl::Win void SvxPageWindow::Paint(const Rectangle&) { - boost::rational<long> aXScale(aWinSize.Width(),std::max((long)(aSize.Width() * 2 + aSize.Width() / 8),1L)); - boost::rational<long> aYScale(aWinSize.Height(),std::max(aSize.Height(),1L)); + boost::rational<sal_Int64> aXScale(aWinSize.Width(),std::max((long)(aSize.Width() * 2 + aSize.Width() / 8),1L)); + boost::rational<sal_Int64> aYScale(aWinSize.Height(),std::max(aSize.Height(),1L)); MapMode aMapMode(GetMapMode()); if(aYScale < aXScale) @@ -126,9 +126,9 @@ void SvxPageWindow::Paint(const Rectangle&) if (aSize.Width() > aSize.Height()) { // Draw Landscape page of the same size - boost::rational<long> aX = aMapMode.GetScaleX(); - boost::rational<long> aY = aMapMode.GetScaleY(); - boost::rational<long> a2(3, 2); + boost::rational<sal_Int64> aX = aMapMode.GetScaleX(); + boost::rational<sal_Int64> aY = aMapMode.GetScaleY(); + boost::rational<sal_Int64> a2(3, 2); aX *= a2; aY *= a2; aMapMode.SetScaleX(aX); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 998d9d80dbbc..76a33c771d02 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -322,7 +322,7 @@ void E3dObject::SetModel(SdrModel* pNewModel) // resize object, used from old 2d interfaces, e.g. in Move/Scale dialog (F4) -void E3dObject::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void E3dObject::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { // Movement in X, Y in the eye coordinate system E3dScene* pScene = GetScene(); diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 54c582bd2392..398965544cc2 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -323,8 +323,8 @@ void E3dScene::NbcMove(const Size& rSize) NbcSetSnapRect(aNewSnapRect); } -void E3dScene::NbcResize(const Point& rRef, const boost::rational<long>& rXFact, - const boost::rational<long>& rYFact) +void E3dScene::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& rXFact, + const boost::rational<sal_Int64>& rYFact) { Rectangle aNewSnapRect = GetSnapRect(); ResizeRect(aNewSnapRect, rRef, rXFact, rYFact); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 141a490f7662..357206e9a1ad 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -736,7 +736,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) case StateChangedType::ZOOM: { - boost::rational<long> aZoom = GetZoom(); + boost::rational<sal_Int64> aZoom = GetZoom(); // not all of these controls need to know the new zoom, but to be sure ... vcl::Font aFont( GetSettings().GetStyleSettings().GetFieldFont() ); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index a87b44850ca0..da63c0c48edb 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -279,7 +279,7 @@ namespace sdr { namespace contact { ::basegfx::B2DVector aZoom( 1, 1 ); if ( pWindow ) { - const boost::rational<long>& rZoom( pWindow->GetZoom() ); + const boost::rational<sal_Int64>& rZoom( pWindow->GetZoom() ); aZoom.setX( boost::rational_cast<double>(rZoom) ); aZoom.setY( boost::rational_cast<double>(rZoom) ); } diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 21738416f926..c2a113553f1c 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -318,7 +318,7 @@ namespace sdr MapUnit aOldUnit(pOldModel->GetScaleUnit()); MapUnit aNewUnit(pNewModel->GetScaleUnit()); bool bScaleUnitChanged(aNewUnit != aOldUnit); - boost::rational<long> aMetricFactor; + boost::rational<sal_Int64> aMetricFactor; if(bScaleUnitChanged) { diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index 08ff3d349397..c59906ac1aee 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -211,7 +211,7 @@ namespace sdr { } - void DefaultProperties::Scale(const boost::rational<long>& rScale) + void DefaultProperties::Scale(const boost::rational<sal_Int64>& rScale) { if(mpItemSet) { diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index e7826272fa2f..29306d6c0d65 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -93,7 +93,7 @@ namespace sdr { namespace properties { - void ScaleItemSet(SfxItemSet& rSet, const boost::rational<long>& rScale) + void ScaleItemSet(SfxItemSet& rSet, const boost::rational<sal_Int64>& rScale) { sal_Int32 nMul(rScale.numerator()); sal_Int32 nDiv(rScale.denominator()); diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 5865948e405f..af59a4e1f3da 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -74,7 +74,7 @@ namespace sdr ClearObjectItem(nWhich); } - void BaseProperties::Scale(const boost::rational<long>& /*rScale*/) + void BaseProperties::Scale(const boost::rational<sal_Int64>& /*rScale*/) { // default implementation does nothing; overload where // an ItemSet is implemented. diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8e41e48b03df..44ce50c1dbc8 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -898,7 +898,7 @@ void PosSizePropertyPanel::executeSize() { if ( mpMtrWidth->IsValueModified() || mpMtrHeight->IsValueModified()) { - boost::rational<long> aUIScale = mpView->GetModel()->GetUIScale(); + boost::rational<sal_Int64> aUIScale = mpView->GetModel()->GetUIScale(); // get Width double nWidth = (double)mpMtrWidth->GetValue( meDlgUnit ); @@ -953,7 +953,7 @@ void PosSizePropertyPanel::executePosX() maRect = mpView->GetAllMarkedRect(); aRect = mpView->GetAllMarkedRect(); - boost::rational<long> aUIScale = mpView->GetModel()->GetUIScale(); + boost::rational<sal_Int64> aUIScale = mpView->GetModel()->GetUIScale(); lX += maAnchorPos.X(); lX = boost::rational_cast<long>(lX * aUIScale); lY += maAnchorPos.Y(); @@ -980,7 +980,7 @@ void PosSizePropertyPanel::executePosY() maRect = mpView->GetAllMarkedRect(); aRect = mpView->GetAllMarkedRect(); - boost::rational<long> aUIScale = mpView->GetModel()->GetUIScale(); + boost::rational<sal_Int64> aUIScale = mpView->GetModel()->GetUIScale(); lX += maAnchorPos.X(); lX = boost::rational_cast<long>(lX * aUIScale); lY += maAnchorPos.Y(); @@ -1158,7 +1158,7 @@ void PosSizePropertyPanel::DisableControls() void PosSizePropertyPanel::UpdateUIScale() { - const boost::rational<long> aUIScale (mpView->GetModel()->GetUIScale()); + const boost::rational<sal_Int64> aUIScale (mpView->GetModel()->GetUIScale()); if (maUIScale != aUIScale) { // UI scale has changed. diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 97fa3e27708d..f8031545bb66 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -102,7 +102,7 @@ private: Point maAnchorPos; //anchor position long mlRotX; long mlRotY; - boost::rational<long> maUIScale; + boost::rational<sal_Int64> maUIScale; SfxMapUnit mePoolUnit; FieldUnit meDlgUnit; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 216107aa9930..2a5a4c521545 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -630,7 +630,7 @@ SdrFractionItem::SdrFractionItem(sal_uInt16 nId, SvStream& rIn): sal_Int32 nMul,nDiv; rIn.ReadInt32( nMul ); rIn.ReadInt32( nDiv ); - nValue=boost::rational<long>(nMul,nDiv); + nValue=boost::rational<sal_Int64>(nMul,nDiv); } bool SdrFractionItem::operator==(const SfxPoolItem& rCmp) const diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index fda560eb2a43..b26b5c8eb7e1 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -106,22 +106,22 @@ bool SdrDragStat::CheckMinMoved(const Point& rPnt) return bMinMoved; } -boost::rational<long> SdrDragStat::GetXFact() const +boost::rational<sal_Int64> SdrDragStat::GetXFact() const { long nMul=GetNow().X()-aRef1.X(); long nDiv=GetPrev().X()-aRef1.X(); if (nDiv==0) nDiv=1; if (bHorFixed) { nMul=1; nDiv=1; } - return boost::rational<long>(nMul,nDiv); + return boost::rational<sal_Int64>(nMul,nDiv); } -boost::rational<long> SdrDragStat::GetYFact() const +boost::rational<sal_Int64> SdrDragStat::GetYFact() const { long nMul=GetNow().Y()-aRef1.Y(); long nDiv=GetPrev().Y()-aRef1.Y(); if (nDiv==0) nDiv=1; if (bVerFixed) { nMul=1; nDiv=1; } - return boost::rational<long>(nMul,nDiv); + return boost::rational<sal_Int64>(nMul,nDiv); } void SdrDragStat::TakeCreateRect(Rectangle& rRect) const diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx index 7b038800b5e2..53469b72cd33 100644 --- a/svx/source/svdraw/svddrgm1.hxx +++ b/svx/source/svdraw/svddrgm1.hxx @@ -74,7 +74,7 @@ public: class SdrDragShear : public SdrDragMethod { private: - boost::rational<long> aFact; + boost::rational<sal_Int64> aFact; long nWink0; long nWink; double nTan; @@ -151,7 +151,7 @@ private: Point aMarkCenter; Point aCenter; Point aStart; - boost::rational<long> aFact; + boost::rational<sal_Int64> aFact; Point aRad; bool bContortionAllowed; bool bNoContortionAllowed; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 687ed7d73c58..b2d5ccfba657 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1779,7 +1779,7 @@ SdrDragResize::SdrDragResize(SdrDragView& rNewView) void SdrDragResize::TakeSdrDragComment(OUString& rStr) const { ImpTakeDescriptionStr(STR_DragMethResize, rStr); - boost::rational<long> aFact1(1,1); + boost::rational<sal_Int64> aFact1(1,1); Point aStart(DragStat().GetStart()); Point aRef(DragStat().GetRef1()); sal_Int32 nXDiv(aStart.X() - aRef.X()); @@ -1889,7 +1889,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) Point aPnt(GetSnapPos(rNoSnapPnt)); Point aStart(DragStat().GetStart()); Point aRef(DragStat().GetRef1()); - boost::rational<long> aMaxFact(0x7FFFFFFF,1); + boost::rational<sal_Int64> aMaxFact(0x7FFFFFFF,1); Rectangle aLR(getSdrDragView().GetWorkArea()); bool bWorkArea=!aLR.IsEmpty(); bool bDragLimit=IsDragLimit(); @@ -1920,7 +1920,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) if (aRef.X()>aSR.Left()) { - boost::rational<long> aMax(aRef.X()-aLR.Left(),aRef.X()-aSR.Left()); + boost::rational<sal_Int64> aMax(aRef.X()-aLR.Left(),aRef.X()-aSR.Left()); if (aMax<aMaxFact) aMaxFact=aMax; @@ -1928,7 +1928,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) if (aRef.X()<aSR.Right()) { - boost::rational<long> aMax(aLR.Right()-aRef.X(),aSR.Right()-aRef.X()); + boost::rational<sal_Int64> aMax(aLR.Right()-aRef.X(),aSR.Right()-aRef.X()); if (aMax<aMaxFact) aMaxFact=aMax; @@ -1936,7 +1936,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) if (aRef.Y()>aSR.Top()) { - boost::rational<long> aMax(aRef.Y()-aLR.Top(),aRef.Y()-aSR.Top()); + boost::rational<sal_Int64> aMax(aRef.Y()-aLR.Top(),aRef.Y()-aSR.Top()); if (aMax<aMaxFact) aMaxFact=aMax; @@ -1944,7 +1944,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) if (aRef.Y()<aSR.Bottom()) { - boost::rational<long> aMax(aLR.Bottom()-aRef.Y(),aSR.Bottom()-aRef.Y()); + boost::rational<sal_Int64> aMax(aLR.Bottom()-aRef.Y(),aSR.Bottom()-aRef.Y()); if (aMax<aMaxFact) aMaxFact=aMax; @@ -1979,7 +1979,7 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) if (bOrtho) { - if ((boost::rational<long>(nXMul,nXDiv)>boost::rational<long>(nYMul,nYDiv)) !=getSdrDragView().IsBigOrtho()) + if ((boost::rational<sal_Int64>(nXMul,nXDiv)>boost::rational<sal_Int64>(nYMul,nYDiv)) !=getSdrDragView().IsBigOrtho()) { nXMul=nYMul; nXDiv=nYDiv; @@ -2027,8 +2027,8 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) } } - boost::rational<long> aNeuXFact(nXMul,nXDiv); - boost::rational<long> aNeuYFact(nYMul,nYDiv); + boost::rational<sal_Int64> aNeuXFact(nXMul,nXDiv); + boost::rational<sal_Int64> aNeuYFact(nYMul,nYDiv); if (bOrtho) { @@ -2046,10 +2046,10 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) } if (bXNeg) - aNeuXFact=boost::rational<long>(-aNeuXFact.numerator(),aNeuXFact.denominator()); + aNeuXFact=boost::rational<sal_Int64>(-aNeuXFact.numerator(),aNeuXFact.denominator()); if (bYNeg) - aNeuYFact=boost::rational<long>(-aNeuYFact.numerator(),aNeuYFact.denominator()); + aNeuYFact=boost::rational<sal_Int64>(-aNeuYFact.numerator(),aNeuYFact.denominator()); if (DragStat().CheckMinMoved(aPnt)) { @@ -2344,7 +2344,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt) Point aP0(DragStat().GetStart()); Point aPnt(rPnt); - boost::rational<long> aNeuFact(1,1); + boost::rational<sal_Int64> aNeuFact(1,1); // if angle snapping not activated, snap to raster (except when using slant) if (nSA==0 && !bSlant) @@ -2389,11 +2389,11 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt) if (bVertical) { - aNeuFact=boost::rational<long>(aPt2.X()-aRef.X(),aP0.X()-aRef.X()); + aNeuFact=boost::rational<sal_Int64>(aPt2.X()-aRef.X(),aP0.X()-aRef.X()); } else { - aNeuFact=boost::rational<long>(aPt2.Y()-aRef.Y(),aP0.Y()-aRef.Y()); + aNeuFact=boost::rational<sal_Int64>(aPt2.Y()-aRef.Y(),aP0.Y()-aRef.Y()); } } } @@ -2451,11 +2451,11 @@ void SdrDragShear::applyCurrentTransformationToSdrObject(SdrObject& rTarget) { if (bVertical) { - rTarget.Resize(DragStat().GetRef1(),aFact,boost::rational<long>(1,1)); + rTarget.Resize(DragStat().GetRef1(),aFact,boost::rational<sal_Int64>(1,1)); } else { - rTarget.Resize(DragStat().GetRef1(),boost::rational<long>(1,1),aFact); + rTarget.Resize(DragStat().GetRef1(),boost::rational<sal_Int64>(1,1),aFact); } } @@ -2469,7 +2469,7 @@ bool SdrDragShear::EndSdrDrag(bool bCopy) { Hide(); - if (bResize && aFact==boost::rational<long>(1,1)) + if (bResize && aFact==boost::rational<sal_Int64>(1,1)) bResize=false; if (nWink!=0 || bResize) @@ -2489,11 +2489,11 @@ bool SdrDragShear::EndSdrDrag(bool bCopy) { if (bVertical) { - getSdrDragView().ResizeMarkedObj(DragStat().GetRef1(),aFact,boost::rational<long>(1,1),bCopy); + getSdrDragView().ResizeMarkedObj(DragStat().GetRef1(),aFact,boost::rational<sal_Int64>(1,1),bCopy); } else { - getSdrDragView().ResizeMarkedObj(DragStat().GetRef1(),boost::rational<long>(1,1),aFact,bCopy); + getSdrDragView().ResizeMarkedObj(DragStat().GetRef1(),boost::rational<sal_Int64>(1,1),aFact,bCopy); } bCopy=false; @@ -3016,7 +3016,7 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget) if (bResize) { - boost::rational<long> aFact1(1,1); + boost::rational<sal_Int64> aFact1(1,1); if (bVertical) { @@ -3108,7 +3108,7 @@ void SdrDragCrook::_MovCrookPoint(Point& rPnt, Point* pC1, Point* pC2) if (bResize) { - boost::rational<long> aFact1(1,1); + boost::rational<sal_Int64> aFact1(1,1); if (bVert) { @@ -3184,7 +3184,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) else bAtCenter=true; - boost::rational<long> aNeuFact(1,1); + boost::rational<sal_Int64> aNeuFact(1,1); long dx1=aPnt.X()-aNeuCenter.X(); long dy1=aPnt.Y()-aNeuCenter.Y(); bValid=bVertical ? dx1!=0 : dy1!=0; @@ -3254,7 +3254,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) if (bAtCenter) nMul*=2; - aNeuFact=boost::rational<long>(nMul,nMarkSize); + aNeuFact=boost::rational<sal_Int64>(nMul,nMarkSize); nWink=nPntWink; } else @@ -3287,7 +3287,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) nMul = std::abs(nMul); } - aNeuFact=boost::rational<long>(nMul,nDiv); + aNeuFact=boost::rational<sal_Int64>(nMul,nDiv); } if (aNeuCenter!=aCenter || bNeuContortion!=bContortion || aNeuFact!=aFact || @@ -3301,7 +3301,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) aCenter=aNeuCenter; aFact=aNeuFact; aRad=Point(nNeuRad,nNeuRad); - bResize=aFact!=boost::rational<long>(1,1); + bResize=aFact!=boost::rational<sal_Int64>(1,1); DragStat().NextMove(aPnt); Show(); } @@ -3310,14 +3310,14 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) void SdrDragCrook::applyCurrentTransformationToSdrObject(SdrObject& rTarget) { - const bool bDoResize(aFact!=boost::rational<long>(1,1)); + const bool bDoResize(aFact!=boost::rational<sal_Int64>(1,1)); const bool bDoCrook(aCenter!=aMarkCenter && aRad.X()!=0 && aRad.Y()!=0); if (bDoCrook || bDoResize) { if (bDoResize) { - boost::rational<long> aFact1(1,1); + boost::rational<sal_Int64> aFact1(1,1); if (bContortion) { @@ -3370,7 +3370,7 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy) { Hide(); - if (bResize && aFact==boost::rational<long>(1,1)) + if (bResize && aFact==boost::rational<sal_Int64>(1,1)) bResize=false; const bool bUndo = getSdrDragView().IsUndoEnabled(); @@ -3392,7 +3392,7 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy) if (bResize) { - boost::rational<long> aFact1(1,1); + boost::rational<sal_Int64> aFact1(1,1); if (bContortion) { diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index d0a34a13cf08..340a96946ba4 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -212,7 +212,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy) EndUndo(); } -void SdrEditView::ResizeMarkedObj(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bCopy) +void SdrEditView::ResizeMarkedObj(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bCopy) { const bool bUndo = IsUndoEnabled(); if( bUndo ) @@ -245,8 +245,8 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const boost::rational<long> EndUndo(); } void SdrEditView::ResizeMultMarkedObj(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, const bool bCopy, const bool bWdh, const bool bHgt) @@ -276,7 +276,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef, AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); } - boost::rational<long> aFrac(1,1); + boost::rational<sal_Int64> aFrac(1,1); if (bWdh && bHgt) pO->Resize(rRef, xFact, yFact); else if (bWdh) @@ -755,12 +755,12 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep SetMarkedObjRect(aRect); } if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SfxItemState::SET) { - boost::rational<long> aXFact=((const SdrResizeXAllItem*)pPoolItem)->GetValue(); - ResizeMarkedObj(aAllSnapRect.TopLeft(),aXFact,boost::rational<long>(1,1)); + boost::rational<sal_Int64> aXFact=((const SdrResizeXAllItem*)pPoolItem)->GetValue(); + ResizeMarkedObj(aAllSnapRect.TopLeft(),aXFact,boost::rational<sal_Int64>(1,1)); } if (rAttr.GetItemState(SDRATTR_RESIZEYALL,true,&pPoolItem)==SfxItemState::SET) { - boost::rational<long> aYFact=((const SdrResizeYAllItem*)pPoolItem)->GetValue(); - ResizeMarkedObj(aAllSnapRect.TopLeft(),boost::rational<long>(1,1),aYFact); + boost::rational<sal_Int64> aYFact=((const SdrResizeYAllItem*)pPoolItem)->GetValue(); + ResizeMarkedObj(aAllSnapRect.TopLeft(),boost::rational<sal_Int64>(1,1),aYFact); } if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SfxItemState::SET) { long nAngle=((const SdrRotateAllItem*)pPoolItem)->GetValue(); @@ -1608,8 +1608,8 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // change size and height if (bChgSiz && (bResizeFreeAllowed || bResizePropAllowed)) { - boost::rational<long> aWdt(nSizX,aRect.Right()-aRect.Left()); - boost::rational<long> aHgt(nSizY,aRect.Bottom()-aRect.Top()); + boost::rational<sal_Int64> aWdt(nSizX,aRect.Right()-aRect.Left()); + boost::rational<sal_Int64> aHgt(nSizY,aRect.Bottom()-aRect.Top()); Point aRef(ImpGetPoint(aRect,eSizePoint)); if(GetSdrPageView()) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 5b6a1f4dfcc0..ca4996af510f 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -241,18 +241,18 @@ size_t ImpSdrGDIMetaFileImport::DoImport( mbMov = maOfs.X()!=0 || maOfs.Y()!=0; mbSize = false; - maScaleX = boost::rational<long>( 1, 1 ); - maScaleY = boost::rational<long>( 1, 1 ); + maScaleX = boost::rational<sal_Int64>( 1, 1 ); + maScaleY = boost::rational<sal_Int64>( 1, 1 ); if(aMtfSize.Width() != (maScaleRect.GetWidth() - 1)) { - maScaleX = boost::rational<long>(maScaleRect.GetWidth() - 1, aMtfSize.Width()); + maScaleX = boost::rational<sal_Int64>(maScaleRect.GetWidth() - 1, aMtfSize.Width()); mbSize = true; } if(aMtfSize.Height() != (maScaleRect.GetHeight() - 1)) { - maScaleY = boost::rational<long>(maScaleRect.GetHeight() - 1, aMtfSize.Height()); + maScaleY = boost::rational<sal_Int64>(maScaleRect.GetHeight() - 1, aMtfSize.Height()); mbSize = true; } diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index d394e97463b3..239e6ee4f0d2 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -63,8 +63,8 @@ protected: Point maOfs; double mfScaleX; double mfScaleY; - boost::rational<long> maScaleX; - boost::rational<long> maScaleY; + boost::rational<sal_Int64> maScaleX; + boost::rational<sal_Int64> maScaleY; bool mbFntDirty; diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 279c84631190..af7f705d0b29 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -378,10 +378,10 @@ void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, bool bCopy) static void ImpResize(Point& rPt, const void* p1, const void* p2, const void* p3, const void* /*p4*/, const void* /*p5*/) { - ResizePoint(rPt,*(const Point*)p1,*(const boost::rational<long>*)p2,*(const boost::rational<long>*)p3); + ResizePoint(rPt,*(const Point*)p1,*(const boost::rational<sal_Int64>*)p2,*(const boost::rational<sal_Int64>*)p3); } -void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bCopy) +void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bCopy) { ForceUndirtyMrkPnt(); OUString aStr(ImpGetResStr(STR_EditResize)); diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index be76208d988e..3a54e6458e03 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1217,7 +1217,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) case ITEM_FRACTION: { if (!bPairX) nLongX=1; if (!bPairY) nLongY=1; - ((SdrFractionItem*)pNewItem)->SetValue(boost::rational<long>(nLongX,nLongY)); + ((SdrFractionItem*)pNewItem)->SetValue(boost::rational<sal_Int64>(nLongX,nLongY)); } break; case ITEM_XCOLOR: break; case ITEM_COLOR: break; diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index e7171b1c3961..8a46865dbbe0 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -113,7 +113,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe aObjUnit=SdrEngineDefaults::GetMapFraction(); eObjUnit=SdrEngineDefaults::GetMapUnit(); eUIUnit=FUNIT_MM; - aUIScale=boost::rational<long>(1,1); + aUIScale=boost::rational<sal_Int64>(1,1); nUIUnitKomma=0; bUIOnlyKomma=false; pLayerAdmin=NULL; @@ -929,7 +929,7 @@ void SdrModel::ImpSetUIUnit() { if(0 == aUIScale.numerator()) { - aUIScale = boost::rational<long>(1,1); + aUIScale = boost::rational<sal_Int64>(1,1); } // set start values @@ -1015,7 +1015,7 @@ void SdrModel::ImpSetUIUnit() // may need to be changed in the future, too if(1 != nMul || 1 != nDiv) { - const boost::rational<long> aTemp(static_cast< long >(nMul), static_cast< long >(nDiv)); + const boost::rational<sal_Int64> aTemp(static_cast< long >(nMul), static_cast< long >(nDiv)); nMul = aTemp.numerator(); nDiv = aTemp.denominator(); } @@ -1043,12 +1043,12 @@ void SdrModel::ImpSetUIUnit() } // end preparations, set member values - aUIUnitFact = boost::rational<long>(sal_Int32(nMul), sal_Int32(nDiv)); + aUIUnitFact = boost::rational<sal_Int64>(sal_Int32(nMul), sal_Int32(nDiv)); bUIOnlyKomma = (nMul == nDiv); TakeUnitStr(eUIUnit, aUIUnitStr); } -void SdrModel::SetScaleUnit(MapUnit eMap, const boost::rational<long>& rFrac) +void SdrModel::SetScaleUnit(MapUnit eMap, const boost::rational<sal_Int64>& rFrac) { if (eObjUnit!=eMap || aObjUnit!=rFrac) { eObjUnit=eMap; @@ -1073,7 +1073,7 @@ void SdrModel::SetScaleUnit(MapUnit eMap) } } -void SdrModel::SetScaleFraction(const boost::rational<long>& rFrac) +void SdrModel::SetScaleFraction(const boost::rational<sal_Int64>& rFrac) { if (aObjUnit!=rFrac) { aObjUnit=rFrac; @@ -1093,7 +1093,7 @@ void SdrModel::SetUIUnit(FieldUnit eUnit) } } -void SdrModel::SetUIScale(const boost::rational<long>& rScale) +void SdrModel::SetUIScale(const boost::rational<sal_Int64>& rScale) { if (aUIScale!=rScale) { aUIScale=rScale; @@ -1102,7 +1102,7 @@ void SdrModel::SetUIScale(const boost::rational<long>& rScale) } } -void SdrModel::SetUIUnit(FieldUnit eUnit, const boost::rational<long>& rScale) +void SdrModel::SetUIUnit(FieldUnit eUnit, const boost::rational<sal_Int64>& rScale) { if (eUIUnit!=eUnit || aUIScale!=rScale) { eUIUnit=eUnit; @@ -1333,7 +1333,7 @@ void SdrModel::TakeWinkStr(long nWink, OUString& rStr, bool bNoDegChar) const rStr = aBuf.makeStringAndClear(); } -void SdrModel::TakePercentStr(const boost::rational<long>& rVal, OUString& rStr, bool bNoPercentChar) const +void SdrModel::TakePercentStr(const boost::rational<sal_Int64>& rVal, OUString& rStr, bool bNoPercentChar) const { sal_Int32 nMul(rVal.numerator()); sal_Int32 nDiv(rVal.denominator()); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 859e366ec17e..021e9a049ade 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1564,15 +1564,15 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz ) mpLastShadowGeometry->NbcMove( rSiz ); } } -void SdrObjCustomShape::Resize( const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative ) +void SdrObjCustomShape::Resize( const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bUnsetRelative ) { SdrTextObj::Resize( rRef, xFact, yFact, bUnsetRelative ); } -void SdrObjCustomShape::NbcResize( const Point& rRef, const boost::rational<long>& rxFact, const boost::rational<long>& ryFact ) +void SdrObjCustomShape::NbcResize( const Point& rRef, const boost::rational<sal_Int64>& rxFact, const boost::rational<sal_Int64>& ryFact ) { - boost::rational<long> xFact( rxFact ); - boost::rational<long> yFact( ryFact ); + boost::rational<sal_Int64> xFact( rxFact ); + boost::rational<sal_Int64> yFact( ryFact ); // taking care of handles that should not been changed Rectangle aOld( aRect ); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 2cd9069de14f..1c1281d9d934 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1338,8 +1338,8 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const nYMul=std::abs(nYMul); nXDiv=std::abs(nXDiv); nYDiv=std::abs(nYDiv); - boost::rational<long> aXFact(nXMul,nXDiv); // fractions for canceling - boost::rational<long> aYFact(nYMul,nYDiv); // and for comparing + boost::rational<sal_Int64> aXFact(nXMul,nXDiv); // fractions for canceling + boost::rational<sal_Int64> aYFact(nYMul,nYDiv); // and for comparing nXMul=aXFact.numerator(); nYMul=aYFact.numerator(); nXDiv=aXFact.denominator(); @@ -1495,7 +1495,7 @@ void SdrObject::NbcMove(const Size& rSiz) SetRectsDirty(); } -void SdrObject::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrObject::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { bool bXMirr = xFact < 0; bool bYMirr = yFact < 0; @@ -1593,7 +1593,7 @@ void SdrObject::Move(const Size& rSiz) } } -void SdrObject::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative) +void SdrObject::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()) { if (bUnsetRelative) @@ -2262,15 +2262,15 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) if (aNewLogic!=rLogic) { NbcSetLogicRect(aNewLogic); } - boost::rational<long> aResizeX(1,1); - boost::rational<long> aResizeY(1,1); + boost::rational<sal_Int64> aResizeX(1,1); + boost::rational<sal_Int64> aResizeY(1,1); if (rAttr.GetItemState(SDRATTR_RESIZEXONE,true,&pPoolItem)==SfxItemState::SET) { aResizeX*=((const SdrResizeXOneItem*)pPoolItem)->GetValue(); } if (rAttr.GetItemState(SDRATTR_RESIZEYONE,true,&pPoolItem)==SfxItemState::SET) { aResizeY*=((const SdrResizeYOneItem*)pPoolItem)->GetValue(); } - if (aResizeX!=boost::rational<long>(1,1) || aResizeY!=boost::rational<long>(1,1)) { + if (aResizeX!=boost::rational<sal_Int64>(1,1) || aResizeY!=boost::rational<sal_Int64>(1,1)) { NbcResize(aRef1,aResizeX,aResizeY); } } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 85f7502f9d33..cd0fba56b32f 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -608,7 +608,7 @@ void SdrCaptionObj::NbcMove(const Size& rSiz) SetTailPos(GetFixedTailPos()); } -void SdrCaptionObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrCaptionObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrRectObj::NbcResize(rRef,xFact,yFact); ResizePoly(aTailPoly,rRef,xFact,yFact); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 32f99f01b246..987f1ab6e16d 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -811,7 +811,7 @@ void SdrCircObj::NbcMove(const Size& aSiz) SetRectsDirty(true); } -void SdrCircObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrCircObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { long nWink0=aGeo.nRotationAngle; bool bNoShearRota=(aGeo.nRotationAngle==0 && aGeo.nShearWink==0); @@ -1031,7 +1031,7 @@ void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect) long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); long nHgt1=rRect.Bottom()-rRect.Top(); - NbcResize(maSnapRect.TopLeft(),boost::rational<long>(nWdt1,nWdt0),boost::rational<long>(nHgt1,nHgt0)); + NbcResize(maSnapRect.TopLeft(),boost::rational<sal_Int64>(nWdt1,nWdt0),boost::rational<sal_Int64>(nHgt1,nHgt0)); NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top())); } else { aRect=rRect; diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index c73a6d167f73..d1794116b332 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2244,8 +2244,8 @@ void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect) long nDivY = aOld.Bottom() - aOld.Top(); if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; } if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; } - boost::rational<long> aX(nMulX, nDivX); - boost::rational<long> aY(nMulY, nDivY); + boost::rational<sal_Int64> aX(nMulX, nDivX); + boost::rational<sal_Int64> aY(nMulY, nDivY); NbcResize(aOld.TopLeft(), aX, aY); NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top())); } @@ -2258,7 +2258,7 @@ void SdrEdgeObj::NbcMove(const Size& rSiz) MoveXPoly(*pEdgeTrack,rSiz); } -void SdrEdgeObj::NbcResize(const Point& rRefPnt, const boost::rational<long>& aXFact, const boost::rational<long>& aYFact) +void SdrEdgeObj::NbcResize(const Point& rRefPnt, const boost::rational<sal_Int64>& aXFact, const boost::rational<sal_Int64>& aYFact) { SdrTextObj::NbcResize(rRefPnt,aXFact,aXFact); ResizeXPoly(*pEdgeTrack,rRefPnt,aXFact,aYFact); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 7190aa283205..09fe52409a20 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -897,7 +897,7 @@ SdrHdl* SdrGrafObj::GetHdl(sal_uInt32 nHdlNum) const return SdrRectObj::GetHdl( nHdlNum + 1L ); } -void SdrGrafObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrGrafObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrRectObj::NbcResize( rRef, xFact, yFact ); diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index a624269bd2a8..638a05b622fe 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -403,8 +403,8 @@ void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect) if (nDivX==0) { nMulX=1; nDivX=1; } if (nDivY==0) { nMulY=1; nDivY=1; } if (nMulX!=nDivX || nMulY!=nDivY) { - boost::rational<long> aX(nMulX,nDivX); - boost::rational<long> aY(nMulY,nDivY); + boost::rational<sal_Int64> aX(nMulX,nDivX); + boost::rational<sal_Int64> aY(nMulY,nDivY); NbcResize(aOld.TopLeft(),aX,aY); } if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) { @@ -436,7 +436,7 @@ void SdrObjGroup::NbcMove(const Size& rSiz) } -void SdrObjGroup::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrObjGroup::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { bool bXMirr = xFact < 0; bool bYMirr = yFact < 0; @@ -538,8 +538,8 @@ void SdrObjGroup::SetSnapRect(const Rectangle& rRect) if (nDivX==0) { nMulX=1; nDivX=1; } if (nDivY==0) { nMulY=1; nDivY=1; } if (nMulX!=nDivX || nMulY!=nDivY) { - boost::rational<long> aX(nMulX,nDivX); - boost::rational<long> aY(nMulY,nDivY); + boost::rational<sal_Int64> aX(nMulX,nDivX); + boost::rational<sal_Int64> aY(nMulY,nDivY); Resize(aOld.TopLeft(),aX,aY); } if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) { @@ -587,7 +587,7 @@ void SdrObjGroup::Move(const Size& rSiz) } -void SdrObjGroup::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative) +void SdrObjGroup::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()) { bool bXMirr = xFact < 0; diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index ebec5c688349..09d664b7647f 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -80,7 +80,7 @@ SdrMeasureObjGeoData::~SdrMeasureObjGeoData() {} OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind) const { OUString aStr; - boost::rational<long> aMeasureScale(1, 1); + boost::rational<sal_Int64> aMeasureScale(1, 1); bool bTextRota90(false); bool bShowUnit(false); FieldUnit eMeasureUnit(FUNIT_NONE); @@ -105,7 +105,7 @@ OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind eMeasureUnit = eModUIUnit; sal_Int32 nLen(GetLen(aPt2 - aPt1)); - boost::rational<long> aFact(1,1); + boost::rational<sal_Int64> aFact(1,1); if(eMeasureUnit != eModUIUnit) { @@ -275,7 +275,7 @@ struct ImpMeasureRec : public SdrDragStatUserData bool bTextUpsideDown; long nMeasureOverhang; FieldUnit eMeasureUnit; - boost::rational<long> aMeasureScale; + boost::rational<sal_Int64> aMeasureScale; bool bShowUnit; OUString aFormatString; bool bTextAutoAngle; @@ -1029,7 +1029,7 @@ void SdrMeasureObj::NbcMove(const Size& rSiz) MovePoint(aPt2,rSiz); } -void SdrMeasureObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrMeasureObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrTextObj::NbcResize(rRef,xFact,yFact); ResizePoint(aPt1,rRef,xFact,yFact); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index cb9dd89ffc04..2bcf9e8b11d1 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -114,22 +114,22 @@ class SdrLightEmbeddedClient_Impl : public ::cppu::WeakImplHelper5 uno::Reference< awt::XWindow > m_xWindow; SdrOle2Obj* mpObj; - boost::rational<long> m_aScaleWidth; - boost::rational<long> m_aScaleHeight; + boost::rational<sal_Int64> m_aScaleWidth; + boost::rational<sal_Int64> m_aScaleHeight; public: SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj ); void Release(); - void SetSizeScale( const boost::rational<long>& aScaleWidth, const boost::rational<long>& aScaleHeight ) + void SetSizeScale( const boost::rational<sal_Int64>& aScaleWidth, const boost::rational<sal_Int64>& aScaleHeight ) { m_aScaleWidth = aScaleWidth; m_aScaleHeight = aScaleHeight; } - boost::rational<long> GetScaleWidth() const { return m_aScaleWidth; } - boost::rational<long> GetScaleHeight() const { return m_aScaleHeight; } + boost::rational<sal_Int64> GetScaleWidth() const { return m_aScaleWidth; } + boost::rational<sal_Int64> GetScaleHeight() const { return m_aScaleHeight; } void setWindow(const uno::Reference< awt::XWindow >& _xWindow); @@ -1762,8 +1762,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() || mpImpl->mxObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE ) { - boost::rational<long> aScaleWidth; - boost::rational<long> aScaleHeight; + boost::rational<sal_Int64> aScaleWidth; + boost::rational<sal_Int64> aScaleHeight; if ( pClient ) { aScaleWidth = pClient->GetScaleWidth(); @@ -1826,8 +1826,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() { // The object isn't active and does not want to resize itself so the changed object area size // will be reflected in a changed object scaling - boost::rational<long> aScaleWidth; - boost::rational<long> aScaleHeight; + boost::rational<sal_Int64> aScaleWidth; + boost::rational<sal_Int64> aScaleHeight; Size aObjAreaSize; if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) ) { @@ -1865,7 +1865,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() -void SdrOle2Obj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrOle2Obj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { if( pModel && !pModel->isLocked() ) { @@ -2211,7 +2211,7 @@ uno::Reference< frame::XModel > SdrOle2Obj::GetParentXModel() const } -bool SdrOle2Obj::CalculateNewScaling( boost::rational<long>& aScaleWidth, boost::rational<long>& aScaleHeight, Size& aObjAreaSize ) +bool SdrOle2Obj::CalculateNewScaling( boost::rational<sal_Int64>& aScaleWidth, boost::rational<sal_Int64>& aScaleHeight, Size& aObjAreaSize ) { // TODO/LEAN: to avoid rounding errors scaling always uses the VisArea. // If we don't cache it for own objects also we must load the object here @@ -2222,8 +2222,8 @@ bool SdrOle2Obj::CalculateNewScaling( boost::rational<long>& aScaleWidth, boost: aObjAreaSize = mpImpl->mxObjRef.GetSize( &aMapMode ); Size aSize = aRect.GetSize(); - aScaleWidth = boost::rational<long>(aSize.Width(), aObjAreaSize.Width() ); - aScaleHeight = boost::rational<long>(aSize.Height(), aObjAreaSize.Height() ); + aScaleWidth = boost::rational<sal_Int64>(aSize.Width(), aObjAreaSize.Width() ); + aScaleHeight = boost::rational<sal_Int64>(aSize.Height(), aObjAreaSize.Height() ); // reduce to 10 binary digits Kuerzen(aScaleHeight, 10); @@ -2243,8 +2243,8 @@ bool SdrOle2Obj::AddOwnLightClient() if ( mpImpl->mxObjRef.is() && mpImpl->pLightClient ) { - boost::rational<long> aScaleWidth; - boost::rational<long> aScaleHeight; + boost::rational<sal_Int64> aScaleWidth; + boost::rational<sal_Int64> aScaleHeight; Size aObjAreaSize; if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) ) { diff --git a/svx/source/svdraw/svdoopengl.cxx b/svx/source/svdraw/svdoopengl.cxx index b1e8e8f0e945..7e3f689059d7 100644 --- a/svx/source/svdraw/svdoopengl.cxx +++ b/svx/source/svdraw/svdoopengl.cxx @@ -35,7 +35,7 @@ sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact() } -void SdrOpenGLObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrOpenGLObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrObject::NbcResize(rRef, xFact, yFact); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 3f7541383b72..fc58d2b3a419 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2352,7 +2352,7 @@ void SdrPathObj::NbcMove(const Size& rSiz) SdrTextObj::NbcMove(rSiz); } -void SdrPathObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrPathObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRef.X(), -rRef.Y())); aTrans = basegfx::tools::createScaleTranslateB2DHomMatrix( @@ -2454,8 +2454,8 @@ void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect) long nDivY = aOld.Bottom() - aOld.Top(); if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; } if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; } - boost::rational<long> aX(nMulX,nDivX); - boost::rational<long> aY(nMulY,nDivY); + boost::rational<sal_Int64> aX(nMulX,nDivX); + boost::rational<sal_Int64> aY(nMulY,nDivY); NbcResize(aOld.TopLeft(), aX, aY); NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top())); } diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 81b12eceed49..774286e0e457 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -494,7 +494,7 @@ void SdrRectObj::NbcMove(const Size& rSiz) SetXPolyDirty(); } -void SdrRectObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrRectObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrTextObj::NbcResize(rRef,xFact,yFact); SetXPolyDirty(); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a84b853396be..5f6cc3d7ed1a 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -871,7 +871,7 @@ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const return pPara; } -void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, boost::rational<long>& rFitXKorreg) const +void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, boost::rational<sal_Int64>& rFitXKorreg) const { OutputDevice* pOut = rOutliner.GetRefDevice(); bool bNoStretching(false); @@ -963,7 +963,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS nLoopCount++; Size aSiz(rOutliner.CalcTextSize()); long nXDiff=aSiz.Width()-nWantWdt; - rFitXKorreg=boost::rational<long>(nWantWdt,aSiz.Width()); + rFitXKorreg=boost::rational<sal_Int64>(nWantWdt,aSiz.Width()); if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0) { bNoMoreLoop = true; } else { @@ -1245,7 +1245,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, Rectangle& rTextRect, Rectangle& rAnchorRect, Rectangle& rPaintRect, - boost::rational<long>& rFitXKorreg ) const + boost::rational<sal_Int64>& rFitXKorreg ) const { if (!bContourFrame) { @@ -1349,7 +1349,7 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint { Rectangle aTextRect; Rectangle aAnchorRect; - boost::rational<long> aFitXKorreg(1,1); + boost::rational<sal_Int64> aFitXKorreg(1,1); bool bContourFrame=IsContourTextFrame(); @@ -1837,7 +1837,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( Rectangle aTextRect; Rectangle aAnchorRect; Rectangle aPaintRect; - boost::rational<long> aFitXKorreg(1,1); + boost::rational<sal_Int64> aFitXKorreg(1,1); bool bContourFrame(IsContourTextFrame()); // get outliner set up. To avoid getting a somehow rotated MetaFile, diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 334aaaef1568..05bdb03c860a 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -104,8 +104,8 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const nYMul=std::abs(nYMul); nXDiv=std::abs(nXDiv); nYDiv=std::abs(nYDiv); - boost::rational<long> aXFact(nXMul,nXDiv); // fractions for canceling - boost::rational<long> aYFact(nYMul,nYDiv); // and for comparing + boost::rational<sal_Int64> aXFact(nXMul,nXDiv); // fractions for canceling + boost::rational<sal_Int64> aYFact(nYMul,nYDiv); // and for comparing nXMul=aXFact.numerator(); nYMul=aYFact.numerator(); nXDiv=aXFact.denominator(); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 4bdaa2a0f845..94f1aef13e12 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -95,7 +95,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) Rectangle aTextRect; TakeTextRect(rOutl, aTextRect, false, &aAnchorRect); - boost::rational<long> aFitXKorreg(1,1); + boost::rational<sal_Int64> aFitXKorreg(1,1); ImpSetCharStretching(rOutl,aTextRect.GetSize(),aAnchorRect.GetSize(),aFitXKorreg); } else if (IsAutoFit()) diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 550ce4c335af..64a48cae777c 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -48,7 +48,7 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); long nHgt1=rRect.Bottom()-rRect.Top(); - SdrTextObj::NbcResize(maSnapRect.TopLeft(),boost::rational<long>(nWdt1,nWdt0),boost::rational<long>(nHgt1,nHgt0)); + SdrTextObj::NbcResize(maSnapRect.TopLeft(),boost::rational<sal_Int64>(nWdt1,nWdt0),boost::rational<sal_Int64>(nHgt1,nHgt0)); SdrTextObj::NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top())); } else { long nHDist=GetTextLeftDistance()+GetTextRightDistance(); @@ -118,7 +118,7 @@ void SdrTextObj::NbcMove(const Size& rSiz) SetRectsDirty(true); } -void SdrTextObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrTextObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { bool bNoShearMerk=aGeo.nShearWink==0; bool bRota90Merk=bNoShearMerk && aGeo.nRotationAngle % 9000 ==0; diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index aff41c4f92e9..a577387a464b 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -320,7 +320,7 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj) return *this; } -void SdrUnoObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrUnoObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { SdrRectObj::NbcResize(rRef,xFact,yFact); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index ae99c80b2e5c..cc690fef6da2 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -355,7 +355,7 @@ void SdrVirtObj::NbcMove(const Size& rSiz) SetRectsDirty(); } -void SdrVirtObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrVirtObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { rRefObj.NbcResize(rRef-aAnchor,xFact,yFact); SetRectsDirty(); @@ -392,7 +392,7 @@ void SdrVirtObj::Move(const Size& rSiz) } } -void SdrVirtObj::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative) +void SdrVirtObj::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()) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index e7a713ec74f5..14fc0d43c53b 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1149,8 +1149,8 @@ void SdrPaintView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) { bNewScale=true; // set new MapMode (Size+Org) and invalidate everything - boost::rational<long> aXFact(aNewSize.Width(),aActualSize.Width()); - boost::rational<long> aYFact(aNewSize.Height(),aActualSize.Height()); + boost::rational<sal_Int64> aXFact(aNewSize.Width(),aActualSize.Width()); + boost::rational<sal_Int64> aYFact(aNewSize.Height(),aActualSize.Height()); if (aYFact>aXFact) aXFact=aYFact; aXFact*=aMap.GetScaleX(); rational_ReduceInaccurate(aXFact, 10); // to avoid runovers and BigInt mapping diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 8ee050116a7c..ac5d309e9578 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -672,12 +672,12 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz) static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* /*p4*/, const void* /*p5*/) { - ResizePoint(rPt,*(const Point*)p1,*(const boost::rational<long>*)p2,*(const boost::rational<long>*)p3); - if (pC1!=NULL) ResizePoint(*pC1,*(const Point*)p1,*(const boost::rational<long>*)p2,*(const boost::rational<long>*)p3); - if (pC2!=NULL) ResizePoint(*pC2,*(const Point*)p1,*(const boost::rational<long>*)p2,*(const boost::rational<long>*)p3); + ResizePoint(rPt,*(const Point*)p1,*(const boost::rational<sal_Int64>*)p2,*(const boost::rational<sal_Int64>*)p3); + if (pC1!=NULL) ResizePoint(*pC1,*(const Point*)p1,*(const boost::rational<sal_Int64>*)p2,*(const boost::rational<sal_Int64>*)p3); + if (pC2!=NULL) ResizePoint(*pC2,*(const Point*)p1,*(const boost::rational<sal_Int64>*)p2,*(const boost::rational<sal_Int64>*)p3); } -void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { ForceUndirtyMrkPnt(); OUString aStr(ImpGetResStr(STR_EditResize)); diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index acd1546b1cad..bc67201aa366 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -153,7 +153,7 @@ void SdrText::SetModel( SdrModel* pNewModel ) mpOutlinerParaObject=0; if (bScaleUnitChanged) { - boost::rational<long> aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X(); + boost::rational<sal_Int64> aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X(); if (bSetHgtItem) { diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 535383a6f827..195abe60fcb3 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -32,10 +32,10 @@ void MoveXPoly(XPolygon& rPoly, const Size& S) rPoly.Move(S.Width(),S.Height()); } -void ResizeRect(Rectangle& rRect, const Point& rRef, const boost::rational<long>& rxFact, const boost::rational<long>& ryFact, bool bNoJustify) +void ResizeRect(Rectangle& rRect, const Point& rRef, const boost::rational<sal_Int64>& rxFact, const boost::rational<sal_Int64>& ryFact, bool bNoJustify) { - boost::rational<long> xFact(rxFact); - boost::rational<long> yFact(ryFact); + boost::rational<sal_Int64> xFact(rxFact); + boost::rational<sal_Int64> yFact(ryFact); rRect.Left() =rRef.X()+Round(((double)(rRect.Left() -rRef.X())*xFact.numerator())/xFact.denominator()); rRect.Right() =rRef.X()+Round(((double)(rRect.Right() -rRef.X())*xFact.numerator())/xFact.denominator()); @@ -45,7 +45,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const boost::rational<long> } -void ResizePoly(Polygon& rPoly, const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void ResizePoly(Polygon& rPoly, const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { sal_uInt16 nAnz=rPoly.GetSize(); for (sal_uInt16 i=0; i<nAnz; i++) { @@ -53,7 +53,7 @@ void ResizePoly(Polygon& rPoly, const Point& rRef, const boost::rational<long>& } } -void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { sal_uInt16 nAnz=rPoly.GetPointCount(); for (sal_uInt16 i=0; i<nAnz; i++) { @@ -570,7 +570,7 @@ long BigMulDiv(long nVal, long nMul, long nDiv) return 0x7fffffff; } -void Kuerzen(boost::rational<long>& rF, unsigned nDigits) +void Kuerzen(boost::rational<sal_Int64>& rF, unsigned nDigits) { sal_Int32 nMul=rF.numerator(); sal_Int32 nDiv=rF.denominator(); @@ -599,7 +599,7 @@ void Kuerzen(boost::rational<long>& rF, unsigned nDigits) return; } if (bNeg) nMul=-nMul; - rF=boost::rational<long>(nMul,nDiv); + rF=boost::rational<sal_Int64>(nMul,nDiv); } @@ -635,7 +635,7 @@ FrPair GetInchOrMM(MapUnit eU) } default: break; } - return boost::rational<long>(1,1); + return boost::rational<sal_Int64>(1,1); } FrPair GetInchOrMM(FieldUnit eU) @@ -654,7 +654,7 @@ FrPair GetInchOrMM(FieldUnit eU) case FUNIT_MILE : return FrPair( 1,63360); default: break; } - return boost::rational<long>(1,1); + return boost::rational<sal_Int64>(1,1); } // Calculate the factor that we need to convert units from eS to eD. @@ -668,8 +668,8 @@ FrPair GetMapFactor(MapUnit eS, MapUnit eD) bool bSInch=IsInch(eS); bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); - if (bSInch && !bDInch) { aRet.X()*=boost::rational<long>(127,5); aRet.Y()*=boost::rational<long>(127,5); } - if (!bSInch && bDInch) { aRet.X()*=boost::rational<long>(5,127); aRet.Y()*=boost::rational<long>(5,127); } + if (bSInch && !bDInch) { aRet.X()*=boost::rational<sal_Int64>(127,5); aRet.Y()*=boost::rational<sal_Int64>(127,5); } + if (!bSInch && bDInch) { aRet.X()*=boost::rational<sal_Int64>(5,127); aRet.Y()*=boost::rational<sal_Int64>(5,127); } return aRet; }; @@ -681,8 +681,8 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD) bool bSInch=IsInch(eS); bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); - if (bSInch && !bDInch) { aRet.X()*=boost::rational<long>(127,5); aRet.Y()*=boost::rational<long>(127,5); } - if (!bSInch && bDInch) { aRet.X()*=boost::rational<long>(5,127); aRet.Y()*=boost::rational<long>(5,127); } + if (bSInch && !bDInch) { aRet.X()*=boost::rational<sal_Int64>(127,5); aRet.Y()*=boost::rational<sal_Int64>(127,5); } + if (!bSInch && bDInch) { aRet.X()*=boost::rational<sal_Int64>(5,127); aRet.Y()*=boost::rational<sal_Int64>(5,127); } return aRet; }; @@ -763,7 +763,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, boo void SdrFormatter::Undirty() { - if (aScale.numerator()==0) aScale=boost::rational<long>(1,1); + if (aScale.numerator()==0) aScale=boost::rational<sal_Int64>(1,1); bool bSrcMetr,bSrcInch,bDstMetr,bDstInch; long nMul1,nDiv1,nMul2,nDiv2; short nKomma1,nKomma2; @@ -792,7 +792,7 @@ void SdrFormatter::Undirty() } // temporary fraction for canceling - boost::rational<long> aTempFract(nMul1,nDiv1); + boost::rational<sal_Int64> aTempFract(nMul1,nDiv1); nMul1=aTempFract.numerator(); nDiv1=aTempFract.denominator(); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index eadfbcf02977..b70743cdd726 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -480,8 +480,8 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co // account for FitToSize bool bFitToSize(pTextObj->IsFitToSize()); if (bFitToSize) { - boost::rational<long> aX(aTextRect.GetWidth()-1, std::max(aAnchor.GetWidth()-1, 1L)); - boost::rational<long> aY(aTextRect.GetHeight()-1, std::max(aAnchor.GetHeight()-1, 1L)); + boost::rational<sal_Int64> aX(aTextRect.GetWidth()-1, std::max(aAnchor.GetWidth()-1, 1L)); + boost::rational<sal_Int64> aY(aTextRect.GetHeight()-1, std::max(aAnchor.GetHeight()-1, 1L)); ResizePoint(aTemporaryTextRelativePosition,Point(),aX,aY); } // account for rotation diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 1b070a17f1f2..51790c335289 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -160,7 +160,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList* pObj->FitFrameToTextSize(); Size aSiz(pObj->GetLogicRect().GetSize()); MapUnit eMap=pMod->GetScaleUnit(); - boost::rational<long> aMap=pMod->GetScaleFraction(); + boost::rational<sal_Int64> aMap=pMod->GetScaleFraction(); ImpPasteObject(pObj,*pLst,aPos,aSiz,MapMode(eMap,Point(0,0),aMap,aMap),nOptions); return true; } @@ -197,7 +197,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt pObj->FitFrameToTextSize(); Size aSiz(pObj->GetLogicRect().GetSize()); MapUnit eMap=pMod->GetScaleUnit(); - boost::rational<long> aMap=pMod->GetScaleFraction(); + boost::rational<sal_Int64> aMap=pMod->GetScaleFraction(); ImpPasteObject(pObj,*pLst,aPos,aSiz,MapMode(eMap,Point(0,0),aMap,aMap),nOptions); // b4967543 @@ -267,7 +267,7 @@ bool SdrExchangeView::Paste( MapUnit eSrcUnit=pSrcMod->GetScaleUnit(); MapUnit eDstUnit=pMod->GetScaleUnit(); bool bResize=eSrcUnit!=eDstUnit; - boost::rational<long> xResize,yResize; + boost::rational<sal_Int64> xResize,yResize; Point aPt0; if (bResize) { @@ -403,7 +403,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po MapUnit eSrcMU=rMap.GetMapUnit(); MapUnit eDstMU=pMod->GetScaleUnit(); FrPair aMapFact(GetMapFactor(eSrcMU,eDstMU)); - boost::rational<long> aDstFr(pMod->GetScaleFraction()); + boost::rational<sal_Int64> aDstFr(pMod->GetScaleFraction()); nSizX*=aMapFact.X().numerator(); nSizX*=rMap.GetScaleX().numerator(); nSizX*=aDstFr.denominator(); diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index fb66230a3d00..7260c0aaab42 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1965,7 +1965,7 @@ void SdrTableObj::NbcMove(const Size& rSiz) -void SdrTableObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrTableObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact) { Rectangle aOldRect( maLogicRect ); ResizeRect(maLogicRect,rRef,xFact,yFact); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 6155adc4913a..cfca6f3fdd0b 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -111,8 +111,8 @@ namespace { Sequence< PropertyValue > maFilterData; - boost::rational<long> maScaleX; - boost::rational<long> maScaleY; + boost::rational<sal_Int64> maScaleX; + boost::rational<sal_Int64> maScaleY; ExportSettings( SdrModel* pDoc ); }; @@ -407,7 +407,7 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWid // use scaling? if( nWidthPixel ) { - const boost::rational<long> aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() ); + const boost::rational<sal_Int64> aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() ); aMM.SetScaleX( aFrac ); @@ -417,7 +417,7 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWid if( nHeightPixel ) { - const boost::rational<long> aFrac( (long) nHeightPixel, pVDev->LogicToPixel( aPageSize, aMM ).Height() ); + const boost::rational<sal_Int64> aFrac( (long) nHeightPixel, pVDev->LogicToPixel( aPageSize, aMM ).Height() ); if( nWidthPixel == 0 ) aMM.SetScaleX( aFrac ); @@ -577,25 +577,25 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) - rSettings.maScaleX = boost::rational<long>( nVal, rSettings.maScaleX.denominator() ); + rSettings.maScaleX = boost::rational<sal_Int64>( nVal, rSettings.maScaleX.denominator() ); } else if ( pDataValues->Name == "ScaleXDenominator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) - rSettings.maScaleX = boost::rational<long>( rSettings.maScaleX.numerator(), nVal ); + rSettings.maScaleX = boost::rational<sal_Int64>( rSettings.maScaleX.numerator(), nVal ); } else if ( pDataValues->Name == "ScaleYNumerator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) - rSettings.maScaleY = boost::rational<long>( nVal, rSettings.maScaleY.denominator() ); + rSettings.maScaleY = boost::rational<sal_Int64>( nVal, rSettings.maScaleY.denominator() ); } else if ( pDataValues->Name == "ScaleYDenominator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) - rSettings.maScaleY = boost::rational<long>( rSettings.maScaleY.numerator(), nVal ); + rSettings.maScaleY = boost::rational<sal_Int64>( rSettings.maScaleY.numerator(), nVal ); } pDataValues++; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3fb2591a5e16..b894bf5e8b7b 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1219,10 +1219,10 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) if(mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_MEASURE ) { - boost::rational<long> aWdt; + boost::rational<sal_Int64> aWdt; if (aRect.Right()-aRect.Left() > 0) aWdt.assign(aLocalSize.Width(),aRect.Right()-aRect.Left()); - boost::rational<long> aHgt; + boost::rational<sal_Int64> aHgt; if (aRect.Bottom()-aRect.Top() > 0) aHgt.assign(aLocalSize.Height(),aRect.Bottom()-aRect.Top()); Point aPt = mpObj->GetSnapRect().TopLeft(); |