diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 17:22:06 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 18:34:34 +0200 |
commit | 858c2a2977d5e4671959724ecd2a453837dadddf (patch) | |
tree | a61e303e6e27cef015c50b38b23fc574ce64fcef /filter | |
parent | ff502f409fd73249a6a94c579d19905144aa5ba8 (diff) |
Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.
Conflicts:
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/eos2met/eos2met.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipsd/ipsd.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/itiff/itiff.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 18 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 8 |
10 files changed, 28 insertions, 28 deletions
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index dd743c97e498..173d2317321c 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<sal_Int64> aScaleX = aMM.GetScaleX(); - boost::rational<sal_Int64> aScaleY = aMM.GetScaleY(); + boost::rational<long> aScaleX = aMM.GetScaleX(); + boost::rational<long> 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 e2d1ebffa966..b0f61f328bc6 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<sal_Int64> aScaleX = aMM.GetScaleX(); - boost::rational<sal_Int64> aScaleY = aMM.GetScaleY(); + boost::rational<long> aScaleX = aMM.GetScaleX(); + boost::rational<long> 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<sal_Int64> aDPIFrac( 1, 72 ); + boost::rational<long> aDPIFrac( 1, 72 ); bStatus=true; nLastPercent=0; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index abe2eeb762c3..87ea75d050ae 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2127,9 +2127,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<sal_Int64>(10,xr),boost::rational<sal_Int64>(10,yr)); + aGlobMapMode=MapMode(MAP_INCH,Point(0,0),boost::rational<long>(10,xr),boost::rational<long>(10,yr)); else if (nUnitType==0x01 && xr>0 && yr>0) - aGlobMapMode=MapMode(MAP_CM,Point(0,0),boost::rational<sal_Int64>(10,xr),boost::rational<sal_Int64>(10,yr)); + aGlobMapMode=MapMode(MAP_CM,Point(0,0),boost::rational<long>(10,xr),boost::rational<long>(10,yr)); else aGlobMapMode=MapMode(); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 89a2aee82e05..b0d07d805a3b 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<sal_Int64> aHRes; - boost::rational<sal_Int64> aVRes; + boost::rational<long> aHRes; + boost::rational<long> 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<sal_Int64>( 1, 1 ); + aHRes = aVRes = boost::rational<long>( 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 7f4bfc79e1db..dbba04cb9983 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<sal_Int64> aFractX( 1, mnXResFixed >> 16 ); - boost::rational<sal_Int64> aFractY( 1, mnYResFixed >> 16 ); + boost::rational<long> aFractX( 1, mnXResFixed >> 16 ); + boost::rational<long> 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 c2c752f501ab..82575a5d057c 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<sal_Int64>(1,nRX),boost::rational<sal_Int64>(1,nRY)); + MapMode aMapMode(MAP_INCH,Point(0,0),boost::rational<long>(1,nRX),boost::rational<long>(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 a5db54a6f99d..0c2b757284a3 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<sal_Int64>( 1, EES_MAP_FRACTION ), boost::rational<sal_Int64>( 1, EES_MAP_FRACTION ) ) + , maMapModeDest( MAP_INCH, Point(), boost::rational<long>( 1, EES_MAP_FRACTION ), boost::rational<long>( 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 05ac18ee6f74..231af88c3eda 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<sal_Int64>( 1, 1 ), + DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleX() == boost::rational<long>( 1, 1 ), "X-Skalierung im Mtf" ); - DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleY() == boost::rational<sal_Int64>( 1, 1 ), + DBG_ASSERT( pMtf->GetPrefMapMode().GetScaleY() == boost::rational<long>( 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<sal_Int64>( aS.Width(), aPrefS.Width() ), - boost::rational<sal_Int64>( aS.Height(), aPrefS.Height() ) ); + pMtf->Scale( boost::rational<long>( aS.Width(), aPrefS.Width() ), + boost::rational<long>( aS.Height(), aPrefS.Height() ) ); pMtf->SetPrefMapMode( MAP_100TH_MM ); pMtf->SetPrefSize( aS ); } @@ -3118,10 +3118,10 @@ void SvxMSDffManager::ScaleEmu( sal_Int32& rVal ) const sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const { MapUnit eMap = pSdrModel->GetScaleUnit(); - boost::rational<sal_Int64> aFact( GetMapFactor( MAP_POINT, eMap ).X() ); + boost::rational<long> aFact( GetMapFactor( MAP_POINT, eMap ).X() ); long aMul = aFact.numerator(); long aDiv = aFact.denominator() * 65536; - aFact = boost::rational<sal_Int64>( aMul, aDiv ); // try again to shorten it + aFact = boost::rational<long>( aMul, aDiv ); // try again to shorten it return BigMulDiv( nVal, aFact.numerator(), aFact.denominator() ); } @@ -3138,10 +3138,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<sal_Int64> aFact = GetMapFactor(MAP_INCH, eMap).X(); + boost::rational<long> aFact = GetMapFactor(MAP_INCH, eMap).X(); long nMul=aFact.numerator(); long nDiv=aFact.denominator()*nApplicationScale; - aFact=boost::rational<sal_Int64>(nMul,nDiv); // try again to shorten it + aFact=boost::rational<long>(nMul,nDiv); // try again to shorten it // For 100TH_MM -> 2540/576=635/144 // For Twip -> 1440/576=5/2 nMapMul = aFact.numerator(); @@ -3153,7 +3153,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<sal_Int64>(nMul,nDiv); // try again to shorten it + aFact=boost::rational<long>(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 0475f0cbb361..759b6bb5e624 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<sal_Int64> aFact = GetMapFactor(eMap,MAP_100TH_MM).X(); + boost::rational<long> 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 0922a59cfc6e..6dff611d8519 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<sal_Int64> aFractionX = aMapMode.GetScaleX(); - boost::rational<sal_Int64> aFractionY = aMapMode.GetScaleY(); + boost::rational<long> aFractionX = aMapMode.GetScaleX(); + boost::rational<long> aFractionY = aMapMode.GetScaleY(); mpVDev->Push(); Size aSize( OutputDevice::LogicToLogic( rSize100thmm, MAP_100TH_MM, aMapMode ) ); - aMapMode.SetScaleX( aFractionX *= boost::rational<sal_Int64>( aSize.Width(), aPrefSize.Width() ) ); - aMapMode.SetScaleY( aFractionY *= boost::rational<sal_Int64>( aSize.Height(), aPrefSize.Height() ) ); + aMapMode.SetScaleX( aFractionX *= boost::rational<long>( aSize.Width(), aPrefSize.Width() ) ); + aMapMode.SetScaleY( aFractionY *= boost::rational<long>( aSize.Height(), aPrefSize.Height() ) ); Point aOffset( OutputDevice::LogicToLogic( rPos100thmm, MAP_100TH_MM, aMapMode ) ); aMapMode.SetOrigin( aOffset += aMapMode.GetOrigin() ); |