From 7a6341e4edb757fade73aa58315c17c7a83e76a0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 May 2015 12:22:28 +0100 Subject: cppcheck: noExplicitConstructor Change-Id: Ie7e0a036c223f9576be3798feb0df95131c1803a --- sw/source/core/text/pormulti.hxx | 2 +- sw/source/core/text/porrst.hxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sw') diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index c0af24b5bcf1..67071a8245bb 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -85,7 +85,7 @@ class SwMultiPortion : public SwLinePortion bool bFlyInCntnt:1; // Fly as character inside sal_uInt8 nDirection:2; // Direction (0/90/180/270 degrees) protected: - SwMultiPortion(sal_Int32 nEnd) + explicit SwMultiPortion(sal_Int32 nEnd) : pFldRest(0) , bTab1(false) , bTab2(false) diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx index df15859c0690..90ba3743f030 100644 --- a/sw/source/core/text/porrst.hxx +++ b/sw/source/core/text/porrst.hxx @@ -29,7 +29,7 @@ class SwTxtFormatInfo; class SwTmpEndPortion : public SwLinePortion { public: - SwTmpEndPortion( const SwLinePortion &rPortion ); + explicit SwTmpEndPortion( const SwLinePortion &rPortion ); virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; OUTPUT_OPERATOR_OVERRIDE }; @@ -37,7 +37,7 @@ public: class SwBreakPortion : public SwLinePortion { public: - SwBreakPortion( const SwLinePortion &rPortion ); + explicit SwBreakPortion( const SwLinePortion &rPortion ); // Returns 0 if we have no usable data virtual SwLinePortion *Compress() SAL_OVERRIDE; virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; @@ -69,7 +69,7 @@ public: // This constructor only sets the height and ascent to the values // of rPortion. It is only used for kerning portions for grid mode - SwKernPortion( const SwLinePortion &rPortion ); + explicit SwKernPortion( const SwLinePortion &rPortion ); virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE; virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; @@ -82,8 +82,8 @@ class SwArrowPortion : public SwLinePortion Point aPos; bool bLeft; public: - SwArrowPortion( const SwLinePortion &rPortion ); - SwArrowPortion( const SwTxtPaintInfo &rInf ); + explicit SwArrowPortion( const SwLinePortion &rPortion ); + explicit SwArrowPortion( const SwTxtPaintInfo &rInf ); virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; virtual SwLinePortion *Compress() SAL_OVERRIDE; inline bool IsLeft() const { return bLeft; } @@ -99,17 +99,17 @@ class SwHangingPortion : public SwTxtPortion { sal_uInt16 nInnerWidth; public: - inline SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() ) + explicit SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() ) { SetWhichPor( POR_HNG ); SetLen( 1 ); Height( aSize.Height() ); } - inline sal_uInt16 GetInnerWidth() const { return nInnerWidth; } + sal_uInt16 GetInnerWidth() const { return nInnerWidth; } }; // Used to hide text class SwHiddenTextPortion : public SwLinePortion { public: - inline SwHiddenTextPortion( sal_Int32 nLen ) + explicit SwHiddenTextPortion( sal_Int32 nLen ) { SetWhichPor( POR_HIDDEN_TXT ); SetLen( nLen ); } virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; @@ -126,7 +126,7 @@ private: public: - inline SwControlCharPortion( sal_Unicode cChar ) + explicit SwControlCharPortion( sal_Unicode cChar ) : mnViewWidth( 0 ), mnHalfCharWidth( 0 ), mcChar( cChar ) { SetWhichPor( POR_CONTROLCHAR ); SetLen( 1 ); -- cgit