diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-14 09:01:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-14 08:47:06 +0000 |
commit | 20a9e101d909cb1953101e5962b74731e1265400 (patch) | |
tree | 4e2516dcb7a5e19efb36fc4c2560b9211af83ce9 /sw | |
parent | 0761f97525b3f3ce2cd73f8db28bf389a3c44f57 (diff) |
loplugin:constantparam
clean up the plugin a little, and try to catch params which are default
constructed, which doesn't seem to be working yet
Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12
Reviewed-on: https://gerrit.libreoffice.org/28861
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fesh.hxx | 7 | ||||
-rw-r--r-- | sw/inc/ftninfo.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docftn.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/inc/fltshell.hxx | 5 |
5 files changed, 11 insertions, 20 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 1c17dcf2293e..4ee0a6a60391 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -570,9 +570,7 @@ public: void Insert(const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, - const SfxItemSet* pFlyAttrSet = nullptr, - const SfxItemSet* pGrfAttrSet = nullptr, - SwFrameFormat* = nullptr ); + const SfxItemSet* pFlyAttrSet = nullptr ); /// Insertion of a drawing object which have to be already inserted in the DrawModel. void InsertDrawObj( SdrObject& rDrawObj, @@ -624,8 +622,7 @@ public: bool GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const; SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&, - const SfxItemSet* pFlyAttrSet, - SwFrameFormat* = nullptr ); + const SfxItemSet* pFlyAttrSet ); bool FinishOLEObj(); ///< Shutdown server. void GetTableAttr( SfxItemSet & ) const; diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx index 585130cdcd19..3c5af525c25a 100644 --- a/sw/inc/ftninfo.hxx +++ b/sw/inc/ftninfo.hxx @@ -63,7 +63,7 @@ public: SwEndNoteInfo & operator=(const SwEndNoteInfo&); bool operator==( const SwEndNoteInfo &rInf ) const; - SwEndNoteInfo( SwTextFormatColl *pTextColl = nullptr); + SwEndNoteInfo(); SwEndNoteInfo(const SwEndNoteInfo&); const OUString& GetPrefix() const { return sPrefix; } diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 522a90839c5c..d2896ac69ad3 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -106,8 +106,8 @@ SwEndNoteInfo::SwEndNoteInfo(const SwEndNoteInfo& rInfo) : &aAnchorCharFormatDep ); } -SwEndNoteInfo::SwEndNoteInfo(SwTextFormatColl *pFormat) : - SwClient(pFormat), +SwEndNoteInfo::SwEndNoteInfo() : + SwClient(nullptr), aPageDescDep( this, nullptr ), aCharFormatDep( this, nullptr ), aAnchorCharFormatDep( this, nullptr ), @@ -240,7 +240,7 @@ SwFootnoteInfo::SwFootnoteInfo(const SwFootnoteInfo& rInfo) : } SwFootnoteInfo::SwFootnoteInfo() : - SwEndNoteInfo( nullptr ), + SwEndNoteInfo(), ePos( FTNPOS_PAGE ), eNum( FTNNUM_DOC ) { diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index b10233f058f4..5c1179ac10ef 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -767,9 +767,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, - const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, - SwFrameFormat* pFrameFormat ) + const SfxItemSet* pFlyAttrSet ) { SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); @@ -821,7 +819,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, pFormat = GetDoc()->getIDocumentContentOperations().Insert(*pCursor, rGrfName, rFltName, pGraphic, pFlyAttrSet, - pGrfAttrSet, pFrameFormat ); + nullptr, nullptr ); OSL_ENSURE( pFormat, "Doc->getIDocumentContentOperations().Insert(notxt) failed." ); pCursor = dynamic_cast<SwShellCursor*>(pCursor->GetNext()); @@ -850,8 +848,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, } SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, - const SfxItemSet* pFlyAttrSet, - SwFrameFormat* pFrameFormat ) + const SfxItemSet* pFlyAttrSet ) { SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); @@ -859,7 +856,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { pFormat = GetDoc()->getIDocumentContentOperations().Insert(rPaM, xObj, - pFlyAttrSet, nullptr, pFrameFormat ); + pFlyAttrSet, nullptr, nullptr ); OSL_ENSURE( pFormat, "Doc->getIDocumentContentOperations().Insert(notxt) failed." ); } diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 7ad69c20429c..bd669dd5ce0a 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -235,15 +235,12 @@ public: sal_uInt16 nAutorNo_, const DateTime& rStamp_, RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT, - sal_uInt16 nAutorNoPrev_ = USHRT_MAX, - const DateTime* pStampPrev_ = nullptr) + sal_uInt16 nAutorNoPrev_ = USHRT_MAX) : SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_), aStampPrev( DateTime::EMPTY ), eType(eType_), eTypePrev(eTypePrev_), nAutorNo(nAutorNo_), nAutorNoPrev(nAutorNoPrev_) { - if( pStampPrev_ ) - aStampPrev = *pStampPrev_; } SwFltRedline(const SwFltRedline& rCpy): |