summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-16 15:30:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-16 17:44:44 +0200
commit582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch)
tree80c42b34da7e7ee05843b572f7311b3c230de9dd /vcl/source/gdi
parentada4862afc3227b04c12960ded761db24f61257e (diff)
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/cvtsvm.cxx2
-rw-r--r--vcl/source/gdi/dibtools.cxx4
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/impgraph.cxx4
-rw-r--r--vcl/source/gdi/mapmod.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx2
9 files changed, 17 insertions, 17 deletions
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) {