From d16d9f950f8cb6d8948875372c9ff1f0aae9fb7a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 29 Jun 2015 14:04:27 +0200 Subject: remove some unnecessary typedefs to pointer that were really not helping make the code any clearer. Found with a search git grep -P 'typedef\s+\w+\s*\*\s*\w+\;' and manual inspection Change-Id: I6a5c031e9e060ad3623a7586ec8a8cc4fe6252e9 --- include/editeng/svxrtf.hxx | 5 ++--- include/oox/drawingml/color.hxx | 4 ---- include/svx/nbdtmg.hxx | 2 -- include/vcl/salbtype.hxx | 27 +++++++++++++-------------- 4 files changed, 15 insertions(+), 23 deletions(-) (limited to 'include') diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index fee26224b813..5dcb23efda69 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -76,8 +76,7 @@ public: }; -typedef Color* ColorPtr; -typedef std::deque< ColorPtr > SvxRTFColorTbl; +typedef std::deque< Color* > SvxRTFColorTbl; typedef boost::ptr_map SvxRTFFontTbl; typedef boost::ptr_map SvxRTFStyleTbl; @@ -391,7 +390,7 @@ public: inline const Color& SvxRTFParser::GetColor( size_t nId ) const { - ColorPtr pColor = pDfltColor; + Color* pColor = pDfltColor; if( nId < aColorTbl.size() ) pColor = aColorTbl[ nId ]; return *pColor; diff --git a/include/oox/drawingml/color.hxx b/include/oox/drawingml/color.hxx index 9b52bf3e18a0..e84628917757 100644 --- a/include/oox/drawingml/color.hxx +++ b/include/oox/drawingml/color.hxx @@ -150,10 +150,6 @@ private: maInteropTransformations; /// Unaltered list of transformations for interoperability purposes }; -typedef std::shared_ptr< Color > ColorPtr; - - - } // namespace drawingml } // namespace oox diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index d400a87285f2..6f1fd0e16812 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -79,7 +79,6 @@ class SVX_DLLPUBLIC NumSettings_Impl ~NumSettings_Impl(){} }; -typedef NumSettings_Impl* NumSettings_ImplPtr; typedef std::vector< std::shared_ptr > NumSettingsArr_Impl; class SVX_DLLPUBLIC BulletsSettings @@ -163,7 +162,6 @@ class SVX_DLLPUBLIC NumberSettings_Impl ~NumberSettings_Impl(){} }; -typedef NumberSettings_Impl* NumberSettings_ImplPtr; typedef std::vector< std::shared_ptr > NumberSettingsArr_Impl; class SVX_DLLPUBLIC OutlineSettings_Impl diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index c145d88393f1..4a9d398e16e8 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -33,8 +33,7 @@ typedef sal_uInt8* HPBYTE; typedef HPBYTE Scanline; -typedef const sal_uInt8* ConstHPBYTE; -typedef ConstHPBYTE ConstScanline; +typedef const sal_uInt8* ConstScanline; // - Bitmap formats - @@ -219,19 +218,19 @@ public: inline sal_uLong GetGreenMask() const; inline sal_uLong GetBlueMask() const; - inline void GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const; + inline void GetColorFor8Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const; inline void SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel ) const; - inline void GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const; + inline void GetColorFor16BitMSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const; inline void SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pPixel ) const; - inline void GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const; + inline void GetColorFor16BitLSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const; inline void SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pPixel ) const; - inline void GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const; + inline void GetColorFor24Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const; inline void SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixel ) const; - inline void GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const; - inline void GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, ConstHPBYTE pPixel ) const; + inline void GetColorFor32Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const; + inline void GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, const sal_uInt8* pPixel ) const; inline void SetColorFor32Bit( const BitmapColor& rColor, HPBYTE pPixel ) const; }; @@ -673,7 +672,7 @@ inline sal_uLong ColorMask::GetBlueMask() const return mnBMask; } -inline void ColorMask::GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorFor8Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = *pPixel; MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor ); @@ -684,7 +683,7 @@ inline void ColorMask::SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel *pPixel = (sal_uInt8) COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, mnAlphaChannel ); } -inline void ColorMask::GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorFor16BitMSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = pPixel[ 1 ] | ( (sal_uInt32) pPixel[ 0 ] << 8UL ); @@ -699,7 +698,7 @@ inline void ColorMask::SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pP pPixel[ 1 ] = (sal_uInt8) nVal; } -inline void ColorMask::GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorFor16BitLSB( BitmapColor& rColor, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ); @@ -714,7 +713,7 @@ inline void ColorMask::SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pP pPixel[ 1 ] = (sal_uInt8)(nVal >> 8U); } -inline void ColorMask::GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorFor24Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | ( (sal_uInt32) pPixel[ 2 ] << 16UL ); MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor ); @@ -726,7 +725,7 @@ inline void ColorMask::SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixe pPixel[ 0 ] = (sal_uInt8) nVal; pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8UL ); pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16UL ); } -inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | ( (sal_uInt32) pPixel[ 2 ] << 16UL ) | ( (sal_uInt32) pPixel[ 3 ] << 24UL ); @@ -734,7 +733,7 @@ inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor ); } -inline void ColorMask::GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, ConstHPBYTE pPixel ) const +inline void ColorMask::GetColorAndAlphaFor32Bit( BitmapColor& rColor, sal_uInt8& rAlpha, const sal_uInt8* pPixel ) const { const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | ( (sal_uInt32) pPixel[ 2 ] << 16UL ) | ( (sal_uInt32) pPixel[ 3 ] << 24UL ); -- cgit