summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-29 14:04:27 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-06 16:42:01 -0500
commitbd1d61324244d26d8581f784d7b8c6cce529a6be (patch)
treef989c8cb61095202cbc70c0a1beffbae26287444 /include
parentf1aaedc48e56e04cbd07bbabbb775507a7ac34dd (diff)
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 (cherry picked from commit d16d9f950f8cb6d8948875372c9ff1f0aae9fb7a) Change-Id: I6a5c031e9e060ad3623a7586ec8a8cc4fe6252e9
Diffstat (limited to 'include')
-rw-r--r--include/editeng/svxrtf.hxx5
-rw-r--r--include/oox/drawingml/color.hxx4
-rw-r--r--include/svx/nbdtmg.hxx2
-rw-r--r--include/vcl/salbtype.hxx27
4 files changed, 15 insertions, 23 deletions
diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx
index 42098f663220..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<short, vcl::Font> SvxRTFFontTbl;
typedef boost::ptr_map<sal_uInt16, SvxRTFStyleType> SvxRTFStyleTbl;
@@ -391,7 +390,7 @@ public:
inline const Color& SvxRTFParser::GetColor( size_t nId ) const
{
- ColorPtr pColor = (ColorPtr)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<NumSettings_Impl> > 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<NumberSettings_Impl> > 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 );