summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2019-01-01 03:42:10 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-01-11 18:00:11 +0100
commit0515ffdb2e4c975f1d19257dfed2a24ff3cbfdb4 (patch)
tree283965a22b522aa975f496c63836ee8117eb7785
parent46f2c64eee2213e2921f28645c4ba907d6b83885 (diff)
tdf#114441 Convert use of sal_uLong to sal_uInt32
Convert the return type of GetScanlineSize to sal_uInt32 since the type of the mnScanlineSize member of the BitmapBuffer struct is "long" Convert places that are using the value returned by this method Change-Id: I222ce30b8e8f88402ddfd25286ca3b7548a8e8fb Reviewed-on: https://gerrit.libreoffice.org/65779 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--include/vcl/bitmapaccess.hxx5
-rw-r--r--vcl/inc/bitmapwriteaccess.hxx2
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx10
-rw-r--r--vcl/source/filter/igif/gifread.cxx4
-rw-r--r--vcl/source/gdi/bmpacc.cxx2
5 files changed, 11 insertions, 12 deletions
diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index 47eb8cabb31e..cb4c8cb6ad0e 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_VCL_BMPACC_HXX
#define INCLUDED_VCL_BMPACC_HXX
-#include <tools/solar.h>
#include <vcl/dllapi.h>
#include <vcl/salbtype.hxx>
#include <vcl/bitmap.hxx>
@@ -71,11 +70,11 @@ public:
return mpBuffer ? RemoveScanline(mpBuffer->mnFormat) : ScanlineFormat::NONE;
}
- sal_uLong GetScanlineSize() const
+ sal_uInt32 GetScanlineSize() const
{
assert(mpBuffer && "Access is not valid!");
- return mpBuffer ? mpBuffer->mnScanlineSize : 0UL;
+ return mpBuffer ? mpBuffer->mnScanlineSize : 0;
}
sal_uInt16 GetBitCount() const
diff --git a/vcl/inc/bitmapwriteaccess.hxx b/vcl/inc/bitmapwriteaccess.hxx
index b2aba128381d..f20e4e8e2e6e 100644
--- a/vcl/inc/bitmapwriteaccess.hxx
+++ b/vcl/inc/bitmapwriteaccess.hxx
@@ -30,7 +30,7 @@ public:
void CopyScanline(long nY, const BitmapReadAccess& rReadAcc);
void CopyScanline(long nY, ConstScanline aSrcScanline, ScanlineFormat nSrcScanlineFormat,
- sal_uLong nSrcScanlineSize);
+ sal_uInt32 nSrcScanlineSize);
void CopyBuffer(const BitmapReadAccess& rReadAcc);
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 706fb1f58690..6372b71d55aa 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -347,11 +347,11 @@ void BitmapTest::testConvert()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), pReadAccess->GetBitCount());
#if defined MACOSX || defined IOS
//it would be nice to find and change the stride for quartz to be the same as everyone else
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(10), pReadAccess->GetScanlineSize());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(10), pReadAccess->GetScanlineSize());
#else
#if HAVE_FEATURE_OPENGL
if (!OpenGLHelper::isVCLOpenGLEnabled())
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(12), pReadAccess->GetScanlineSize());
#endif
#endif
CPPUNIT_ASSERT(pReadAccess->HasPalette());
@@ -370,18 +370,18 @@ void BitmapTest::testConvert()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(24), pReadAccess->GetBitCount());
#if defined LINUX || defined FREEBSD
- CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(32), pReadAccess->GetScanlineSize());
#else
#if defined(_WIN32)
if (!OpenGLHelper::isVCLOpenGLEnabled())
{
// GDI Scanlines padded to DWORD multiples, it seems
- CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(32), pReadAccess->GetScanlineSize());
}
else
#endif
{
- CPPUNIT_ASSERT_EQUAL(sal_uLong(30), pReadAccess->GetScanlineSize());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(30), pReadAccess->GetScanlineSize());
}
#endif
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 745440853f55..3ddcb06c643e 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -561,9 +561,9 @@ void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount )
if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) )
{
sal_uInt8* pScanline8 = pAcc8->GetScanline( nYAcc );
- sal_uLong nSize8 = pAcc8->GetScanlineSize();
+ sal_uInt32 nSize8 = pAcc8->GetScanlineSize();
sal_uInt8* pScanline1 = nullptr;
- sal_uLong nSize1 = 0;
+ sal_uInt32 nSize1 = 0;
if( bGCTransparent )
{
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 9bfd9a26930e..af8d75362467 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -349,7 +349,7 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
}
void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
- ScanlineFormat nSrcScanlineFormat, sal_uLong nSrcScanlineSize )
+ ScanlineFormat nSrcScanlineFormat, sal_uInt32 nSrcScanlineSize )
{
const ScanlineFormat nFormat = RemoveScanline( nSrcScanlineFormat );