summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/salgdilayout.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-07 11:45:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-07 14:13:18 +0200
commitd36f7c5bd2115fcdd26ba8ff7b6a0446dea70bd4 (patch)
tree5ae4b15f3302a538ac55d714ba0529ca4c1de87a /vcl/source/gdi/salgdilayout.cxx
parent61d57bcebd1a246603cbcd9ad5e0a7df1a8d66cd (diff)
Revert "long->sal_Int32 in tools/gen.hxx"
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/gdi/salgdilayout.cxx')
-rw-r--r--vcl/source/gdi/salgdilayout.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 2887158ea67b..49cc105d5d54 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -106,13 +106,13 @@ bool SalGraphics::drawTransformedBitmap(
return false;
}
-sal_Int32 SalGraphics::mirror2( sal_Int32 x, const OutputDevice *pOutDev ) const
+long SalGraphics::mirror2( long x, const OutputDevice *pOutDev ) const
{
mirror(x, pOutDev);
return x;
}
-void SalGraphics::mirror( sal_Int32& x, const OutputDevice *pOutDev ) const
+void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
{
long w;
if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@@ -142,7 +142,7 @@ void SalGraphics::mirror( sal_Int32& x, const OutputDevice *pOutDev ) const
}
}
-void SalGraphics::mirror( sal_Int32& x, sal_Int32 nWidth, const OutputDevice *pOutDev, bool bBack ) const
+void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, bool bBack ) const
{
long w;
if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@@ -267,9 +267,9 @@ void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const
void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const
{
- sal_Int32 nWidth = rRect.GetWidth();
- sal_Int32 x = rRect.Left();
- sal_Int32 x_org = x;
+ long nWidth = rRect.GetWidth();
+ long x = rRect.Left();
+ long x_org = x;
mirror( x, nWidth, pOutDev, bBack );
rRect.Move( x - x_org, 0 );
@@ -366,21 +366,21 @@ bool SalGraphics::SetClipRegion( const vcl::Region& i_rClip, const OutputDevice
return setClipRegion( i_rClip );
}
-void SalGraphics::DrawPixel( sal_Int32 nX, sal_Int32 nY, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY );
}
-void SalGraphics::DrawPixel( sal_Int32 nX, sal_Int32 nY, Color nColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, Color nColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY, nColor );
}
-void SalGraphics::DrawLine( sal_Int32 nX1, sal_Int32 nY1, sal_Int32 nX2, sal_Int32 nY2, const OutputDevice *pOutDev )
+void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -390,7 +390,7 @@ void SalGraphics::DrawLine( sal_Int32 nX1, sal_Int32 nY1, sal_Int32 nX2, sal_Int
drawLine( nX1, nY1, nX2, nY2 );
}
-void SalGraphics::DrawRect( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const OutputDevice *pOutDev )
+void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -535,9 +535,9 @@ bool SalGraphics::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradi
return drawGradient( rPolyPoly, rGradient );
}
-void SalGraphics::CopyArea( sal_Int32 nDestX, sal_Int32 nDestY,
- sal_Int32 nSrcX, sal_Int32 nSrcY,
- sal_Int32 nSrcWidth, sal_Int32 nSrcHeight,
+void SalGraphics::CopyArea( long nDestX, long nDestY,
+ long nSrcX, long nSrcY,
+ long nSrcWidth, long nSrcHeight,
const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
@@ -606,21 +606,21 @@ void SalGraphics::DrawMask( const SalTwoRect& rPosAry,
drawMask( rPosAry, rSalBitmap, nMaskColor );
}
-SalBitmap* SalGraphics::GetBitmap( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const OutputDevice *pOutDev )
+SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return getBitmap( nX, nY, nWidth, nHeight );
}
-Color SalGraphics::GetPixel( sal_Int32 nX, sal_Int32 nY, const OutputDevice *pOutDev )
+Color SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
return getPixel( nX, nY );
}
-void SalGraphics::Invert( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -639,7 +639,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert
invert( nPoints, pPtAry, nFlags );
}
-bool SalGraphics::DrawEPS( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev )
+bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -806,7 +806,7 @@ bool SalGraphics::DrawTransformedBitmap(
}
}
-bool SalGraphics::DrawAlphaRect( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight,
+bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )