summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx4
-rw-r--r--include/vcl/bitmap.hxx2
-rw-r--r--include/vcl/salbtype.hxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 719f51d997c2..c778e807d736 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -498,7 +498,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
case 0x0140: { // Color Map
sal_uInt16 nVal;
sal_uLong i;
- nNumColors= ( 1UL << nBitsPerSample );
+ nNumColors= ( (sal_uLong)1 << nBitsPerSample );
if ( nDataType == 3 && nNumColors <= 256)
{
pColorMap = new sal_uLong[ 256 ];
@@ -1094,7 +1094,7 @@ void TIFFReader::MakePalCol( void )
pColorMap = new sal_uLong[ 256 ];
if ( nPhotometricInterpretation <= 1 )
{
- nNumColors = 1UL << nBitsPerSample;
+ nNumColors = (sal_uLong)1 << nBitsPerSample;
if ( nNumColors > 256 )
nNumColors = 256;
pAcc->SetPaletteEntryCount( (sal_uInt16)nNumColors );
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index accb763c5faa..6e445e37a865 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -914,7 +914,7 @@ inline void Bitmap::SetPrefSize( const Size& rSize )
inline sal_uLong Bitmap::GetColorCount() const
{
- return( 1UL << (sal_uLong) GetBitCount() );
+ return( (sal_uLong)1 << (sal_uLong) GetBitCount() );
}
inline sal_uLong Bitmap::GetSizeBytes() const
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 9859aa3f1b83..5c466f08cde3 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -732,13 +732,13 @@ inline long ColorMask::ImplCalcMaskShift( sal_uLong nMask, sal_uLong& rOr, sal_u
sal_uLong nLen = 0UL;
// from which bit starts the mask?
- for( nShift = 31L; ( nShift >= 0L ) && !( nMask & ( 1 << (sal_uLong) nShift ) ); nShift-- )
+ for( nShift = 31L; ( nShift >= 0L ) && !( nMask & ( (sal_uLong)1 << (sal_uLong) nShift ) ); nShift-- )
{}
nRet = nShift;
// XXX determine number of bits set => walk right until null
- while( ( nShift >= 0L ) && ( nMask & ( 1 << (sal_uLong) nShift ) ) )
+ while( ( nShift >= 0L ) && ( nMask & ( (sal_uLong)1 << (sal_uLong) nShift ) ) )
{
nShift--;
nLen++;