summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-28 09:29:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-28 09:29:52 +0000
commitc0d06c51f2b742d544a452f38556c49f889147e3 (patch)
treeb0c17ccbe8bcf6384777edf24b73a21a9cf24cc4 /filter/source
parentca1aa6950314dd7332a02a31171920ec45f23187 (diff)
sal_uLong->sal_uInt32
Change-Id: I49d926f4ff064871e3773fce089d7f927df9b099
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 807756a561bd..3fe1018db90f 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -91,7 +91,7 @@ private:
sal_uLong nGroup4Options;
sal_uLong nResolutionUnit; // unit of fX/YResolution: 1=unknown, 2(default)=inch, 3=cm
sal_uLong nPredictor;
- sal_uLong* pColorMap; // color palette
+ sal_uInt32* pColorMap; // color palette
sal_uLong nNumColors; // number of colors within the color palette
sal_uLong nPlanes; // number of layers within the Tiff file
@@ -493,23 +493,23 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
nNumColors= ( (sal_uLong)1 << nBitsPerSample );
if ( nDataType == 3 && nNumColors <= 256)
{
- pColorMap = new sal_uLong[ 256 ];
+ pColorMap = new sal_uInt32[256];
for ( i = 0; i < nNumColors; i++ )
pColorMap[ i ] = 0;
for ( i = 0; i < nNumColors; i++ )
{
pTIFF->ReadUInt16( nVal );
- pColorMap[ i ] |= ( ( (sal_uLong)nVal ) << 8 ) & 0x00ff0000;
+ pColorMap[ i ] |= ( ( (sal_uInt32)nVal ) << 8 ) & 0x00ff0000;
}
for ( i = 0; i < nNumColors; i++ )
{
pTIFF->ReadUInt16( nVal );
- pColorMap[ i ] |= ( (sal_uLong)nVal ) & 0x0000ff00;
+ pColorMap[ i ] |= ( (sal_uInt32)nVal ) & 0x0000ff00;
}
for ( i = 0; i < nNumColors; i++ )
{
pTIFF->ReadUInt16( nVal );
- pColorMap[ i ] |= ( ( (sal_uLong)nVal ) >> 8 ) & 0x000000ff;
+ pColorMap[ i ] |= ( ( (sal_uInt32)nVal ) >> 8 ) & 0x000000ff;
}
}
else
@@ -1098,9 +1098,9 @@ void TIFFReader::MakePalCol()
{
if ( nDstBitsPerPixel <= 8 )
{
- sal_uLong i, nVal, n0RGB;
+ sal_uLong i, nVal;
if ( pColorMap == nullptr )
- pColorMap = new sal_uLong[ 256 ];
+ pColorMap = new sal_uInt32[256];
if ( nPhotometricInterpretation <= 1 )
{
nNumColors = (sal_uLong)1 << nBitsPerSample;
@@ -1110,7 +1110,7 @@ void TIFFReader::MakePalCol()
for ( i = 0; i < nNumColors; i++ )
{
nVal = ( i * 255 / ( nNumColors - 1 ) ) & 0xff;
- n0RGB = nVal | ( nVal << 8 ) | ( nVal << 16 );
+ sal_uInt32 n0RGB = nVal | ( nVal << 8 ) | ( nVal << 16 );
if ( nPhotometricInterpretation == 1 )
pColorMap[ i ] = n0RGB;
else