diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-07-17 12:28:01 -0400 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-29 06:51:27 +0000 |
commit | b97aa3faa03e5944aac8f3c35a8c198fba295e83 (patch) | |
tree | 7c10524446f7c6fdcca0b9ee1cf763ac1e11eeec /vcl | |
parent | e5fc46499126aff725953f73527819e333f13bbc (diff) |
Remove the unnecessary type definition: HPBYTE
HPBYTE is a duplicate defintion of Scanline as seen below.
include/vcl/salbtype.hxx:
34: typedef sal_uInt8* HPBYTE;
35: typedef HPBYTE Scanline;
Remove the definition of HPBYTE and inline the definition of
Scanline. Replace all instances with sal_uInt8*.
Change-Id: I8a79a9d6c45af57fbabf8d3e6a04a1b5eba15a7b
Reviewed-on: https://gerrit.libreoffice.org/17175
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/igif/decode.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/igif/decode.hxx | 12 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 10 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.hxx | 4 | ||||
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 10 |
5 files changed, 22 insertions, 22 deletions
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx index 0008f6317d3c..00d7e7575678 100644 --- a/vcl/source/filter/igif/decode.cxx +++ b/vcl/source/filter/igif/decode.cxx @@ -63,13 +63,13 @@ GIFLZWDecompressor::~GIFLZWDecompressor() delete[] pTable; } -HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, +Scanline GIFLZWDecompressor::DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, bool& rEOI ) { sal_uLong nTargetSize = 4096; sal_uLong nCount = 0; - HPBYTE pTarget = static_cast<HPBYTE>(rtl_allocateMemory( nTargetSize )); - HPBYTE pTmpTarget = pTarget; + sal_uInt8* pTarget = static_cast<sal_uInt8*>(rtl_allocateMemory( nTargetSize )); + sal_uInt8* pTmpTarget = pTarget; nBlockBufSize = cBufSize; nBlockBufPos = 0; @@ -83,7 +83,7 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, { sal_uLong nNewSize = nTargetSize << 1; sal_uLong nOffset = pTmpTarget - pTarget; - HPBYTE pTmp = static_cast<HPBYTE>(rtl_allocateMemory( nNewSize )); + sal_uInt8* pTmp = static_cast<sal_uInt8*>(rtl_allocateMemory( nNewSize )); memcpy( pTmp, pTarget, nTargetSize ); rtl_freeMemory( pTarget ); diff --git a/vcl/source/filter/igif/decode.hxx b/vcl/source/filter/igif/decode.hxx index 4f5edde442cc..93840f1ade1b 100644 --- a/vcl/source/filter/igif/decode.hxx +++ b/vcl/source/filter/igif/decode.hxx @@ -26,10 +26,10 @@ struct GIFLZWTableEntry; class GIFLZWDecompressor { - GIFLZWTableEntry* pTable; - HPBYTE pOutBuf; - HPBYTE pOutBufData; - HPBYTE pBlockBuf; + GIFLZWTableEntry* pTable; + sal_uInt8* pOutBuf; + sal_uInt8* pOutBufData; + sal_uInt8* pBlockBuf; sal_uLong nInputBitsBuf; sal_uInt16 nTableSize; sal_uInt16 nClearCode; @@ -38,7 +38,7 @@ class GIFLZWDecompressor sal_uInt16 nOldCode; sal_uInt16 nOutBufDataLen; sal_uInt16 nInputBitsBufSize; - bool bEOIFound; + bool bEOIFound; sal_uInt8 nDataSize; sal_uInt8 nBlockBufSize; sal_uInt8 nBlockBufPos; @@ -51,7 +51,7 @@ public: explicit GIFLZWDecompressor( sal_uInt8 cDataSize ); ~GIFLZWDecompressor(); - HPBYTE DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, bool& rEOI ); + sal_uInt8* DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, bool& rEOI ); }; #endif diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 96bea221d1f7..e24b2e1e3928 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -420,8 +420,8 @@ sal_uLong GIFReader::ReadNextBlock() nRet = 3UL; else { - bool bEOI; - HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); + bool bEOI; + sal_uInt8* pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); nRet = ( bEOI ? 3 : 1 ); @@ -437,7 +437,7 @@ sal_uLong GIFReader::ReadNextBlock() return nRet; } -void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount ) +void GIFReader::FillImages( sal_uInt8* pBytes, sal_uLong nCount ) { for( sal_uLong i = 0UL; i < nCount; i++ ) { @@ -457,9 +457,9 @@ void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount ) // ( happens at the end of the image ) if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) ) { - HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); + sal_uInt8* pScanline8 = pAcc8->GetScanline( nYAcc ); sal_uLong nSize8 = pAcc8->GetScanlineSize(); - HPBYTE pScanline1 = 0; + sal_uInt8* pScanline1 = 0; sal_uLong nSize1 = 0; if( bGCTransparent ) diff --git a/vcl/source/filter/igif/gifread.hxx b/vcl/source/filter/igif/gifread.hxx index dc161c2b31cb..52a4f1f11a73 100644 --- a/vcl/source/filter/igif/gifread.hxx +++ b/vcl/source/filter/igif/gifread.hxx @@ -57,7 +57,7 @@ class GIFReader : public GraphicReader BitmapPalette aGPalette; BitmapPalette aLPalette; SvStream& rIStm; - HPBYTE pSrcBuf; + sal_uInt8* pSrcBuf; GIFLZWDecompressor* pDecomp; BitmapWriteAccess* pAcc8; BitmapWriteAccess* pAcc1; @@ -97,7 +97,7 @@ class GIFReader : public GraphicReader bool ReadExtension(); bool ReadLocalHeader(); sal_uLong ReadNextBlock(); - void FillImages( HPBYTE pBytes, sal_uLong nCount ); + void FillImages( sal_uInt8* pBytes, sal_uLong nCount ); void CreateNewBitmaps(); bool ProcessGIF(); diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 42088b739ac6..52c28784adac 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -51,7 +51,7 @@ // - Inlines - -inline void ImplSetPixel4( const HPBYTE pScanline, long nX, const BYTE cIndex ) +inline void ImplSetPixel4( const sal_uInt8* pScanline, long nX, const BYTE cIndex ) { BYTE& rByte = pScanline[ nX >> 1 ]; @@ -951,11 +951,11 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, const Size& rSizePixel, bool bRLE4 ) { - HPBYTE pRLE = (HPBYTE) pSrcBuf; - HPBYTE pDIB = (HPBYTE) pDstBuf; - HPBYTE pRow = (HPBYTE) pDstBuf; + sal_uInt8* pRLE = (sal_uInt8*) pSrcBuf; + sal_uInt8* pDIB = (sal_uInt8*) pDstBuf; + sal_uInt8* pRow = (sal_uInt8*) pDstBuf; sal_uLong nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) ); - HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1; + sal_uInt8* pLast = pDIB + rSizePixel.Height() * nWidthAl - 1; sal_uLong nCountByte; sal_uLong nRunByte; sal_uLong i; |