diff options
330 files changed, 1001 insertions, 1001 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 5d8373a0815e..791c9c20e7ac 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -234,7 +234,7 @@ DlgEditor::DlgEditor ( pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); pDlgEdView->SetGridCoarse( aGridSize ); - pDlgEdView->SetSnapGridWidth(boost::rational<long>(aGridSize.Width(),1), boost::rational<long>(aGridSize.Height(),1)); + pDlgEdView->SetSnapGridWidth(boost::rational<sal_Int64>(aGridSize.Width(),1), boost::rational<sal_Int64>(aGridSize.Height(),1)); pDlgEdView->SetGridSnap( bGridSnap ); pDlgEdView->SetGridVisible( bGridVisible ); pDlgEdView->SetDragStripes(false); diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 89a0207989d8..cd837a4f7624 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -940,7 +940,7 @@ void DlgEdObj::NbcMove( const Size& rSize ) GetDlgEdForm()->GetDlgEditor().SetDialogModelChanged(true); } -void DlgEdObj::NbcResize(const Point& rRef, const boost::rational<long>& xFract, const boost::rational<long>& yFract) +void DlgEdObj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFract, const boost::rational<sal_Int64>& yFract) { SdrUnoObj::NbcResize( rRef, xFract, yFract ); @@ -1590,7 +1590,7 @@ void DlgEdForm::NbcMove( const Size& rSize ) GetDlgEditor().SetDialogModelChanged(true); } -void DlgEdForm::NbcResize(const Point& rRef, const boost::rational<long>& xFract, const boost::rational<long>& yFract) +void DlgEdForm::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFract, const boost::rational<sal_Int64>& yFract) { SdrUnoObj::NbcResize( rRef, xFract, yFract ); diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 33e489ff06e1..c980eec74117 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -63,7 +63,7 @@ protected: const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac); virtual void NbcMove( const Size& rSize ) 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 bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE; using SfxListener::StartListening; @@ -153,7 +153,7 @@ private: protected: virtual void NbcMove( const Size& rSize ) 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 bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE; public: diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 472d4b726f82..29f25c504273 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1340,8 +1340,8 @@ static double GetDialogZoomFactor( bool bX, long nValue ) if( pDevice ) { Size aRefSize( nValue, nValue ); - boost::rational<long> aFracX( 1, 26 ); - boost::rational<long> aFracY( 1, 24 ); + boost::rational<sal_Int64> aFracX( 1, 26 ); + boost::rational<sal_Int64> aFracY( 1, 24 ); MapMode aMap( MAP_APPFONT, Point(), aFracX, aFracY ); Size aScaledSize = pDevice->LogicToPixel( aRefSize, aMap ); aRefSize = pDevice->LogicToPixel( aRefSize, MapMode(MAP_TWIP) ); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index d8fbd16f55bc..0e53cd581a07 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -244,8 +244,8 @@ void SAL_CALL ChartController::setPosSize( MapMode aNewMapMode( MAP_100TH_MM, Point(0,0), - boost::rational<long>(nScaleXNumerator, nScaleXDenominator), - boost::rational<long>(nScaleYNumerator, nScaleYDenominator) ); + boost::rational<sal_Int64>(nScaleXNumerator, nScaleXDenominator), + boost::rational<sal_Int64>(nScaleYNumerator, nScaleYDenominator) ); m_pChartWindow->SetMapMode(aNewMapMode); m_pChartWindow->setPosSizePixel( X, Y, Width, Height, Flags ); diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index 65d98b660930..ff0dbcfe33e1 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -99,7 +99,7 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext> m_pChartItemPool = ChartItemPool::CreateChartItemPool(); SetScaleUnit(MAP_100TH_MM); - SetScaleFraction(boost::rational<long>(1, 1)); + SetScaleFraction(boost::rational<sal_Int64>(1, 1)); SetDefaultFontHeight(423); // 12pt SfxItemPool* pMasterPool = &GetItemPool(); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 59e24f9f7c34..2121a05dd41b 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -812,8 +812,8 @@ void SvxCropExample::SetFrameSize( const Size& rSz ) if(!aFrameSize.Height()) aFrameSize.Height() = 1; Size aWinSize( GetOutputSizePixel() ); - boost::rational<long> aXScale( aWinSize.Width() * 4, aFrameSize.Width() * 5 ); - boost::rational<long> aYScale( aWinSize.Height() * 4, aFrameSize.Height() * 5 ); + boost::rational<sal_Int64> aXScale( aWinSize.Width() * 4, aFrameSize.Width() * 5 ); + boost::rational<sal_Int64> aYScale( aWinSize.Height() * 4, aFrameSize.Height() * 5 ); if( aYScale < aXScale ) aXScale = aYScale; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index ff024add4d14..26a8678ddc82 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -90,7 +90,7 @@ static void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, rRange = basegfx::B2DRange(aTopLeft, aBottomRight); } -static void lcl_ScaleRect(basegfx::B2DRange& rRange, const boost::rational<long> aUIScale) +static void lcl_ScaleRect(basegfx::B2DRange& rRange, const boost::rational<sal_Int64> aUIScale) { const double fFactor(1.0 / boost::rational_cast<double>(aUIScale)); rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, rRange.getMaximum() * fFactor); @@ -254,7 +254,7 @@ void SvxAngleTabPage::Construct() } // take scale into account - const boost::rational<long> aUIScale = pView->GetModel()->GetUIScale(); + const boost::rational<sal_Int64> aUIScale = pView->GetModel()->GetUIScale(); lcl_ScaleRect(maRange, aUIScale); // take UI units into account @@ -475,7 +475,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) if( m_pMtrRadius->IsValueChangedFromSaved() ) { - boost::rational<long> aUIScale = pView->GetModel()->GetUIScale(); + boost::rational<sal_Int64> aUIScale = pView->GetModel()->GetUIScale(); long nTmp = GetCoreValue( *m_pMtrRadius, ePoolUnit ); nTmp = boost::rational_cast<long>(nTmp * aUIScale); @@ -758,7 +758,7 @@ void SvxPositionSizeTabPage::Construct() } // take scale into account - const boost::rational<long> aUIScale = mpView->GetModel()->GetUIScale(); + const boost::rational<sal_Int64> aUIScale = mpView->GetModel()->GetUIScale(); lcl_ScaleRect( maWorkRange, aUIScale ); lcl_ScaleRect( maRange, aUIScale ); @@ -828,7 +828,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) if ( m_pMtrWidth->IsValueModified() || m_pMtrHeight->IsValueModified() ) { - boost::rational<long> aUIScale = mpView->GetModel()->GetUIScale(); + boost::rational<sal_Int64> aUIScale = mpView->GetModel()->GetUIScale(); // get Width double nWidth = static_cast<double>(m_pMtrWidth->GetValue( meDlgUnit )); diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx index c527a3e648b0..cfc6036c5157 100644 --- a/dbaccess/source/ui/inc/JoinController.hxx +++ b/dbaccess/source/ui/inc/JoinController.hxx @@ -47,7 +47,7 @@ namespace dbaui TTableConnectionData m_vTableConnectionData; TTableWindowData m_vTableData; - boost::rational<long> m_aZoom; + boost::rational<sal_Int64> m_aZoom; ::dbtools::SQLExceptionInfo m_aExceptionInfo; OAddTableDlg* m_pAddTableDialog; diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index c42b1cb20e0d..04ab97f4fd99 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -573,7 +573,7 @@ namespace basegfx::B2DHomMatrix getTransformFromMapMode(const MapMode& rMapMode) { basegfx::B2DHomMatrix aMapping; - const boost::rational<long> aNoScale(1, 1); + const boost::rational<sal_Int64> aNoScale(1, 1); const Point& rOrigin(rMapMode.GetOrigin()); if(0 != rOrigin.X() || 0 != rOrigin.Y()) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 4ba25a60c852..bf3f296d89d1 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -501,7 +501,7 @@ bool ImpEditEngine::ImpCheckRefMapMode() if ( bChange ) { - boost::rational<long> Scale1( 1, 1 ); + boost::rational<sal_Int64> Scale1( 1, 1 ); aMapMode.SetScaleX( Scale1 ); aMapMode.SetScaleY( Scale1 ); GetRefDevice()->Push(); diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index b01a97842b53..e7285ec3a721 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -2168,8 +2168,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) if ( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) { MapMode aMM = pA->GetMapMode(); - boost::rational<long> aScaleX = aMM.GetScaleX(); - boost::rational<long> aScaleY = aMM.GetScaleY(); + boost::rational<sal_Int64> aScaleX = aMM.GetScaleX(); + boost::rational<sal_Int64> aScaleY = aMM.GetScaleY(); Point aOrigin = aPictureMapMode.GetOrigin(); BigInt aX( aOrigin.X() ); diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index b0f61f328bc6..e2d1ebffa966 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -1962,8 +1962,8 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) { MapMode aMM = pA->GetMapMode(); - boost::rational<long> aScaleX = aMM.GetScaleX(); - boost::rational<long> aScaleY = aMM.GetScaleY(); + boost::rational<sal_Int64> aScaleX = aMM.GetScaleX(); + boost::rational<sal_Int64> aScaleY = aMM.GetScaleY(); Point aOrigin = aSrcMapMode.GetOrigin(); BigInt aX( aOrigin.X() ); @@ -2183,7 +2183,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F { PictWriterAttrStackMember* pAt; MapMode aMap72( MAP_INCH ); - boost::rational<long> aDPIFrac( 1, 72 ); + boost::rational<sal_Int64> aDPIFrac( 1, 72 ); bStatus=true; nLastPercent=0; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 1568ef9112f5..a23d0cc59339 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2125,9 +2125,9 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/) ReadCoord(b32); if (nUnitType==0x00 && xr>0 && yr>0) - aGlobMapMode=MapMode(MAP_INCH,Point(0,0),boost::rational<long>(10,xr),boost::rational<long>(10,yr)); + aGlobMapMode=MapMode(MAP_INCH,Point(0,0),boost::rational<sal_Int64>(10,xr),boost::rational<sal_Int64>(10,yr)); else if (nUnitType==0x01 && xr>0 && yr>0) - aGlobMapMode=MapMode(MAP_CM,Point(0,0),boost::rational<long>(10,xr),boost::rational<long>(10,yr)); + aGlobMapMode=MapMode(MAP_CM,Point(0,0),boost::rational<sal_Int64>(10,xr),boost::rational<sal_Int64>(10,yr)); else aGlobMapMode=MapMode(); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index b0d07d805a3b..89a2aee82e05 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -166,8 +166,8 @@ private: Size aActOvalSize; vcl::Font aActFont; - boost::rational<long> aHRes; - boost::rational<long> aVRes; + boost::rational<sal_Int64> aHRes; + boost::rational<sal_Int64> aVRes; bool Callback(sal_uInt16 nPercent); @@ -1841,7 +1841,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) aActFont.SetSize(Size(0,12)); aActFont.SetAlign(ALIGN_BASELINE); - aHRes = aVRes = boost::rational<long>( 1, 1 ); + aHRes = aVRes = boost::rational<sal_Int64>( 1, 1 ); pVirDev = new VirtualDevice(); pVirDev->EnableOutput(false); diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx index dbba04cb9983..7f4bfc79e1db 100644 --- a/filter/source/graphicfilter/ipsd/ipsd.cxx +++ b/filter/source/graphicfilter/ipsd/ipsd.cxx @@ -148,8 +148,8 @@ bool PSDReader::ReadPSD(Graphic & rGraphic ) if ( mnXResFixed && mnYResFixed ) { Point aEmptyPoint; - boost::rational<long> aFractX( 1, mnXResFixed >> 16 ); - boost::rational<long> aFractY( 1, mnYResFixed >> 16 ); + boost::rational<sal_Int64> aFractX( 1, mnXResFixed >> 16 ); + boost::rational<sal_Int64> aFractY( 1, mnYResFixed >> 16 ); MapMode aMapMode( MAP_INCH, aEmptyPoint, aFractX, aFractY ); Size aPrefSize = OutputDevice::LogicToLogic( aBitmapSize, aMapMode, MAP_100TH_MM ); rGraphic.SetPrefSize( aPrefSize ); diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 82575a5d057c..c2c752f501ab 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -1127,7 +1127,7 @@ void TIFFReader::MakePalCol( void ) nRX=(sal_uLong)(fXResolution*2.54+0.5); nRY=(sal_uLong)(fYResolution*2.54+0.5); } - MapMode aMapMode(MAP_INCH,Point(0,0),boost::rational<long>(1,nRX),boost::rational<long>(1,nRY)); + MapMode aMapMode(MAP_INCH,Point(0,0),boost::rational<sal_Int64>(1,nRX),boost::rational<sal_Int64>(1,nRY)); aBitmap.SetPrefMapMode(aMapMode); aBitmap.SetPrefSize(Size(nImageWidth,nImageLength)); } diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 0c2b757284a3..a5db54a6f99d 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -64,7 +64,7 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx ) : mpEscherEx(&rEx) , maMapModeSrc(MAP_100TH_MM) // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi - , maMapModeDest( MAP_INCH, Point(), boost::rational<long>( 1, EES_MAP_FRACTION ), boost::rational<long>( 1, EES_MAP_FRACTION ) ) + , maMapModeDest( MAP_INCH, Point(), boost::rational<sal_Int64>( 1, EES_MAP_FRACTION ), boost::rational<sal_Int64>( 1, EES_MAP_FRACTION ) ) , mpPicStrm(NULL) , mpHostAppData(NULL) , mnPagesWritten(0) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 96b5554ff09b..fe6538664eff 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -170,9 +170,9 @@ void Impl_OlePres::Write( SvStream & rStm ) { // Always to 1/100 mm, until Mtf-Solution found // Assumption (no scaling, no origin translation) - DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleX() == boost::rational<long>( 1, 1 ), + DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleX() == boost::rational<sal_Int64>( 1, 1 ), "X-Skalierung im Mtf" ); - DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleY() == boost::rational<long>( 1, 1 ), + DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleY() == boost::rational<sal_Int64>( 1, 1 ), "Y-Skalierung im Mtf" ); DBG_ASSERT( pMtf->GetPrefMapMode().GetOrigin() == Point(), "Origin-Verschiebung im Mtf" ); @@ -183,8 +183,8 @@ void Impl_OlePres::Write( SvStream & rStm ) Size aS( aPrefS ); aS = OutputDevice::LogicToLogic( aS, nMU, MAP_100TH_MM ); - pMtf->Scale( boost::rational<long>( aS.Width(), aPrefS.Width() ), - boost::rational<long>( aS.Height(), aPrefS.Height() ) ); + pMtf->Scale( boost::rational<sal_Int64>( aS.Width(), aPrefS.Width() ), + boost::rational<sal_Int64>( aS.Height(), aPrefS.Height() ) ); pMtf->SetPrefMapMode( MAP_100TH_MM ); pMtf->SetPrefSize( aS ); } @@ -3088,10 +3088,10 @@ void SvxMSDffManager::ScaleEmu( sal_Int32& rVal ) const sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const { MapUnit eMap = pSdrModel->GetScaleUnit(); - boost::rational<long> aFact( GetMapFactor( MAP_POINT, eMap ).X() ); + boost::rational<sal_Int64> aFact( GetMapFactor( MAP_POINT, eMap ).X() ); long aMul = aFact.numerator(); long aDiv = aFact.denominator() * 65536; - aFact = boost::rational<long>( aMul, aDiv ); // try again to shorten it + aFact = boost::rational<sal_Int64>( aMul, aDiv ); // try again to shorten it return BigMulDiv( nVal, aFact.numerator(), aFact.denominator() ); } @@ -3108,10 +3108,10 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale) // PPT works in units of 576DPI // WW on the other side uses twips, i.e. 1440DPI. MapUnit eMap = pSdrModel->GetScaleUnit(); - boost::rational<long> aFact = GetMapFactor(MAP_INCH, eMap).X(); + boost::rational<sal_Int64> aFact = GetMapFactor(MAP_INCH, eMap).X(); long nMul=aFact.numerator(); long nDiv=aFact.denominator()*nApplicationScale; - aFact=boost::rational<long>(nMul,nDiv); // try again to shorten it + aFact=boost::rational<sal_Int64>(nMul,nDiv); // try again to shorten it // For 100TH_MM -> 2540/576=635/144 // For Twip -> 1440/576=5/2 nMapMul = aFact.numerator(); @@ -3123,7 +3123,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale) aFact=GetMapFactor(MAP_100TH_MM,eMap).X(); nMul=aFact.numerator(); nDiv=aFact.denominator()*360; - aFact=boost::rational<long>(nMul,nDiv); // try again to shorten it + aFact=boost::rational<sal_Int64>(nMul,nDiv); // try again to shorten it // For 100TH_MM -> 1/360 // For Twip -> 14,40/(25,4*360)=144/91440=1/635 nEmuMul=aFact.numerator(); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index a8c55bfeb10d..fba076a2aa89 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2474,7 +2474,7 @@ Size SdrPowerPointImport::GetPageSize() const long nInchMul = 1, nInchDiv = 1; if ( bInch ) { // temporarily convert size (for rounding it) from inch to metric units - boost::rational<long> aFact = GetMapFactor(eMap,MAP_100TH_MM).X(); + boost::rational<sal_Int64> aFact = GetMapFactor(eMap,MAP_100TH_MM).X(); nInchMul = aFact.numerator(); nInchDiv = aFact.denominator(); aRet.Width() = BigMulDiv( aRet.Width(), nInchMul, nInchDiv ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 6dff611d8519..0922a59cfc6e 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -3583,14 +3583,14 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm, { MapMode aMapMode( rMtf.GetPrefMapMode() ); Size aPrefSize( rMtf.GetPrefSize() ); - boost::rational<long> aFractionX = aMapMode.GetScaleX(); - boost::rational<long> aFractionY = aMapMode.GetScaleY(); + boost::rational<sal_Int64> aFractionX = aMapMode.GetScaleX(); + boost::rational<sal_Int64> aFractionY = aMapMode.GetScaleY(); mpVDev->Push(); Size aSize( OutputDevice::LogicToLogic( rSize100thmm, MAP_100TH_MM, aMapMode ) ); - aMapMode.SetScaleX( aFractionX *= boost::rational<long>( aSize.Width(), aPrefSize.Width() ) ); - aMapMode.SetScaleY( aFractionY *= boost::rational<long>( aSize.Height(), aPrefSize.Height() ) ); + aMapMode.SetScaleX( aFractionX *= boost::rational<sal_Int64>( aSize.Width(), aPrefSize.Width() ) ); + aMapMode.SetScaleY( aFractionY *= boost::rational<sal_Int64>( aSize.Height(), aPrefSize.Height() ) ); Point aOffset( OutputDevice::LogicToLogic( rPos100thmm, MAP_100TH_MM, aMapMode ) ); aMapMode.SetOrigin( aOffset += aMapMode.GetOrigin() ); diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 1e84f1b39648..068db8c99a6a 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -515,7 +515,7 @@ namespace frm void RichTextControlImpl::notifyZoomChanged() { - const boost::rational<long>& rZoom = m_pAntiImpl->GetZoom(); + const boost::rational<sal_Int64>& rZoom = m_pAntiImpl->GetZoom(); MapMode aMapMode( m_pAntiImpl->GetMapMode() ); aMapMode.SetScaleX( rZoom ); diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index 74f9236119d4..eff1b4b2de02 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -84,7 +84,7 @@ public: private: sal_Int32 mnXmlNamespace; sal_Int32 mnSeriesCount; - boost::rational<long> maFraction; + boost::rational<sal_Int64> maFraction; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxChartModel; com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram; com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > mxNewDiagram; diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx index 250729b243a3..1846b07891bb 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -66,7 +66,7 @@ protected: private: sal_Int32 mnXmlNamespace; - boost::rational<long> maFraction; + boost::rational<sal_Int64> maFraction; MapMode maMapModeSrc, maMapModeDest; ::com::sun::star::awt::Size MapSize( const ::com::sun::star::awt::Size& ) const; diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx index 573d899b3b39..a4d440f94d38 100644 --- a/include/sfx2/ipclient.hxx +++ b/include/sfx2/ipclient.hxx @@ -73,10 +73,10 @@ public: bool SetObjArea( const Rectangle & ); Rectangle GetObjArea() const; Rectangle GetScaledObjArea() const; - void SetSizeScale( const boost::rational<long> & rScaleWidth, const boost::rational<long> & rScaleHeight ); - bool SetObjAreaAndScale( const Rectangle&, const boost::rational<long>&, const boost::rational<long>& ); - const boost::rational<long>& GetScaleWidth() const; - const boost::rational<long>& GetScaleHeight() const; + void SetSizeScale( const boost::rational<sal_Int64> & rScaleWidth, const boost::rational<sal_Int64> & rScaleHeight ); + bool SetObjAreaAndScale( const Rectangle&, const boost::rational<sal_Int64>&, const boost::rational<sal_Int64>& ); + const boost::rational<sal_Int64>& GetScaleWidth() const; + const boost::rational<sal_Int64>& GetScaleHeight() const; void Invalidate(); static SfxInPlaceClient* GetClient( SfxObjectShell* pDoc, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObject ); sal_Int64 GetAspect() const; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 42487bcc8333..df0a32a3d821 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -638,8 +638,8 @@ public: SAL_DLLPRIVATE void DoDraw_Impl( OutputDevice* pDev, const Point & rViewPos, - const boost::rational<long>& rScaleX, - const boost::rational<long>& rScaleY, + const boost::rational<sal_Int64>& rScaleX, + const boost::rational<sal_Int64>& rScaleY, const JobSetup & rSetup, sal_uInt16 nAspect ); diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 426a9fd9a9df..fdfde8eec1b0 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -119,7 +119,7 @@ public: SfxBindings& GetBindings() { return *pBindings; } const SfxBindings& GetBindings() const { return *pBindings; } vcl::Window& GetWindow() const; - virtual void SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ); + virtual void SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ); SfxProgress* GetProgress() const; diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 39e5f2c2dee3..d47ea27732e3 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -146,7 +146,7 @@ protected: virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); - virtual void SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ); + virtual void SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ); virtual void Move(); diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx index 29b5de5cfb24..79bbb616b3f7 100644 --- a/include/svtools/imap.hxx +++ b/include/svtools/imap.hxx @@ -117,7 +117,7 @@ public: void SetName( const OUString& rName ) { aName = rName; } // skaliert alle Objekte der ImageMap entpr. dem uebergebenen Faktor - void Scale( const boost::rational<long>& rFractX, const boost::rational<long>& rFracY ); + void Scale( const boost::rational<sal_Int64>& rFractX, const boost::rational<sal_Int64>& rFracY ); // Im-/Export void Write ( SvStream& rOStm, const OUString& rBaseURL ) const; diff --git a/include/svtools/imapcirc.hxx b/include/svtools/imapcirc.hxx index 003a2e1b78b4..23b58a34c5fb 100644 --- a/include/svtools/imapcirc.hxx +++ b/include/svtools/imapcirc.hxx @@ -60,7 +60,7 @@ public: // liefert das BoundRect des Kreis-Objektes in 1/100mm virtual Rectangle GetBoundRect() const SAL_OVERRIDE; - void Scale( const boost::rational<long>& rFractX, const boost::rational<long>& rFracY ); + void Scale( const boost::rational<sal_Int64>& rFractX, const boost::rational<sal_Int64>& rFracY ); using IMapObject::IsEqual; bool IsEqual( const IMapCircleObject& rEqObj ); diff --git a/include/svtools/imappoly.hxx b/include/svtools/imappoly.hxx index 40fff04898ed..23c23fb6d088 100644 --- a/include/svtools/imappoly.hxx +++ b/include/svtools/imappoly.hxx @@ -66,7 +66,7 @@ public: const Rectangle& GetExtraEllipse() const { return aEllipse; } void SetExtraEllipse( const Rectangle& rEllipse ); - void Scale( const boost::rational<long>& rFractX, const boost::rational<long>& rFracY ); + void Scale( const boost::rational<sal_Int64>& rFractX, const boost::rational<sal_Int64>& rFracY ); using IMapObject::IsEqual; bool IsEqual( const IMapPolygonObject& rEqObj ); diff --git a/include/svtools/imaprect.hxx b/include/svtools/imaprect.hxx index 48dff3cd95cf..b1c0633cc88a 100644 --- a/include/svtools/imaprect.hxx +++ b/include/svtools/imaprect.hxx @@ -58,7 +58,7 @@ public: // liefert das BoundRect des Rechteck-Objektes in 1/100mm virtual Rectangle GetBoundRect() const SAL_OVERRIDE { return aRect; } - void Scale( const boost::rational<long>& rFractX, const boost::rational<long>& rFracY ); + void Scale( const boost::rational<sal_Int64>& rFractX, const boost::rational<sal_Int64>& rFracY ); using IMapObject::IsEqual; bool IsEqual( const IMapRectangleObject& rEqObj ); diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index a27a92175a5f..cf31b16c18c8 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -644,7 +644,7 @@ private: RulerType meDragType; MapUnit meSourceUnit; FieldUnit meUnit; - boost::rational<long> maZoom; + boost::rational<sal_Int64> maZoom; bool mbCalc; bool mbFormat; bool mbDrag; @@ -745,8 +745,8 @@ public: void SetUnit( FieldUnit eNewUnit ); FieldUnit GetUnit() const { return meUnit; } - void SetZoom( const boost::rational<long>& rNewZoom ); - boost::rational<long> GetZoom() const { return maZoom; } + void SetZoom( const boost::rational<sal_Int64>& rNewZoom ); + boost::rational<sal_Int64> GetZoom() const { return maZoom; } void SetSourceUnit( MapUnit eNewUnit ) { meSourceUnit = eNewUnit; } MapUnit GetSourceUnit() const { return meSourceUnit; } diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index c1e37963c70c..66fac1923743 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -153,7 +153,7 @@ public: virtual void SetPage(SdrPage* pNewPage) SAL_OVERRIDE; virtual void SetModel(SdrModel* pNewModel) SAL_OVERRIDE; virtual void NbcMove(const Size& rSize) 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 SdrObjList* GetSubList() const SAL_OVERRIDE; // Insert 3D object into the group; transfer to other owner! diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index b519126bea54..11a9fd7c881c 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -191,8 +191,8 @@ public: virtual void NbcSetSnapRect(const Rectangle& rRect) SAL_OVERRIDE; virtual void NbcMove(const Size& rSize) SAL_OVERRIDE; - virtual void NbcResize(const Point& rRef, const boost::rational<long>& rXFact, - const boost::rational<long>& rYFact) SAL_OVERRIDE; + virtual void NbcResize(const Point& rRef, const boost::rational<sal_Int64>& rXFact, + const boost::rational<sal_Int64>& rYFact) SAL_OVERRIDE; virtual void RecalcSnapRect() SAL_OVERRIDE; virtual E3dScene* GetScene() const SAL_OVERRIDE; diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index 9e9defe1e65a..1dd12a6ee727 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -94,7 +94,7 @@ namespace sdr virtual void ForceDefaultAttributes(); // Scale the included ItemSet. - virtual void Scale(const boost::rational<long>& rScale) SAL_OVERRIDE; + virtual void Scale(const boost::rational<sal_Int64>& rScale) SAL_OVERRIDE; }; } // end of namespace properties } // end of namespace sdr diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index 6ce22f6a8ba9..73471dae453d 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -147,7 +147,7 @@ namespace sdr // Scale the local ItemSet as far as it contains metric items. This needs to be // overloaded to do it for hierarchical objects like e.g. groups. - virtual void Scale(const boost::rational<long>& rScale); + virtual void Scale(const boost::rational<sal_Int64>& rScale); // Move local items to a new ItemPool. This needs to be // overloaded to do it for hierarchical objects like e.g. groups. diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx index 1a11e0c6f4bb..aff0ef429c70 100644 --- a/include/svx/svddrag.hxx +++ b/include/svx/svddrag.hxx @@ -146,8 +146,8 @@ public: bool CheckMinMoved(const Point& rPnt); long GetDX() const { return GetNow().X()-GetPrev().X(); } long GetDY() const { return GetNow().Y()-GetPrev().Y(); } - boost::rational<long> GetXFact() const; - boost::rational<long> GetYFact() const; + boost::rational<sal_Int64> GetXFact() const; + boost::rational<sal_Int64> GetYFact() const; SdrDragMethod* GetDragMethod() const { return pDragMethod; } void SetDragMethod(SdrDragMethod* pMth) { pDragMethod=pMth; } diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx index ad37eeee3099..b267857f10f7 100644 --- a/include/svx/svddrgmt.hxx +++ b/include/svx/svddrgmt.hxx @@ -258,8 +258,8 @@ public: class SVX_DLLPUBLIC SdrDragResize : public SdrDragMethod { protected: - boost::rational<long> aXFact; - boost::rational<long> aYFact; + boost::rational<sal_Int64> aXFact; + boost::rational<sal_Int64> aYFact; public: TYPEINFO_OVERRIDE(); diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 12b27b84bb41..d2ddc391b8f2 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -212,8 +212,8 @@ public: // waagerechte Linie hat z.B. immer eine Hoehe von 0. void SetMarkedObjRect(const Rectangle& rRect, bool bCopy=false); void MoveMarkedObj(const Size& rSiz, bool bCopy=false); - void ResizeMarkedObj(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bCopy=false); - void ResizeMultMarkedObj(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, const bool bCopy, const bool bWdh, const bool bHgt); + void ResizeMarkedObj(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bCopy=false); + void ResizeMultMarkedObj(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, const bool bCopy, const bool bWdh, const bool bHgt); long GetMarkedObjRotate() const; void RotateMarkedObj(const Point& rRef, long nWink, bool bCopy=false); void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false); @@ -228,7 +228,7 @@ public: void CopyMarkedObj(); void SetAllMarkedRect(const Rectangle& rRect, bool bCopy=false) { SetMarkedObjRect(rRect,bCopy); } void MoveAllMarked(const Size& rSiz, bool bCopy=false) { MoveMarkedObj (rSiz,bCopy); } - void ResizeAllMarked(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bCopy=false) { ResizeMarkedObj (rRef,xFact,yFact,bCopy); } + void ResizeAllMarked(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bCopy=false) { ResizeMarkedObj (rRef,xFact,yFact,bCopy); } long GetAllMarkedRotate() const { return GetMarkedObjRotate(); } void RotateAllMarked(const Point& rRef, long nWink, bool bCopy=false) { RotateMarkedObj(rRef,nWink,bCopy); } void MirrorAllMarked(const Point& rRef1, const Point& rRef2, bool bCopy=false) { MirrorMarkedObj(rRef1,rRef2,bCopy); } diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index 2ec177c4daa9..fb12c8fcc015 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -62,7 +62,7 @@ friend class SdrAttrObj; Color aFontColor; sal_uIntPtr nFontHeight; MapUnit eMapUnit; - boost::rational<long> aMapFraction; + boost::rational<sal_Int64> aMapFraction; private: static SdrEngineDefaults& GetDefaults(); @@ -92,8 +92,8 @@ public: static void SetMapUnit(MapUnit eMap) { GetDefaults().eMapUnit=eMap; } static MapUnit GetMapUnit() { return GetDefaults().eMapUnit; } // Default MapFraction ist 1/1. - static void SetMapFraction(const boost::rational<long>& rMap) { GetDefaults().aMapFraction=rMap; } - static boost::rational<long> GetMapFraction() { return GetDefaults().aMapFraction; } + static void SetMapFraction(const boost::rational<sal_Int64>& rMap) { GetDefaults().aMapFraction=rMap; } + static boost::rational<sal_Int64> GetMapFraction() { return GetDefaults().aMapFraction; } // Einen Outliner mit den engineglobalen // Defaulteinstellungen auf dem Heap erzeugen. diff --git a/include/svx/svdglev.hxx b/include/svx/svdglev.hxx index b1576bda5047..a7dd3f361886 100644 --- a/include/svx/svdglev.hxx +++ b/include/svx/svdglev.hxx @@ -78,7 +78,7 @@ public: void DeleteMarkedGluePoints(); void MoveMarkedGluePoints (const Size& rSiz, bool bCopy=false); - void ResizeMarkedGluePoints(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bCopy=false); + void ResizeMarkedGluePoints(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bCopy=false); void RotateMarkedGluePoints(const Point& rRef, long nWink, bool bCopy=false); void MirrorMarkedGluePoints(const Point& rRef1, const Point& rRef2, bool bCopy=false); void MirrorMarkedGluePointsHorizontal(bool bCopy=false); diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 850185edb581..3be9defa600f 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -155,12 +155,12 @@ protected: Link aIOProgressLink; OUString aTablePath; Size aMaxObjSize; // e.g. for auto-growing text - boost::rational<long> aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ... + boost::rational<sal_Int64> aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ... MapUnit eObjUnit; // see above FieldUnit eUIUnit; // unit, scale (e.g. 1/1000) for the UI (status bar) is set by ImpSetUIUnit() - boost::rational<long> aUIScale; // see above + boost::rational<sal_Int64> aUIScale; // see above OUString aUIUnitStr; // see above - boost::rational<long> aUIUnitFact; // see above + boost::rational<sal_Int64> aUIUnitFact; // see above int nUIUnitKomma; // see above SdrLayerAdmin* pLayerAdmin; @@ -374,10 +374,10 @@ public: // with the correct sizes. MapUnit GetScaleUnit() const { return eObjUnit; } void SetScaleUnit(MapUnit eMap); - const boost::rational<long>& GetScaleFraction() const { return aObjUnit; } - void SetScaleFraction(const boost::rational<long>& rFrac); + const boost::rational<sal_Int64>& GetScaleFraction() const { return aObjUnit; } + void SetScaleFraction(const boost::rational<sal_Int64>& rFrac); // Setting both simultaneously performs a little better - void SetScaleUnit(MapUnit eMap, const boost::rational<long>& rFrac); + void SetScaleUnit(MapUnit eMap, const boost::rational<sal_Int64>& rFrac); // maximal size e.g. for auto growing texts const Size& GetMaxObjSize() const { return aMaxObjSize; } @@ -387,12 +387,12 @@ public: void SetUIUnit(FieldUnit eUnit); FieldUnit GetUIUnit() const { return eUIUnit; } // The scale of the drawing. Default 1/1. - void SetUIScale(const boost::rational<long>& rScale); - const boost::rational<long>& GetUIScale() const { return aUIScale; } + void SetUIScale(const boost::rational<sal_Int64>& rScale); + const boost::rational<sal_Int64>& GetUIScale() const { return aUIScale; } // Setting both simultaneously performs a little better - void SetUIUnit(FieldUnit eUnit, const boost::rational<long>& rScale); + void SetUIUnit(FieldUnit eUnit, const boost::rational<sal_Int64>& rScale); - const boost::rational<long>& GetUIUnitFact() const { return aUIUnitFact; } + const boost::rational<sal_Int64>& GetUIUnitFact() const { return aUIUnitFact; } const OUString& GetUIUnitStr() const { return aUIUnitStr; } int GetUIUnitKomma() const { return nUIUnitKomma; } bool IsUIOnlyKomma() const { return bUIOnlyKomma; } @@ -400,7 +400,7 @@ public: static void TakeUnitStr(FieldUnit eUnit, OUString& rStr); void TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const; void TakeWinkStr(long nWink, OUString& rStr, bool bNoDegChar = false) const; - void TakePercentStr(const boost::rational<long>& rVal, OUString& rStr, bool bNoPercentChar = false) const; + void TakePercentStr(const boost::rational<sal_Int64>& rVal, OUString& rStr, bool bNoPercentChar = false) const; // RecalcPageNums is ordinarily only called by the Page. bool IsPagNumsDirty() const { return bPagNumsDirty; }; diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index bca9283c6f93..1d80eeb367fd 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -188,13 +188,13 @@ public: virtual const Rectangle& GetLogicRect() const 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 Shear(const Point& rRef, long nWink, double tn, bool bVShear) SAL_OVERRIDE; virtual void SetSnapRect(const Rectangle& rRect) SAL_OVERRIDE; virtual void SetLogicRect(const Rectangle& rRect) 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 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; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index f1dc3a3bf94c..aa5344e0134f 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -672,13 +672,13 @@ public: // Objekte sollten i.d.R. nur die Nbc-Methoden ueberladen. // Nbc bedeutet: 'NoBroadcast'. virtual void NbcMove (const Size& rSiz); - virtual void NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact); + virtual void NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact); virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); virtual void NbcMirror(const Point& rRef1, const Point& rRef2); virtual void NbcShear (const Point& rRef, long nWink, double tn, bool bVShear); virtual void Move (const Size& rSiz); - virtual void Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative = true); + virtual void Resize(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bUnsetRelative = true); virtual void Rotate(const Point& rRef, long nWink, double sn, double cs); virtual void Mirror(const Point& rRef1, const Point& rRef2); virtual void Shear (const Point& rRef, long nWink, double tn, bool bVShear); diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx index a10b0f7f6e1b..4efcde5df59f 100644 --- a/include/svx/svdocapt.hxx +++ b/include/svx/svdocapt.hxx @@ -116,7 +116,7 @@ public: virtual Pointer GetCreatePointer() 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 NbcSetRelativePos(const Point& rPnt) SAL_OVERRIDE; virtual Point GetRelativePos() const SAL_OVERRIDE; diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx index 036a4bee4df4..ea90a4b94d57 100644 --- a/include/svx/svdocirc.hxx +++ b/include/svx/svdocirc.hxx @@ -112,7 +112,7 @@ public: virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const SAL_OVERRIDE; virtual Pointer GetCreatePointer() const SAL_OVERRIDE; virtual void NbcMove(const Size& aSiz) 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 NbcMirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE; virtual void NbcShear (const Point& rRef, long nWink, double tn, bool bVShear) SAL_OVERRIDE; virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const SAL_OVERRIDE; diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index 8161ca55cf2b..cc5090cc5a56 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -264,7 +264,7 @@ public: virtual void NbcSetSnapRect(const Rectangle& rRect) SAL_OVERRIDE; virtual void NbcMove(const Size& aSize) SAL_OVERRIDE; - virtual void NbcResize(const Point& rRefPnt, const boost::rational<long>& aXFact, const boost::rational<long>& aYFact) SAL_OVERRIDE; + virtual void NbcResize(const Point& rRefPnt, const boost::rational<sal_Int64>& aXFact, const boost::rational<sal_Int64>& aYFact) SAL_OVERRIDE; // #i54102# added rotate, mirrorn and shear support virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs) SAL_OVERRIDE; diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 3179369711e6..cd1e63388283 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -162,7 +162,7 @@ public: virtual sal_uInt32 GetHdlCount() const SAL_OVERRIDE; virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const 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; diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index 4dc70df5b93d..48a5332b86ea 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -85,7 +85,7 @@ public: virtual long GetShearAngle(bool bVertical = false) const 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; @@ -95,7 +95,7 @@ public: virtual void SetLogicRect(const Rectangle& rRect) 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 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; diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx index f0cb6a7b624c..4ca46421ed92 100644 --- a/include/svx/svdomeas.hxx +++ b/include/svx/svdomeas.hxx @@ -117,7 +117,7 @@ public: virtual Pointer GetCreatePointer() 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 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; diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx index a27a35e8d0eb..37b7b123d0c8 100644 --- a/include/svx/svdoole2.hxx +++ b/include/svx/svdoole2.hxx @@ -136,7 +136,7 @@ public: SdrOle2Obj& operator=(const SdrOle2Obj& rObj); virtual void NbcMove(const Size& rSize) 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 NbcSetSnapRect(const Rectangle& rRect) SAL_OVERRIDE; virtual void NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE; virtual void SetGeoData(const SdrObjGeoData& rGeo) SAL_OVERRIDE; @@ -167,7 +167,7 @@ public: const OUString& aMediaType ); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetParentXModel() const; - bool CalculateNewScaling( boost::rational<long>& aScaleWidth, boost::rational<long>& aScaleHeight, Size& aObjAreaSize ); + bool CalculateNewScaling( boost::rational<sal_Int64>& aScaleWidth, boost::rational<sal_Int64>& aScaleHeight, Size& aObjAreaSize ); bool AddOwnLightClient(); // handy to get the empty replacement graphic without accessing all the old stuff diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index f3e4a46b9004..efcdf356a0a5 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -114,7 +114,7 @@ public: basegfx::B2DPolyPolygon getDragPolyPolygon(const SdrDragStat& rDrag) const; virtual void NbcMove(const Size& aSize) SAL_OVERRIDE; - virtual void NbcResize(const Point& rRefPnt, const boost::rational<long>& aXFact, const boost::rational<long>& aYFact) SAL_OVERRIDE; + virtual void NbcResize(const Point& rRefPnt, const boost::rational<sal_Int64>& aXFact, const boost::rational<sal_Int64>& aYFact) SAL_OVERRIDE; virtual void NbcRotate(const Point& rRefPnt, long nAngle, double fSin, double fCos) SAL_OVERRIDE; virtual void NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) SAL_OVERRIDE; virtual void NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) SAL_OVERRIDE; diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx index db40274f3496..ea3c63bf51f4 100644 --- a/include/svx/svdorect.hxx +++ b/include/svx/svdorect.hxx @@ -105,7 +105,7 @@ public: virtual Pointer GetCreatePointer() 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 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; diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 8b461b6c6aaa..d78e81b32685 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -241,7 +241,7 @@ public: virtual Pointer GetCreatePointer() 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 bool BegTextEdit(SdrOutliner& rOutl) SAL_OVERRIDE; virtual void EndTextEdit(SdrOutliner& rOutl) SAL_OVERRIDE; diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 94a032c2b585..ba69600e2540 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -264,7 +264,7 @@ private: Rectangle& rTextRect, Rectangle& rAnchorRect, Rectangle& rPaintRect, - boost::rational<long>& aFitXKorreg ) const; + boost::rational<sal_Int64>& aFitXKorreg ) const; void ImpAutoFitText( SdrOutliner& rOutliner ) const; static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ); SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const; @@ -284,7 +284,7 @@ protected: SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier, bool bNoSetAttr = false) const; SdrObject* ImpConvertAddText(SdrObject* pObj, bool bBezier) const; void ImpSetTextStyleSheetListeners(); - void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, boost::rational<long>& rFitXKorreg) const; + void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, boost::rational<sal_Int64>& rFitXKorreg) const; void ImpJustifyRect(Rectangle& rRect) const; void ImpCheckShear(); Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; @@ -465,7 +465,7 @@ public: virtual Pointer GetCreatePointer() 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 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; diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx index f22cb57f161f..d72f5eb32349 100644 --- a/include/svx/svdouno.hxx +++ b/include/svx/svdouno.hxx @@ -80,7 +80,7 @@ public: virtual SdrUnoObj* Clone() const SAL_OVERRIDE; SdrUnoObj& operator= (const SdrUnoObj& rObj); - 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 NbcSetLayer(SdrLayerID nLayer) SAL_OVERRIDE; // SpecialDrag support diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index 82c311ef9c5f..1e41cc1d5d93 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -101,13 +101,13 @@ public: virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) 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 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/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx index b0adf6d09f97..aa4e0e82163b 100644 --- a/include/svx/svdpoev.hxx +++ b/include/svx/svdpoev.hxx @@ -64,7 +64,7 @@ public: bool IsDeleteMarkedPointsPossible() const SAL_OVERRIDE; void MoveMarkedPoints(const Size& rSiz); - void ResizeMarkedPoints(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact); + void ResizeMarkedPoints(const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact); void RotateMarkedPoints(const Point& rRef, long nWink); // Hierbei entstehen eventuell beliebig viele neue Objekte: diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx index c963d8031ad9..5b3dcfa00a92 100644 --- a/include/svx/svdsnpv.hxx +++ b/include/svx/svdsnpv.hxx @@ -51,8 +51,8 @@ protected: class ImplHelpLineOverlay* mpHelpLineOverlay; Size aMagnSiz; - boost::rational<long> aSnapWdtX; - boost::rational<long> aSnapWdtY; + boost::rational<sal_Int64> aSnapWdtX; + boost::rational<sal_Int64> aSnapWdtY; sal_uInt16 nMagnSizPix; long nSnapAngle; @@ -98,9 +98,9 @@ public: virtual void BrkAction() SAL_OVERRIDE; // f.abg.Klassen Actions z,B, Draggen abbrechen. virtual void TakeActionRect(Rectangle& rRect) const SAL_OVERRIDE; - void SetSnapGridWidth(const boost::rational<long>& rX, const boost::rational<long>& rY) { aSnapWdtX=rX; aSnapWdtY=rY; } - const boost::rational<long>& GetSnapGridWidthX() const { return aSnapWdtX; } - const boost::rational<long>& GetSnapGridWidthY() const { return aSnapWdtY; } + void SetSnapGridWidth(const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY) { aSnapWdtX=rX; aSnapWdtY=rY; } + const boost::rational<sal_Int64>& GetSnapGridWidthX() const { return aSnapWdtX; } + const boost::rational<sal_Int64>& GetSnapGridWidthY() const { return aSnapWdtY; } void SetSnapMagnetic(const Size& rSiz) { if (rSiz!=aMagnSiz) { aMagnSiz=rSiz; } } const Size& GetSnapMagnetic() const { return aMagnSiz; } diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index 163e2f213126..9790327a9241 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -55,10 +55,10 @@ inline void MovePoly(Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(), inline void MovePoly(tools::PolyPolygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } void MoveXPoly(XPolygon& rPoly, const Size& S); -SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bNoJustify = false); -inline void ResizePoint(Point& rPnt, const Point& rRef, boost::rational<long> xFact, boost::rational<long> yFact); -void ResizePoly(Polygon& rPoly, const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact); -void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact); +SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact, bool bNoJustify = false); +inline void ResizePoint(Point& rPnt, const Point& rRef, boost::rational<sal_Int64> xFact, boost::rational<sal_Int64> yFact); +void ResizePoly(Polygon& rPoly, const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact); +void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const boost::rational<sal_Int64>& xFact, const boost::rational<sal_Int64>& yFact); inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs); SVX_DLLPUBLIC void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs); @@ -102,7 +102,7 @@ void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rR /* Inline */ /**************************************************************************************************/ -inline void ResizePoint(Point& rPnt, const Point& rRef, boost::rational<long> xFact, boost::rational<long> yFact) +inline void ResizePoint(Point& rPnt, const Point& rRef, boost::rational<sal_Int64> xFact, boost::rational<sal_Int64> yFact) { rPnt.X()=rRef.X()+ Round(((double)(rPnt.X()-rRef.X())*xFact.numerator())/xFact.denominator()); rPnt.Y()=rRef.Y()+ Round(((double)(rPnt.Y()-rRef.Y())*yFact.numerator())/yFact.denominator()); @@ -219,25 +219,25 @@ SVX_DLLPUBLIC void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho) // Rechnung und Zwischenergebnis sind BigInt. SVX_DLLPUBLIC long BigMulDiv(long nVal, long nMul, long nDiv); -// Fehlerbehaftetes Kuerzen einer boost::rational<long>. +// Fehlerbehaftetes Kuerzen einer boost::rational<sal_Int64>. // nDigits gibt an, wieviele signifikante Stellen in // Zaehler/Nenner mindestens erhalten bleiben sollen. -void Kuerzen(boost::rational<long>& rF, unsigned nDigits); +void Kuerzen(boost::rational<sal_Int64>& rF, unsigned nDigits); class FrPair { - boost::rational<long> aX; - boost::rational<long> aY; + boost::rational<sal_Int64> aX; + boost::rational<sal_Int64> aY; public: FrPair() : aX(0,1),aY(0,1) {} - FrPair(const boost::rational<long>& rBoth) : aX(rBoth),aY(rBoth) {} - FrPair(const boost::rational<long>& rX, const boost::rational<long>& rY) : aX(rX),aY(rY) {} + FrPair(const boost::rational<sal_Int64>& rBoth) : aX(rBoth),aY(rBoth) {} + FrPair(const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY) : aX(rX),aY(rY) {} FrPair(long nMul, long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {} FrPair(long xMul, long xDiv, long yMul, long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {} - const boost::rational<long>& X() const { return aX; } - const boost::rational<long>& Y() const { return aY; } - boost::rational<long>& X() { return aX; } - boost::rational<long>& Y() { return aY; } + const boost::rational<sal_Int64>& X() const { return aX; } + const boost::rational<sal_Int64>& Y() const { return aY; } + boost::rational<sal_Int64>& X() { return aX; } + boost::rational<sal_Int64>& Y() { return aY; } }; // Fuer die Umrechnung von Masseinheiten @@ -263,7 +263,7 @@ inline bool IsInch(FieldUnit eU) { } class SVX_DLLPUBLIC SdrFormatter { - boost::rational<long> aScale; + boost::rational<sal_Int64> aScale; long nMul_; long nDiv_; short nKomma_; diff --git a/include/svx/sxfiitm.hxx b/include/svx/sxfiitm.hxx index 6aa43ac3532d..64ef18d4ed5e 100644 --- a/include/svx/sxfiitm.hxx +++ b/include/svx/sxfiitm.hxx @@ -27,19 +27,19 @@ /*************************************************************************/ class SdrFractionItem: public SfxPoolItem { - boost::rational<long> nValue; + boost::rational<sal_Int64> nValue; public: TYPEINFO_VISIBILITY( SVX_DLLPUBLIC ); SdrFractionItem(sal_uInt16 nId=0): SfxPoolItem(nId) {} - SdrFractionItem(sal_uInt16 nId, const boost::rational<long>& rVal): SfxPoolItem(nId), nValue(rVal) {} + SdrFractionItem(sal_uInt16 nId, const boost::rational<sal_Int64>& rVal): SfxPoolItem(nId), nValue(rVal) {} SdrFractionItem(sal_uInt16 nId, SvStream& rIn); virtual bool operator==(const SfxPoolItem&) const SAL_OVERRIDE; virtual bool GetPresentation(SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, OUString &rText, const IntlWrapper * = 0) const SAL_OVERRIDE; virtual SfxPoolItem* Create(SvStream&, sal_uInt16 nVer) const SAL_OVERRIDE; virtual SvStream& Store(SvStream&, sal_uInt16 nItemVers) const SAL_OVERRIDE; virtual SfxPoolItem* Clone(SfxItemPool *pPool=NULL) const SAL_OVERRIDE; - const boost::rational<long>& GetValue() const { return nValue; } - void SetValue(const boost::rational<long>& rVal) { nValue = rVal; } + const boost::rational<sal_Int64>& GetValue() const { return nValue; } + void SetValue(const boost::rational<sal_Int64>& rVal) { nValue = rVal; } }; diff --git a/include/svx/sxsiitm.hxx b/include/svx/sxsiitm.hxx index 8a7625a576ad..ecbba8d31dd6 100644 --- a/include/svx/sxsiitm.hxx +++ b/include/svx/sxsiitm.hxx @@ -24,8 +24,8 @@ class SdrScaleItem: public SdrFractionItem { public: TYPEINFO_OVERRIDE(); - SdrScaleItem(sal_uInt16 nId=0): SdrFractionItem(nId, boost::rational<long>(1,1) ) {} - SdrScaleItem(sal_uInt16 nId, const boost::rational<long>& rVal): SdrFractionItem(nId,rVal) {} + SdrScaleItem(sal_uInt16 nId=0): SdrFractionItem(nId, boost::rational<sal_Int64>(1,1) ) {} + SdrScaleItem(sal_uInt16 nId, const boost::rational<sal_Int64>& rVal): SdrFractionItem(nId,rVal) {} SdrScaleItem(sal_uInt16 nId, SvStream& rIn): SdrFractionItem(nId,rIn) {} virtual bool GetPresentation(SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, OUString &rText, const IntlWrapper * = 0) const SAL_OVERRIDE; virtual SfxPoolItem* Create(SvStream&, sal_uInt16 nVer) const SAL_OVERRIDE; diff --git a/include/tools/rational.hxx b/include/tools/rational.hxx index 0eeb1032a83c..bd3615140a89 100644 --- a/include/tools/rational.hxx +++ b/include/tools/rational.hxx @@ -15,10 +15,10 @@ class SvStream; -TOOLS_DLLPUBLIC boost::rational<long> rational_FromDouble(double dVal); -TOOLS_DLLPUBLIC void rational_ReduceInaccurate(boost::rational<long>& rRational, unsigned nSignificantBits); -TOOLS_DLLPUBLIC SvStream& ReadFraction(SvStream& rIStream, boost::rational<long>& rRational); -TOOLS_DLLPUBLIC SvStream& WriteFraction(SvStream& rOStream, const boost::rational<long>& rRational); +TOOLS_DLLPUBLIC boost::rational<sal_Int64> rational_FromDouble(double dVal); +TOOLS_DLLPUBLIC void rational_ReduceInaccurate(boost::rational<sal_Int64>& rRational, unsigned nSignificantBits); +TOOLS_DLLPUBLIC SvStream& ReadFraction(SvStream& rIStream, boost::rational<sal_Int64>& rRational); +TOOLS_DLLPUBLIC SvStream& WriteFraction(SvStream& rOStream, const boost::rational<sal_Int64>& rRational); #endif diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 128895fc0675..4db341fe7997 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -136,7 +136,7 @@ public: // additional Move method getting specifics how to handle MapMode( MAP_PIXEL ) void Move( long nX, long nY, long nDPIX, long nDPIY ); void Scale( double fScaleX, double fScaleY ); - void Scale( const boost::rational<long>& rScaleX, const boost::rational<long>& rScaleY ); + void Scale( const boost::rational<sal_Int64>& rScaleX, const boost::rational<sal_Int64>& rScaleY ); void Rotate( long nAngle10 ); void Clip( const Rectangle& ); /* get the bound rect of the contained actions diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx index 211727f39660..e86c96f23573 100644 --- a/include/vcl/mapmod.hxx +++ b/include/vcl/mapmod.hxx @@ -44,8 +44,8 @@ private: sal_uLong mnRefCount; MapUnit meUnit; Point maOrigin; - boost::rational<long> maScaleX; - boost::rational<long> maScaleY; + boost::rational<sal_Int64> maScaleX; + boost::rational<sal_Int64> maScaleY; bool mbSimple; friend SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rMapMode ); @@ -75,7 +75,7 @@ public: MapMode( const MapMode& rMapMode ); MapMode( MapUnit eUnit ); MapMode( MapUnit eUnit, const Point& rLogicOrg, - const boost::rational<long>& rScaleX, const boost::rational<long>& rScaleY ); + const boost::rational<sal_Int64>& rScaleX, const boost::rational<sal_Int64>& rScaleY ); ~MapMode(); void SetMapUnit( MapUnit eUnit ); @@ -86,11 +86,11 @@ public: const Point& GetOrigin() const { return mpImplMapMode->maOrigin; } - void SetScaleX( const boost::rational<long>& rScaleX ); - const boost::rational<long>& GetScaleX() const + void SetScaleX( const boost::rational<sal_Int64>& rScaleX ); + const boost::rational<sal_Int64>& GetScaleX() const { return mpImplMapMode->maScaleX; } - void SetScaleY( const boost::rational<long>& rScaleY ); - const boost::rational<long>& GetScaleY() const + void SetScaleY( const boost::rational<sal_Int64>& rScaleY ); + const boost::rational<sal_Int64>& GetScaleY() const { return mpImplMapMode->maScaleY; } MapMode& operator=( const MapMode& rMapMode ); diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 4886410bd2aa..c7d1365ffced 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -124,7 +124,7 @@ public: bool SetOutputSizePixel( const Size& rNewSize, bool bErase = true ); bool SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, - const boost::rational<long>& rScale, + const boost::rational<sal_Int64>& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer, const bool bTopDown = false ); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 3e942872364e..cb7dbdefa17d 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1011,8 +1011,8 @@ public: void SetCursor( vcl::Cursor* pCursor ); vcl::Cursor* GetCursor() const; - void SetZoom( const boost::rational<long>& rZoom ); - const boost::rational<long>& GetZoom() const; + void SetZoom( const boost::rational<sal_Int64>& rZoom ); + const boost::rational<sal_Int64>& GetZoom() const; bool IsZoom() const; long CalcZoom( long n ) const; diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx index d91e271277bc..293a169f292b 100644 --- a/reportdesign/inc/RptObject.hxx +++ b/reportdesign/inc/RptObject.hxx @@ -148,7 +148,7 @@ protected: OCustomShape(const OUString& _sComponentName); virtual void NbcMove( const Size& rSize ) 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 NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE; @@ -196,7 +196,7 @@ protected: virtual void NbcMove( const Size& rSize ) 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 NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE; @@ -244,7 +244,7 @@ protected: virtual ~OUnoObject(); virtual void NbcMove( const Size& rSize ) 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 NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE; diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 5c0d525dae60..b9c0b5dbbb69 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -538,7 +538,7 @@ void OCustomShape::NbcMove( const Size& rSize ) SdrObjCustomShape::NbcMove( rSize ); } -void OCustomShape::NbcResize(const Point& rRef, const boost::rational<long>& xFract, const boost::rational<long>& yFract) +void OCustomShape::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFract, const boost::rational<sal_Int64>& yFract) { SdrObjCustomShape::NbcResize( rRef, xFract, yFract ); @@ -749,7 +749,7 @@ void OUnoObject::NbcMove( const Size& rSize ) -void OUnoObject::NbcResize(const Point& rRef, const boost::rational<long>& xFract, const boost::rational<long>& yFract) +void OUnoObject::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFract, const boost::rational<sal_Int64>& yFract) { SdrUnoObj::NbcResize( rRef, xFract, yFract ); @@ -1050,7 +1050,7 @@ void OOle2Obj::NbcMove( const Size& rSize ) -void OOle2Obj::NbcResize(const Point& rRef, const boost::rational<long>& xFract, const boost::rational<long>& yFract) +void OOle2Obj::NbcResize(const Point& rRef, const boost::rational<sal_Int64>& xFract, const boost::rational<sal_Int64>& yFract) { SdrOle2Obj::NbcResize( rRef, xFract, yFract ); diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 4c36ab743abe..e9d7671152eb 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -257,7 +257,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index fec4e81de722..724c36809409 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -211,7 +211,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index f00ceb8b8123..d1315cad5852 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -202,7 +202,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); /** fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index e57769c3721d..5b28d97e1278 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -120,7 +120,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); void scrollChildren(long _nThumbPosX); }; diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx index 83d4d7aee857..d96cfa064f90 100644 --- a/reportdesign/source/ui/inc/StartMarker.hxx +++ b/reportdesign/source/ui/inc/StartMarker.hxx @@ -71,7 +71,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); }; } #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_STARTMARKER_HXX diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index facbd129a8c9..01a65aa7fa2f 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -176,7 +176,7 @@ namespace rptui @param _aZoom the zoom scale @param _rWindow where to set the map mode */ - void setZoomFactor(const boost::rational<long>& _aZoom, ::vcl::Window& _rWindow); + void setZoomFactor(const boost::rational<sal_Int64>& _aZoom, ::vcl::Window& _rWindow); } #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_UITOOLS_HXX diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index 5fe5ab29fe98..5963b42a7845 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -331,7 +331,7 @@ namespace rptui /** zoom the ruler and view windows */ - void zoom(const boost::rational<long>& _aZoom); + void zoom(const boost::rational<sal_Int64>& _aZoom); void scrollChildren(const Point& _aThumbPos); diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 2ca816ddede2..59e0121fe22b 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -991,7 +991,7 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(),SDRINSERT_ADDMARK); } -void setZoomFactor(const boost::rational<long>& _aZoom, vcl::Window& _rWindow) +void setZoomFactor(const boost::rational<sal_Int64>& _aZoom, vcl::Window& _rWindow) { MapMode aMapMode( _rWindow.GetMapMode() ); aMapMode.SetScaleX(_aZoom); diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 853358ef6ccc..09d0626c16cd 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -684,7 +684,7 @@ sal_uInt32 ODesignView::getMarkedObjectCount() const return m_aScrollWindow.getMarkedObjectCount(); } -void ODesignView::zoom(const boost::rational<long>& _aZoom) +void ODesignView::zoom(const boost::rational<sal_Int64>& _aZoom) { m_aScrollWindow.zoom(_aZoom); } diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index eacba6c64ffe..ec3851be4173 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -45,7 +45,7 @@ OEndMarker::~OEndMarker() void OEndMarker::Paint( const Rectangle& /*rRect*/ ) { - boost::rational<long> aCornerSpace(long(CORNER_SPACE)); + boost::rational<sal_Int64> aCornerSpace(long(CORNER_SPACE)); aCornerSpace *= GetMapMode().GetScaleX(); const long nCornerSpace = boost::rational_cast<long>(aCornerSpace); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index bdfa22448d81..89dbb5a767bd 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -4171,7 +4171,7 @@ void OReportController::impl_fillState_nothrow(const OUString& _sProperty,dbaui: void OReportController::impl_zoom_nothrow() { - boost::rational<long> aZoom(m_nZoomValue,100); + boost::rational<sal_Int64> aZoom(m_nZoomValue,100); setZoomFactor( aZoom,*getDesignView() ); getDesignView()->zoom(aZoom); InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(), true); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 519a0abb7e59..5111ecc04ba5 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -202,8 +202,8 @@ void OReportSection::fill() m_pView->SetGridFine(aGridSizeFine); // #i93595# set snap grid width to snap to all existing subdivisions - const boost::rational<long> aX(aGridSizeFine.A()); - const boost::rational<long> aY(aGridSizeFine.B()); + const boost::rational<sal_Int64> aX(aGridSizeFine.A()); + const boost::rational<sal_Int64> aY(aGridSizeFine.B()); m_pView->SetSnapGridWidth(aX, aY); m_pView->SetGridSnap( pDesignView->isGridSnap() ); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 57afd5c0dcba..db1b6aa13aaa 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -141,10 +141,10 @@ void OReportWindow::showRuler(bool _bShow) sal_Int32 OReportWindow::getMaxMarkerWidth(bool _bWithEnd) const { - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_aViewsWindow.GetMapMode().GetScaleX(); if ( _bWithEnd ) - aStartWidth += boost::rational<long>(long(REPORT_ENDMARKER_WIDTH)); + aStartWidth += boost::rational<sal_Int64>(long(REPORT_ENDMARKER_WIDTH)); return sal_Int32(boost::rational_cast<long>(aStartWidth)); } @@ -153,11 +153,11 @@ sal_Int32 OReportWindow::GetTotalWidth() const sal_Int32 nWidth = 0; if ( !m_aViewsWindow.empty() ) { - boost::rational<long> aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); - const boost::rational<long> aZoom(m_pView->getController().getZoomValue(),100); + boost::rational<sal_Int64> aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); + const boost::rational<sal_Int64> aZoom(m_pView->getController().getZoomValue(),100); aStartWidth *= aZoom; const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; - boost::rational<long> aPaperWidth(nPaperWidth,1); + boost::rational<sal_Int64> aPaperWidth(nPaperWidth,1); aPaperWidth *= aZoom; const Size aPageSize = LogicToPixel(Size(boost::rational_cast<long>(aPaperWidth),0)); nWidth = aPageSize.Width() + boost::rational_cast<long>(aStartWidth); @@ -171,7 +171,7 @@ void OReportWindow::Resize() if ( !m_aViewsWindow.empty() ) { const Size aTotalOutputSize = GetOutputSizePixel(); - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MAP_APPFONT ); Point aStartPoint(boost::rational_cast<long>(aStartWidth) + aOffset.X(),0); @@ -372,7 +372,7 @@ sal_uInt32 OReportWindow::getMarkedObjectCount() const return m_aViewsWindow.getMarkedObjectCount(); } -void OReportWindow::zoom(const boost::rational<long>& _aZoom) +void OReportWindow::zoom(const boost::rational<sal_Int64>& _aZoom) { m_aHRuler.SetZoom(_aZoom); m_aHRuler.Invalidate(); @@ -414,14 +414,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const break; case SVX_ZOOM_WHOLEPAGE: { - nZoom = (sal_uInt16) boost::rational_cast<long>( boost::rational<long>(aSize.Width() * 100, impl_getRealPixelWidth()) ); + nZoom = (sal_uInt16) boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Width() * 100, impl_getRealPixelWidth()) ); MapMode aMap( MAP_100TH_MM ); const Size aHeight = m_aViewsWindow.LogicToPixel(m_aViewsWindow.PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler.GetSizePixel().Height())),aMap); - nZoom = ::std::min(nZoom, (sal_uInt16) boost::rational_cast<long>( boost::rational<long>(aSize.Height() * 100, aHeight.Height()) )); + nZoom = ::std::min(nZoom, (sal_uInt16) boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Height() * 100, aHeight.Height()) )); } break; case SVX_ZOOM_PAGEWIDTH: - nZoom = (sal_uInt16)boost::rational_cast<long>( boost::rational<long>(aSize.Width() * 100, this->impl_getRealPixelWidth()) ); + nZoom = (sal_uInt16)boost::rational_cast<long>( boost::rational<sal_Int64>(aSize.Width() * 100, this->impl_getRealPixelWidth()) ); break; default: break; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 59d1f6de1efd..5db2bf003377 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -101,7 +101,7 @@ void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight) m_aTotalPixelSize.Height() = _nHeight; // now set the ranges without start marker - boost::rational<long> aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); + boost::rational<sal_Int64> aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); long nWidth = long(_nWidth - boost::rational_cast<double>(aStartWidth)); m_aHScroll.SetRangeMax( nWidth ); m_aVScroll.SetRangeMax( m_aTotalPixelSize.Height() ); @@ -163,7 +163,7 @@ Size OScrollWindowHelper::ResizeScrollBars() const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT ); // resize scrollbars and set their ranges { - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X() - boost::rational_cast<long>(aStartWidth); lcl_setScrollBar(nNewWidth,Point( boost::rational_cast<long>(aStartWidth) + aOffset.X(), aOutPixSz.Height() ),Size( nNewWidth, nScrSize ),m_aHScroll); } @@ -382,7 +382,7 @@ sal_uInt32 OScrollWindowHelper::getMarkedObjectCount() const return m_aReportWindow.getMarkedObjectCount(); } -void OScrollWindowHelper::zoom(const boost::rational<long>& _aZoom) +void OScrollWindowHelper::zoom(const boost::rational<sal_Int64>& _aZoom) { m_aReportWindow.zoom(_aZoom); Resize(); diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 1d82b716cd5e..7c07993dad73 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -220,7 +220,7 @@ void OSectionWindow::Resize() Window::Resize(); Size aOutputSize = GetOutputSizePixel(); - boost::rational<long> aEndWidth(long(REPORT_ENDMARKER_WIDTH)); + boost::rational<sal_Int64> aEndWidth(long(REPORT_ENDMARKER_WIDTH)); aEndWidth *= GetMapMode().GetScaleX(); const Point aThumbPos = m_pParent->getView()->getThumbPos(); @@ -236,7 +236,7 @@ void OSectionWindow::Resize() { const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aThumbPos.X() + aOutputSize.Width() ); - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); // set start marker @@ -299,7 +299,7 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker ) return 0L; } -void OSectionWindow::zoom(const boost::rational<long>& _aZoom) +void OSectionWindow::zoom(const boost::rational<sal_Int64>& _aZoom) { setZoomFactor(_aZoom,*this); m_aStartMarker.zoom(_aZoom); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index bc7fc19a6efd..75b30f7e619f 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -89,7 +89,7 @@ OStartMarker::~OStartMarker() sal_Int32 OStartMarker::getMinHeight() const { - boost::rational<long> aExtraWidth(long(2*REPORT_EXTRA_SPACE)); + boost::rational<sal_Int64> aExtraWidth(long(2*REPORT_EXTRA_SPACE)); aExtraWidth *= GetMapMode().GetScaleX(); return LogicToPixel(Size(0,m_aText.GetTextHeight())).Height() + boost::rational_cast<long>(aExtraWidth); } @@ -221,7 +221,7 @@ void OStartMarker::Resize() aImageSize.Width() = long(aImageSize.Width() * boost::rational_cast<double>(rMapMode.GetScaleX())); aImageSize.Height() = long(aImageSize.Height() * boost::rational_cast<double>(rMapMode.GetScaleY())); - boost::rational<long> aExtraWidth(long(REPORT_EXTRA_SPACE)); + boost::rational<sal_Int64> aExtraWidth(long(REPORT_EXTRA_SPACE)); aExtraWidth *= rMapMode.GetScaleX(); Point aPos(aImageSize.Width() + boost::rational_cast<long>((aExtraWidth + aExtraWidth)), boost::rational_cast<long>(aExtraWidth)); @@ -281,7 +281,7 @@ void OStartMarker::setCollapsed(bool _bCollapsed) changeImage(); } -void OStartMarker::zoom(const boost::rational<long>& _aZoom) +void OStartMarker::zoom(const boost::rational<sal_Int64>& _aZoom) { setZoomFactor(_aZoom,*this); m_aVRuler.SetZoom(_aZoom); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 8c0e49f4eb86..8f0dd2a76b4f 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -263,7 +263,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) Window::Paint( rRect ); Size aOut = GetOutputSizePixel(); - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= GetMapMode().GetScaleX(); aOut.Width() -= boost::rational_cast<long>(aStartWidth); @@ -1685,11 +1685,11 @@ void OViewsWindow::collapseSections(const uno::Sequence< beans::PropertyValue>& } } -void OViewsWindow::zoom(const boost::rational<long>& _aZoom) +void OViewsWindow::zoom(const boost::rational<sal_Int64>& _aZoom) { const MapMode& aMapMode = GetMapMode(); - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); if ( _aZoom < aMapMode.GetScaleX() ) aStartWidth *= aMapMode.GetScaleX(); else diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 33b12ae54a00..b8274f5e81a0 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -78,7 +78,7 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) OScrollWindowHelper* pScrollWindow = pReportWindow->getScrollWindow(); Size aOut = pReportWindow->GetOutputSizePixel(); - boost::rational<long> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + boost::rational<sal_Int64> aStartWidth(long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_pParent->GetMapMode().GetScaleX(); aOut.Width() -= boost::rational_cast<long>(aStartWidth); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 50204b310c99..560729b0887d 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -456,12 +456,12 @@ public: long GetNeededSize( SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** pPatternChange ) const; sal_uInt16 GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const; void GetOptimalHeight( diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 93f33bdc3cf3..9a796748cf6c 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1453,7 +1453,7 @@ public: void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ); + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ); bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; @@ -1521,7 +1521,7 @@ public: sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, const ScMarkData* pMarkData = NULL, const ScColWidthParam* pParam = NULL ); @@ -1534,7 +1534,7 @@ public: long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, bool bTotalSize = false ); SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow); diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index d3f7b3be986d..9e564319fc2c 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -44,8 +44,8 @@ class ScEditUtil OutputDevice* pDev; // MapMode has to be set double nPPTX; double nPPTY; - boost::rational<long> aZoomX; - boost::rational<long> aZoomY; + boost::rational<sal_Int64> aZoomX; + boost::rational<sal_Int64> aZoomY; static const char pCalcDelimiters[]; @@ -82,7 +82,7 @@ public: ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ, const Point& rScrPosPixel, OutputDevice* pDevice, double nScaleX, double nScaleY, - const boost::rational<long>& rX, const boost::rational<long>& rY ) : + const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY ) : pDoc(pDocument),nCol(nX),nRow(nY),nTab(nZ), aScrPos(rScrPosPixel),pDev(pDevice), nPPTX(nScaleX),nPPTY(nScaleY),aZoomX(rX),aZoomY(rY) {} diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 66bdc7e50edb..0f72e0308aa7 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -84,14 +84,14 @@ public: static void GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev = NULL, - const boost::rational<long>* pScale = NULL, + const boost::rational<sal_Int64>* pScale = NULL, const SfxItemSet* pCondSet = NULL, sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL, const Color* pTextConfigColor = NULL ); /** Fills a font object from the own item set. */ void GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev = NULL, - const boost::rational<long>* pScale = NULL, + const boost::rational<sal_Int64>* pScale = NULL, const SfxItemSet* pCondSet = NULL, sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL, const Color* pTextConfigColor = NULL ) const; diff --git a/sc/inc/rowheightcontext.hxx b/sc/inc/rowheightcontext.hxx index 0db012c4a263..816c53d0c88a 100644 --- a/sc/inc/rowheightcontext.hxx +++ b/sc/inc/rowheightcontext.hxx @@ -22,8 +22,8 @@ class SC_DLLPUBLIC RowHeightContext { double mfPPTX; double mfPPTY; - boost::rational<long> maZoomX; - boost::rational<long> maZoomY; + boost::rational<sal_Int64> maZoomX; + boost::rational<sal_Int64> maZoomY; OutputDevice* mpOutDev; sal_uInt16 mnExtraHeight; @@ -31,15 +31,15 @@ class SC_DLLPUBLIC RowHeightContext public: RowHeightContext( - double fPPTX, double fPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + double fPPTX, double fPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, OutputDevice* pOutDev ); ~RowHeightContext(); double getPPTX() const { return mfPPTX;} double getPPTY() const { return mfPPTY;} - const boost::rational<long>& getZoomX() const { return maZoomX;} - const boost::rational<long>& getZoomY() const { return maZoomY;} + const boost::rational<sal_Int64>& getZoomX() const { return maZoomX;} + const boost::rational<sal_Int64>& getZoomY() const { return maZoomY;} OutputDevice* getOutputDevice() { return mpOutDev;} diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index c59dc473aeb6..3b33c65007e7 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -637,7 +637,7 @@ public: void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ); + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ); bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; @@ -672,7 +672,7 @@ public: sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, const ScMarkData* pMarkData, const ScColWidthParam* pParam ); bool SetOptimalHeight( @@ -686,7 +686,7 @@ public: long GetNeededSize( SCCOL nCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, bool bTotalSize ); void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth ); void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth ); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index fd05c65a46e8..ad9a45c65ef7 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -83,7 +83,7 @@ inline bool IsAmbiguousScript( sal_uInt8 nScript ) long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** ppPatternChange ) const { @@ -240,7 +240,7 @@ long ScColumn::GetNeededSize( // bGetFont is set also if script type changes if (rOptions.bGetFont) { - boost::rational<long> aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY; + boost::rational<sal_Int64> aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY; vcl::Font aFont; // font color doesn't matter here pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aFontZoom, pCondSet, nScript ); @@ -616,7 +616,7 @@ public: } sal_uInt16 ScColumn::GetOptimalColWidth( - OutputDevice* pDev, double nPPTX, double nPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + OutputDevice* pDev, double nPPTX, double nPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const { if (maCells.block_size() == 1 && maCells.begin()->type == sc::element_type_empty) diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 3613477e948a..3df2f13dc6ad 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -2544,7 +2544,7 @@ void ScDocRowHeightUpdater::update() ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount); - boost::rational<long> aZoom(1, 1); + boost::rational<sal_Int64> aZoom(1, 1); itr = mpTabRangesArray->begin(); sal_uInt32 nProgressStart = 0; sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev); @@ -2582,7 +2582,7 @@ void ScDocRowHeightUpdater::updateAll() ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount); - boost::rational<long> aZoom(1, 1); + boost::rational<sal_Int64> aZoom(1, 1); sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev); sal_uLong nProgressStart = 0; for (SCTAB nTab = 0; nTab < mrDoc.GetTableCount(); ++nTab) diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index a7ba4025851b..bc0b478ebea8 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -569,7 +569,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers } sal_uInt16 nZoom = getScaleValue(*pStyle, ATTR_PAGE_SCALE); - boost::rational<long> aZoomFract(nZoom, 100); + boost::rational<sal_Int64> aZoomFract(nZoom, 100); // Start at specified cell position (nCol, nRow, nTab). ScColumn* pCol = &pTab->aCol[aScope.Col()]; @@ -655,7 +655,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers if (getScaleValue(*pStyle, ATTR_PAGE_SCALETOPAGES) == 0) { nZoom = getScaleValue(*pStyle, ATTR_PAGE_SCALE); - aZoomFract = boost::rational<long>(nZoom, 100); + aZoomFract = boost::rational<sal_Int64>(nZoom, 100); } else nZoom = 0; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index fb0c664ded76..9b0a3416a36f 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3883,7 +3883,7 @@ sal_uLong ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, const ScMarkData* pMarkData, const ScColWidthParam* pParam ) { @@ -3897,7 +3897,7 @@ sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, bool bTotalSize ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) @@ -4594,7 +4594,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { TableContainer::iterator it = maTabs.begin(); for (; it != maTabs.end(); ++it) diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index c1d2c8f6eccc..adcb84c68073 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1421,19 +1421,19 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const long nWidthDiff = nDestWidth - nSourceWidth; long nHeightDiff = nDestHeight - nSourceHeight; - boost::rational<long> aHorFract(1,1); - boost::rational<long> aVerFract(1,1); + boost::rational<sal_Int64> aHorFract(1,1); + boost::rational<sal_Int64> aVerFract(1,1); bool bResize = false; // sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes, // don't resize to empty size when pasting into hidden columns or rows if ( std::abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 ) { - aHorFract = boost::rational<long>( nDestWidth, nSourceWidth ); + aHorFract = boost::rational<sal_Int64>( nDestWidth, nSourceWidth ); bResize = true; } if ( std::abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 ) { - aVerFract = boost::rational<long>( nDestHeight, nSourceHeight ); + aVerFract = boost::rational<sal_Int64>( nDestHeight, nSourceHeight ); bResize = true; } Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving) diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index f0c6d478010a..a92c92925b04 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -216,7 +216,7 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet* pCondSet void ScPatternAttr::GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode, - OutputDevice* pOutDev, const boost::rational<long>* pScale, + OutputDevice* pOutDev, const boost::rational<sal_Int64>* pScale, const SfxItemSet* pCondSet, sal_uInt8 nScript, const Color* pBackConfigColor, const Color* pTextConfigColor ) { @@ -376,7 +376,7 @@ void ScPatternAttr::GetFont( if ( pOutDev != NULL ) { Size aEffSize; - boost::rational<long> aFraction( 1,1 ); + boost::rational<sal_Int64> aFraction( 1,1 ); if (pScale) aFraction = *pScale; Size aSize( 0, (long) nFontHeight ); @@ -386,7 +386,7 @@ void ScPatternAttr::GetFont( aEffSize = pOutDev->LogicToPixel( aSize, aSrcMode ); else { - boost::rational<long> aFractOne(1,1); + boost::rational<sal_Int64> aFractOne(1,1); aDestMode.SetScaleX( aFractOne ); aDestMode.SetScaleY( aFractOne ); aEffSize = OutputDevice::LogicToLogic( aSize, aSrcMode, aDestMode ); @@ -482,7 +482,7 @@ void ScPatternAttr::GetFont( void ScPatternAttr::GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode, - OutputDevice* pOutDev, const boost::rational<long>* pScale, + OutputDevice* pOutDev, const boost::rational<sal_Int64>* pScale, const SfxItemSet* pCondSet, sal_uInt8 nScript, const Color* pBackConfigColor, const Color* pTextConfigColor ) const { diff --git a/sc/source/core/data/rowheightcontext.cxx b/sc/source/core/data/rowheightcontext.cxx index 46cce64908fc..43ca932c3ad8 100644 --- a/sc/source/core/data/rowheightcontext.cxx +++ b/sc/source/core/data/rowheightcontext.cxx @@ -12,7 +12,7 @@ namespace sc { RowHeightContext::RowHeightContext( - double fPPTX, double fPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + double fPPTX, double fPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, OutputDevice* pOutDev ) : mfPPTX(fPPTX), mfPPTY(fPPTY), maZoomX(rZoomX), maZoomY(rZoomY), diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 9917e110698d..0357e185c9b2 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -427,7 +427,7 @@ void ScTable::SetLink( sal_uInt8 nMode, sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bFormula, const ScMarkData* pMarkData, const ScColWidthParam* pParam ) { @@ -438,7 +438,7 @@ sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev, long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, bool bWidth, bool bTotalSize ) { ScNeededSizeOptions aOptions; @@ -1800,7 +1800,7 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d aOptions.bFormula = bFormula; aOptions.bSkipMerged = false; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); nPixel = aCol[rCol].GetNeededSize( nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions, NULL ); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 98e512171259..2aa91d03e619 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -2542,7 +2542,7 @@ bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyle void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { ScFlatBoolRowSegments aUsedRows; for (SCCOL i = 0; i <= MAXCOL; ++i) diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 1ba6ca2ad959..23b73968ba63 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -429,7 +429,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu } DELETEZ( pProgress ); // SetOptimalHeight has its own ProgressBar // Adjust line height, base is 100% zoom - boost::rational<long> aZoom( 1, 1 ); + boost::rational<sal_Int64> aZoom( 1, 1 ); // Factor is printer to display ratio double nPPTX = ScGlobal::nScreenPPTX * boost::rational_cast<double>(aZoom) / nOutputFactor; double nPPTY = ScGlobal::nScreenPPTY * boost::rational_cast<double>(aZoom); diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index 8f33f7853e85..a9d7f740c51c 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -213,8 +213,8 @@ void ScClient::ViewChanged() if (pDrawObj) { Rectangle aLogicRect = pDrawObj->GetLogicRect(); - boost::rational<long> aFractX = GetScaleWidth(); - boost::rational<long> aFractY = GetScaleHeight(); + boost::rational<sal_Int64> aFractX = GetScaleWidth(); + boost::rational<sal_Int64> aFractY = GetScaleHeight(); aFractX *= aVisSize.Width(); aFractY *= aVisSize.Height(); aVisSize = Size( boost::rational_cast<long>(aFractX), boost::rational_cast<long>(aFractY) ); // Scaled for Draw model diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 0dcc849ee080..1a8fb0f02c5b 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -569,7 +569,7 @@ ScInputHandler::~ScInputHandler() delete pFormulaDataPara; } -void ScInputHandler::SetRefScale( const boost::rational<long>& rX, const boost::rational<long>& rY ) +void ScInputHandler::SetRefScale( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY ) { if ( rX != aScaleX || rY != aScaleY ) { diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index 02022a1d348d..2a2ad4207506 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -27,7 +27,7 @@ #include "docpool.hxx" #include "patattr.hxx" -ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<long>* pZoomX, const boost::rational<long>* pZoomY, ScDocument* pDoc) : +ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<sal_Int64>* pZoomX, const boost::rational<sal_Int64>* pZoomY, ScDocument* pDoc) : mpDoc(pDoc), mpOutDev(pOutDev), mpStyle(pStyle), @@ -40,12 +40,12 @@ ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pSt if (pZoomX) maZoomX = *pZoomX; else - maZoomX = boost::rational<long>(1, 1); + maZoomX = boost::rational<sal_Int64>(1, 1); if (pZoomY) maZoomY = *pZoomY; else - maZoomY = boost::rational<long>(1, 1); + maZoomY = boost::rational<sal_Int64>(1, 1); } ScDPFieldButton::~ScDPFieldButton() diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index b3085442ce17..c117a62f342c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -153,7 +153,7 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint ) SCROW nEndRow = rRange.aEnd.Row(); ScSizeDeviceProvider aProv( &rDocShell ); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice()); bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab); @@ -3358,7 +3358,7 @@ static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCT double nPPTY = aProv.GetPPTY(); ScDocument& rDoc = rDocShell.GetDocument(); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sal_uInt16 nTwips = rDoc.GetOptimalColWidth( nCol, nTab, pDev, nPPTX, nPPTY, aOne, aOne, bFormula, NULL ); @@ -3451,7 +3451,7 @@ bool ScDocFunc::SetWidthOrHeight( } ScSizeDeviceProvider aProv( &rDocShell ); - boost::rational<long> aOne(1,1); + boost::rational<sal_Int64> aOne(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice()); aCxt.setForceAutoSize(bAll); rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 6b25a783e6fe..dd8f30091732 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1457,7 +1457,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) CalcOutputFactor(); if ( bRet && (bSetColWidths || bSetRowHeights) ) { // Adjust column width/row height; base 100% zoom - boost::rational<long> aZoom( 1, 1 ); + boost::rational<sal_Int64> aZoom( 1, 1 ); double nPPTX = ScGlobal::nScreenPPTX * boost::rational_cast<double>(aZoom) / GetOutputFactor(); // Factor is printer display ratio double nPPTY = ScGlobal::nScreenPPTY * boost::rational_cast<double>(aZoom); VirtualDevice aVirtDev; diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 88fc80417e9f..ff42c00eac26 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -368,7 +368,7 @@ void ScDocShell::CancelAutoDBRange() bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) { ScSizeDeviceProvider aProv(this); - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice()); bool bChange = aDocument.SetOptimalHeight(aCxt, nStartRow,nEndRow, nTab); @@ -383,7 +383,7 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark ) // update automatic row heights ScSizeDeviceProvider aProv(this); - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice()); aDocument.UpdateAllRowHeights(aCxt, pTabMark); } diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index f8e5dfc35da5..51e34793bf55 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -131,7 +131,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, MapMode aDestMap( MAP_100TH_MM ); if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView ) { - boost::rational<long> aScaleX, aScaleY; + boost::rational<sal_Int64> aScaleX, aScaleY; pDrawView->CalcNormScale( aScaleX, aScaleY ); aDestMap.SetScaleX(aScaleX); aDestMap.SetScaleY(aScaleY); diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx index 461c1100fca8..d92d02548b34 100644 --- a/sc/source/ui/inc/dpcontrol.hxx +++ b/sc/source/ui/inc/dpcontrol.hxx @@ -37,7 +37,7 @@ class ScDocument; class ScDPFieldButton { public: - ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<long>* pZoomX = NULL, const boost::rational<long>* pZoomY = NULL, + ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<sal_Int64>* pZoomX = NULL, const boost::rational<sal_Int64>* pZoomY = NULL, ScDocument* pDoc = NULL); ~ScDPFieldButton(); @@ -59,8 +59,8 @@ private: Point maPos; Size maSize; OUString maText; - boost::rational<long> maZoomX; - boost::rational<long> maZoomY; + boost::rational<sal_Int64> maZoomX; + boost::rational<sal_Int64> maZoomY; ScDocument* mpDoc; OutputDevice* mpOutDev; const StyleSettings* mpStyle; diff --git a/sc/source/ui/inc/drawutil.hxx b/sc/source/ui/inc/drawutil.hxx index 15ef550ee0db..b981373ff8c3 100644 --- a/sc/source/ui/inc/drawutil.hxx +++ b/sc/source/ui/inc/drawutil.hxx @@ -32,9 +32,9 @@ class ScDrawUtil public: static void CalcScale( ScDocument* pDoc, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - OutputDevice* pDev, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + OutputDevice* pDev, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, double nPPTX, double nPPTY, - boost::rational<long>& rScaleX, boost::rational<long>& rScaleY ); + boost::rational<sal_Int64>& rScaleX, boost::rational<sal_Int64>& rScaleY ); }; #endif diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index 923af0f9a0fd..5f4f5e7ba315 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -37,8 +37,8 @@ class ScDrawView: public FmFormView OutputDevice* pDev; //! needed ? ScDocument* pDoc; SCTAB nTab; - boost::rational<long> aScaleX; // Factor for Drawing-MapMode - boost::rational<long> aScaleY; + boost::rational<sal_Int64> aScaleX; // Factor for Drawing-MapMode + boost::rational<sal_Int64> aScaleY; SdrDropMarkerOverlay* pDropMarker; SdrObject* pDropMarkObj; bool bInConstruct; @@ -94,12 +94,12 @@ public: void DoCut(); void DoCopy(); - void GetScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const; + void GetScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const; void RecalcScale(); void UpdateWorkArea(); SCTAB GetTab() const { return nTab; } - void CalcNormScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const; + void CalcNormScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const; void SetPageAnchored(); void SetCellAnchored(); diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index dd8752a5c52d..ea2375036fb0 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -102,8 +102,8 @@ private: sal_uLong nValidation; SvxCellHorJustify eAttrAdjust; - boost::rational<long> aScaleX; // for ref MapMode - boost::rational<long> aScaleY; + boost::rational<sal_Int64> aScaleX; // for ref MapMode + boost::rational<sal_Int64> aScaleY; ScTabViewShell* pRefViewSh; ScTabViewShell* pActiveViewSh; @@ -209,7 +209,7 @@ public: void ShowTip( const OUString& rText ); // at Cursor void ShowTipBelow( const OUString& rText ); - void SetRefScale( const boost::rational<long>& rX, const boost::rational<long>& rY ); + void SetRefScale( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY ); void UpdateRefDevice(); EditView* GetActiveView(); diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index dd42cd8fe737..8ecdfd29a0d3 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -164,8 +164,8 @@ private: ScOutputType eType; // Screen/Printer ... double mnPPTX; // Pixel per Twips double mnPPTY; - boost::rational<long> aZoomX; - boost::rational<long> aZoomY; + boost::rational<sal_Int64> aZoomX; + boost::rational<sal_Int64> aZoomY; SdrObject* pEditObj; // Omit when painting @@ -262,8 +262,8 @@ public: SCTAB nNewTab, long nNewScrX, long nNewScrY, SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2, double nPixelPerTwipsX, double nPixelPerTwipsY, - const boost::rational<long>* pZoomX = NULL, - const boost::rational<long>* pZoomY = NULL ); + const boost::rational<sal_Int64>* pZoomX = NULL, + const boost::rational<sal_Int64>* pZoomY = NULL ); ~ScOutputData(); diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 1cbb87afec6a..d3e29b3e98b9 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -298,7 +298,7 @@ public: * @param bSameTabButMoved true if the same sheet as before is activated. */ void TabChanged( bool bSameTabButMoved = false ); - void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll ); + void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll ); SC_DLLPUBLIC void RefreshZoom(); void SetPagebreakMode( bool bSet ); diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 053a1e9053e6..d7eb2a8a728f 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -208,7 +208,7 @@ protected: virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ) SAL_OVERRIDE; // neu virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) SAL_OVERRIDE; - virtual void SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) SAL_OVERRIDE; + virtual void SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) SAL_OVERRIDE; virtual void QueryObjAreaPixel( Rectangle& rRect ) const SAL_OVERRIDE; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 1505f4dd0ab8..85d5946a5836 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -109,10 +109,10 @@ class ScViewDataTable // per-sheet data friend class ScViewData; private: SvxZoomType eZoomType; // selected zoom type (normal view) - boost::rational<long> aZoomX; // selected zoom X - boost::rational<long> aZoomY; // selected zoom Y (displayed) - boost::rational<long> aPageZoomX; // zoom in page break preview mode - boost::rational<long> aPageZoomY; + boost::rational<sal_Int64> aZoomX; // selected zoom X + boost::rational<sal_Int64> aZoomY; // selected zoom Y (displayed) + boost::rational<sal_Int64> aPageZoomX; // zoom in page break preview mode + boost::rational<sal_Int64> aPageZoomY; long nTPosX[2]; // MapMode - Offset (Twips) long nTPosY[2]; @@ -174,10 +174,10 @@ private: MapMode aLogicMode; // skalierter 1/100mm-MapMode SvxZoomType eDefZoomType; // default zoom and type for missing TabData - boost::rational<long> aDefZoomX; - boost::rational<long> aDefZoomY; - boost::rational<long> aDefPageZoomX; // zoom in page break preview mode - boost::rational<long> aDefPageZoomY; + boost::rational<sal_Int64> aDefZoomX; + boost::rational<sal_Int64> aDefZoomY; + boost::rational<sal_Int64> aDefPageZoomX; // zoom in page break preview mode + boost::rational<sal_Int64> aDefPageZoomY; ScRefType eRefType; @@ -305,15 +305,15 @@ public: void SetZoomType( SvxZoomType eNew, bool bAll ); void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs ); - void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, std::vector< SCTAB >& tabs ); - void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll ); + void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, std::vector< SCTAB >& tabs ); + void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll ); void RefreshZoom(); void SetSelCtrlMouseClick( bool bTmp ) { bSelCtrlMouseClick = bTmp; } SvxZoomType GetZoomType() const { return pThisTab->eZoomType; } - const boost::rational<long>& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; } - const boost::rational<long>& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; } + const boost::rational<sal_Int64>& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; } + const boost::rational<sal_Int64>& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; } void SetShowGrid( bool bShow ); bool GetShowGrid() const { return pThisTab->bShowGrid; } @@ -446,7 +446,7 @@ public: void SetScreen( const Rectangle& rVisArea ); void SetScreenPos( const Point& rVisAreaStart ); - void UpdateScreenZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY ); + void UpdateScreenZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY ); Size GetScrSize() const { return aScrSize; } diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 23bb99345fda..ec0f98366b0d 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -258,8 +258,8 @@ bool ScBlockUndo::AdjustHeight() ScDocument& rDoc = pDocShell->GetDocument(); VirtualDevice aVirtDev; - boost::rational<long> aZoomX( 1, 1 ); - boost::rational<long> aZoomY = aZoomX; + boost::rational<sal_Int64> aZoomX( 1, 1 ); + boost::rational<sal_Int64> aZoomY = aZoomX; double nPPTX, nPPTY; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) @@ -356,8 +356,8 @@ void ScMultiBlockUndo::AdjustHeight() ScDocument& rDoc = pDocShell->GetDocument(); VirtualDevice aVirtDev; - boost::rational<long> aZoomX( 1, 1 ); - boost::rational<long> aZoomY = aZoomX; + boost::rational<sal_Int64> aZoomX( 1, 1 ); + boost::rational<sal_Int64> aZoomY = aZoomX; double nPPTX, nPPTY; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 661b43495c61..f172f0015c89 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -842,8 +842,8 @@ void ScUndoAutoFormat::Redo() if (bSize) { VirtualDevice aVirtDev; - boost::rational<long> aZoomX(1,1); - boost::rational<long> aZoomY = aZoomX; + boost::rational<sal_Int64> aZoomX(1,1); + boost::rational<sal_Int64> aZoomY = aZoomX; double nPPTX,nPPTY; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index 01bfc89a1705..d0693deb84d0 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -110,7 +110,7 @@ static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, bo Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP ); double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); pDoc->StyleSheetChanged( pStyle, bRemoved, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 314dddb7ef79..69fea9aeb38a 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1283,8 +1283,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // Scale and move the target rectangle from aLocationMM to aLocationPixel, // to get the target rectangle in pixels. - boost::rational<long> aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() ); - boost::rational<long> aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() ); + boost::rational<sal_Int64> aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() ); + boost::rational<sal_Int64> aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() ); long nX1 = aLocationPixel.Left() + boost::rational_cast<long>( (aTargetRect.Left() - aLocationMM.Left()) * aScaleX ); long nX2 = aLocationPixel.Left() + boost::rational_cast<long>( (aTargetRect.Right() - aLocationMM.Left()) * aScaleX ); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 0817ec8ae23a..ee4288c9e00d 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -758,7 +758,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName ) Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP ); double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); pDocShell->SetDocumentModified(); @@ -1100,7 +1100,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle ) Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP ); double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); @@ -1464,7 +1464,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP ); double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); @@ -1843,7 +1843,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP ); double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index dfd80686a17b..bd90b6c5c184 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -1446,7 +1446,7 @@ sal_Int16 ScTabViewObj::GetZoom(void) const ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - const boost::rational<long>& rZoomY = pViewSh->GetViewData().GetZoomY(); // Y wird angezeigt + const boost::rational<sal_Int64>& rZoomY = pViewSh->GetViewData().GetZoomY(); // Y wird angezeigt return (sal_Int16)(( rZoomY.numerator() * 100 ) / rZoomY.denominator()); } return 0; @@ -1468,7 +1468,7 @@ void ScTabViewObj::SetZoom(sal_Int16 nZoom) pScMod->SetAppOptions( aNewOpt ); } } - boost::rational<long> aFract( nZoom, 100 ); + boost::rational<sal_Int64> aFract( nZoom, 100 ); pViewSh->SetZoom( aFract, aFract, true ); pViewSh->PaintGrid(); pViewSh->PaintTop(); diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 3771b6fcd3c9..6e76bfb47930 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -97,7 +97,7 @@ getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs ) { ScTabViewShell* pViewSh = excel::getBestViewShell( xModel ); - boost::rational<long> aFract( nZoom, 100 ); + boost::rational<sal_Int64> aFract( nZoom, 100 ); pViewSh->GetViewData().SetZoom( aFract, aFract, nTabs ); pViewSh->RefreshZoom(); } diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx index 21840f50ffaf..ff6bacbb85f8 100644 --- a/sc/source/ui/view/drawutil.cxx +++ b/sc/source/ui/view/drawutil.cxx @@ -27,9 +27,9 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, OutputDevice* pDev, - const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY, + const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY, double nPPTX, double nPPTY, - boost::rational<long>& rScaleX, boost::rational<long>& rScaleY ) + boost::rational<sal_Int64>& rScaleX, boost::rational<sal_Int64>& rScaleY ) { long nPixelX = 0; long nTwipsX = 0; @@ -69,7 +69,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, ((double)HMM_PER_TWIPS) / ((double)rZoomX.denominator()) ); else - rScaleX = boost::rational<long>( 1, 1 ); + rScaleX = boost::rational<sal_Int64>( 1, 1 ); if ( aPixelLog.Y() && nTwipsY ) rScaleY = rational_FromDouble( ((double)aPixelLog.Y()) * @@ -78,7 +78,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, ((double)HMM_PER_TWIPS) / ((double)rZoomY.denominator()) ); else - rScaleY = boost::rational<long>( 1, 1 ); + rScaleY = boost::rational<sal_Int64>( 1, 1 ); // 25 bits of accuracy are needed to always hit the right part of // cells in the last rows (was 17 before 1M rows). diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 6a8add5ccc4e..178d8b92e5a5 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -437,7 +437,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable() // Korrektur fuer 100% berechnen, unabhaengig von momentanen Einstellungen -void ScDrawView::CalcNormScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const +void ScDrawView::CalcNormScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const { double nPPTX = ScGlobal::nScreenPPTX; double nPPTY = ScGlobal::nScreenPPTY; @@ -453,7 +453,7 @@ void ScDrawView::CalcNormScale( boost::rational<long>& rFractX, boost::rational< if (nEndRow<20) nEndRow = 1000; - boost::rational<long> aZoom(1,1); + boost::rational<sal_Int64> aZoom(1,1); ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev, aZoom,aZoom, nPPTX, nPPTY, rFractX,rFractY ); } @@ -513,7 +513,7 @@ void ScDrawView::SetMarkedOriginalSize() { // Pixel-Korrektur beruecksichtigen, damit Bitmap auf dem Bildschirm stimmt - boost::rational<long> aNormScaleX, aNormScaleY; + boost::rational<sal_Int64> aNormScaleX, aNormScaleY; CalcNormScale( aNormScaleX, aNormScaleY ); aDestMap.SetScaleX(aNormScaleX); aDestMap.SetScaleY(aNormScaleY); @@ -535,8 +535,8 @@ void ScDrawView::SetMarkedOriginalSize() Rectangle aDrawRect = pObj->GetLogicRect(); pUndoGroup->AddAction( new SdrUndoGeoObj( *pObj ) ); - pObj->Resize( aDrawRect.TopLeft(), boost::rational<long>( aOriginalSize.Width(), aDrawRect.GetWidth() ), - boost::rational<long>( aOriginalSize.Height(), aDrawRect.GetHeight() ) ); + pObj->Resize( aDrawRect.TopLeft(), boost::rational<sal_Int64>( aOriginalSize.Width(), aDrawRect.GetWidth() ), + boost::rational<sal_Int64>( aOriginalSize.Height(), aDrawRect.GetHeight() ) ); ++nDone; } } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 00e31a2910d0..e6d6762714e8 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -286,7 +286,7 @@ void ScDrawView::DoCut() EndUndo(); } -void ScDrawView::GetScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const +void ScDrawView::GetScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const { rFractX = aScaleX; rFractY = aScaleY; @@ -296,8 +296,8 @@ void ScDrawView::RecalcScale() { double nPPTX; double nPPTY; - boost::rational<long> aZoomX(1,1); - boost::rational<long> aZoomY(1,1); + boost::rational<sal_Int64> aZoomX(1,1); + boost::rational<sal_Int64> aZoomY(1,1); if (pViewData) { @@ -614,8 +614,8 @@ void ScDrawView::UpdateUserViewOptions() SetSnapEnabled( rGrid.GetUseGridSnap() ); SetGridSnap( rGrid.GetUseGridSnap() ); - boost::rational<long> aFractX( rGrid.GetFldDrawX(), rGrid.GetFldDivisionX() + 1 ); - boost::rational<long> aFractY( rGrid.GetFldDrawY(), rGrid.GetFldDivisionY() + 1 ); + boost::rational<sal_Int64> aFractX( rGrid.GetFldDrawX(), rGrid.GetFldDivisionX() + 1 ); + boost::rational<sal_Int64> aFractY( rGrid.GetFldDrawY(), rGrid.GetFldDivisionY() + 1 ); SetSnapGridWidth( aFractX, aFractY ); SetGridCoarse( Size( rGrid.GetFldDrawX(), rGrid.GetFldDrawY() ) ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 7fd9bdec0ab5..1072cdcc8fc3 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4625,8 +4625,8 @@ void ScGridWindow::UpdateFormulas() ScTableInfo aTabInfo; rDoc.FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, false, false ); - boost::rational<long> aZoomX = pViewData->GetZoomX(); - boost::rational<long> aZoomY = pViewData->GetZoomY(); + boost::rational<sal_Int64> aZoomX = pViewData->GetZoomX(); + boost::rational<sal_Int64> aZoomY = pViewData->GetZoomY(); ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab, nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY, &aZoomX, &aZoomY ); diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 9cbaa2a9139b..ff197ac94417 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -247,8 +247,8 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce ) ScDrawView* pDrView = pViewData->GetView()->GetScDrawView(); if ( pDrView || bForce ) { - boost::rational<long> aScaleX; - boost::rational<long> aScaleY; + boost::rational<sal_Int64> aScaleX; + boost::rational<sal_Int64> aScaleY; if (pDrView) pDrView->GetScale( aScaleX, aScaleY ); else diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 56f35ecb4496..8ef8b7f21ed1 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -77,7 +77,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, const OUString& rTitle, const Color& rColor, bool bTextBelow, - double nPPTX, double nPPTY, const boost::rational<long>& rZoomY, + double nPPTX, double nPPTY, const boost::rational<sal_Int64>& rZoomY, ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL ) { // pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen, @@ -470,8 +470,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod nPPTX, nPPTY, false, bFormulaMode, &pViewData->GetMarkData() ); - boost::rational<long> aZoomX = pViewData->GetZoomX(); - boost::rational<long> aZoomY = pViewData->GetZoomY(); + boost::rational<sal_Int64> aZoomX = pViewData->GetZoomX(); + boost::rational<sal_Int64> aZoomY = pViewData->GetZoomY(); ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab, nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY, &aZoomX, &aZoomY ); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 617288e69ef2..09b6cca4c03b 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -145,7 +145,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, SCTAB nNewTab, long nNewScrX, long nNewScrY, SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2, double nPixelPerTwipsX, double nPixelPerTwipsY, - const boost::rational<long>* pZoomX, const boost::rational<long>* pZoomY ) : + const boost::rational<sal_Int64>* pZoomX, const boost::rational<sal_Int64>* pZoomY ) : mpDev( pNewDev ), mpRefDevice( pNewDev ), // default is output device pFmtDevice( pNewDev ), // default is output device @@ -193,11 +193,11 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, if (pZoomX) aZoomX = *pZoomX; else - aZoomX = boost::rational<long>(1,1); + aZoomX = boost::rational<sal_Int64>(1,1); if (pZoomY) aZoomY = *pZoomY; else - aZoomY = boost::rational<long>(1,1); + aZoomY = boost::rational<sal_Int64>(1,1); nVisX1 = nX1; nVisY1 = nY1; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index a5a9af577aae..2e0004692f62 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -231,7 +231,7 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript ) // call GetFont with a modified fraction, use only the height - boost::rational<long> aFraction( nScale, 100 ); + boost::rational<sal_Int64> aFraction( nScale, 100 ); if ( !bPixelToLogic ) aFraction *= pOutput->aZoomY; vcl::Font aTmpFont; @@ -2787,7 +2787,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) // #i85342# screen display and formatting for printer, // use same GetEditArea call as in ScViewData::SetEditEngine - boost::rational<long> aFract(1,1); + boost::rational<sal_Int64> aFract(1,1); Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); @@ -3809,7 +3809,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) // #i85342# screen display and formatting for printer, // use same GetEditArea call as in ScViewData::SetEditEngine - boost::rational<long> aFract(1,1); + boost::rational<sal_Int64> aFract(1,1); Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); @@ -4165,7 +4165,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) // #i85342# screen display and formatting for printer, // use same GetEditArea call as in ScViewData::SetEditEngine - boost::rational<long> aFract(1,1); + boost::rational<sal_Int64> aFract(1,1); Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index ab843eec4a89..b56323ab60ff 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -344,8 +344,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) UpdateDrawView(); // Spreedsheet eventually changes } - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); bool bDoPrint = ( pFillLocation == NULL ); @@ -732,8 +732,8 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom) // apply new MapMode and call UpdateScrollBars to update aOffset - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); SetMapMode( aMMMode ); @@ -961,8 +961,8 @@ void ScPreview::DataChanged( const DataChangedEvent& rDCEvt ) void ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) { - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); aButtonDownChangePoint = PixelToLogic( rMEvt.GetPosPixel(),aMMMode ); @@ -1044,8 +1044,8 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) { - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); aButtonUpPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode ); @@ -1294,8 +1294,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) void ScPreview::MouseMove( const MouseEvent& rMEvt ) { - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); Point aMouseMovePoint = PixelToLogic( rMEvt.GetPosPixel(), aMMMode ); @@ -1540,8 +1540,8 @@ void ScPreview::SwitchView() void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) { - boost::rational<long> aPreviewZoom( nZoom, 100 ); - boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); + boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 ); + boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); SetMapMode( aMMMode ); long nPos = nDragMovePos; diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 0e2bda3c4421..046e2a82cb86 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1593,7 +1593,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( !pPrinter ) { OutputDevice* pRefDev = pDoc->GetPrinter(); // use the printer also for Preview - boost::rational<long> aPrintFrac( nZoom, 100 ); // without nManualZoom + boost::rational<sal_Int64> aPrintFrac( nZoom, 100 ); // without nManualZoom // MapMode, as it would arrive at the printer: pRefDev->SetMapMode( MapMode( MAP_100TH_MM, Point(), aPrintFrac, aPrintFrac ) ); @@ -2543,13 +2543,13 @@ void ScPrintFunc::InitModes() // set MapModes from nZoom etc. long nEffZoom = nZoom * (long) nManualZoom; nScaleX = nScaleY = HMM_PER_TWIPS; // output in 1/100 mm - boost::rational<long> aZoomFract( nEffZoom,10000 ); - boost::rational<long> aHorFract = aZoomFract; + boost::rational<sal_Int64> aZoomFract( nEffZoom,10000 ); + boost::rational<sal_Int64> aHorFract = aZoomFract; if ( !pPrinter && !bIsRender ) // adjust scale for preview { double nFact = pDocShell->GetOutputFactor(); - aHorFract = boost::rational<long>( long( nEffZoom / nFact ), 10000 ); + aHorFract = boost::rational<sal_Int64>( long( nEffZoom / nFact ), 10000 ); } aLogicMode = MapMode( MAP_100TH_MM, Point(), aHorFract, aZoomFract ); diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 6802dd0e7bf7..b2cf9b1d2c76 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -697,11 +697,11 @@ void ScTabView::UpdateVarZoom() if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate ) { bInZoomUpdate = true; - const boost::rational<long>& rOldX = GetViewData().GetZoomX(); - const boost::rational<long>& rOldY = GetViewData().GetZoomY(); + const boost::rational<sal_Int64>& rOldX = GetViewData().GetZoomX(); + const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY(); long nOldPercent = ( rOldY.numerator() * 100 ) / rOldY.denominator(); sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent ); - boost::rational<long> aNew( nNewZoom, 100 ); + boost::rational<sal_Int64> aNew( nNewZoom, 100 ); if ( aNew != rOldX || aNew != rOldY ) { @@ -924,7 +924,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) // for ole inplace editing, the scale is defined by the visarea and client size // and can't be changed directly - const boost::rational<long>& rOldY = aViewData.GetZoomY(); + const boost::rational<sal_Int64>& rOldY = aViewData.GetZoomY(); long nOld = long(( rOldY.numerator() * 100 ) / rOldY.denominator()); long nNew = nOld; if ( pData->GetMode() == COMMAND_WHEEL_ZOOM_SCALE ) @@ -943,7 +943,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); - boost::rational<long> aFract( nNew, 100 ); + boost::rational<sal_Int64> aFract( nNew, 100 ); SetZoom( aFract, aFract, bSyncZoom ); PaintGrid(); PaintTop(); diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index e19348adeed2..ee78d61c09b3 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -1111,7 +1111,7 @@ static bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCCOL nFixPosX, SCROW nFixPosY ) { - double fZoomFactor = boost::rational_cast<double>(boost::rational<long>(nZoom, 100)); + double fZoomFactor = boost::rational_cast<double>(boost::rational<sal_Int64>(nZoom, 100)); fScaleX *= fZoomFactor; fScaleY *= fZoomFactor; diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 749f542747d4..af47a938379a 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2337,8 +2337,8 @@ void ScTabView::RecalcPPT() // call view SetZoom (including draw scale, split update etc) // and paint only if values changed - boost::rational<long> aZoomX = aViewData.GetZoomX(); - boost::rational<long> aZoomY = aViewData.GetZoomY(); + boost::rational<sal_Int64> aZoomX = aViewData.GetZoomX(); + boost::rational<sal_Int64> aZoomY = aViewData.GetZoomY(); SetZoom( aZoomX, aZoomY, false ); PaintGrid(); diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 65f6d072323f..ea7950b5f08d 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -370,7 +370,7 @@ void ScTabView::SetZoomType( SvxZoomType eNew, bool bAll ) aViewData.SetZoomType( eNew, bAll ); } -void ScTabView::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll ) +void ScTabView::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll ) { aViewData.SetZoom( rNewX, rNewY, bAll ); if (pDrawView) diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index ded17ef4177e..a3e1defa6d7c 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -627,7 +627,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); SvxZoomType eOldZoomType = GetZoomType(); SvxZoomType eNewZoomType = eOldZoomType; - const boost::rational<long>& rOldY = GetViewData().GetZoomY(); // Y wird angezeigt + const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY(); // Y wird angezeigt sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.numerator() * 100 ) / rOldY.denominator()); sal_uInt16 nZoom = nOldZoom; @@ -720,7 +720,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) aNewOpt.SetZoomType( GetZoomType() ); pScMod->SetAppOptions( aNewOpt ); } - boost::rational<long> aFract( nZoom, 100 ); + boost::rational<sal_Int64> aFract( nZoom, 100 ); SetZoom( aFract, aFract, bSyncZoom ); PaintGrid(); PaintTop(); @@ -749,7 +749,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) aNewOpt.SetZoomType( GetZoomType() ); pScMod->SetAppOptions( aNewOpt ); } - boost::rational<long> aFract( nCurrentZoom,100 ); + boost::rational<sal_Int64> aFract( nCurrentZoom,100 ); SetZoom( aFract, aFract, bSyncZoom ); PaintGrid(); PaintTop(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index ee241c451ae3..2b5e3ba25c44 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -333,8 +333,8 @@ void ScTabViewShell::UpdateOleZoom() { vcl::Window* pWin = GetActiveWin(); Size aWinHMM = pWin->PixelToLogic( pWin->GetOutputSizePixel(), MAP_100TH_MM ); - SetZoomFactor( boost::rational<long>( aWinHMM.Width(),aObjSize.Width() ), - boost::rational<long>( aWinHMM.Height(),aObjSize.Height() ) ); + SetZoomFactor( boost::rational<sal_Int64>( aWinHMM.Width(),aObjSize.Width() ), + boost::rational<sal_Int64>( aWinHMM.Height(),aObjSize.Height() ) ); } } } @@ -362,8 +362,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize ) if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 ) { Size aLogicSize = GetWindow()->PixelToLogic( aSize, MAP_100TH_MM ); - SfxViewShell::SetZoomFactor( boost::rational<long>( aLogicSize.Width(),aObjSize.Width() ), - boost::rational<long>( aLogicSize.Height(),aObjSize.Height() ) ); + SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aLogicSize.Width(),aObjSize.Width() ), + boost::rational<sal_Int64>( aLogicSize.Height(),aObjSize.Height() ) ); } Point aPos( rOfs ); @@ -401,19 +401,19 @@ void ScTabViewShell::OuterResizePixel( const Point &rOfs, const Size &rSize ) ForceMove(); } -void ScTabViewShell::SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) +void ScTabViewShell::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { // fuer OLE... - boost::rational<long> aFrac20( 1,5 ); - boost::rational<long> aFrac400( 4,1 ); + boost::rational<sal_Int64> aFrac20( 1,5 ); + boost::rational<sal_Int64> aFrac400( 4,1 ); - boost::rational<long> aNewX( rZoomX ); + boost::rational<sal_Int64> aNewX( rZoomX ); if ( aNewX < aFrac20 ) aNewX = aFrac20; if ( aNewX > aFrac400 ) aNewX = aFrac400; - boost::rational<long> aNewY( rZoomY ); + boost::rational<sal_Int64> aNewY( rZoomY ); if ( aNewY < aFrac20 ) aNewY = aFrac20; if ( aNewY > aFrac400 ) @@ -1727,7 +1727,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, } else { - boost::rational<long> aFract( rAppOpt.GetZoom(), 100 ); + boost::rational<sal_Int64> aFract( rAppOpt.GetZoom(), 100 ); SetZoom( aFract, aFract, true ); SetZoomType( rAppOpt.GetZoomType(), true ); } diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 5c2727a50667..bf4bc434633d 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -287,7 +287,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) rSet.DisableItem( nWhich ); else { - const boost::rational<long>& rOldY = GetViewData().GetZoomY(); + const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY(); sal_uInt16 nZoom = (sal_uInt16)(( rOldY.numerator() * 100 ) / rOldY.denominator()); rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) ); } @@ -299,7 +299,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) rSet.DisableItem( nWhich ); else { - const boost::rational<long>& rOldY = GetViewData().GetZoomY(); + const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY(); sal_uInt16 nCurrentZoom = (sal_uInt16)(( rOldY.numerator() * 100 ) / rOldY.denominator()); if( nCurrentZoom ) diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 5b422dfb15c5..f40aa45dcc3b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -85,8 +85,8 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) Size aOleSize = pObj->GetOrigObjSize(); - boost::rational<long> aScaleWidth (aDrawSize.Width(), aOleSize.Width() ); - boost::rational<long> aScaleHeight(aDrawSize.Height(), aOleSize.Height() ); + boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aOleSize.Width() ); + boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aOleSize.Height() ); rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj rational_ReduceInaccurate(aScaleHeight, 10); pClient->SetSizeScale(aScaleWidth,aScaleHeight); @@ -145,15 +145,15 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) awt::Size aSz( aOleSize.Width(), aOleSize.Height() ); xObj->setVisualAreaSize( pClient->GetAspect(), aSz ); } - boost::rational<long> aOne( 1, 1 ); + boost::rational<sal_Int64> aOne( 1, 1 ); pClient->SetSizeScale( aOne, aOne ); } else { // calculate scale from client and VisArea size - boost::rational<long> aScaleWidth (aDrawSize.Width(), aOleSize.Width() ); - boost::rational<long> aScaleHeight(aDrawSize.Height(), aOleSize.Height() ); + boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aOleSize.Width() ); + boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aOleSize.Height() ); rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj rational_ReduceInaccurate(aScaleHeight, 10); pClient->SetSizeScale(aScaleWidth,aScaleHeight); diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 46503dae69a7..641998930843 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -121,12 +121,12 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) pDrView->MoveMarkedObj( Size( 0, nNewVal - aRect.Top() ) ); else if ( nSlotId == SID_OBJECT_WIDTH ) pDrView->ResizeMarkedObj( aRect.TopLeft(), - boost::rational<long>( nNewVal, aRect.GetWidth() ), - boost::rational<long>( 1, 1 ) ); + boost::rational<sal_Int64>( nNewVal, aRect.GetWidth() ), + boost::rational<sal_Int64>( 1, 1 ) ); else // if ( nSlotId == SID_OBJECT_HEIGHT ) pDrView->ResizeMarkedObj( aRect.TopLeft(), - boost::rational<long>( 1, 1 ), - boost::rational<long>( nNewVal, aRect.GetHeight() ) ); + boost::rational<sal_Int64>( 1, 1 ), + boost::rational<sal_Int64>( nNewVal, aRect.GetHeight() ) ); bDone = true; } } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 1dd2d255a0d7..7006abc09eb7 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -248,14 +248,14 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV else if (sName.equalsAscii(SC_ZOOMVALUE) ) { aSettings[i].Value >>= nTemp32; - boost::rational<long> aZoom(nTemp32, 100); + boost::rational<sal_Int64> aZoom(nTemp32, 100); aZoomX = aZoomY = aZoom; rHasZoom = true; } else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) ) { aSettings[i].Value >>= nTemp32; - boost::rational<long> aZoom(nTemp32, 100); + boost::rational<sal_Int64> aZoom(nTemp32, 100); aPageZoomX = aPageZoomY = aZoom; rHasZoom = true; } @@ -616,21 +616,21 @@ void ScViewData::SetZoomType( SvxZoomType eNew, bool bAll ) SetZoomType( eNew, vTabs ); } -void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, std::vector< SCTAB >& tabs ) +void ScViewData::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, std::vector< SCTAB >& tabs ) { bool bAll = ( tabs.empty() ); if ( !bAll ) // create associated table data CreateTabData( tabs ); - boost::rational<long> aFrac20( 1,5 ); - boost::rational<long> aFrac400( 4,1 ); + boost::rational<sal_Int64> aFrac20( 1,5 ); + boost::rational<sal_Int64> aFrac400( 4,1 ); - boost::rational<long> aValidX = rNewX; + boost::rational<sal_Int64> aValidX = rNewX; if (aValidX<aFrac20) aValidX = aFrac20; if (aValidX>aFrac400) aValidX = aFrac400; - boost::rational<long> aValidY = rNewY; + boost::rational<sal_Int64> aValidY = rNewY; if (aValidY<aFrac20) aValidY = aFrac20; if (aValidY>aFrac400) @@ -690,7 +690,7 @@ void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::ratio RefreshZoom(); } -void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll ) +void ScViewData::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll ) { std::vector< SCTAB > vTabs; if ( !bAll ) // get selected tabs @@ -1033,7 +1033,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // if text is formatted for printer, use the exact same paper width // (and same line breaks) as for output. - boost::rational<long> aFract(1,1); + boost::rational<sal_Int64> aFract(1,1); Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false ); aPaperSize.Width() = aUtilRect.GetWidth(); @@ -2120,18 +2120,18 @@ bool ScViewData::IsMinimized() return pView->IsMinimized(); } -void ScViewData::UpdateScreenZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY ) +void ScViewData::UpdateScreenZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY ) { - boost::rational<long> aOldX = GetZoomX(); - boost::rational<long> aOldY = GetZoomY(); + boost::rational<sal_Int64> aOldX = GetZoomX(); + boost::rational<sal_Int64> aOldY = GetZoomY(); SetZoom( rNewX, rNewY, false ); - boost::rational<long> aWidth = GetZoomX(); + boost::rational<sal_Int64> aWidth = GetZoomX(); aWidth *= aScrSize.Width(); aWidth /= aOldX; - boost::rational<long> aHeight = GetZoomY(); + boost::rational<sal_Int64> aHeight = GetZoomY(); aHeight *= aScrSize.Height(); aHeight /= aOldY; @@ -2259,15 +2259,15 @@ void ScViewData::ReadUserData(const OUString& rData) // nicht pro Tabelle: SCTAB nTabStart = 2; - boost::rational<long> aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?) + boost::rational<sal_Int64> aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?) OUString aZoomStr = rData.getToken(0, ';'); // Zoom/PageZoom/Modus sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0,'/').toInt32()); if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM ) - aZoomX = aZoomY = boost::rational<long>( nNormZoom, 100 ); // "normal" zoom (always) + aZoomX = aZoomY = boost::rational<sal_Int64>( nNormZoom, 100 ); // "normal" zoom (always) sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(1,'/').toInt32()); if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM ) - aPageZoomX = aPageZoomY = boost::rational<long>( nPageZoom, 100 ); // Pagebreak-zoom, if set + aPageZoomX = aPageZoomY = boost::rational<sal_Int64>( nPageZoom, 100 ); // Pagebreak-zoom, if set sal_Unicode cMode = aZoomStr.getToken(2,'/')[0]; // 0 or "0"/"1" SetPagebreakMode( cMode == '1' ); // SetPagebreakMode muss immer gerufen werden wegen CalcPPT / RecalcPixPos() @@ -2579,9 +2579,9 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) // zoom for each sheet if( rTabSett.mnNormalZoom ) - rViewTab.aZoomX = rViewTab.aZoomY = boost::rational<long>( rTabSett.mnNormalZoom, 100L ); + rViewTab.aZoomX = rViewTab.aZoomY = boost::rational<sal_Int64>( rTabSett.mnNormalZoom, 100L ); if( rTabSett.mnPageZoom ) - rViewTab.aPageZoomX = rViewTab.aPageZoomY = boost::rational<long>( rTabSett.mnPageZoom, 100L ); + rViewTab.aPageZoomX = rViewTab.aPageZoomY = boost::rational<sal_Int64>( rTabSett.mnPageZoom, 100L ); rViewTab.bShowGrid = rTabSett.mbShowGrid; @@ -2599,9 +2599,9 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) // view mode and default zoom (for new sheets) from current sheet if( rTabSett.mnNormalZoom ) - aDefZoomX = aDefZoomY = boost::rational<long>( rTabSett.mnNormalZoom, 100L ); + aDefZoomX = aDefZoomY = boost::rational<sal_Int64>( rTabSett.mnNormalZoom, 100L ); if( rTabSett.mnPageZoom ) - aDefPageZoomX = aDefPageZoomY = boost::rational<long>( rTabSett.mnPageZoom, 100L ); + aDefPageZoomX = aDefPageZoomY = boost::rational<sal_Int64>( rTabSett.mnPageZoom, 100L ); /* #i46820# set pagebreak mode via SetPagebreakMode(), this will update map modes that are needed to draw text correctly. */ SetPagebreakMode( rTabSett.mbPageMode ); @@ -2787,7 +2787,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> { if (rSettings[i].Value >>= nTemp32) { - boost::rational<long> aZoom(nTemp32, 100); + boost::rational<sal_Int64> aZoom(nTemp32, 100); aDefZoomX = aDefZoomY = aZoom; } } @@ -2795,7 +2795,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> { if (rSettings[i].Value >>= nTemp32) { - boost::rational<long> aZoom(nTemp32, 100); + boost::rational<sal_Int64> aZoom(nTemp32, 100); aDefPageZoomX = aDefPageZoomY = aZoom; } } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index bd0fb122e88a..5fb567ccb3bf 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -114,15 +114,15 @@ bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData ) double nPPTX = GetViewData().GetPPTX(); double nPPTY = GetViewData().GetPPTY(); - boost::rational<long> aZoomX = GetViewData().GetZoomX(); - boost::rational<long> aZoomY = GetViewData().GetZoomY(); + boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX(); + boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY(); ScSizeDeviceProvider aProv(pDocSh); if (aProv.IsPrinter()) { nPPTX = aProv.GetPPTX(); nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = boost::rational<long>( 1, 1 ); + aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 ); } sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice()); @@ -163,8 +163,8 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint ) SCTAB nTab = GetViewData().GetTabNo(); double nPPTX = GetViewData().GetPPTX(); double nPPTY = GetViewData().GetPPTY(); - boost::rational<long> aZoomX = GetViewData().GetZoomX(); - boost::rational<long> aZoomY = GetViewData().GetZoomY(); + boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX(); + boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY(); sal_uInt16 nOldPixel = 0; if (nStartRow == nEndRow) nOldPixel = (sal_uInt16) (rDoc.GetRowHeight(nStartRow,nTab) * nPPTY); @@ -174,7 +174,7 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint ) { nPPTX = aProv.GetPPTX(); nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = boost::rational<long>( 1, 1 ); + aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 ); } sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice()); bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab); diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 1e27dd1e9be1..68c6dbbb58e8 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -420,7 +420,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if (aSourceMap.GetMapUnit() == MAP_PIXEL) { // consider pixel correction, so bitmap fits to screen - boost::rational<long> aScaleX, aScaleY; + boost::rational<sal_Int64> aScaleX, aScaleY; pScDrawView->CalcNormScale( aScaleX, aScaleY ); aDestMap.SetScaleX(aScaleX); aDestMap.SetScaleY(aScaleY); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 4f89e13103e9..f834e65d14f6 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -228,15 +228,15 @@ sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula double nPPTX = GetViewData().GetPPTX(); double nPPTY = GetViewData().GetPPTY(); - boost::rational<long> aZoomX = GetViewData().GetZoomX(); - boost::rational<long> aZoomY = GetViewData().GetZoomY(); + boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX(); + boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY(); ScSizeDeviceProvider aProv(pDocSh); if (aProv.IsPrinter()) { nPPTX = aProv.GetPPTX(); nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = boost::rational<long>( 1, 1 ); + aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 ); } sal_uInt16 nTwips = rDoc.GetOptimalColWidth( nCol, nTab, aProv.GetDevice(), @@ -1960,15 +1960,15 @@ void ScViewFunc::SetWidthOrHeight( double nPPTX = GetViewData().GetPPTX(); double nPPTY = GetViewData().GetPPTY(); - boost::rational<long> aZoomX = GetViewData().GetZoomX(); - boost::rational<long> aZoomY = GetViewData().GetZoomY(); + boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX(); + boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY(); ScSizeDeviceProvider aProv(pDocSh); if (aProv.IsPrinter()) { nPPTX = aProv.GetPPTX(); nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = boost::rational<long>( 1, 1 ); + aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 ); } sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice()); @@ -2194,15 +2194,15 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, bool bOptimal ) { double nPPTX = GetViewData().GetPPTX(); double nPPTY = GetViewData().GetPPTY(); - boost::rational<long> aZoomX = GetViewData().GetZoomX(); - boost::rational<long> aZoomY = GetViewData().GetZoomY(); + boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX(); + boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY(); ScSizeDeviceProvider aProv(pDocSh); if (aProv.IsPrinter()) { nPPTX = aProv.GetPPTX(); nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = boost::rational<long>( 1, 1 ); + aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 ); } long nPixel = rDoc.GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(), diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 39cded4e3e74..7727d48119cc 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -192,12 +192,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) // Allow UI scale only for draw documents. if( eType == DOCUMENT_TYPE_DRAW ) - SetUIUnit( (FieldUnit)pOptions->GetMetric(), boost::rational<long>( nX, nY ) ); // user-defined + SetUIUnit( (FieldUnit)pOptions->GetMetric(), boost::rational<sal_Int64>( nX, nY ) ); // user-defined else - SetUIUnit( (FieldUnit)pOptions->GetMetric(), boost::rational<long>( 1, 1 ) ); // default + SetUIUnit( (FieldUnit)pOptions->GetMetric(), boost::rational<sal_Int64>( 1, 1 ) ); // default SetScaleUnit(MAP_100TH_MM); - SetScaleFraction(boost::rational<long>(1, 1)); + SetScaleFraction(boost::rational<sal_Int64>(1, 1)); SetDefaultFontHeight(847); // 24p pItemPool->SetDefaultMetric(SFX_MAPUNIT_100TH_MM); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 1e96f6f0aa68..032a0a0080bd 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1843,8 +1843,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR long nOldWidth = GetWdt() - GetLftBorder() - GetRgtBorder(); long nOldHeight = GetHgt() - GetUppBorder() - GetLwrBorder(); - boost::rational<long> aFractX( aNewPageSize.Width(), nOldWidth ); - boost::rational<long> aFractY( aNewPageSize.Height(), nOldHeight ); + boost::rational<sal_Int64> aFractX( aNewPageSize.Width(), nOldWidth ); + boost::rational<sal_Int64> aFractY( aNewPageSize.Height(), nOldHeight ); const size_t nObjCnt = (mbScaleObjects ? GetObjCount() : 0); diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 427f884e24b4..3194ec8487f5 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1095,7 +1095,7 @@ void ImplExportComments( uno::Reference< drawing::XDrawPage > xPage, SvMemoryStr uno::Reference< office::XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement() ); geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() ); - MapMode aMapDest( MAP_INCH, Point(), boost::rational<long>( 1, 576 ), boost::rational<long>( 1, 576 ) ); + MapMode aMapDest( MAP_INCH, Point(), boost::rational<sal_Int64>( 1, 576 ), boost::rational<sal_Int64>( 1, 576 ) ); Point aPoint( OutputDevice::LogicToLogic( Point( static_cast< sal_Int32 >( aRealPoint2D.X * 100.0 ), static_cast< sal_Int32 >( aRealPoint2D.Y * 100.0 ) ), MAP_100TH_MM, aMapDest ) ); diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index b5dd80321481..457600cba8cb 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -350,7 +350,7 @@ protected: sal_uInt32 mnPages; ///< number of Slides ( w/o master pages & notes & handout ) sal_uInt32 mnMasterPages; - boost::rational<long> maFraction; + boost::rational<sal_Int64> maFraction; MapMode maMapModeSrc; MapMode maMapModeDest; ::com::sun::star::awt::Size maDestPageSize; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 8e56d350e884..18e2f34107a5 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -652,7 +652,7 @@ ParagraphObj::ParagraphObj(const ::com::sun::star::uno::Reference< ::com::sun::s , SOParagraph() , mvPortions() , maMapModeSrc(MAP_100TH_MM) - , maMapModeDest(MAP_INCH, Point(), boost::rational<long>( 1, 576 ), boost::rational<long>( 1, 576 )) + , maMapModeDest(MAP_INCH, Point(), boost::rational<sal_Int64>( 1, 576 ), boost::rational<sal_Int64>( 1, 576 )) , mnTextSize(0) , mbFirstParagraph(false) , mbLastParagraph(false) @@ -682,7 +682,7 @@ ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::t , SOParagraph() , mvPortions() , maMapModeSrc(MAP_100TH_MM) - , maMapModeDest(MAP_INCH, Point(), boost::rational<long>( 1, 576 ), boost::rational<long>( 1, 576 )) + , maMapModeDest(MAP_INCH, Point(), boost::rational<sal_Int64>( 1, 576 ), boost::rational<sal_Int64>( 1, 576 )) , mnTextSize(0) , mbIsBullet(false) , mbFirstParagraph( aParaFlags.bFirstParagraph ) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 8db6f17d7f52..7a06ad74f73a 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -502,7 +502,7 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot ) if(pFrameView) { - const boost::rational<long>& rFraction = pDoc->GetUIScale(); + const boost::rational<sal_Int64>& rFraction = pDoc->GetUIScale(); nX=rFraction.numerator(); nY=rFraction.denominator(); } @@ -595,7 +595,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) // Apply to document only if doc type match if( pDocSh && pDoc && eDocType == pDoc->GetDocumentType() ) { - pDoc->SetUIScale( boost::rational<long>( nX, nY ) ); + pDoc->SetUIScale( boost::rational<sal_Int64>( nX, nY ) ); if( pViewShell ) pViewShell->SetRuler( pViewShell->HasRuler() ); } diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index f8db33ebe451..79f71a72228a 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -100,7 +100,7 @@ void SdDisplay::Paint( const Rectangle& ) aBitmapEx.Draw( this, aPt, aBmpSize ); } -void SdDisplay::SetScale( const boost::rational<long>& rFrac ) +void SdDisplay::SetScale( const boost::rational<sal_Int64>& rFrac ) { aScale = rFrac; } @@ -468,7 +468,7 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn ) } // calculate and set zoom for DisplayWin - boost::rational<long> aFrac( GetScale() ); + boost::rational<sal_Int64> aFrac( GetScale() ); aCtlDisplay.SetScale( aFrac ); UpdateControl(); @@ -643,9 +643,9 @@ void AnimationWindow::WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime, } } -boost::rational<long> AnimationWindow::GetScale() +boost::rational<sal_Int64> AnimationWindow::GetScale() { - boost::rational<long> aFrac; + boost::rational<sal_Int64> aFrac; size_t const nCount = m_FrameList.size(); if (nCount > 0) { @@ -733,7 +733,7 @@ void AnimationWindow::Resize() aGrpAnimation.SetPosPixel( aGrpAnimation.GetPosPixel() + aPt ); // calculate and set zoom for DisplayWin - boost::rational<long> aFrac( GetScale() ); + boost::rational<sal_Int64> aFrac( GetScale() ); aCtlDisplay.SetScale( aFrac ); aBtnFirst.Show(); @@ -963,7 +963,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) } // calculate and set zoom for DisplayWin - boost::rational<long> aFrac( GetScale() ); + boost::rational<sal_Int64> aFrac( GetScale() ); aCtlDisplay.SetScale( aFrac ); UpdateControl(); diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index a6f2fa7787ae..91877806858d 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -237,7 +237,7 @@ void SdDocPreviewWin::updateViewSettings() VirtualDevice aVDev; - const boost::rational<long> aFrac( pDoc->GetScaleFraction() ); + const boost::rational<sal_Int64> aFrac( pDoc->GetScaleFraction() ); const MapMode aMap( pDoc->GetScaleUnit(), Point(), aFrac, aFrac ); aVDev.SetMapMode( aMap ); diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index ecb5a2966cbc..b4dd8f59ae7f 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -113,7 +113,7 @@ void SdVectorizeDlg::InitPreviewBmp() m_pBmpWin->SetGraphic( aPreviewBmp ); } -Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, boost::rational<long>& rScale ) +Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, boost::rational<sal_Int64>& rScale ) { Bitmap aNew( rBmp ); const Size aSizePix( aNew.GetSizePixel() ); @@ -121,11 +121,11 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, boost::rational<long>& r if( aSizePix.Width() > VECTORIZE_MAX_EXTENT || aSizePix.Height() > VECTORIZE_MAX_EXTENT ) { const Rectangle aRect( GetRect( Size( VECTORIZE_MAX_EXTENT, VECTORIZE_MAX_EXTENT ), aSizePix ) ); - rScale = boost::rational<long>( aSizePix.Width(), aRect.GetWidth() ); + rScale = boost::rational<sal_Int64>( aSizePix.Width(), aRect.GetWidth() ); aNew.Scale( aRect.GetSize() ); } else - rScale = boost::rational<long>( 1, 1 ); + rScale = boost::rational<sal_Int64>( 1, 1 ); aNew.ReduceColors( (sal_uInt16) m_pNmLayers->GetValue(), BMP_REDUCE_SIMPLE ); @@ -137,7 +137,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ) mpDocSh->SetWaitCursor( true ); m_pPrgs->SetValue( 0 ); - boost::rational<long> aScale; + boost::rational<sal_Int64> aScale; Bitmap aTmp( GetPreparedBitmap( rBmp, aScale ) ); if( !!aTmp ) diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 0cf004be3498..8887b1b1e736 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -199,7 +199,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe const Size aPixSize( aVDev.LogicToPixel( aSize ) ); const sal_uLong nMaxEdgePix = std::max( aPixSize.Width(), aPixSize.Height() ); - boost::rational<long> aFrac( nMaxEdgePixel, nMaxEdgePix ); + boost::rational<sal_Int64> aFrac( nMaxEdgePixel, nMaxEdgePix ); aMapMode.SetScaleX( aFrac ); aMapMode.SetScaleY( aFrac ); @@ -207,7 +207,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe aVDev.SetOutputSize( aSize ); // that we also get the dark lines at the right and bottom page margin - aFrac = boost::rational<long>( nMaxEdgePixel - 1, nMaxEdgePix ); + aFrac = boost::rational<sal_Int64>( nMaxEdgePixel - 1, nMaxEdgePix ); aMapMode.SetScaleX( aFrac ); aMapMode.SetScaleY( aFrac ); aVDev.SetMapMode( aMapMode ); diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index e1d0b57f76b2..dbfb7e4f8fcf 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -235,8 +235,8 @@ void FuCopy::DoExecute( SfxRequest& rReq ) } } - boost::rational<long> aWidth( aRect.Right() - aRect.Left() + lWidth, aRect.Right() - aRect.Left() ); - boost::rational<long> aHeight( aRect.Bottom() - aRect.Top() + lHeight, aRect.Bottom() - aRect.Top() ); + boost::rational<sal_Int64> aWidth( aRect.Right() - aRect.Left() + lWidth, aRect.Right() - aRect.Left() ); + boost::rational<sal_Int64> aHeight( aRect.Bottom() - aRect.Top() + lHeight, aRect.Bottom() - aRect.Top() ); if( mpView->IsResizeAllowed() ) mpView->ResizeAllMarked( aRect.TopLeft(), aWidth, aHeight ); diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 8ffedbdf7569..da0749cab2c0 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -408,7 +408,7 @@ protected: virtual SvxRuler* CreateVRuler(::sd::Window* pWin) SAL_OVERRIDE; virtual void UpdateHRuler() SAL_OVERRIDE; virtual void UpdateVRuler() SAL_OVERRIDE; - virtual void SetZoomFactor(const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY) SAL_OVERRIDE; + virtual void SetZoomFactor(const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY) SAL_OVERRIDE; void SetupPage( Size &rSize, long nLeft, long nRight, long nUpper, long nLower, bool bSize, bool bMargin, bool bScaleAll ); diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 18e3cd43be3c..8c53ccb5321b 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -537,8 +537,8 @@ protected: virtual void Activate(bool IsMDIActivate) SAL_OVERRIDE; virtual void Deactivate(bool IsMDIActivate) SAL_OVERRIDE; - virtual void SetZoomFactor( const boost::rational<long>& rZoomX, - const boost::rational<long>& rZoomY ); + virtual void SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, + const boost::rational<sal_Int64>& rZoomY ); /** This must be called after the ctor, but before anything else. diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index c744a3d3a085..3a49fa8338f5 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -161,8 +161,8 @@ public: virtual void Activate (bool IsMDIActivate) SAL_OVERRIDE; virtual void Deactivate (bool IsMDIActivate) SAL_OVERRIDE; virtual void SetZoomFactor ( - const boost::rational<long>& rZoomX, - const boost::rational<long>& rZoomY) SAL_OVERRIDE; + const boost::rational<sal_Int64>& rZoomX, + const boost::rational<sal_Int64>& rZoomY) SAL_OVERRIDE; virtual bool PrepareClose (bool bUI = true) SAL_OVERRIDE; virtual void WriteUserData (OUString&, bool bBrowse = false) SAL_OVERRIDE; virtual void ReadUserData (const OUString&, bool bBrowse = false) SAL_OVERRIDE; diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 2178f829108c..ca27764c1638 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -61,7 +61,7 @@ class SdDisplay : public Control { private: BitmapEx aBitmapEx; - boost::rational<long> aScale; + boost::rational<sal_Int64> aScale; public: SdDisplay( vcl::Window* pWin, SdResId Id ); @@ -70,7 +70,7 @@ public: virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; void SetBitmapEx( BitmapEx* pBmpEx ); - void SetScale( const boost::rational<long>& rFrac ); + void SetScale( const boost::rational<sal_Int64>& rFrac ); virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; }; @@ -155,7 +155,7 @@ private: void ResetAttrs(); void WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime, SfxProgress* pStbMgr ) const; - boost::rational<long> GetScale(); + boost::rational<sal_Int64> GetScale(); }; /** diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx index f62bf44f3b39..fba9779cf8ed 100644 --- a/sd/source/ui/inc/copydlg.hxx +++ b/sd/source/ui/inc/copydlg.hxx @@ -64,7 +64,7 @@ private: const SfxItemSet& mrOutAttrs; XColorListRef mpColorList; - boost::rational<long> maUIScale; + boost::rational<sal_Int64> maUIScale; ::sd::View* mpView; DECL_LINK( SelectColorHdl, void * ); diff --git a/sd/source/ui/inc/dlgsnap.hxx b/sd/source/ui/inc/dlgsnap.hxx index befaa538ceba..1042144b1651 100644 --- a/sd/source/ui/inc/dlgsnap.hxx +++ b/sd/source/ui/inc/dlgsnap.hxx @@ -53,7 +53,7 @@ private: long nXValue; long nYValue; FieldUnit eUIUnit; - boost::rational<long> aUIScale; + boost::rational<sal_Int64> aUIScale; DECL_LINK( ClickHdl, Button * ); diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx index 6107c7ed99a1..dee673bc13bb 100644 --- a/sd/source/ui/inc/vectdlg.hxx +++ b/sd/source/ui/inc/vectdlg.hxx @@ -67,7 +67,7 @@ class SdVectorizeDlg : public ModalDialog void UpdatePreviewMtf(); Rectangle GetRect( const Size& rDispSize, const Size& rBmpSize ) const; - Bitmap GetPreparedBitmap( Bitmap& rBmp, boost::rational<long>& rScale ); + Bitmap GetPreparedBitmap( Bitmap& rBmp, boost::rational<sal_Int64>& rScale ); void Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ); void AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, long nPosX, long nPosY, long nWidth, long nHeight ); diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index b6555cc5ac89..5ffe1e8d4b4c 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx @@ -114,7 +114,7 @@ public: /** Return the scale factor that can be set at the map mode of the output window. */ - boost::rational<long> GetScaleFactor (void) const; + boost::rational<sal_Int64> GetScaleFactor (void) const; Size GetPageObjectSize (void) const; diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 3113433ff3b9..c9ff1054aa79 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -383,9 +383,9 @@ void PreviewRenderer::SetupOutputSize ( { const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0); aMapMode.SetScaleX( - boost::rational<long>(rFramePixelSize.Width()-2*nFrameWidth-1, aPageModelSize.Width())); + boost::rational<sal_Int64>(rFramePixelSize.Width()-2*nFrameWidth-1, aPageModelSize.Width())); aMapMode.SetScaleY( - boost::rational<long>(rFramePixelSize.Height()-2*nFrameWidth-1, aPageModelSize.Height())); + boost::rational<sal_Int64>(rFramePixelSize.Height()-2*nFrameWidth-1, aPageModelSize.Height())); aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(Point(nFrameWidth,nFrameWidth),aMapMode)); } else diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 3d4703c742e3..52551a4a62b5 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -677,7 +677,7 @@ throw (UnknownPropertyException, PropertyVetoException, sal_Int32 nValue = 0; if( *pValues >>= nValue ) { - boost::rational<long> aFract( nValue, pDoc->GetUIScale().denominator() ); + boost::rational<sal_Int64> aFract( nValue, pDoc->GetUIScale().denominator() ); pDoc->SetUIScale( aFract ); bOk = true; bChanged = true; @@ -689,7 +689,7 @@ throw (UnknownPropertyException, PropertyVetoException, sal_Int32 nValue = 0; if( *pValues >>= nValue ) { - boost::rational<long> aFract( pDoc->GetUIScale().numerator(), nValue ); + boost::rational<sal_Int64> aFract( pDoc->GetUIScale().numerator(), nValue ); pDoc->SetUIScale( aFract ); bOk = true; bChanged = true; diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 16fe7c1eca44..be94ae7d6c59 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2226,10 +2226,10 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, // that VirtualDevices use a DPI of 96. // We specifically calculate these scales first as we're still // in TWIPs, and might as well minimise the number of conversions. - boost::rational<long> scaleX = boost::rational<long>( nOutputWidth, 96 ) * boost::rational<long>(1440L) / - boost::rational<long>( nTileWidth ); - boost::rational<long> scaleY = boost::rational<long>( nOutputHeight, 96 ) * boost::rational<long>(1440L) / - boost::rational<long>( nTileHeight ); + boost::rational<sal_Int64> scaleX = boost::rational<sal_Int64>( nOutputWidth, 96 ) * boost::rational<sal_Int64>(1440L) / + boost::rational<sal_Int64>( nTileWidth ); + boost::rational<sal_Int64> scaleY = boost::rational<sal_Int64>( nOutputHeight, 96 ) * boost::rational<sal_Int64>(1440L) / + boost::rational<sal_Int64>( nTileHeight ); // svx seems to be the only component that works natively in // 100th mm rather than TWIP. It makes most sense just to diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 1da275481f44..46f63ad667f7 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1607,8 +1607,8 @@ private: { MapMode aMap (rInfo.maMap); Point aPageOfs (rInfo.mpPrinter->GetPageOffset() ); - aMap.SetScaleX(boost::rational<long>(1,2)); - aMap.SetScaleY(boost::rational<long>(1,2)); + aMap.SetScaleX(boost::rational<sal_Int64>(1,2)); + aMap.SetScaleY(boost::rational<sal_Int64>(1,2)); mpPrinter->SetMapMode(aMap); Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); @@ -1802,11 +1802,11 @@ private: const double fHorz = (double) aPrintSize.Width() / aPageSize.Width(); const double fVert = (double) aPrintSize.Height() / aPageSize.Height(); - boost::rational<long> aFract; + boost::rational<sal_Int64> aFract; if ( fHorz < fVert ) - aFract = boost::rational<long>(aPrintSize.Width(), aPageSize.Width()); + aFract = boost::rational<sal_Int64>(aPrintSize.Width(), aPageSize.Width()); else - aFract = boost::rational<long>(aPrintSize.Height(), aPageSize.Height()); + aFract = boost::rational<sal_Int64>(aPrintSize.Height(), aPageSize.Height()); aMap.SetScaleX(aFract); aMap.SetScaleY(aFract); @@ -1930,11 +1930,11 @@ private: const double fHorz ((double) rInfo.maPrintSize.Width() / aPageSize.Width()); const double fVert ((double) rInfo.maPrintSize.Height() / aPageSize.Height()); - boost::rational<long> aFract; + boost::rational<sal_Int64> aFract; if (fHorz < fVert) - aFract = boost::rational<long>(rInfo.maPrintSize.Width(), aPageSize.Width()); + aFract = boost::rational<sal_Int64>(rInfo.maPrintSize.Width(), aPageSize.Width()); else - aFract = boost::rational<long>(rInfo.maPrintSize.Height(), aPageSize.Height()); + aFract = boost::rational<sal_Int64>(rInfo.maPrintSize.Height(), aPageSize.Height()); aMap.SetScaleX(aFract); aMap.SetScaleY(aFract); @@ -2012,8 +2012,8 @@ private: } MapMode aMap (rInfo.maMap); - aMap.SetScaleX( boost::rational<long>( aPageSize_2.Width(), rInfo.maPageSize.Width() ) ); - aMap.SetScaleY( boost::rational<long>( aPageSize_2.Height(), rInfo.maPageSize.Height() ) ); + aMap.SetScaleX( boost::rational<sal_Int64>( aPageSize_2.Width(), rInfo.maPageSize.Width() ) ); + aMap.SetScaleY( boost::rational<sal_Int64>( aPageSize_2.Height(), rInfo.maPageSize.Height() ) ); // calculate adjusted print size const Size aAdjustedPrintSize (OutputDevice::LogicToLogic( diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 63d89849de5a..3c1eb9d13a95 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -453,8 +453,8 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize) aSize.Height() -= (aBorder.Top() + aBorder.Bottom()); Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MAP_100TH_MM ); SfxViewShell::SetZoomFactor( - boost::rational<long>( aSize.Width(), std::max( aObjSizePixel.Width(), (long int)1 ) ), - boost::rational<long>( aSize.Height(), std::max( aObjSizePixel.Height(), (long int)1) ) ); + boost::rational<sal_Int64>( aSize.Width(), std::max( aObjSizePixel.Width(), (long int)1 ) ), + boost::rational<sal_Int64>( aSize.Height(), std::max( aObjSizePixel.Height(), (long int)1) ) ); } mpImpl->ResizePixel(rOrigin, rSize, false); @@ -735,8 +735,8 @@ void ViewShellBase::Deactivate (bool bIsMDIActivate) } void ViewShellBase::SetZoomFactor ( - const boost::rational<long>& rZoomX, - const boost::rational<long>& rZoomY) + const boost::rational<sal_Int64>& rZoomX, + const boost::rational<sal_Int64>& rZoomY) { SfxViewShell::SetZoomFactor (rZoomX, rZoomY); // Forward call to main sub shell. diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 8dd8d031990a..4361a9f827f8 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -500,7 +500,7 @@ SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, bool bIsFirst) // ... and also set DefTab at the ruler pRuler->SetDefTabDist( GetDoc()->GetDefaultTabulator() ); // new - boost::rational<long> aUIScale(pWin->GetMapMode().GetScaleX()); + boost::rational<sal_Int64> aUIScale(pWin->GetMapMode().GetScaleX()); aUIScale *= GetDoc()->GetUIScale(); pRuler->SetZoom(aUIScale); @@ -529,7 +529,7 @@ SvxRuler* DrawViewShell::CreateVRuler(::sd::Window* pWin) pRuler->SetUnit( FieldUnit( nMetric ) ); - boost::rational<long> aUIScale(pWin->GetMapMode().GetScaleY()); + boost::rational<sal_Int64> aUIScale(pWin->GetMapMode().GetScaleY()); aUIScale *= GetDoc()->GetUIScale(); pRuler->SetZoom(aUIScale); diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 9c9a151c08c1..e04024f80d5b 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -440,7 +440,7 @@ void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) /** * adjust zoom factor for InPlace */ -void DrawViewShell::SetZoomFactor(const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY) +void DrawViewShell::SetZoomFactor(const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY) { ViewShell::SetZoomFactor(rZoomX, rZoomY); mbZoomOnPage = false; diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 4f12613fdd7a..1fb96287f604 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -644,7 +644,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) { Point aPos = GetActiveWindow()->PixelToLogic(maMousePos); pPageView->LogicToPagePos(aPos); - boost::rational<long> aUIScale(GetDoc()->GetUIScale()); + boost::rational<sal_Int64> aUIScale(GetDoc()->GetUIScale()); aPos.X() = boost::rational_cast<long>(aPos.X() / aUIScale); aPos.Y() = boost::rational_cast<long>(aPos.Y() / aUIScale); diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 8f48aeca2f1f..5aec01f58672 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -202,7 +202,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * maVisibleLayers.SetAll(); maPrintableLayers.SetAll(); SetGridCoarse( Size( 1000, 1000 ) ); - SetSnapGridWidth(boost::rational<long>(1000, 1), boost::rational<long>(1000, 1)); + SetSnapGridWidth(boost::rational<sal_Int64>(1000, 1), boost::rational<sal_Int64>(1000, 1)); SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) ); mbNoColors = true; mbNoAttribs = false; @@ -302,8 +302,8 @@ void FrameView::Update(SdOptions* pOptions) SetGridCoarse( Size( pOptions->GetFldDrawX(), pOptions->GetFldDrawY() ) ); SetGridFine( Size( pOptions->GetFldDivisionX(), pOptions->GetFldDivisionY() ) ); - boost::rational<long> aFractX(pOptions->GetFldDrawX(), pOptions->GetFldDrawX() / ( pOptions->GetFldDivisionX() ? pOptions->GetFldDivisionX() : 1 )); - boost::rational<long> aFractY(pOptions->GetFldDrawY(), pOptions->GetFldDrawY() / ( pOptions->GetFldDivisionY() ? pOptions->GetFldDivisionY() : 1 )); + boost::rational<sal_Int64> aFractX(pOptions->GetFldDrawX(), pOptions->GetFldDrawX() / ( pOptions->GetFldDivisionX() ? pOptions->GetFldDivisionX() : 1 )); + boost::rational<sal_Int64> aFractY(pOptions->GetFldDrawY(), pOptions->GetFldDrawY() / ( pOptions->GetFldDivisionY() ? pOptions->GetFldDivisionY() : 1 )); SetSnapGridWidth(aFractX, aFractY); SetQuickEdit(pOptions->IsQuickEdit()); @@ -928,8 +928,8 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : default: SetViewShEditModeOnLoad(EM_PAGE); break; } - const boost::rational<long> aSnapGridWidthX( aSnapGridWidthXNum, aSnapGridWidthXDom ); - const boost::rational<long> aSnapGridWidthY( aSnapGridWidthYNum, aSnapGridWidthYDom ); + const boost::rational<sal_Int64> aSnapGridWidthX( aSnapGridWidthXNum, aSnapGridWidthXDom ); + const boost::rational<sal_Int64> aSnapGridWidthY( aSnapGridWidthYNum, aSnapGridWidthYDom ); SetSnapGridWidth( aSnapGridWidthX, aSnapGridWidthY ); } diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index fabc2aa506a8..f5b9e38d1ea8 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -876,8 +876,8 @@ void View::SetMarkedOriginalSize() Rectangle aDrawRect( pObj->GetLogicRect() ); pUndoGroup->AddAction( mrDoc.GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) ); - pObj->Resize( aDrawRect.TopLeft(), boost::rational<long>( aOleSize.Width(), aDrawRect.GetWidth() ), - boost::rational<long>( aOleSize.Height(), aDrawRect.GetHeight() ) ); + pObj->Resize( aDrawRect.TopLeft(), boost::rational<sal_Int64>( aOleSize.Width(), aDrawRect.GetWidth() ), + boost::rational<sal_Int64>( aOleSize.Height(), aDrawRect.GetHeight() ) ); } } } @@ -938,8 +938,8 @@ void View::DoConnect(SdrOle2Obj* pObj) MapMode aMapMode( mrDoc.GetScaleUnit() ); Size aObjAreaSize = pObj->GetOrigObjSize( &aMapMode ); - boost::rational<long> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); - boost::rational<long> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); + boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); + boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); rational_ReduceInaccurate(aScaleWidth, 10); // compatible to SdrOle2Obj rational_ReduceInaccurate(aScaleHeight, 10); pSdClient->SetSizeScale(aScaleWidth, aScaleHeight); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 3524a77565d2..01b5f1dcbcac 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -703,8 +703,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, Rectangle aObjRect( pNewObj->GetCurrentBoundRect() ); Size aObjSize( aObjRect.GetSize() ); - boost::rational<long> aScaleWidth( aPickObjSize.Width(), aObjSize.Width() ); - boost::rational<long> aScaleHeight( aPickObjSize.Height(), aObjSize.Height() ); + boost::rational<sal_Int64> aScaleWidth( aPickObjSize.Width(), aObjSize.Width() ); + boost::rational<sal_Int64> aScaleHeight( aPickObjSize.Height(), aObjSize.Height() ); pNewObj->NbcResize( aObjRect.TopLeft(), aScaleWidth, aScaleHeight ); aVec -= aObjRect.TopLeft(); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index e0a48d4f1cc2..974b36aebf8c 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -228,8 +228,8 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, Rectangle aObjRect(pNewGrafObj->GetCurrentBoundRect()); Size aObjSize(aObjRect.GetSize()); - boost::rational<long> aScaleWidth(aPickObjSize.Width(), aObjSize.Width()); - boost::rational<long> aScaleHeight(aPickObjSize.Height(), aObjSize.Height()); + boost::rational<sal_Int64> aScaleWidth(aPickObjSize.Width(), aObjSize.Width()); + boost::rational<sal_Int64> aScaleHeight(aPickObjSize.Height(), aObjSize.Height()); pNewGrafObj->NbcResize(aObjRect.TopLeft(), aScaleWidth, aScaleHeight); Point aVec = aPickObjRect.TopLeft() - aObjRect.TopLeft(); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 49149706a986..1d498ee0f12c 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -318,8 +318,8 @@ long Window::SetZoomFactor(long nZoom) // Set the zoom factor at the window's map mode. MapMode aMap(GetMapMode()); - aMap.SetScaleX(boost::rational<long>(nZoom, 100)); - aMap.SetScaleY(boost::rational<long>(nZoom, 100)); + aMap.SetScaleX(boost::rational<sal_Int64>(nZoom, 100)); + aMap.SetScaleY(boost::rational<sal_Int64>(nZoom, 100)); SetMapMode(aMap); // invalidate previous size - it was relative to the old scaling diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 3724d462142a..7408267060ca 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -332,7 +332,7 @@ void ViewShell::Scroll(long nScrollX, long nScrollY) */ void ViewShell::SetZoom(long nZoom) { - boost::rational<long> aUIScale(nZoom, 100); + boost::rational<sal_Int64> aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); if (mpHorizontalRuler.get() != NULL) @@ -399,7 +399,7 @@ void ViewShell::ScrollCenter() void ViewShell::SetZoomRect(const Rectangle& rZoomRect) { long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); - boost::rational<long> aUIScale(nZoom, 100); + boost::rational<sal_Int64> aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); Point aPos = GetActiveWindow()->GetWinViewPos(); @@ -651,7 +651,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, /** * Set zoom factor for InPlace */ -void ViewShell::SetZoomFactor(const boost::rational<long>& rZoomX, const boost::rational<long>&) +void ViewShell::SetZoomFactor(const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>&) { long nZoom = (long)(boost::rational_cast<double>(rZoomX) * 100); SetZoom(nZoom); @@ -870,8 +870,8 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if( pObj->IsChart() ) //charts never should be stretched see #i84323# for example aObjAreaSize = aDrawSize; - boost::rational<long> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); - boost::rational<long> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); + boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() ); + boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() ); rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj rational_ReduceInaccurate(aScaleHeight, 10); pSdClient->SetSizeScale(aScaleWidth, aScaleHeight); diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index d491b702f9d4..9f6f9c175995 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -180,8 +180,8 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev, aSize = pDev->LogicToLogic( aSize, &aWilliMode, &aMod ); if( aSize.Width() && aSize.Height() ) { - boost::rational<long> aXF( rSize.Width(), aSize.Width() ); - boost::rational<long> aYF( rSize.Height(), aSize.Height() ); + boost::rational<sal_Int64> aXF( rSize.Width(), aSize.Width() ); + boost::rational<sal_Int64> aYF( rSize.Height(), aSize.Height() ); DoDraw_Impl( pDev, rObjPos, aXF, aYF, rSetup, nAspect ); } @@ -190,8 +190,8 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev, void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev, const Point & rViewPos, - const boost::rational<long>& rScaleX, - const boost::rational<long>& rScaleY, + const boost::rational<sal_Int64>& rScaleX, + const boost::rational<sal_Int64>& rScaleY, const JobSetup & rSetup, sal_uInt16 nAspect ) { diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index ea49352d9f11..1c6cd4b06ce4 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -99,8 +99,8 @@ class SfxInPlaceClient_Impl : public ::cppu::WeakImplHelper5< embed::XEmbeddedCl public: Timer m_aTimer; // activation timeout, starts after object connection Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) - boost::rational<long> m_aScaleWidth; // scaling that was applied to the object when it was not active - boost::rational<long> m_aScaleHeight; + boost::rational<sal_Int64> m_aScaleWidth; // scaling that was applied to the object when it was not active + boost::rational<sal_Int64> m_aScaleHeight; SfxInPlaceClient* m_pClient; sal_Int64 m_nAspect; // ViewAspect that is assigned from the container Rectangle m_aLastObjAreaPixel; // area of object in coordinate system of the container (without scaling) @@ -615,7 +615,7 @@ SfxInPlaceClient::SfxInPlaceClient( SfxViewShell* pViewShell, vcl::Window *pDraw m_pImp->acquire(); m_pImp->m_pClient = this; m_pImp->m_nAspect = nAspect; - m_pImp->m_aScaleWidth = m_pImp->m_aScaleHeight = boost::rational<long>(1); + m_pImp->m_aScaleWidth = m_pImp->m_aScaleHeight = boost::rational<sal_Int64>(1); m_pImp->m_xClient = static_cast< embed::XEmbeddedClient* >( m_pImp ); pViewShell->NewIPClient_Impl(this); m_pImp->m_aTimer.SetTimeout( SFX_CLIENTACTIVATE_TIMEOUT ); @@ -760,7 +760,7 @@ Rectangle SfxInPlaceClient::GetScaledObjArea() const } -void SfxInPlaceClient::SetSizeScale( const boost::rational<long>& rScaleWidth, const boost::rational<long>& rScaleHeight ) +void SfxInPlaceClient::SetSizeScale( const boost::rational<sal_Int64>& rScaleWidth, const boost::rational<sal_Int64>& rScaleHeight ) { if ( m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight ) { @@ -776,7 +776,7 @@ void SfxInPlaceClient::SetSizeScale( const boost::rational<long>& rScaleWidth, c } -bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost::rational<long>& rScaleWidth, const boost::rational<long>& rScaleHeight ) +bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost::rational<sal_Int64>& rScaleWidth, const boost::rational<sal_Int64>& rScaleHeight ) { if( rArea != m_pImp->m_aObjArea || m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight ) { @@ -794,13 +794,13 @@ bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const boost:: } -const boost::rational<long>& SfxInPlaceClient::GetScaleWidth() const +const boost::rational<sal_Int64>& SfxInPlaceClient::GetScaleWidth() const { return m_pImp->m_aScaleWidth; } -const boost::rational<long>& SfxInPlaceClient::GetScaleHeight() const +const boost::rational<sal_Int64>& SfxInPlaceClient::GetScaleHeight() const { return m_pImp->m_aScaleHeight; } @@ -955,8 +955,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) Rectangle aScaledArea = GetScaledObjArea(); m_pImp->m_aObjArea.SetSize( aNewSize ); - m_pImp->m_aScaleWidth = boost::rational<long>( aScaledArea.GetWidth(), aNewSize.Width() ); - m_pImp->m_aScaleHeight = boost::rational<long>( aScaledArea.GetHeight(), aNewSize.Height() ); + m_pImp->m_aScaleWidth = boost::rational<sal_Int64>( aScaledArea.GetWidth(), aNewSize.Width() ); + m_pImp->m_aScaleHeight = boost::rational<sal_Int64>( aScaledArea.GetHeight(), aNewSize.Height() ); } } catch (uno::Exception const& e) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index cd9f43c1494b..bc3fb83555ae 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -385,7 +385,7 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet ) rItemSet.DisableItem( SID_CREATELINK ); } -void SfxViewFrame::SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) +void SfxViewFrame::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) { GetViewShell()->SetZoomFactor( rZoomX, rZoomY ); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 4eb4d4b375ee..bad5377f38a1 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -853,8 +853,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) -void SfxViewShell::SetZoomFactor( const boost::rational<long>& rZoomX, - const boost::rational<long>& rZoomY ) +void SfxViewShell::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, + const boost::rational<sal_Int64>& rZoomY ) { DBG_ASSERT( GetWindow(), "no window" ); MapMode aMap( GetWindow()->GetMapMode() ); diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 93ed6210fcb4..10bd3eb9c22a 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -134,8 +134,8 @@ public: SmFace & GetFont() { return aFace; }; void SetFont(const SmFace &rFace); - void SetFontSize(const boost::rational<long> &rRelSize, sal_uInt16 nType); - void SetSize(const boost::rational<long> &rScale); + void SetFontSize(const boost::rational<sal_Int64> &rRelSize, sal_uInt16 nType); + void SetSize(const boost::rational<sal_Int64> &rScale); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void PrepareAttributes(); @@ -1240,18 +1240,18 @@ public: class SmFontNode : public SmStructureNode { sal_uInt16 nSizeType; - boost::rational<long> aFontSize; + boost::rational<sal_Int64> aFontSize; public: SmFontNode(const SmToken &rNodeToken) : SmStructureNode(NFONT, rNodeToken) { nSizeType = FNTSIZ_MULTIPLY; - aFontSize = boost::rational<long>(1L); + aFontSize = boost::rational<sal_Int64>(1L); } - void SetSizeParameter(const boost::rational<long> &rValue, sal_uInt16 nType); - const boost::rational<long> & GetSizeParameter() const {return aFontSize;} + void SetSizeParameter(const boost::rational<sal_Int64> &rValue, sal_uInt16 nType); + const boost::rational<sal_Int64> & GetSizeParameter() const {return aFontSize;} const sal_uInt16& GetSizeType() const {return nSizeType;} virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) SAL_OVERRIDE; diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 8cb9254004f8..4ef2b9ffa610 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -41,27 +41,27 @@ inline long SmPtsTo100th_mm(long nNumPts) } -inline long SmPtsTo100th_mm(const boost::rational<long> &rNumPts) - // as above but with argument 'rNumPts' as 'boost::rational<long>' +inline long SmPtsTo100th_mm(const boost::rational<sal_Int64> &rNumPts) + // as above but with argument 'rNumPts' as 'boost::rational<sal_Int64>' { - boost::rational<long> aTmp (254000L, 7227L); + boost::rational<sal_Int64> aTmp (254000L, 7227L); return boost::rational_cast<long>(aTmp * rNumPts); } -inline boost::rational<long> Sm100th_mmToPts(long nNum100th_mm) +inline boost::rational<sal_Int64> Sm100th_mmToPts(long nNum100th_mm) // returns the length (in points) that corresponds to the length // 'nNum100th_mm' (in 100th of mm). { SAL_WARN_IF( nNum100th_mm < 0, "starmath", "Ooops..." ); - boost::rational<long> aTmp (7227L, 254000L); - return aTmp *= boost::rational<long>(nNum100th_mm); + boost::rational<sal_Int64> aTmp (7227L, 254000L); + return aTmp *= boost::rational<sal_Int64>(nNum100th_mm); } -inline long SmRoundFraction(const boost::rational<long> &rFrac) +inline long SmRoundFraction(const boost::rational<sal_Int64> &rFrac) { - SAL_WARN_IF( rFrac <= boost::rational<long>(), "starmath", "Ooops..." ); + SAL_WARN_IF( rFrac <= boost::rational<sal_Int64>(), "starmath", "Ooops..." ); return (rFrac.numerator() + rFrac.denominator() / 2) / rFrac.denominator(); } @@ -109,7 +109,7 @@ public: SmFace & operator = (const SmFace &rFace); }; -SmFace & operator *= (SmFace &rFace, const boost::rational<long> &rFrac); +SmFace & operator *= (SmFace &rFace, const boost::rational<sal_Int64> &rFrac); diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index b23572e2d1e9..a9f3bb3a703b 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -276,7 +276,7 @@ protected: virtual void InnerResizePixel(const Point &rOfs, const Size &rSize) SAL_OVERRIDE; virtual void OuterResizePixel(const Point &rOfs, const Size &rSize) SAL_OVERRIDE; virtual void QueryObjAreaPixel( Rectangle& rRect ) const SAL_OVERRIDE; - virtual void SetZoomFactor( const boost::rational<long> &rX, const boost::rational<long> &rY ) SAL_OVERRIDE; + virtual void SetZoomFactor( const boost::rational<sal_Int64> &rX, const boost::rational<sal_Int64> &rY ) SAL_OVERRIDE; public: TYPEINFO_OVERRIDE(); diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 9ea3b2cebfb7..f39570567a80 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -449,7 +449,7 @@ void SmElementsControl::addElement(const OUString& aElementVisual, const OUStrin SmNodePointer pNode(SmParser().ParseExpression(aElementVisual)); pNode->Prepare(maFormat, *mpDocShell); - pNode->SetSize(boost::rational<long>(10,8)); + pNode->SetSize(boost::rational<sal_Int64>(10,8)); pNode->Arrange(*this, maFormat); Size aSizePixel = LogicToPixel(Size(pNode->GetWidth(), pNode->GetHeight()), MAP_100TH_MM); diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index a8183ed7388b..aaa494dfd3e5 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -1344,7 +1344,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) case TSIZE: { const SmFontNode *pFontNode = static_cast<const SmFontNode *>(pNode); - const boost::rational<long>& aFrac = pFontNode->GetSizeParameter(); + const boost::rational<sal_Int64>& aFrac = pFontNode->GetSizeParameter(); OUStringBuffer sStrBuf; switch(pFontNode->GetSizeType()) @@ -1373,7 +1373,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) //value specified in points. //Must fix StarMath to retain the original pt values - boost::rational<long> aTemp = Sm100th_mmToPts(pFontNode->GetFont(). + boost::rational<sal_Int64> aTemp = Sm100th_mmToPts(pFontNode->GetFont(). GetSize().Height()); if (pFontNode->GetSizeType() == FNTSIZ_MINUS) diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index dd1c51c4b4b9..a2cd19d0fe32 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -165,14 +165,14 @@ void SmNode::SetFont(const SmFace &rFace) } -void SmNode::SetFontSize(const boost::rational<long>& rSize, sal_uInt16 nType) +void SmNode::SetFontSize(const boost::rational<sal_Int64>& rSize, sal_uInt16 nType) //! 'rSize' is in units of pts { Size aFntSize; if (!(Flags() & FLG_SIZE)) { - boost::rational<long> aVal (SmPtsTo100th_mm(rSize.numerator()), + boost::rational<sal_Int64> aVal (SmPtsTo100th_mm(rSize.numerator()), rSize.denominator()); long nHeight = boost::rational_cast<long>(aVal); @@ -197,7 +197,7 @@ void SmNode::SetFontSize(const boost::rational<long>& rSize, sal_uInt16 nType) break; case FNTSIZ_DIVIDE: - if (rSize != boost::rational<long>(0L)) + if (rSize != boost::rational<sal_Int64>(0L)) aFntSize.Height() = boost::rational_cast<long>(aFntSize.Height() / rSize); break; default: @@ -220,7 +220,7 @@ void SmNode::SetFontSize(const boost::rational<long>& rSize, sal_uInt16 nType) } -void SmNode::SetSize(const boost::rational<long>& rSize) +void SmNode::SetSize(const boost::rational<sal_Int64>& rSize) { GetFont() *= rSize; @@ -906,7 +906,7 @@ void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) OSL_ENSURE(pOper, "Sm: NULL pointer"); OSL_ENSURE(pBody, "Sm: NULL pointer"); - pOper->SetSize(boost::rational<long> (rFormat.GetRelSize(SIZ_OPERATOR), 100)); + pOper->SetSize(boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_OPERATOR), 100)); pOper->Arrange(rDev, rFormat); pBody->Arrange(rDev, rFormat); @@ -1003,7 +1003,7 @@ void SmRootNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) pRootSym->MoveTo(aPos); if (pExtra) - { pExtra->SetSize(boost::rational<long>(rFormat.GetRelSize(SIZ_INDEX), 100)); + { pExtra->SetSize(boost::rational<sal_Int64>(rFormat.GetRelSize(SIZ_INDEX), 100)); pExtra->Arrange(rDev, rFormat); aPos = GetExtraPos(*pRootSym, *pExtra); @@ -1097,7 +1097,7 @@ void SmBinHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) OSL_ENSURE(pOper != NULL, "Sm: NULL pointer"); OSL_ENSURE(pRight != NULL, "Sm: NULL pointer"); - pOper->SetSize(boost::rational<long> (rFormat.GetRelSize(SIZ_OPERATOR), 100)); + pOper->SetSize(boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_OPERATOR), 100)); pLeft ->Arrange(rDev, rFormat); pOper ->Arrange(rDev, rFormat); @@ -1139,7 +1139,7 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) bool bIsTextmode = rFormat.IsTextmode(); if (bIsTextmode) { - boost::rational<long> aFraction(rFormat.GetRelSize(SIZ_INDEX), 100); + boost::rational<sal_Int64> aFraction(rFormat.GetRelSize(SIZ_INDEX), 100); pNum ->SetSize(aFraction); pLine ->SetSize(aFraction); pDenom->SetSize(aFraction); @@ -1502,7 +1502,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) { sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ? SIZ_LIMITS : SIZ_INDEX; - boost::rational<long> aFraction ( rFormat.GetRelSize(nIndex), 100 ); + boost::rational<sal_Int64> aFraction ( rFormat.GetRelSize(nIndex), 100 ); pSubSup->SetSize(aFraction); } @@ -1833,9 +1833,9 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor pBody->Arrange(aTmpDev, rFormat); // size is the same as for limits for this part - pScript->SetSize( boost::rational<long>( rFormat.GetRelSize(SIZ_LIMITS), 100 ) ); + pScript->SetSize( boost::rational<sal_Int64>( rFormat.GetRelSize(SIZ_LIMITS), 100 ) ); // braces are a bit taller than usually - pBrace ->SetSize( boost::rational<long>(3, 2) ); + pBrace ->SetSize( boost::rational<sal_Int64>(3, 2) ); long nItalicWidth = pBody->GetItalicWidth(); if (nItalicWidth > 0) @@ -1929,7 +1929,7 @@ void SmOperNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) OSL_ENSURE(pBody, "Sm: missing subnode"); SmNode *pSymbol = GetSymbol(); - pSymbol->SetSize(boost::rational<long>(CalcSymbolHeight(*pSymbol, rFormat), + pSymbol->SetSize(boost::rational<sal_Int64>(CalcSymbolHeight(*pSymbol, rFormat), pSymbol->GetFont().GetSize().Height())); pBody->Arrange(rDev, rFormat); @@ -2174,7 +2174,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) } -void SmFontNode::SetSizeParameter(const boost::rational<long>& rValue, sal_uInt16 Type) +void SmFontNode::SetSizeParameter(const boost::rational<sal_Int64>& rValue, sal_uInt16 Type) { nSizeType = Type; aFontSize = rValue; @@ -2367,7 +2367,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ? SIZ_FUNCTION : SIZ_TEXT; - GetFont() *= boost::rational<long> (rFormat.GetRelSize(nSizeDesc), 100); + GetFont() *= boost::rational<sal_Int64> (rFormat.GetRelSize(nSizeDesc), 100); SmTmpDevice aTmpDev ((OutputDevice &) rDev, true); aTmpDev.SetFont(GetFont()); @@ -2729,7 +2729,7 @@ void SmMathSymbolNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat PrepareAttributes(); - GetFont() *= boost::rational<long> (rFormat.GetRelSize(SIZ_TEXT), 100); + GetFont() *= boost::rational<sal_Int64> (rFormat.GetRelSize(SIZ_TEXT), 100); SmTmpDevice aTmpDev ((OutputDevice &) rDev, true); aTmpDev.SetFont(GetFont()); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 54254bb20fd0..e83fccfcd101 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -1947,7 +1947,7 @@ void SmParser::FontSize() } // get number argument - boost::rational<long> aValue( 1L ); + boost::rational<sal_Int64> aValue( 1L ); if (lcl_IsNumber( m_aCurToken.aText )) { double fTmp = OUString(m_aCurToken.aText).toDouble(); @@ -1969,7 +1969,7 @@ void SmParser::FontSize() nNum /= 10; nDenom /= 10; } - aValue = boost::rational<long>( nNum, nDenom ); + aValue = boost::rational<sal_Int64>( nNum, nDenom ); } } } diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index a47df4a62a9b..81f2abbb3023 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -284,7 +284,7 @@ SmFace & SmFace::operator = (const SmFace &rFace) } -SmFace & operator *= (SmFace &rFace, const boost::rational<long>& rFrac) +SmFace & operator *= (SmFace &rFace, const boost::rational<sal_Int64>& rFrac) // scales the width and height of 'rFace' by 'rFrac' and returns a // reference to 'rFace'. // It's main use is to make scaling fonts look easier. diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 55874794153a..865db90fdc64 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -103,7 +103,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell): // resource) and will be shown by the sfx framework. Hide(); - const boost::rational<long> aFraction (1,1); + const boost::rational<sal_Int64> aFraction (1,1); SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction)); ApplyColorConfigValues( SM_MOD()->GetColorConfig() ); @@ -613,7 +613,7 @@ IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu ) void SmGraphicWindow::SetZoom(sal_uInt16 Factor) { nZoom = std::min(std::max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM); - boost::rational<long> aFraction (nZoom, 100); + boost::rational<sal_Int64> aFraction (nZoom, 100); SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) ); SetTotalSize(); SmViewShell *pViewSh = GetView(); @@ -960,8 +960,8 @@ void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize) if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 ) { Size aProvidedSize = GetWindow()->PixelToLogic( rSize, MAP_100TH_MM ); - SfxViewShell::SetZoomFactor( boost::rational<long>( aProvidedSize.Width(), aObjSize.Width() ), - boost::rational<long>( aProvidedSize.Height(), aObjSize.Height() ) ); + SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aProvidedSize.Width(), aObjSize.Width() ), + boost::rational<sal_Int64>( aProvidedSize.Height(), aObjSize.Height() ) ); } SetBorderPixel( SvBorder() ); @@ -986,9 +986,9 @@ void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const } -void SmViewShell::SetZoomFactor( const boost::rational<long>& rX, const boost::rational<long>& rY ) +void SmViewShell::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; GetGraphicWindow().SetZoom( (sal_uInt16) boost::rational_cast<long>(rFrac * 100) ); //To avoid rounding errors base class regulates crooked values too @@ -1284,9 +1284,9 @@ void SmViewShell::Impl_Print( Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(), aOutRect.GetHeight()), MapMode(MAP_100TH_MM))); Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM))); - sal_uInt16 nZ = (sal_uInt16) std::min( boost::rational_cast<long>( boost::rational<long>(OutputSize.Width() * 100L, GraphicSize.Width()) ), - boost::rational_cast<long>( boost::rational<long>(OutputSize.Height() * 100L, GraphicSize.Height()) ) ); - boost::rational<long> aFraction ((sal_uInt16) std::max ((sal_uInt16) MINZOOM, std::min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100); + sal_uInt16 nZ = (sal_uInt16) std::min( boost::rational_cast<long>( boost::rational<sal_Int64>(OutputSize.Width() * 100L, GraphicSize.Width()) ), + boost::rational_cast<long>( boost::rational<sal_Int64>(OutputSize.Height() * 100L, GraphicSize.Height()) ) ); + boost::rational<sal_Int64> aFraction ((sal_uInt16) std::max ((sal_uInt16) MINZOOM, std::min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100); OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction); } @@ -1296,7 +1296,7 @@ void SmViewShell::Impl_Print( case PRINT_SIZE_ZOOMED: { - boost::rational<long> aFraction( nZoomFactor, 100 ); + boost::rational<sal_Int64> aFraction( nZoomFactor, 100 ); OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction); break; @@ -1788,8 +1788,8 @@ void SmViewShell::Execute(SfxRequest& rReq) Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(), OutputRect.GetHeight()), aMap)); Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap)); - sal_uInt16 nZ = (sal_uInt16) std::min( boost::rational_cast<long>( boost::rational<long>(OutputSize.Width() * 100L, GraphicSize.Width())), - boost::rational_cast<long>( boost::rational<long>(OutputSize.Height() * 100L, GraphicSize.Height()) ) ); + sal_uInt16 nZ = (sal_uInt16) std::min( boost::rational_cast<long>( boost::rational<sal_Int64>(OutputSize.Width() * 100L, GraphicSize.Width())), + boost::rational_cast<long>( boost::rational<sal_Int64>(OutputSize.Height() * 100L, GraphicSize.Height()) ) ); aGraphic.SetZoom (nZ); break; } diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index f7374bf91db1..026c7c1de4ab 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2423,7 +2423,7 @@ long BrowseBox::CalcReverseZoom(long nVal) { if (IsZoom()) { - const boost::rational<long>& rZoom = GetZoom(); + const boost::rational<sal_Int64>& rZoom = GetZoom(); double n = (double)nVal; n *= (double)rZoom.denominator(); n /= (double)rZoom.numerator(); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index e8ac1d0e6d3b..fa1965e0431d 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -104,7 +104,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) BrowserColumn::BrowserColumn( sal_uInt16 nItemId, const class Image &rImage, - const OUString& rTitle, sal_uLong nWidthPixel, const boost::rational<long>& rCurrentZoom ) + const OUString& rTitle, sal_uLong nWidthPixel, const boost::rational<sal_Int64>& rCurrentZoom ) : _nId( nItemId ), _nWidth( nWidthPixel ), _aImage( rImage ), @@ -123,7 +123,7 @@ BrowserColumn::~BrowserColumn() -void BrowserColumn::SetWidth(sal_uLong nNewWidthPixel, const boost::rational<long>& rCurrentZoom) +void BrowserColumn::SetWidth(sal_uLong nNewWidthPixel, const boost::rational<sal_Int64>& rCurrentZoom) { _nWidth = nNewWidthPixel; double n = (double)_nWidth; @@ -174,7 +174,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos -void BrowserColumn::ZoomChanged(const boost::rational<long>& rNewZoom) +void BrowserColumn::ZoomChanged(const boost::rational<sal_Int64>& rNewZoom) { double n = (double)_nOriginalWidth; n *= (double)rNewZoom.numerator(); diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 1bbe57a684d9..838a0874004a 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -76,7 +76,7 @@ class BrowserColumn public: BrowserColumn( sal_uInt16 nItemId, const Image &rImage, - const OUString& rTitle, sal_uLong nWidthPixel, const boost::rational<long>& rCurrentZoom ); + const OUString& rTitle, sal_uLong nWidthPixel, const boost::rational<sal_Int64>& rCurrentZoom ); virtual ~BrowserColumn(); sal_uInt16 GetId() const { return _nId; } @@ -91,8 +91,8 @@ public: virtual void Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, bool bCurs ); - void SetWidth(sal_uLong nNewWidthPixel, const boost::rational<long>& rCurrentZoom); - void ZoomChanged(const boost::rational<long>& rNewZoom); + void SetWidth(sal_uLong nNewWidthPixel, const boost::rational<sal_Int64>& rCurrentZoom); + void ZoomChanged(const boost::rational<sal_Int64>& rNewZoom); }; diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 587174e88491..fed7da731080 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -737,7 +737,7 @@ const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const return aStdSizeAry; MapMode aOldMapMode = pDevice->GetMapMode(); - MapMode aMap( MAP_10TH_INCH, Point(), boost::rational<long>( 1, 72 ), boost::rational<long>( 1, 72 ) ); + MapMode aMap( MAP_10TH_INCH, Point(), boost::rational<sal_Int64>( 1, 72 ), boost::rational<sal_Int64>( 1, 72 ) ); pDevice->SetMapMode( aMap ); sal_uInt16 i; diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index a85a474293e2..f3011b27d73a 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -256,7 +256,7 @@ void Ruler::ImplInit( WinBits nWinBits ) // Initialize Units mnUnitIndex = RULER_UNIT_CM; meUnit = FUNIT_CM; - maZoom = boost::rational<long>( 1, 1 ); + maZoom = boost::rational<sal_Int64>( 1, 1 ); meSourceUnit = MAP_100TH_MM; // Recalculate border widths @@ -2478,7 +2478,7 @@ void Ruler::SetUnit( FieldUnit eNewUnit ) } } -void Ruler::SetZoom( const boost::rational<long>& rNewZoom ) +void Ruler::SetZoom( const boost::rational<sal_Int64>& rNewZoom ) { DBG_ASSERT( rNewZoom.numerator(), "Ruler::SetZoom() with scale 0 is not allowed" ); diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 808a4205d37f..031a43160806 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -1017,7 +1017,7 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX) } else { - boost::rational<long> aFract( 1, 100 ); + boost::rational<sal_Int64> aFract( 1, 100 ); sal_Int32 nWidth = mpMfSizeX->GetValue(); sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); @@ -1051,7 +1051,7 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY) } else { - boost::rational<long> aFract( 1, 100 ); + boost::rational<sal_Int64> aFract( 1, 100 ); sal_Int32 nHeight= mpMfSizeY->GetValue(); sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 69c710991d5b..8b853e2b0e11 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -887,7 +887,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo } else { - aMtf.Scale( boost::rational<long>( rDestSize.Width(), aSrcSize.Width() ), boost::rational<long>( rDestSize.Height(), aSrcSize.Height() ) ); + aMtf.Scale( boost::rational<sal_Int64>( rDestSize.Width(), aSrcSize.Width() ), boost::rational<sal_Int64>( rDestSize.Height(), aSrcSize.Height() ) ); aMtf.SetPrefMapMode( rDestMap ); } diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 967724923ed8..c3698d4f4f13 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -226,7 +226,7 @@ Rectangle IMapRectangleObject::GetRectangle( bool bPixelCoords ) const return aNewRect; } -void IMapRectangleObject::Scale( const boost::rational<long>& rFracX, const boost::rational<long>& rFracY ) +void IMapRectangleObject::Scale( const boost::rational<sal_Int64>& rFracX, const boost::rational<sal_Int64>& rFracY ) { Point aTL( aRect.TopLeft() ); Point aBR( aRect.BottomRight() ); @@ -368,12 +368,12 @@ Rectangle IMapCircleObject::GetBoundRect() const Size( nWidth, nWidth ) ); } -void IMapCircleObject::Scale( const boost::rational<long>& rFracX, const boost::rational<long>& rFracY ) +void IMapCircleObject::Scale( const boost::rational<sal_Int64>& rFracX, const boost::rational<sal_Int64>& rFracY ) { - boost::rational<long> aAverage( rFracX ); + boost::rational<sal_Int64> aAverage( rFracX ); aAverage += rFracY; - aAverage *= boost::rational<long>( 1, 2 ); + aAverage *= boost::rational<sal_Int64>( 1, 2 ); SCALEPOINT( aCenter, rFracX, rFracY ); @@ -487,7 +487,7 @@ void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse ) } } -void IMapPolygonObject::Scale( const boost::rational<long>& rFracX, const boost::rational<long>& rFracY ) +void IMapPolygonObject::Scale( const boost::rational<sal_Int64>& rFracX, const boost::rational<sal_Int64>& rFracY ) { sal_uInt16 nCount = aPoly.GetSize(); @@ -812,7 +812,7 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize, return( pObj ? ( pObj->IsActive() ? pObj : NULL ) : NULL ); } -void ImageMap::Scale( const boost::rational<long>& rFracX, const boost::rational<long>& rFracY ) +void ImageMap::Scale( const boost::rational<sal_Int64>& rFracX, const boost::rational<sal_Int64>& rFracY ) { size_t nCount = maList.size(); 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(); 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()); } } } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index d892b9bdb81f..5da6e056d916 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -744,10 +744,10 @@ void SAL_CALL VCLXToolkit::disposing() if ( addressOfMemoryBufferForSharedArrayWrapper != 0 ) { #if defined(ANDROID) ByteBufferWrapper *bbw = (ByteBufferWrapper *) (intptr_t) addressOfMemoryBufferForSharedArrayWrapper; - pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), boost::rational<long>(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw )); + pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), boost::rational<sal_Int64>(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw )); #else pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), - boost::rational<long>(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), + boost::rational<sal_Int64>(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( reinterpret_cast<sal_uInt8*>( addressOfMemoryBufferForSharedArrayWrapper ))); #endif } else { diff --git a/tools/qa/cppunit/test_rational.cxx b/tools/qa/cppunit/test_rational.cxx index e503c1c5d38d..c58a8001f4f7 100644 --- a/tools/qa/cppunit/test_rational.cxx +++ b/tools/qa/cppunit/test_rational.cxx @@ -33,17 +33,17 @@ public: void testReduceInaccurate() { - const boost::rational<long> aFract(1082130431,1073741824); + const boost::rational<sal_Int64> aFract(1082130431,1073741824); CPPUNIT_ASSERT_MESSAGE( "Fraction #1 not approximately equal to 1.007812499068677", rtl::math::approxEqual(boost::rational_cast<double>(aFract),1.007812499068677) ); - boost::rational<long> aFract2( aFract ); + boost::rational<sal_Int64> aFract2( aFract ); rational_ReduceInaccurate(aFract2, 8); CPPUNIT_ASSERT_MESSAGE( "Fraction #2 not 1", aFract2.numerator() == 1 && aFract2.denominator() == 1 ); - boost::rational<long> aFract3( 0x7AAAAAAA, 0x35555555 ); + boost::rational<sal_Int64> aFract3( 0x7AAAAAAA, 0x35555555 ); CPPUNIT_ASSERT_MESSAGE( "Fraction #3 cancellation wrong", aFract3.numerator() == 0x7AAAAAAA && aFract3.denominator() == 0x35555555 ); @@ -73,7 +73,7 @@ public: aFract3.denominator() == 1 ); #if SAL_TYPES_SIZEOFLONG == 8 - boost::rational<long> aFract4(0x7AAAAAAAAAAAAAAA, 0x3555555555555555); + boost::rational<sal_Int64> aFract4(0x7AAAAAAAAAAAAAAA, 0x3555555555555555); CPPUNIT_ASSERT_MESSAGE( "Fraction #4 cancellation wrong", aFract4.numerator() == 0x7AAAAAAAAAAAAAAA && aFract4.denominator() == 0x3555555555555555 ); diff --git a/tools/source/generic/rational.cxx b/tools/source/generic/rational.cxx index 73b9f4ec6a9b..1f2fc14d5a00 100644 --- a/tools/source/generic/rational.cxx +++ b/tools/source/generic/rational.cxx @@ -15,7 +15,7 @@ // If dVal > LONG_MAX or dVal < LONG_MIN, the rational throws a boost::bad_rational. // Otherwise, dVal and denominator are multiplied with 10, until one of them // is larger than (LONG_MAX / 10). -boost::rational<long> rational_FromDouble(double dVal) +boost::rational<sal_Int64> rational_FromDouble(double dVal) { long nDen = 1; long nMAX = LONG_MAX / 10; @@ -30,7 +30,7 @@ boost::rational<long> rational_FromDouble(double dVal) dVal *= 10; nDen *= 10; } - return boost::rational<long>((long) dVal, nDen); + return boost::rational<sal_Int64>((long) dVal, nDen); } // Similar to clz_table that can be googled @@ -114,7 +114,7 @@ static int impl_NumberOfBits( unsigned long nNum ) A ReduceInaccurate(8) yields 1/1. */ -void rational_ReduceInaccurate(boost::rational<long>& rRational, unsigned nSignificantBits) +void rational_ReduceInaccurate(boost::rational<sal_Int64>& rRational, unsigned nSignificantBits) { if ( !rRational ) return; @@ -147,7 +147,7 @@ void rational_ReduceInaccurate(boost::rational<long>& rRational, unsigned nSigni rRational.assign( bNeg? -long( nMul ): long( nMul ), nDiv ); } -SvStream& ReadFraction(SvStream& rIStream, boost::rational<long>& rRational) +SvStream& ReadFraction(SvStream& rIStream, boost::rational<sal_Int64>& rRational) { sal_Int32 nTmpNumerator(0), nTmpDenominator(0); rIStream.ReadInt32( nTmpNumerator ); @@ -161,7 +161,7 @@ SvStream& ReadFraction(SvStream& rIStream, boost::rational<long>& rRational) return rIStream; } -SvStream& WriteFraction(SvStream& rOStream, const boost::rational<long>& rRational) +SvStream& WriteFraction(SvStream& rOStream, const boost::rational<sal_Int64>& rRational) { //fdo#39428 SvStream no longer supports operator<<(long) rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rRational.numerator()) ); diff --git a/vcl/inc/window.h b/vcl/inc/window.h index b6ffa3d41640..4448c55c1f6f 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -231,7 +231,7 @@ public: void* mpUserData; vcl::Cursor* mpCursor; Pointer maPointer; - boost::rational<long> maZoom; + boost::rational<sal_Int64> maZoom; OUString maText; vcl::Font* mpControlFont; Color maControlForeground; diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 1bad8034d929..b228c6ab640a 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -860,7 +860,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r MapMode aMap( MAP_100TH_INCH ); sal_Int32 nDPI = rConfigItem.ReadInt32( "Resolution", 75 ); - boost::rational<long> aFrac( 1, std::min( std::max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); + boost::rational<sal_Int64> aFrac( 1, std::min( std::max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); aMap.SetScaleX( aFrac ); aMap.SetScaleY( aFrac ); @@ -900,8 +900,8 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r if( aNewSize.Width() && aNewSize.Height() ) { const Size aPreferredSize( aMtf.GetPrefSize() ); - aMtf.Scale( boost::rational<long>( aNewSize.Width(), aPreferredSize.Width() ), - boost::rational<long>( aNewSize.Height(), aPreferredSize.Height() ) ); + aMtf.Scale( boost::rational<sal_Int64>( aNewSize.Width(), aPreferredSize.Width() ), + boost::rational<sal_Int64>( aNewSize.Height(), aPreferredSize.Height() ) ); } aGraphic = Graphic( aMtf ); } diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 9f552e96a953..8c7851b560b2 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -336,8 +336,8 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ) { MapMode aMap; aMap.SetMapUnit( nUnits == 1 ? MAP_INCH : MAP_CM ); - aMap.SetScaleX( boost::rational<long>( 1, nHorizontalResolution ) ); - aMap.SetScaleY( boost::rational<long>( 1, nVerticalResolution ) ); + aMap.SetScaleX( boost::rational<sal_Int64>( 1, nHorizontalResolution ) ); + aMap.SetScaleY( boost::rational<sal_Int64>( 1, nVerticalResolution ) ); aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); } } @@ -489,7 +489,7 @@ bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo ) // set logical size MapMode aMap( MAP_INCH, Point(), - boost::rational<long>( 1, nDPIx ), boost::rational<long>( 1, nDPIy ) ); + boost::rational<sal_Int64>( 1, nDPIx ), boost::rational<sal_Int64>( 1, nDPIy ) ); aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 5d4c0479e1cf..be3afdfacd65 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -258,8 +258,8 @@ unsigned char * JPEGReader::CreateBitmap( JPEGCreateBitmapParam * pParam ) if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && pParam->X_density && pParam->Y_density ) { Point aEmptyPoint; - boost::rational<long> aFractX( 1, pParam->X_density ); - boost::rational<long> aFractY( 1, pParam->Y_density ); + boost::rational<sal_Int64> aFractX( 1, pParam->X_density ); + boost::rational<sal_Int64> aFractY( 1, pParam->Y_density ); MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index ac119cae625b..2055e9272627 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -447,7 +447,7 @@ bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt rMtf.Stop(); rMtf.WindStart(); MapMode aMap( MAP_10TH_MM, Point(), - boost::rational<long>( 1, 4 ), boost::rational<long>( 1, 4 ) ); + boost::rational<sal_Int64>( 1, 4 ), boost::rational<sal_Int64>( 1, 4 ) ); rMtf.SetPrefMapMode( aMap ); rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) ); return true; diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 089573a36e17..e297842d93f0 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -830,7 +830,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) rMtf.Stop(); rMtf.WindStart(); - MapMode aMap(MAP_10TH_MM,Point(),boost::rational<long>(1,4),boost::rational<long>(1,4)); + MapMode aMap(MAP_10TH_MM,Point(),boost::rational<sal_Int64>(1,4),boost::rational<sal_Int64>(1,4)); rMtf.SetPrefMapMode(aMap); rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y)); bRet=true; diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 7cbf6bf9732f..2544f2bcb173 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -688,7 +688,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& sal_uInt16 i,j,k,h; sal_uInt16 re,li; - vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),boost::rational<long>(1,4),boost::rational<long>(1,4))); + vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),boost::rational<sal_Int64>(1,4),boost::rational<sal_Int64>(1,4))); nChars=0; SetTextContext(vOut,AktAtr,false,0,1,1,1,1); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 579ca89f20ee..37ee02a768dd 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -1252,8 +1252,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) MapMode aMapMode( aSubstitute.GetPrefMapMode() ); Size aOutSize( OutputDevice::LogicToLogic( pA->GetSize(), maVDev.GetMapMode(), aMapMode ) ); - aMapMode.SetScaleX( boost::rational<long>( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); - aMapMode.SetScaleY( boost::rational<long>( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); + aMapMode.SetScaleX( boost::rational<sal_Int64>( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); + aMapMode.SetScaleY( boost::rational<sal_Int64>( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); aMapMode.SetOrigin( OutputDevice::LogicToLogic( pA->GetPoint(), maVDev.GetMapMode(), aMapMode ) ); maVDev.SetMapMode( aMapMode ); ImplWrite( aSubstitute ); diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 1aa01fef966b..164d5ca7fc82 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1510,8 +1510,8 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B const Size aSizePixel( rBitmap.GetSizePixel() ); if ( aOutputSizePixel.Width() && aOutputSizePixel.Height() ) { - aMapMode.SetScaleX( boost::rational<long>( aSizePixel.Width(), aOutputSizePixel.Width() ) ); - aMapMode.SetScaleY( boost::rational<long>( aSizePixel.Height(), aOutputSizePixel.Height() ) ); + aMapMode.SetScaleX( boost::rational<sal_Int64>( aSizePixel.Width(), aOutputSizePixel.Width() ) ); + aMapMode.SetScaleY( boost::rational<sal_Int64>( aSizePixel.Height(), aOutputSizePixel.Height() ) ); } aVDev.SetMapMode( aMapMode ); aVDev.SetOutputSizePixel( aSizePixel ); diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index fa2dc1b43a53..edd5c6f84426 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1196,7 +1196,7 @@ bool WMFReader::ReadHeader() Size aDevExt( 10000, 10000 ); if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) ) { - const boost::rational<long> aFrac( 1, nUnitsPerInch ); + const boost::rational<sal_Int64> aFrac( 1, nUnitsPerInch ); MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 95473f08f08c..42d83b6e2a9e 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1401,8 +1401,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) { MapMode aMM = pA->GetMapMode(); - boost::rational<long> aScaleX = aMM.GetScaleX(); - boost::rational<long> aScaleY = aMM.GetScaleY(); + boost::rational<sal_Int64> aScaleX = aMM.GetScaleX(); + boost::rational<sal_Int64> aScaleY = aMM.GetScaleY(); Point aOrigin = aSrcMapMode.GetOrigin(); BigInt aX( aOrigin.X() ); @@ -1740,7 +1740,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, aTargetMapMode = MapMode( MAP_INCH ); const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); - const boost::rational<long> aFrac( 1, nUnit ); + const boost::rational<sal_Int64> aFrac( 1, nUnit ); aTargetMapMode.SetScaleX( aFrac ); aTargetMapMode.SetScaleY( aFrac ); @@ -1824,14 +1824,14 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, sal_uInt16 WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize) { - boost::rational<long> aDivFrac(2, 1); + boost::rational<sal_Int64> aDivFrac(2, 1); sal_uInt16 nDivisor = 1; Size aSize = OutputDevice::LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); while( nDivisor <= 64 && (aSize.Width() > 32767 || aSize.Height() > 32767) ) { - boost::rational<long> aFrac = rMapMode.GetScaleX(); + boost::rational<sal_Int64> aFrac = rMapMode.GetScaleX(); aFrac *= aDivFrac; rMapMode.SetScaleX(aFrac); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 3d95cc97d59d..398b85dd2f8f 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -139,7 +139,7 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode ) rIStm.ReadInt16( nUnit ); ReadPair( rIStm, aOrg ); rIStm.ReadInt32( nXNum ).ReadInt32( nXDenom ).ReadInt32( nYNum ).ReadInt32( nYDenom ); - rMapMode = MapMode( (MapUnit) nUnit, aOrg, boost::rational<long>( nXNum, nXDenom ), boost::rational<long>( nYNum, nYDenom ) ); + rMapMode = MapMode( (MapUnit) nUnit, aOrg, boost::rational<sal_Int64>( nXNum, nXDenom ), boost::rational<sal_Int64>( nYNum, nYDenom ) ); } void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode ) diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 2e503ed7dc6b..d32642457c2b 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -766,8 +766,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon MapMode aMapMode( MAP_MM, Point(), - boost::rational<long>(1000, aHeader.nXPelsPerMeter), - boost::rational<long>(1000, aHeader.nYPelsPerMeter)); + boost::rational<sal_Int64>(1000, aHeader.nXPelsPerMeter), + boost::rational<sal_Int64>(1000, aHeader.nYPelsPerMeter)); aNewBmp.SetPrefMapMode(aMapMode); aNewBmp.SetPrefSize(Size(aHeader.nWidth, aHeader.nHeight)); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 9144800e627c..0163959fa02e 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -550,8 +550,8 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, if( !aTmpPrefSize.Height() ) aTmpPrefSize.Height() = aDestSize.Height(); - boost::rational<long> aScaleX( aDestSize.Width(), aTmpPrefSize.Width() ); - boost::rational<long> aScaleY( aDestSize.Height(), aTmpPrefSize.Height() ); + boost::rational<sal_Int64> aScaleX( aDestSize.Width(), aTmpPrefSize.Width() ); + boost::rational<sal_Int64> aScaleY( aDestSize.Height(), aTmpPrefSize.Height() ); aScaleX *= aDrawMap.GetScaleX(); aDrawMap.SetScaleX( aScaleX ); aScaleY *= aDrawMap.GetScaleY(); aDrawMap.SetScaleY( aScaleY ); @@ -816,7 +816,7 @@ void GDIMetaFile::Scale( double fScaleX, double fScaleY ) aPrefSize.Height() = FRound( aPrefSize.Height() * fScaleY ); } -void GDIMetaFile::Scale( const boost::rational<long>& rScaleX, const boost::rational<long>& rScaleY ) +void GDIMetaFile::Scale( const boost::rational<sal_Int64>& rScaleX, const boost::rational<sal_Int64>& rScaleY ) { Scale( boost::rational_cast<double>(rScaleX), boost::rational_cast<double>(rScaleY) ); } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 9ec9a2887728..0107ffc4e58c 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1039,8 +1039,8 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, bool bSwap ) aSize = Size( nWidth, nHeight ); aMapMode = MapMode( (MapUnit) nMapMode, Point( nOffsX, nOffsY ), - boost::rational<long>( nScaleNumX, nScaleDenomX ), - boost::rational<long>( nScaleNumY, nScaleDenomY ) ); + boost::rational<sal_Int64>( nScaleNumX, nScaleDenomX ), + boost::rational<sal_Int64>( nScaleNumY, nScaleDenomY ) ); } nHeaderLen = rIStm.Tell() - nStartPos; diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx index 2ac95ed54b11..e284a8b3c027 100644 --- a/vcl/source/gdi/mapmod.cxx +++ b/vcl/source/gdi/mapmod.cxx @@ -80,7 +80,7 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit ) ImplMapMode* pImplMapMode = ((ImplMapMode*)aStaticImplMapModeAry)+eUnit; if ( !pImplMapMode->mbSimple ) { - boost::rational<long> aDefFraction( 1, 1 ); + boost::rational<sal_Int64> aDefFraction( 1, 1 ); pImplMapMode->maScaleX = aDefFraction; pImplMapMode->maScaleY = aDefFraction; pImplMapMode->meUnit = eUnit; @@ -125,7 +125,7 @@ MapMode::MapMode( MapUnit eUnit ) } MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg, - const boost::rational<long>& rScaleX, const boost::rational<long>& rScaleY ) + const boost::rational<sal_Int64>& rScaleX, const boost::rational<sal_Int64>& rScaleY ) { mpImplMapMode = new ImplMapMode; @@ -163,14 +163,14 @@ void MapMode::SetOrigin( const Point& rLogicOrg ) mpImplMapMode->maOrigin = rLogicOrg; } -void MapMode::SetScaleX( const boost::rational<long>& rScaleX ) +void MapMode::SetScaleX( const boost::rational<sal_Int64>& rScaleX ) { ImplMakeUnique(); mpImplMapMode->maScaleX = rScaleX; } -void MapMode::SetScaleY( const boost::rational<long>& rScaleY ) +void MapMode::SetScaleY( const boost::rational<sal_Int64>& rScaleY ) { ImplMakeUnique(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 450177671fc5..38746a7ebe0a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1705,7 +1705,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal PDFWriter& i_rOuterFace) : m_pReferenceDevice( NULL ), - m_aMapMode( MAP_POINT, Point(), boost::rational<long>( 1L, pointToPixel(1) ), boost::rational<long>( 1L, pointToPixel(1) ) ), + m_aMapMode( MAP_POINT, Point(), boost::rational<sal_Int64>( 1L, pointToPixel(1) ), boost::rational<sal_Int64>( 1L, pointToPixel(1) ) ), m_nCurrentStructElement( 0 ), m_bEmitStructure( true ), m_bNewMCID( false ), diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index a43e61245e52..547f54717d2e 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -497,8 +497,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa MapMode aMapMode( aSubstitute.GetPrefMapMode() ); Size aOutSize( OutputDevice::LogicToLogic( pA->GetSize(), pDummyVDev->GetMapMode(), aMapMode ) ); - aMapMode.SetScaleX( boost::rational<long>( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); - aMapMode.SetScaleY( boost::rational<long>( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); + aMapMode.SetScaleX( boost::rational<sal_Int64>( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); + aMapMode.SetScaleY( boost::rational<sal_Int64>( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); aMapMode.SetOrigin( OutputDevice::LogicToLogic( pA->GetPoint(), pDummyVDev->GetMapMode(), aMapMode ) ); m_rOuterFace.SetMapMode( aMapMode ); diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 0d584eb1a8b3..fd32d6b1f25a 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -103,7 +103,7 @@ namespace vcl OutputDevice& m_rTargetDevice; OutputDevice& m_rReferenceDevice; Font m_aUnzoomedPointFont; - const boost::rational<long> m_aZoom; + const boost::rational<sal_Int64> m_aZoom; const bool m_bRTLEnabled; Rectangle m_aCompleteTextRect; diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index a8ef0925bab1..94e9bc04b2b0 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -451,7 +451,7 @@ bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase ) } bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( - const Size& rNewSize, const boost::rational<long>& rScale, const Point& rNewOffset, + const Size& rNewSize, const boost::rational<sal_Int64>& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer, const bool bTopDown ) { if (pBuffer) { diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index f6af60cc6476..098f0e0314c2 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -122,7 +122,7 @@ Size OutputDevice::GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) cons if ( mbMap ) { aSize.Height() *= 10; - MapMode aMap( MAP_10TH_INCH, Point(), boost::rational<long>( 1, 72 ), boost::rational<long>( 1, 72 ) ); + MapMode aMap( MAP_10TH_INCH, Point(), boost::rational<sal_Int64>( 1, 72 ), boost::rational<sal_Int64>( 1, 72 ) ); aSize = PixelToLogic( aSize, aMap ); aSize.Height() += 5; aSize.Height() /= 10; diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 9de77a74bb23..fb39bf9cf428 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -43,14 +43,14 @@ Reduces accuracy until it is a fraction (should become ctor fraction once); we could also do this with BigInts */ -static boost::rational<long> ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 ) +static boost::rational<sal_Int64> ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 ) { if( nD1 == 0 || nD2 == 0 ) { DBG_ASSERT(false,"Invalid parameter for ImplMakeFraction"); - return boost::rational<long>( 1, 1 ); + return boost::rational<sal_Int64>( 1, 1 ); } - return boost::rational<long>( nN1, nD1 ) * boost::rational<long>( nN2, nD2 ); + return boost::rational<sal_Int64>( nN1, nD1 ) * boost::rational<sal_Int64>( nN2, nD2 ); } // Fraction.GetNumerator() @@ -220,8 +220,8 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, break; } - boost::rational<long> aScaleX = rMapMode.GetScaleX(); - boost::rational<long> aScaleY = rMapMode.GetScaleY(); + boost::rational<sal_Int64> aScaleX = rMapMode.GetScaleX(); + boost::rational<sal_Int64> aScaleY = rMapMode.GetScaleY(); // set offset according to MapMode Point aOrigin = rMapMode.GetOrigin(); @@ -286,11 +286,11 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, // calculate scaling factor according to MapMode // aTemp? = rMapRes.mnMapSc? * aScale? - boost::rational<long> aTempX = ImplMakeFraction( rMapRes.mnMapScNumX, + boost::rational<sal_Int64> aTempX = ImplMakeFraction( rMapRes.mnMapScNumX, aScaleX.numerator(), rMapRes.mnMapScDenomX, aScaleX.denominator() ); - boost::rational<long> aTempY = ImplMakeFraction( rMapRes.mnMapScNumY, + boost::rational<sal_Int64> aTempY = ImplMakeFraction( rMapRes.mnMapScNumY, aScaleY.numerator(), rMapRes.mnMapScDenomY, aScaleY.denominator() ); @@ -739,11 +739,11 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) { Point aOrigin( maMapRes.mnMapOfsX, maMapRes.mnMapOfsY ); // aScale? = maMapMode.GetScale?() * rNewMapMode.GetScale?() - boost::rational<long> aScaleX = ImplMakeFraction( maMapMode.GetScaleX().numerator(), + boost::rational<sal_Int64> aScaleX = ImplMakeFraction( maMapMode.GetScaleX().numerator(), rNewMapMode.GetScaleX().numerator(), maMapMode.GetScaleX().denominator(), rNewMapMode.GetScaleX().denominator() ); - boost::rational<long> aScaleY = ImplMakeFraction( maMapMode.GetScaleY().numerator(), + boost::rational<sal_Int64> aScaleY = ImplMakeFraction( maMapMode.GetScaleY().numerator(), rNewMapMode.GetScaleY().numerator(), maMapMode.GetScaleY().denominator(), rNewMapMode.GetScaleY().denominator() ); @@ -785,11 +785,11 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) MapUnit eNew = rNewMapMode.GetMapUnit(); // a?F = rNewMapMode.GetScale?() / maMapMode.GetScale?() - boost::rational<long> aXF = ImplMakeFraction( rNewMapMode.GetScaleX().numerator(), + boost::rational<sal_Int64> aXF = ImplMakeFraction( rNewMapMode.GetScaleX().numerator(), maMapMode.GetScaleX().denominator(), rNewMapMode.GetScaleX().denominator(), maMapMode.GetScaleX().numerator() ); - boost::rational<long> aYF = ImplMakeFraction( rNewMapMode.GetScaleY().numerator(), + boost::rational<sal_Int64> aYF = ImplMakeFraction( rNewMapMode.GetScaleY().numerator(), maMapMode.GetScaleY().denominator(), rNewMapMode.GetScaleY().denominator(), maMapMode.GetScaleY().numerator() ); @@ -807,7 +807,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) } else { - boost::rational<long> aF( aImplNumeratorAry[eNew] * aImplDenominatorAry[eOld], + boost::rational<sal_Int64> aF( aImplNumeratorAry[eNew] * aImplDenominatorAry[eOld], aImplNumeratorAry[eOld] * aImplDenominatorAry[eNew] ); // a?F = a?F * aF @@ -817,13 +817,13 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) aYF.denominator(), aF.denominator() ); if ( eOld == MAP_PIXEL ) { - aXF *= boost::rational<long>( mnDPIX, 1 ); - aYF *= boost::rational<long>( mnDPIY, 1 ); + aXF *= boost::rational<sal_Int64>( mnDPIX, 1 ); + aYF *= boost::rational<sal_Int64>( mnDPIY, 1 ); } else if ( eNew == MAP_PIXEL ) { - aXF *= boost::rational<long>( 1, mnDPIX ); - aYF *= boost::rational<long>( 1, mnDPIY ); + aXF *= boost::rational<sal_Int64>( 1, mnDPIX ); + aYF *= boost::rational<sal_Int64>( 1, mnDPIY ); } } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index cc9763b17ed9..57b7a4b51c07 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -572,7 +572,7 @@ Window::~Window() WindowImpl::WindowImpl( WindowType nType ) { - maZoom = boost::rational<long>( 1, 1 ); + maZoom = boost::rational<sal_Int64>( 1, 1 ); maWinRegion = vcl::Region(true); maWinClipRegion = vcl::Region(true); mpWinData = NULL; // Extra Window Data, that we dont need for all windows diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index bf09d53b4e94..10c4070c0777 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -507,7 +507,7 @@ bool Window::EndSaveFocus( sal_uIntPtr nSaveId, bool bRestore ) } } -void Window::SetZoom( const boost::rational<long>& rZoom ) +void Window::SetZoom( const boost::rational<sal_Int64>& rZoom ) { if ( mpWindowImpl->maZoom != rZoom ) { @@ -523,7 +523,7 @@ inline long WinFloatRound( double fVal ) void Window::SetZoomedPointFont( const vcl::Font& rFont ) { - const boost::rational<long>& rZoom = GetZoom(); + const boost::rational<sal_Int64>& rZoom = GetZoom(); if ( rZoom.numerator() != rZoom.denominator() ) { vcl::Font aFont( rFont ); @@ -562,7 +562,7 @@ void Window::SetZoomedPointFont( const vcl::Font& rFont ) long Window::CalcZoom( long nCalc ) const { - const boost::rational<long>& rZoom = GetZoom(); + const boost::rational<sal_Int64>& rZoom = GetZoom(); if ( rZoom.numerator() != rZoom.denominator() ) { double n = (double)nCalc; @@ -1318,7 +1318,7 @@ vcl::Cursor* Window::GetCursor() const return mpWindowImpl->mpCursor; } -const boost::rational<long>& Window::GetZoom() const +const boost::rational<sal_Int64>& Window::GetZoom() const { return mpWindowImpl->maZoom; } diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx index 2cc86dcce627..45c7593f7db3 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx @@ -83,7 +83,7 @@ WrapPolygon::Pointer_t WrapPolygon::move(const awt::Point & rPoint) return pResult; } -WrapPolygon::Pointer_t WrapPolygon::scale(const boost::rational<long>& rFractionX, const boost::rational<long>& rFractionY) +WrapPolygon::Pointer_t WrapPolygon::scale(const boost::rational<sal_Int64>& rFractionX, const boost::rational<sal_Int64>& rFractionY) { WrapPolygon::Pointer_t pResult(new WrapPolygon); @@ -106,17 +106,17 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSr const long nWrap100Percent = 21600; - boost::rational<long> aMove(nWrap100Percent, rSrcSize.Width); - aMove = aMove * boost::rational<long>(15, 1); + boost::rational<sal_Int64> aMove(nWrap100Percent, rSrcSize.Width); + aMove = aMove * boost::rational<sal_Int64>(15, 1); awt::Point aMovePoint(boost::rational_cast<long>(aMove), 0); pResult = move(aMovePoint); - boost::rational<long> aScaleX(nWrap100Percent, boost::rational_cast<long>(nWrap100Percent + aMove)); - boost::rational<long> aScaleY(nWrap100Percent, boost::rational_cast<long>(nWrap100Percent - aMove)); + boost::rational<sal_Int64> aScaleX(nWrap100Percent, boost::rational_cast<long>(nWrap100Percent + aMove)); + boost::rational<sal_Int64> aScaleY(nWrap100Percent, boost::rational_cast<long>(nWrap100Percent - aMove)); pResult = pResult->scale(aScaleX, aScaleY); - boost::rational<long> aScaleSrcX(rSrcSize.Width, nWrap100Percent); - boost::rational<long> aScaleSrcY(rSrcSize.Height, nWrap100Percent); + boost::rational<sal_Int64> aScaleSrcX(rSrcSize.Width, nWrap100Percent); + boost::rational<sal_Int64> aScaleSrcY(rSrcSize.Height, nWrap100Percent); pResult = pResult->scale(aScaleSrcX, aScaleSrcY); return pResult; diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx index a02e05423b78..9048d97bc7e1 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx @@ -50,7 +50,7 @@ public: Points_t::iterator end(); WrapPolygon::Pointer_t move(const css::awt::Point & rMove); - WrapPolygon::Pointer_t scale(const boost::rational<long> & rFractionX, const boost::rational<long> & rFractionY); + WrapPolygon::Pointer_t scale(const boost::rational<sal_Int64> & rFractionX, const boost::rational<sal_Int64> & rFractionY); WrapPolygon::Pointer_t correctWordWrapPolygon(const css::awt::Size & rSrcSize); css::drawing::PointSequenceSequence getPointSequenceSequence() const; }; |