summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-08-19 22:47:51 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-08-21 22:29:42 +0200
commitadc5e7d554fb3ad1afc4fdd15021fb84be297147 (patch)
treea35e8d47880ff3b108e1919fdd84fbff8d0608c1 /vcl
parentaa62086495ecf3d5579ffc72df55698a9c943863 (diff)
ColorMask: sal_uLong to better types, minor code rework
Change-Id: I426fa847038e7a6f788761242cb43e38cb355a36
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/canvasbitmap.hxx2
-rw-r--r--vcl/source/helper/canvasbitmap.cxx20
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/inc/canvasbitmap.hxx b/vcl/inc/canvasbitmap.hxx
index 1a6300cbba04..bd00fb77d99f 100644
--- a/vcl/inc/canvasbitmap.hxx
+++ b/vcl/inc/canvasbitmap.hxx
@@ -57,7 +57,7 @@ namespace unotools
sal_Int8 m_nEndianness;
bool m_bPalette;
- SAL_DLLPRIVATE void setComponentInfo( sal_uLong redShift, sal_uLong greenShift, sal_uLong blueShift );
+ SAL_DLLPRIVATE void setComponentInfo( sal_uInt32 redShift, sal_uInt32 greenShift, sal_uInt32 blueShift );
virtual ~VclCanvasBitmap();
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index c532606b4eb8..3efff8ca265d 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -53,7 +53,7 @@ namespace
}
}
-void VclCanvasBitmap::setComponentInfo( sal_uLong redShift, sal_uLong greenShift, sal_uLong blueShift )
+void VclCanvasBitmap::setComponentInfo( sal_uInt32 redShift, sal_uInt32 greenShift, sal_uInt32 blueShift )
{
// sort channels in increasing order of appearance in the pixel
// (starting with the least significant bits)
@@ -89,9 +89,9 @@ void VclCanvasBitmap::setComponentInfo( sal_uLong redShift, sal_uLong greenShift
m_aComponentBitCounts.realloc(3);
sal_Int32* pCounts = m_aComponentBitCounts.getArray();
- pCounts[redPos] = bitcount(sal::static_int_cast<sal_uInt32>(redShift));
- pCounts[greenPos] = bitcount(sal::static_int_cast<sal_uInt32>(greenShift));
- pCounts[bluePos] = bitcount(sal::static_int_cast<sal_uInt32>(blueShift));
+ pCounts[redPos] = bitcount(redShift);
+ pCounts[greenPos] = bitcount(greenShift);
+ pCounts[bluePos] = bitcount(blueShift);
}
VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
@@ -206,9 +206,9 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
m_nBitsPerInputPixel = 24;
m_nEndianness = util::Endianness::LITTLE;
m_aLayout.IsMsbFirst = false; // doesn't matter
- setComponentInfo( 0xff0000LL,
- 0x00ff00LL,
- 0x0000ffLL );
+ setComponentInfo( static_cast<sal_uInt32>(0xff0000UL),
+ static_cast<sal_uInt32>(0x00ff00UL),
+ static_cast<sal_uInt32>(0x0000ffUL) );
break;
case BMP_FORMAT_24BIT_TC_RGB:
@@ -216,9 +216,9 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
m_nBitsPerInputPixel = 24;
m_nEndianness = util::Endianness::LITTLE;
m_aLayout.IsMsbFirst = false; // doesn't matter
- setComponentInfo( 0x0000ffLL,
- 0x00ff00LL,
- 0xff0000LL );
+ setComponentInfo( static_cast<sal_uInt32>(0x0000ffUL),
+ static_cast<sal_uInt32>(0x00ff00UL),
+ static_cast<sal_uInt32>(0xff0000UL) );
break;
case BMP_FORMAT_24BIT_TC_MASK: