[Libreoffice-commits] .: binfilter/bf_svtools
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Feb 3 06:41:53 PST 2011
binfilter/bf_svtools/source/filter.vcl/wmf/winmtf.hxx | 72 +++++++++---------
1 file changed, 37 insertions(+), 35 deletions(-)
New commits:
commit 1d8ee35c5226f5b07724209b7230f5b7dccb8832
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Feb 3 14:41:48 2011 +0000
cppcheck: fix operator= and stray ;
diff --git a/binfilter/bf_svtools/source/filter.vcl/wmf/winmtf.hxx b/binfilter/bf_svtools/source/filter.vcl/wmf/winmtf.hxx
index 85f6d8f..94f9593 100644
--- a/binfilter/bf_svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/binfilter/bf_svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -320,21 +320,21 @@ class WinMtfClipPath
sal_Bool bNeedsUpdate;
- WinMtfClipPath(): eType(EMPTY), bNeedsUpdate( sal_False ){};
+ WinMtfClipPath(): eType(EMPTY), bNeedsUpdate( sal_False ){}
void SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
void IntersectClipRect( const Rectangle& rRect );
void ExcludeClipRect( const Rectangle& rRect );
void MoveClipRegion( const Size& rSize );
- WinMtfClipPathType GetType() const { return eType; };
- const PolyPolygon& GetClipPath() const { return aPolyPoly; };
+ WinMtfClipPathType GetType() const { return eType; }
+ const PolyPolygon& GetClipPath() const { return aPolyPoly; }
sal_Bool operator==( const WinMtfClipPath& rPath )
{
return ( rPath.eType == eType ) &&
( rPath.aPolyPoly == aPolyPoly );
- };
+ }
};
class WinMtfPathObj : public PolyPolygon
@@ -344,7 +344,7 @@ class WinMtfPathObj : public PolyPolygon
public :
WinMtfPathObj() { bClosed = sal_True; }
- void Init() { Clear(); bClosed = sal_True; };
+ void Init() { Clear(); bClosed = sal_True; }
void ClosePath();
void AddPoint( const Point& rPoint );
@@ -371,20 +371,20 @@ struct WinMtfFillStyle
aFillColor ( Color( COL_BLACK ) ),
bTransparent( FALSE )
{
- };
+ }
WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) :
aFillColor ( rColor ),
bTransparent( bTrans )
{
- };
+ }
BOOL operator==( const WinMtfFillStyle& rStyle )
- { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); };
+ { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); }
BOOL operator==( WinMtfFillStyle* pStyle )
- { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); };
- void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; };
- void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; };
+ { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); }
+ WinMtfFillStyle& operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; return *this; }
+ WinMtfFillStyle& operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; return *this; }
};
// -----------------------------------------------------------------------------
@@ -397,32 +397,34 @@ struct WinMtfLineStyle
WinMtfLineStyle() :
aLineColor ( COL_BLACK ),
- bTransparent( FALSE ) {};
+ bTransparent( FALSE ) {}
WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) :
aLineColor ( rColor ),
- bTransparent( bTrans ) {};
+ bTransparent( bTrans ) {}
WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) :
aLineColor ( rColor ),
aLineInfo ( rStyle ),
- bTransparent( bTrans ) {};
+ bTransparent( bTrans ) {}
- BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
- BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); };
- void operator=( const WinMtfLineStyle& rStyle )
+ BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }
+ BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); }
+ WinMtfLineStyle& operator=( const WinMtfLineStyle& rStyle )
{
aLineColor = rStyle.aLineColor;
bTransparent = rStyle.bTransparent;
aLineInfo = rStyle.aLineInfo;
- };
+ return *this;
+ }
- void operator=( WinMtfLineStyle* pStyle )
+ WinMtfLineStyle& operator=( WinMtfLineStyle* pStyle )
{
aLineColor = pStyle->aLineColor;
bTransparent = pStyle->bTransparent;
aLineInfo = pStyle->aLineInfo;
- };
+ return *this;
+ }
};
// -----------------------------------------------------------------------------
@@ -439,7 +441,7 @@ struct XForm
{
eM11 = eM22 = 1.0f;
eDx = eDy = eM12 = eM21 = 0.0f;
- };
+ }
friend SvStream& operator>>( SvStream& rIn, XForm& rXForm );
};
@@ -481,7 +483,7 @@ struct BSaveStruct
UINT32 nWinRop;
BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) :
- aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){};
+ aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){}
};
// -----------------------------------------------------------------------------
@@ -497,10 +499,10 @@ struct GDIObj
pStyle ( NULL ),
eType ( GDI_DUMMY )
{
- };
+ }
- GDIObj( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; };
- void Set( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; };
+ GDIObj( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }
+ void Set( GDIObjectType eT, void* pS ) { pStyle = pS; eType = eT; }
void Delete()
{
if ( pStyle )
@@ -523,7 +525,7 @@ struct GDIObj
}
pStyle = NULL;
}
- };
+ }
~GDIObj()
{
@@ -614,7 +616,7 @@ class WinMtfOutput
void SetRefPix( const Size& rSize );
void SetRefMill( const Size& rSize );
- sal_uInt32 GetMapMode() const { return mnMapMode; };
+ sal_uInt32 GetMapMode() const { return mnMapMode; }
void SetMapMode( sal_uInt32 mnMapMode );
void SetWorldTransform( const XForm& rXForm );
void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
@@ -625,8 +627,8 @@ class WinMtfOutput
UINT32 SetRasterOp( UINT32 nRasterOp );
void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill );
- void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; };
- sal_Int32 GetGfxMode() const { return mnGfxMode; };
+ void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }
+ sal_Int32 GetGfxMode() const { return mnGfxMode; }
void SetBkMode( UINT32 nMode );
void SetBkColor( const Color& rColor );
void SetTextColor( const Color& rColor );
@@ -635,13 +637,13 @@ class WinMtfOutput
void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL );
void DeleteObject( INT32 nIndex );
void SelectObject( INT32 nIndex );
- CharSet GetCharSet(){ return maFont.GetCharSet(); };
+ CharSet GetCharSet(){ return maFont.GetCharSet(); }
const Font& GetFont() const;
void SetTextLayoutMode( const sal_uInt32 nLayoutMode );
- void ClearPath(){ aPathObj.Init(); };
- void ClosePath(){ aPathObj.ClosePath(); };
- const PolyPolygon& GetPathObj(){ return aPathObj; };
+ void ClearPath(){ aPathObj.Init(); }
+ void ClosePath(){ aPathObj.ClosePath(); }
+ const PolyPolygon& GetPathObj(){ return aPathObj; }
void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
@@ -711,7 +713,7 @@ class EnhWMFReader : public WinMtf
public:
EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
- : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {};
+ : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {}
~EnhWMFReader();
BOOL ReadEnhWMF();
@@ -746,7 +748,7 @@ private:
public:
WMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
- : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {};
+ : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {}
// Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile
void ReadWMF();
More information about the Libreoffice-commits
mailing list