From 665d085511a64959ceafd869e6331877ed711c80 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Nov 2017 10:57:55 +0200 Subject: loplugin:countusersofdefaultparams in sw (1) Change-Id: I0d14f9c375f93079aef21ca4f1132adc4e1fe06c Reviewed-on: https://gerrit.libreoffice.org/45207 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/countusersofdefaultparams.py | 6 ++++-- sw/source/core/doc/doccomp.cxx | 2 +- sw/source/core/doc/docfmt.cxx | 2 +- sw/source/core/edit/edfcol.cxx | 4 ++-- sw/source/core/inc/UndoAttribute.hxx | 4 ++-- sw/source/core/inc/flowfrm.hxx | 2 +- sw/source/core/inc/txtfrm.hxx | 4 ++-- sw/source/core/inc/unobookmark.hxx | 2 +- sw/source/core/inc/viewimp.hxx | 4 ++-- sw/source/core/text/blink.cxx | 2 +- sw/source/core/text/porlay.cxx | 6 +++--- sw/source/core/text/porlay.hxx | 10 +++++----- sw/source/core/text/portab.hxx | 2 +- sw/source/core/text/txtpaint.hxx | 8 ++++---- sw/source/filter/html/htmltabw.cxx | 6 +++--- sw/source/filter/html/swhtml.hxx | 4 ++-- sw/source/ui/misc/linenum.cxx | 2 +- sw/source/ui/table/convert.cxx | 6 +++--- sw/source/ui/table/instable.cxx | 6 +++--- sw/source/ui/table/tabledlg.cxx | 4 ++-- sw/source/uibase/inc/convert.hxx | 4 ++-- sw/source/uibase/inc/frmdlg.hxx | 2 +- sw/source/uibase/inc/instable.hxx | 4 ++-- sw/source/uibase/inc/linenum.hxx | 2 +- sw/source/uibase/inc/swuicnttab.hxx | 2 +- sw/source/uibase/inc/uiitems.hxx | 4 ++-- sw/source/uibase/table/tablepg.hxx | 2 +- ucb/source/ucp/file/filtask.cxx | 2 +- ucb/source/ucp/file/filtask.hxx | 3 +-- vcl/inc/implimagetree.hxx | 2 +- vcl/inc/unx/freetype_glyphcache.hxx | 2 +- xmloff/source/forms/formattributes.hxx | 2 +- xmloff/source/style/xmlbahdl.hxx | 3 ++- 33 files changed, 61 insertions(+), 59 deletions(-) diff --git a/compilerplugins/clang/countusersofdefaultparams.py b/compilerplugins/clang/countusersofdefaultparams.py index a790abfcbd76..c36f91b36dbb 100755 --- a/compilerplugins/clang/countusersofdefaultparams.py +++ b/compilerplugins/clang/countusersofdefaultparams.py @@ -9,9 +9,11 @@ callDict = dict() # clang does not always use exactly the same numbers in the type-parameter vars it generates # so I need to substitute them to ensure we can match correctly. -normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") +normalizeTypeParamsRegex1 = re.compile(r"type-parameter-\d+-\d+") +normalizeTypeParamsRegex2 = re.compile(r"typename enable_if<.*") def normalizeTypeParams( line ): - return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) + line = normalizeTypeParamsRegex1.sub("type-parameter-?-?", line) + return normalizeTypeParamsRegex2.sub("type-parameter-?-?", line) with io.open("loplugin.countusersofdefaultparams.log", "rb", buffering=1024*1024) as txt: for line in txt: diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 0595503430d9..158e5dd30ac6 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -334,7 +334,7 @@ protected: } int FindLCS( int *pLcs1, int *pLcs2, int nStt1, - int nEnd1 = 0, int nStt2 = 0, int nEnd2 = 0 ); + int nEnd1, int nStt2, int nEnd2 ); public: static int IgnoreIsolatedPieces( int *pLcs1, int *pLcs2, int nLen1, int nLen2, diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 2f76561a785e..191d5bcb28bb 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1871,7 +1871,7 @@ void SwDoc::ChgFormat(SwFormat & rFormat, const SfxItemSet & rSet) } } - SwUndo * pUndo = new SwUndoFormatAttr(aOldSet, rFormat); + SwUndo * pUndo = new SwUndoFormatAttr(aOldSet, rFormat, /*bSaveDrawPt*/true); GetIDocumentUndoRedo().AppendUndo(pUndo); } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 5b151e15d081..61a4c15cc939 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -301,7 +301,7 @@ bool lcl_IsParagraphSignatureField(const uno::Reference& xModel, uno::Reference lcl_findFieldByRDF(const uno::Reference& xModel, const uno::Reference& xParagraph, const OUString& sRDFName, - const OUString& sRDFValue = OUString()) + const OUString& sRDFValue) { uno::Reference xTextPortionEnumerationAccess(xParagraph, uno::UNO_QUERY); if (!xTextPortionEnumerationAccess.is()) @@ -510,7 +510,7 @@ void lcl_RemoveParagraphMetadataField(const uno::Reference& xModel, const uno::Reference& xField, - const OUString& sKey = OUString()) + const OUString& sKey) { const std::pair rdfPair = lcl_getRDF(xModel, xField, ParagraphClassificationNameRDFName); return rdfPair.first == ParagraphClassificationNameRDFName && (sKey.isEmpty() || rdfPair.second == sKey); diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx index d46f3d8a5d0d..3bbebafe776d 100644 --- a/sw/source/core/inc/UndoAttribute.hxx +++ b/sw/source/core/inc/UndoAttribute.hxx @@ -109,10 +109,10 @@ public: // --> OD 2008-02-27 #refactorlists# - removed SwUndoFormatAttr( const SfxItemSet& rOldSet, SwFormat& rFormat, - bool bSaveDrawPt = true ); + bool bSaveDrawPt ); SwUndoFormatAttr( const SfxPoolItem& rItem, SwFormat& rFormat, - bool bSaveDrawPt = true ); + bool bSaveDrawPt ); virtual ~SwUndoFormatAttr() override; diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index b8482dce92b4..e2963d859336 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -137,7 +137,7 @@ protected: void LockJoin() { m_bLockJoin = true; } void UnlockJoin() { m_bLockJoin = false; } - bool CheckMoveFwd( bool& rbMakePage, bool bKeep, bool bIgnoreMyOwnKeepValue = false ); + bool CheckMoveFwd( bool& rbMakePage, bool bKeep, bool bIgnoreMyOwnKeepValue ); bool MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways = false ); bool MoveBwd( bool &rbReformat ); virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool bHead, bool &rReformat )=0; diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 19931c15d686..aec763d3cefd 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -296,9 +296,9 @@ public: virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly ) const override; bool UnitUp_(SwPaM *, const SwTwips nOffset, - bool bSetInReadOnly = false ) const; + bool bSetInReadOnly ) const; bool UnitDown_(SwPaM *, const SwTwips nOffset, - bool bSetInReadOnly = false ) const; + bool bSetInReadOnly ) const; /** * Prepares the cursor position for a visual cursor move (BiDi). diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx index 881cf227ec1b..7ec058e086bd 100644 --- a/sw/source/core/inc/unobookmark.hxx +++ b/sw/source/core/inc/unobookmark.hxx @@ -181,7 +181,7 @@ class SwXFieldmark final ::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark(); bool isReplacementObject; - SwXFieldmark(bool isReplacementObject, SwDoc* pDoc = nullptr); + SwXFieldmark(bool isReplacementObject, SwDoc* pDoc); public: static css::uno::Reference diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 19594409ba0b..196d345f8603 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -174,8 +174,8 @@ public: SwPageFrame const& rPageFrame, const SwRect& _rRect, const Color* _pPageBackgrdColor, - const bool _bIsPageRightToLeft = false, - sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr ); + const bool _bIsPageRightToLeft, + sdr::contact::ViewObjectContactRedirector* pRedirector ); /** * Is passed to the DrawEngine as a Link and decides what is painted diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx index b3a707e8d671..eec6e4a85073 100644 --- a/sw/source/core/text/blink.cxx +++ b/sw/source/core/text/blink.cxx @@ -133,7 +133,7 @@ void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor, m_List.insert(std::move(pBlinkPor)); pTextFrame->SetBlinkPor(); if( pPor->IsLayPortion() || pPor->IsParaPortion() ) - const_cast(static_cast(pPor))->SetBlinking(); + const_cast(static_cast(pPor))->SetBlinking(true); if( !aTimer.IsActive() ) aTimer.Start(); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 86b38b6d006d..7834915260b9 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -406,7 +406,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) if( pPos->IsHangingPortion() ) { - SetHanging(); + SetHanging(true); rInf.GetParaPortion()->SetMargin(); } @@ -491,11 +491,11 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) { OUString aText; if( pPos->GetExpText( rInf, aText ) && !aText.isEmpty() ) - SetContent(); + SetContent(true); } else if( ( pPos->InTextGrp() || pPos->IsMultiPortion() ) && pPos->GetLen() ) - SetContent(); + SetContent(true); } bTmpDummy &= !HasContent() && ( !pPos->Width() || pPos->IsFlyPortion() ); diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index c77f25b84981..b7d0f031d0d5 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -116,17 +116,17 @@ public: bool IsFly() const { return m_bFly; } void SetRest( const bool bNew ) { m_bRest = bNew; } bool IsRest() const { return m_bRest; } - void SetBlinking( const bool bNew = true ) { m_bBlinking = bNew; } + void SetBlinking( const bool bNew ) { m_bBlinking = bNew; } bool IsBlinking() const { return m_bBlinking; } - void SetContent( const bool bNew = true ) { m_bContent = bNew; } + void SetContent( const bool bNew ) { m_bContent = bNew; } bool HasContent() const { return m_bContent; } - void SetRedline( const bool bNew = true ) { m_bRedline = bNew; } + void SetRedline( const bool bNew ) { m_bRedline = bNew; } bool HasRedline() const { return m_bRedline; } void SetForcedLeftMargin() { m_bForcedLeftMargin = true; } bool HasForcedLeftMargin() const { return m_bForcedLeftMargin; } - void SetHanging( const bool bNew = true ) { m_bHanging = bNew; } + void SetHanging( const bool bNew ) { m_bHanging = bNew; } bool IsHanging() const { return m_bHanging; } - void SetUnderscore( const bool bNew = true ) { m_bUnderscore = bNew; } + void SetUnderscore( const bool bNew ) { m_bUnderscore = bNew; } bool HasUnderscore() const { return m_bUnderscore; } // Respecting empty dummy lines diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx index 65022a44c998..3656f216239e 100644 --- a/sw/source/core/text/portab.hxx +++ b/sw/source/core/text/portab.hxx @@ -47,7 +47,7 @@ public: class SwTabLeftPortion : public SwTabPortion { public: - SwTabLeftPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cFillChar, bool bAutoTab = true ) + SwTabLeftPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cFillChar, bool bAutoTab ) : SwTabPortion( nTabPosVal, cFillChar, bAutoTab ) { SetWhichPor( POR_TABLEFT ); } OUTPUT_OPERATOR_OVERRIDE diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index 567fe03204d4..21fbefc2822d 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -56,14 +56,14 @@ class SwDbgOut protected: VclPtr pOut; public: - inline SwDbgOut( OutputDevice* pOutDev, const bool bOn = true ); + inline SwDbgOut( OutputDevice* pOutDev, const bool bOn ); }; class DbgBackColor : public SwDbgOut { Color aOldFillColor; public: - DbgBackColor( OutputDevice* pOut, const bool bOn = true ); + DbgBackColor( OutputDevice* pOut, const bool bOn ); ~DbgBackColor(); }; @@ -71,8 +71,8 @@ class DbgRect : public SwDbgOut { public: DbgRect( OutputDevice* pOut, const tools::Rectangle &rRect, - const bool bOn = true, - ColorData eColor = COL_LIGHTBLUE ); + const bool bOn, + ColorData eColor ); }; inline SwDbgOut::SwDbgOut( OutputDevice* pOutDev, const bool bOn ) diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 07b2f7bc9868..a603499d688c 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -77,8 +77,8 @@ class SwHTMLWrtTable : public SwWriteTable public: SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, - bool bRel, sal_uInt16 nLeftSub, sal_uInt16 nRightSub=0, - sal_uInt16 nNumOfRowsToRepeat = 0 ); + bool bRel, sal_uInt16 nLeftSub, sal_uInt16 nRightSub, + sal_uInt16 nNumOfRowsToRepeat ); explicit SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo ); void Write( SwHTMLWriter& rWrt, sal_Int16 eAlign=text::HoriOrientation::NONE, @@ -475,7 +475,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, } SwHTMLWrtTable aTableWrt( pBox->GetTabLines(), nTWidth, - nBWidth, HasRelWidths(), nLSub, nRSub ); + nBWidth, HasRelWidths(), nLSub, nRSub, /*nNumOfRowsToRepeat*/0 ); aTableWrt.Write( rWrt ); } diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 69a47da0005f..98b380dbb13c 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -876,8 +876,8 @@ public: const OUString& rFileName, const OUString& rBaseURL, bool bReadNewDoc, - SfxMedium* pMed = nullptr, bool bReadUTF8 = false, - bool bIgnoreHTMLComments = false ); + SfxMedium* pMed, bool bReadUTF8, + bool bIgnoreHTMLComments ); virtual SvParserState CallParser() override; diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 011c075d13cc..78a1b0149967 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -161,7 +161,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView const *pVw) m_pNumberingOnCB->SetClickHdl(LINK(this, SwLineNumberingDlg, LineOnOffHdl)); m_pDivisorED->SetModifyHdl(LINK(this, SwLineNumberingDlg, ModifyHdl)); ModifyHdl(*m_pDivisorED); - LineOnOffHdl(); + LineOnOffHdl(nullptr); get("ok")->SetClickHdl(LINK(this, SwLineNumberingDlg, OKHdl)); } diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 5f05e1e8d6e6..14e1b4729a61 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -168,8 +168,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) mpHeaderCB->SetClickHdl(LINK(this, SwConvertTableDlg, CheckBoxHdl)); mpRepeatHeaderCB->SetClickHdl(LINK(this, SwConvertTableDlg, ReapeatHeaderCheckBoxHdl)); - ReapeatHeaderCheckBoxHdl(); - CheckBoxHdl(); + ReapeatHeaderCheckBoxHdl(nullptr); + CheckBoxHdl(nullptr); } SwConvertTableDlg:: ~SwConvertTableDlg() @@ -225,7 +225,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton, void ) IMPL_LINK_NOARG(SwConvertTableDlg, CheckBoxHdl, Button*, void) { mpRepeatHeaderCB->Enable(mpHeaderCB->IsChecked()); - ReapeatHeaderCheckBoxHdl(); + ReapeatHeaderCheckBoxHdl(nullptr); } IMPL_LINK_NOARG(SwConvertTableDlg, ReapeatHeaderCheckBoxHdl, Button*, void) diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index dd0d1ad25947..eaa591d990be 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -116,8 +116,8 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) m_pRepeatHeaderNF->SetModifyHdl( LINK( this, SwInsTableDlg, ModifyRepeatHeaderNF_Hdl ) ); m_pHeaderCB->SetClickHdl(LINK(this, SwInsTableDlg, CheckBoxHdl)); m_pRepeatHeaderCB->SetClickHdl(LINK(this, SwInsTableDlg, ReapeatHeaderCheckBoxHdl)); - ReapeatHeaderCheckBoxHdl(); - CheckBoxHdl(); + ReapeatHeaderCheckBoxHdl(nullptr); + CheckBoxHdl(nullptr); sal_Int64 nMax = m_pRowNF->GetValue(); if( nMax <= 1 ) @@ -208,7 +208,7 @@ IMPL_LINK( SwInsTableDlg, AutoFormatHdl, Button*, pButton, void ) IMPL_LINK_NOARG(SwInsTableDlg, CheckBoxHdl, Button*, void) { m_pRepeatHeaderCB->Enable(m_pHeaderCB->IsChecked()); - ReapeatHeaderCheckBoxHdl(); + ReapeatHeaderCheckBoxHdl(nullptr); } IMPL_LINK_NOARG(SwInsTableDlg, ReapeatHeaderCheckBoxHdl, Button*, void) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 0b20824c2342..1dd146377a8a 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1278,7 +1278,7 @@ SwTextFlowPage::SwTextFlowPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pSplitRowCB->Hide(); } - HeadLineCBClickHdl(); + HeadLineCBClickHdl(nullptr); } SwTextFlowPage::~SwTextFlowPage() @@ -1628,7 +1628,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pTextDirectionLB->SaveValue(); m_pVertOrientLB->SaveValue(); - HeadLineCBClickHdl(); + HeadLineCBClickHdl(nullptr); } void SwTextFlowPage::SetShell(SwWrtShell* pSh) diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx index d28bd47cc4b8..bb4177b976ce 100644 --- a/sw/source/uibase/inc/convert.hxx +++ b/sw/source/uibase/inc/convert.hxx @@ -57,8 +57,8 @@ class SwConvertTableDlg: public SfxModalDialog DECL_LINK( AutoFormatHdl, Button*, void ); DECL_LINK( BtnHdl, Button*, void ); - DECL_LINK( CheckBoxHdl, Button* = nullptr, void ); - DECL_LINK( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void ); + DECL_LINK( CheckBoxHdl, Button*, void ); + DECL_LINK( ReapeatHeaderCheckBoxHdl, Button*, void ); public: SwConvertTableDlg( SwView& rView, bool bToTable ); diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index ba2217d386eb..8a8cd84bc467 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -50,7 +50,7 @@ public: SwFrameDlg( SfxViewFrame const *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame, - const OUString& sResType = OUString("FrameDialog"), + const OUString& sResType, bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr); diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index 1c8d7a4cab86..9992a16ba9eb 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -59,8 +59,8 @@ class SwInsTableDlg : public SfxModalDialog DECL_LINK( ModifyRowCol, Edit&, void ); DECL_LINK( AutoFormatHdl, Button*, void ); DECL_LINK( OKHdl, Button*, void); - DECL_LINK( CheckBoxHdl, Button* = nullptr, void); - DECL_LINK( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void); + DECL_LINK( CheckBoxHdl, Button*, void); + DECL_LINK( ReapeatHeaderCheckBoxHdl, Button*, void); DECL_LINK( ModifyRepeatHeaderNF_Hdl, Edit&, void ); public: diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx index d3139e52c7d0..80bee87c15bf 100644 --- a/sw/source/uibase/inc/linenum.hxx +++ b/sw/source/uibase/inc/linenum.hxx @@ -49,7 +49,7 @@ private: VclPtr m_pNumberingOnCB; VclPtr m_pNumberingOnFooterHeader; DECL_LINK(OKHdl, Button*, void); - DECL_LINK(LineOnOffHdl, Button* = nullptr, void); + DECL_LINK(LineOnOffHdl, Button*, void); DECL_LINK(ModifyHdl, Edit&, void); public: diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 6405633bbc09..f26bb92a6a21 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -101,7 +101,7 @@ public: SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, sal_uInt16 nToxType, - bool bGlobal = false); + bool bGlobal); virtual ~SwMultiTOXTabDialog() override; virtual void dispose() override; diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx index ea8138caaeae..fadb8bdb0a95 100644 --- a/sw/source/uibase/inc/uiitems.hxx +++ b/sw/source/uibase/inc/uiitems.hxx @@ -59,7 +59,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem void* pMisc; public: - SwPtrItem( const sal_uInt16 nId, void* pPtr = nullptr); + SwPtrItem( const sal_uInt16 nId, void* pPtr); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; @@ -91,7 +91,7 @@ class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem SwPaM* m_pPaM; public: - SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM = nullptr); + SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx index f5e683d0f8d5..3ba5eba9a900 100644 --- a/sw/source/uibase/table/tablepg.hxx +++ b/sw/source/uibase/table/tablepg.hxx @@ -176,7 +176,7 @@ class SwTextFlowPage : public SfxTabPage DECL_LINK(PageNoClickHdl_Impl, Button*, void); DECL_LINK( SplitHdl_Impl, Button*, void ); DECL_STATIC_LINK( SwTextFlowPage, SplitRowHdl_Impl, Button*, void ); - DECL_LINK( HeadLineCBClickHdl, Button* = nullptr, void ); + DECL_LINK( HeadLineCBClickHdl, Button*, void ); public: SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet ); diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index d81ecd6b9992..9b49b26c5be7 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -409,7 +409,7 @@ TaskManager::startTask( { throw DuplicateCommandIdentifierException( OSL_LOG_PREFIX ); } - m_aTaskMap[ CommandId ] = TaskHandling( xCommandEnv ); + m_aTaskMap.emplace( CommandId, TaskHandling( xCommandEnv )); } diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index 49678e57ede8..a08355744d26 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -97,8 +97,7 @@ namespace fileaccess public: explicit TaskHandling( - const css::uno::Reference< css::ucb::XCommandEnvironment >& xCommandEnv - = css::uno::Reference< css::ucb::XCommandEnvironment >( nullptr ) ) + const css::uno::Reference< css::ucb::XCommandEnvironment >& xCommandEnv ) : m_bAbort( false ), m_bHandled( false ), m_nErrorCode( TASKHANDLER_NO_ERROR ), diff --git a/vcl/inc/implimagetree.hxx b/vcl/inc/implimagetree.hxx index 9118664775e8..6675d0dc3ee4 100644 --- a/vcl/inc/implimagetree.hxx +++ b/vcl/inc/implimagetree.hxx @@ -70,7 +70,7 @@ public: bool loadImage( OUString const & name, OUString const & style, BitmapEx & bitmap, bool localized, - const ImageLoadFlags eFlags = ImageLoadFlags::NONE); + const ImageLoadFlags eFlags); /** a crude form of life cycle control (called from DeInitVCL; otherwise, * if the ImplImageTree singleton were destroyed during exit that would diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx index 0a4b7459e8e8..a01992fa60c8 100644 --- a/vcl/inc/unx/freetype_glyphcache.hxx +++ b/vcl/inc/unx/freetype_glyphcache.hxx @@ -58,7 +58,7 @@ public: int nFaceNum, sal_IntPtr nFontId); ~FreetypeFontInfo(); - const unsigned char* GetTable( const char*, sal_uLong* pLength=nullptr ) const; + const unsigned char* GetTable( const char*, sal_uLong* pLength) const; FT_FaceRec_* GetFaceFT(); void ReleaseFaceFT(); diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx index 4c0fd167904a..e16e3abc37ce 100644 --- a/xmloff/source/forms/formattributes.hxx +++ b/xmloff/source/forms/formattributes.hxx @@ -377,7 +377,7 @@ namespace xmloff void addEnumPropertyImpl( const sal_Char* _pAttributeName, const OUString& _rPropertyName, const SvXMLEnumMapEntry* _pValueMap, - const css::uno::Type* _pType = nullptr); + const css::uno::Type* _pType); /// some common code for the various add*Property methods AttributeAssignment& implAdd( const sal_Char* _pAttributeName, const OUString& _rPropertyName, diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx index 4dad377b9d8f..a0e3aa751d28 100644 --- a/xmloff/source/style/xmlbahdl.hxx +++ b/xmloff/source/style/xmlbahdl.hxx @@ -297,7 +297,7 @@ class XMLNumberWithoutZeroPropHdl : public XMLPropertyHandler { sal_Int8 nBytes; public: - explicit XMLNumberWithoutZeroPropHdl( sal_Int8 nB = 4 ); + explicit XMLNumberWithoutZeroPropHdl( sal_Int8 nB ); virtual ~XMLNumberWithoutZeroPropHdl() override; virtual bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override; @@ -312,6 +312,7 @@ public: class XMLNumberWithAutoInsteadZeroPropHdl : public XMLNumberWithoutZeroPropHdl { public: + explicit XMLNumberWithAutoInsteadZeroPropHdl() : XMLNumberWithoutZeroPropHdl(4) {} virtual ~XMLNumberWithAutoInsteadZeroPropHdl() override; virtual bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override; -- cgit