diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-03 16:49:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-03 21:32:05 +0200 |
commit | 98d7b40986afaf35894f8a7b36530975cae73fa9 (patch) | |
tree | 27f059b6118e93a0244b1945e76459bcb560b80d | |
parent | VBA tests- add functions STRING,STRREVERSE,SWITCH (diff) | |
download | core-98d7b40986afaf35894f8a7b36530975cae73fa9.tar.gz core-98d7b40986afaf35894f8a7b36530975cae73fa9.zip |
loplugin:constparams in sw part2
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7
Reviewed-on: https://gerrit.libreoffice.org/40735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
34 files changed, 55 insertions, 54 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index b79d9cd27ebf..4f683317f3a8 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -163,6 +163,7 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl) || name == "PyUNOStruct_getattr" || name == "GoNext" || name == "GoPrevious" + || name == "lcl_SetOtherLineHeight" // #ifdef win32 || name == "convert_slashes" // UNO component entry points diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index c908eeca490c..f87c82c6d549 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -453,7 +453,7 @@ protected: @param pChild the child to invalidate */ - void Invalidate( SwNumberTreeNode * pChild ); + void Invalidate( SwNumberTreeNode const * pChild ); /** Invalidation of all children diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index e9eb91a6b388..80630c5f0464 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -55,7 +55,7 @@ inline const SwFrameFormat *FindFrameFormat( const SdrObject *pObj ) { return ::FindFrameFormat( const_cast<SdrObject*>(pObj) ); } bool HasWrap( const SdrObject* pObj ); -void setContextWritingMode( SdrObject* pObj, SwFrame* pAnchor ); +void setContextWritingMode( SdrObject* pObj, SwFrame const * pAnchor ); /// @return BoundRect plus distance. SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj ); @@ -361,7 +361,7 @@ class SwDrawContact final : public SwContact virtual SdrObject* GetMaster() override; const SwFrame* GetAnchorFrame( const SdrObject* _pDrawObj = nullptr ) const; - SwFrame* GetAnchorFrame( SdrObject* _pDrawObj = nullptr ); + SwFrame* GetAnchorFrame( SdrObject const * _pDrawObj = nullptr ); const SwPageFrame* GetPageFrame() const { diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 0053e1efddf5..4b47f00bb5d7 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -377,7 +377,7 @@ private: typedef SwFormat* (SwDoc:: *FNCopyFormat)( const OUString&, SwFormat*, bool, bool ); SwFormat* CopyFormat( const SwFormat& rFormat, const SwFormatsBase& rFormatArr, FNCopyFormat fnCopyFormat, const SwFormat& rDfltFormat ); - void CopyFormatArr( const SwFormatsBase& rSourceArr, SwFormatsBase& rDestArr, + void CopyFormatArr( const SwFormatsBase& rSourceArr, SwFormatsBase const & rDestArr, FNCopyFormat fnCopyFormat, SwFormat& rDfltFormat ); void CopyPageDescHeaderFooterImpl( bool bCpyHeader, const SwFrameFormat& rSrcFormat, SwFrameFormat& rDestFormat ); @@ -655,7 +655,7 @@ public: spell-checking/hyphenating/word-counting */ css::uno::Any - Spell( SwPaM&, css::uno::Reference< css::linguistic2::XSpellChecker1 > &, + Spell( SwPaM&, css::uno::Reference< css::linguistic2::XSpellChecker1 > const &, sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck, SwConversionArgs *pConvArgs = nullptr ) const; @@ -775,7 +775,7 @@ public: SwCharFormat *MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast = false ); void DelCharFormat(size_t nFormat, bool bBroadcast = false); - void DelCharFormat(SwCharFormat* pFormat, bool bBroadcast = false); + void DelCharFormat(SwCharFormat const * pFormat, bool bBroadcast = false); SwCharFormat* FindCharFormatByName( const OUString& rName ) const { return static_cast<SwCharFormat*>(FindFormatByName( *mpCharFormatTable, rName )); } @@ -792,7 +792,7 @@ public: SwTextFormatColl *pDerivedFrom, bool bBroadcast = false); void DelTextFormatColl(size_t nFormat, bool bBroadcast = false); - void DelTextFormatColl( SwTextFormatColl* pColl, bool bBroadcast = false ); + void DelTextFormatColl( SwTextFormatColl const * pColl, bool bBroadcast = false ); /** Add 4th optional parameter <bResetListAttrs>. 'side effect' of <SetTextFormatColl> with <bReset = true> is that the hard attributes of the affected text nodes are cleared, except the break @@ -1246,7 +1246,7 @@ public: void ChkBoxNumFormat( SwTableBox& rAktBox, bool bCallUpdate ); void SetTableBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ); void ClearBoxNumAttrs( const SwNodeIndex& rNode ); - void ClearLineNumAttrs( SwPosition & rPos ); + void ClearLineNumAttrs( SwPosition const & rPos ); bool InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes, const SwTable* pCpyTable, bool bCpyName = false, diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx index c54ca8e0df33..f733280806d1 100644 --- a/sw/inc/dpage.hxx +++ b/sw/inc/dpage.hxx @@ -49,7 +49,7 @@ public: virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const tools::Rectangle *pRect) const override; - bool RequestHelp( vcl::Window* pWindow, SdrView* pView, const HelpEvent& rEvt ); + bool RequestHelp( vcl::Window* pWindow, SdrView const * pView, const HelpEvent& rEvt ); virtual css::uno::Reference< css::uno::XInterface > createUnoPage() override; diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index eebc176e1f54..a5d8c3f2694e 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -123,7 +123,7 @@ class SW_DLLPUBLIC SwNodes static void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd ); void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 ); - void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize, + void ChgNode( SwNodeIndex const & rDelPos, sal_uLong nSize, SwNodeIndex& rInsPos, bool bNewFrames ); void UpdateOutlineIdx( const SwNode& ); ///< Update all OutlineNodes starting from Node. diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index 89d8b1aa4b57..0e1a094e5764 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -47,7 +47,7 @@ class SW_DLLPUBLIC SwNoTextNode : public SwContentNode protected: SwNoTextNode( const SwNodeIndex &rWhere, const SwNodeType nNdType, - SwGrfFormatColl *pGrColl, SwAttrSet* pAutoAttr ); + SwGrfFormatColl *pGrColl, SwAttrSet const * pAutoAttr ); public: virtual ~SwNoTextNode() override; diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index 2797cf05a820..26ab90a5049f 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -94,7 +94,7 @@ struct SwSpellArgs : SwArgsBase bool bIsGrammarCheck; SwSpellArgs(css::uno::Reference< - css::linguistic2::XSpellChecker1 > &rxSplChk, + css::linguistic2::XSpellChecker1 > const &rxSplChk, SwTextNode* pStart, SwIndex& rStart, SwTextNode* pEnd, SwIndex& rEnd, bool bGrammar ) diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index e859b4565476..196f8bc11732 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -287,7 +287,7 @@ public: enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 }; void UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet, - UpdateFlags eFlags, SvNumberFormatter* ); + UpdateFlags eFlags, SvNumberFormatter const * ); void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags, SvNumberFormatter* ) const ; diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index db49d276740e..eba513190fcf 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -60,10 +60,10 @@ public: /// Does the same, but works on properties which lack an sw-specific WID / MemberID. static void syncProperty(SwFrameFormat* pShape, const OUString& rPropertyName, const css::uno::Any& rValue); /// Get a property of the underlying TextFrame. - static void getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue); + static void getProperty(SwFrameFormat const * pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue); /// Similar to syncProperty(), but used by the internal API (e.g. for UI purposes). - static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet); + static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const & rSet); /** * If we have an associated TextFrame, then return that. @@ -95,11 +95,11 @@ public: /// Count number of shapes in the document, excluding TextBoxes. static sal_Int32 getCount(const SwDoc* pDoc); /// Count number of shapes on the page, excluding TextBoxes. - static sal_Int32 getCount(SdrPage* pPage); + static sal_Int32 getCount(SdrPage const * pPage); /// Get a shape by index, excluding TextBoxes. /// /// @throws css::lang::IndexOutOfBoundsException - static css::uno::Any getByIndex(SdrPage* pPage, sal_Int32 nIndex); + static css::uno::Any getByIndex(SdrPage const * pPage, sal_Int32 nIndex); /// Get the order of the shape, excluding TextBoxes. static sal_Int32 getOrdNum(const SdrObject* pObject); /// If pTextBox is a textbox, then set rWrapThrough to the surround of its shape. diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index c606f7b34aea..f7d1364d0271 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -1063,7 +1063,7 @@ void SwNumberTreeNode::InvalidateTree() const (*aIt)->InvalidateTree(); } -void SwNumberTreeNode::Invalidate(SwNumberTreeNode * pChild) +void SwNumberTreeNode::Invalidate(SwNumberTreeNode const * pChild) { if (pChild->IsValid()) { diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 1d56dc7bd004..df6455ed33bc 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -401,7 +401,7 @@ namespace } } - void lcl_DeleteRedlines( const SwNodeRange& rRg, SwNodeRange& rCpyRg ) + void lcl_DeleteRedlines( const SwNodeRange& rRg, SwNodeRange const & rCpyRg ) { SwDoc* pSrcDoc = rRg.aStart.GetNode().GetDoc(); if( !pSrcDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 1b4c1db454db..333f301d3add 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -488,7 +488,7 @@ static void lcl_syncGrammarError( SwTextNode &rTextNode, linguistic2::Proofreadi } uno::Any SwDoc::Spell( SwPaM& rPaM, - uno::Reference< XSpellChecker1 > &xSpeller, + uno::Reference< XSpellChecker1 > const &xSpeller, sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck, SwConversionArgs *pConvArgs ) const diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 42e841b080cd..4af2f5a069bc 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -695,7 +695,7 @@ void SwDoc::DelCharFormat(size_t nFormat, bool bBroadcast) getIDocumentState().SetModified(); } -void SwDoc::DelCharFormat( SwCharFormat *pFormat, bool bBroadcast ) +void SwDoc::DelCharFormat( SwCharFormat const *pFormat, bool bBroadcast ) { size_t nFormat = mpCharFormatTable->GetPos( pFormat ); OSL_ENSURE( SIZE_MAX != nFormat, "Format not found," ); @@ -999,7 +999,7 @@ void SwDoc::DelTextFormatColl(size_t nFormatColl, bool bBroadcast) getIDocumentState().SetModified(); } -void SwDoc::DelTextFormatColl( SwTextFormatColl *pColl, bool bBroadcast ) +void SwDoc::DelTextFormatColl( SwTextFormatColl const *pColl, bool bBroadcast ) { size_t nFormat = mpTextFormatCollTable->GetPos( pColl ); OSL_ENSURE( SIZE_MAX != nFormat, "Collection not found," ); @@ -1259,7 +1259,7 @@ SwGrfFormatColl* SwDoc::CopyGrfColl( const SwGrfFormatColl& rColl ) } void SwDoc::CopyFormatArr( const SwFormatsBase& rSourceArr, - SwFormatsBase& rDestArr, + SwFormatsBase const & rDestArr, FNCopyFormat fnCopyFormat, SwFormat& rDfltFormat ) { diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index f1580189c70f..f0315919c54b 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -83,7 +83,7 @@ bool SwDoc::GenerateHTMLDoc( const OUString& rPath, } // two helpers for outline mode -SwNodePtr GetStartNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl ) +SwNodePtr GetStartNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl ) { SwNodePtr pNd; @@ -96,7 +96,7 @@ SwNodePtr GetStartNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, SwOutlineNo return nullptr; } -SwNodePtr GetEndNode( SwOutlineNodes* pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl ) +SwNodePtr GetEndNode( SwOutlineNodes const * pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type* nOutl ) { SwNodePtr pNd; diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index f505955e1a68..5a53fc42f25a 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -176,7 +176,7 @@ void StartGrammarChecking( SwDoc &rDoc ) /* * internal functions */ -static void lcl_DelFormatIndices( SwFormat* pFormat ) +static void lcl_DelFormatIndices( SwFormat const * pFormat ) { SwFormatContent &rFormatContent = const_cast<SwFormatContent&>(pFormat->GetContent()); if ( rFormatContent.GetContentIdx() ) diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 7b31716d7b60..7d9d8e5bb2d4 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -426,7 +426,7 @@ SwFrameFormat *SwHTMLTableLayout::FindFlyFrameFormat() const static void lcl_GetMinMaxSize( sal_uLong& rMinNoAlignCnts, sal_uLong& rMaxNoAlignCnts, sal_uLong& rAbsMinNoAlignCnts, - SwTextNode *pTextNd, sal_uLong nIdx, bool bNoBreak ) + SwTextNode const *pTextNd, sal_uLong nIdx, bool bNoBreak ) { pTextNd->GetMinMaxSize( nIdx, rMinNoAlignCnts, rMaxNoAlignCnts, rAbsMinNoAlignCnts ); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 2b35ede3754c..5baaef5e68da 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -680,7 +680,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } } -static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, vcl::RenderContext* pOut ) +static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, vcl::RenderContext const * pOut ) { if(!pOut) diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx index 483ca3885d3d..c5cf9eeeae4a 100644 --- a/sw/source/core/doc/swstylemanager.cxx +++ b/sw/source/core/doc/swstylemanager.cxx @@ -63,7 +63,7 @@ class SwStyleManager : public IStyleAccess public: // accept empty item set for ignorable paragraph items. - explicit SwStyleManager( SfxItemSet* pIgnorableParagraphItems ) + explicit SwStyleManager( SfxItemSet const * pIgnorableParagraphItems ) : aAutoCharPool(), aAutoParaPool( pIgnorableParagraphItems ), mpCharCache(nullptr), @@ -81,7 +81,7 @@ public: virtual void clearCaches() override; }; -IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems ) +IStyleAccess *createStyleManager( SfxItemSet const * pIgnorableParagraphItems ) { return new SwStyleManager( pIgnorableParagraphItems ); } diff --git a/sw/source/core/doc/swstylemanager.hxx b/sw/source/core/doc/swstylemanager.hxx index 97f66fc1be26..9b6aa18d4244 100644 --- a/sw/source/core/doc/swstylemanager.hxx +++ b/sw/source/core/doc/swstylemanager.hxx @@ -23,7 +23,7 @@ class IStyleAccess; class SfxItemSet; -IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems ); +IStyleAccess *createStyleManager( SfxItemSet const * pIgnorableParagraphItems ); #endif // INCLUDED_SW_SOURCE_CORE_DOC_SWSTYLEMANAGER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index aa28328107fc..59afa9ac4f00 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -723,7 +723,7 @@ const SwBoxAutoFormat& SwTableAutoFormat::GetDefaultBoxFormat() void SwTableAutoFormat::UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet, UpdateFlags eFlags, - SvNumberFormatter* pNFormatr) + SvNumberFormatter const * pNFormatr) { OSL_ENSURE( nPos < 16, "wrong area" ); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 3f84d961d5cd..4c2e12ce9e39 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -154,7 +154,7 @@ bool SwTextBoxHelper::isTextBox(const SdrObject* pObject) return isTextBox(pVirtFlyDrawObj->GetFormat(), RES_FLYFRMFMT); } -sal_Int32 SwTextBoxHelper::getCount(SdrPage* pPage) +sal_Int32 SwTextBoxHelper::getCount(SdrPage const * pPage) { sal_Int32 nRet = 0; for (std::size_t i = 0; i < pPage->GetObjCount(); ++i) @@ -178,7 +178,7 @@ sal_Int32 SwTextBoxHelper::getCount(const SwDoc* pDoc) return nRet; } -uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex) +uno::Any SwTextBoxHelper::getByIndex(SdrPage const * pPage, sal_Int32 nIndex) { if (nIndex < 0) throw lang::IndexOutOfBoundsException(); @@ -362,7 +362,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope syncProperty(pShape, RES_BOX, BOTTOM_BORDER_DISTANCE, rValue); } -void SwTextBoxHelper::getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue) +void SwTextBoxHelper::getProperty(SwFrameFormat const * pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue) { if (!pShape) return; @@ -594,7 +594,7 @@ void SwTextBoxHelper::restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrame } } -void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) +void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const & rSet) { if (SwFrameFormat* pFormat = getOtherTextBoxFormat(&rShape, RES_DRAWFRMFMT)) { diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index 491ce495e59c..94f52fa8024d 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -148,7 +148,7 @@ void SAL_CALL CancelJobsThread::run() class TerminateOfficeThread : public osl::Thread { public: - TerminateOfficeThread( CancelJobsThread& rCancelJobsThread, + TerminateOfficeThread( CancelJobsThread const & rCancelJobsThread, css::uno::Reference< css::uno::XComponentContext > const & xContext ) : osl::Thread(), maMutex(), diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 3c3938857945..ccb1533cf59e 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -39,7 +39,7 @@ SwNoTextNode::SwNoTextNode( const SwNodeIndex & rWhere, const SwNodeType nNdType, SwGrfFormatColl *pGrfColl, - SwAttrSet* pAutoAttr ) : + SwAttrSet const * pAutoAttr ) : SwContentNode( rWhere, nNdType, pGrfColl ), pContour( nullptr ), bAutomaticContour( false ), diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 6272761c0a17..211c30e76838 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -61,7 +61,7 @@ // #i21457# - new implementation of local method <lcl_IsInSameTableBox(..)>. // Method now determines the previous/next on its own. Thus, it can be controlled, // for which previous/next is checked, if it's visible. -static bool lcl_IsInSameTableBox( SwNodes& _rNds, +static bool lcl_IsInSameTableBox( SwNodes const & _rNds, const SwNode& _rNd, const bool _bPrev ) { @@ -128,7 +128,7 @@ static bool lcl_IsInSameTableBox( SwNodes& _rNds, return true; } -static void lcl_CheckEmptyLayFrame( SwNodes& rNds, SwSectionData& rSectionData, +static void lcl_CheckEmptyLayFrame( SwNodes const & rNds, SwSectionData& rSectionData, const SwNode& rStt, const SwNode& rEnd ) { SwNodeIndex aIdx( rStt ); diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index a1f7a5e28547..a1340bcfa78e 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2573,7 +2573,7 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const return ( s1 < s2 && std::abs( s1 - s2 ) > ROWFUZZY ); } -static bool lcl_IsFrameInColumn( const SwCellFrame& rFrame, SwSelBoxes& rBoxes ) +static bool lcl_IsFrameInColumn( const SwCellFrame& rFrame, SwSelBoxes const & rBoxes ) { for (size_t i = 0; i < rBoxes.size(); ++i) { @@ -4213,7 +4213,7 @@ void SwDoc::SetTableBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ) getIDocumentState().SetModified(); } -void SwDoc::ClearLineNumAttrs( SwPosition & rPos ) +void SwDoc::ClearLineNumAttrs( SwPosition const & rPos ) { SwPaM aPam(rPos); aPam.Move(fnMoveBackward); diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index ce875b467711..964f5f7d2f93 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -69,7 +69,7 @@ public: SwTableFormatCmp( SwFrameFormat *pOld, SwFrameFormat *pNew, sal_Int16 nType ); - static SwFrameFormat *FindNewFormat( std::vector<SwTableFormatCmp*> &rArr, SwFrameFormat*pOld, sal_Int16 nType ); + static SwFrameFormat *FindNewFormat( std::vector<SwTableFormatCmp*> &rArr, SwFrameFormat const *pOld, sal_Int16 nType ); static void Delete( std::vector<SwTableFormatCmp*> &rArr ); }; @@ -78,7 +78,7 @@ SwTableFormatCmp::SwTableFormatCmp( SwFrameFormat *pO, SwFrameFormat *pN, sal_In { } -SwFrameFormat *SwTableFormatCmp::FindNewFormat( std::vector<SwTableFormatCmp*> &rArr, SwFrameFormat *pOld, sal_Int16 nType ) +SwFrameFormat *SwTableFormatCmp::FindNewFormat( std::vector<SwTableFormatCmp*> &rArr, SwFrameFormat const *pOld, sal_Int16 nType ) { for ( auto pCmp : rArr ) { diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 33f3ccd908c1..b4ee2e677631 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -84,7 +84,7 @@ namespace AttrSetHandleHelper void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNode, - SwAttrSet& rNewAttrSet ) + SwAttrSet const & rNewAttrSet ) { const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(rpAttrSet.get()); if( rNode.GetModifyAtAttr() ) diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 34d66e71d022..b569004a776b 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -113,7 +113,7 @@ SwNodes::~SwNodes() delete m_pEndOfContent; } -void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, +void SwNodes::ChgNode( SwNodeIndex const & rDelPos, sal_uLong nSz, SwNodeIndex& rInsPos, bool bNewFrames ) { // no need for frames in the UndoArea diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx index 7be5fb769a2d..e6b2b70d3034 100644 --- a/sw/source/core/docnode/threadmanager.cxx +++ b/sw/source/core/docnode/threadmanager.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star; */ const std::deque< ThreadManager::tThreadData >::size_type ThreadManager::mnStartedSize = 10; -ThreadManager::ThreadManager( uno::Reference< util::XJobManager >& rThreadJoiner ) +ThreadManager::ThreadManager( uno::Reference< util::XJobManager > const & rThreadJoiner ) : maMutex(), mrThreadJoiner( rThreadJoiner ), mpThreadListener(), diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index c98d06ead6bd..d3bfb40546e1 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -96,7 +96,7 @@ namespace }; } -void setContextWritingMode(SdrObject* pObj, SwFrame* pAnchor) +void setContextWritingMode(SdrObject* pObj, SwFrame const * pAnchor) { if(!pObj || !pAnchor) return; @@ -398,7 +398,7 @@ sal_uInt32 SwContact::GetMaxOrdNum() const namespace { - Point lcl_GetWW8Pos(SwAnchoredObject* pAnchoredObj, const bool bFollowTextFlow, sw::WW8AnchorConv& reConv) + Point lcl_GetWW8Pos(SwAnchoredObject const * pAnchoredObj, const bool bFollowTextFlow, sw::WW8AnchorConv& reConv) { switch(reConv) { @@ -798,7 +798,7 @@ const SwFrame* SwDrawContact::GetAnchorFrame( const SdrObject* _pDrawObj ) const return pAnchorFrame; } -SwFrame* SwDrawContact::GetAnchorFrame(SdrObject *const pDrawObj) +SwFrame* SwDrawContact::GetAnchorFrame(SdrObject const *const pDrawObj) { return const_cast<SwFrame *>(const_cast<SwDrawContact const*>(this)->GetAnchorFrame(pDrawObj)); } @@ -902,7 +902,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const tools::Rectangle* pOldBound } /// local method to notify the background for a drawing object - #i26791# -static void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact, +static void lcl_NotifyBackgroundOfObj( SwDrawContact const & _rDrawContact, const SdrObject& _rObj, const tools::Rectangle* _pOldObjRect ) { diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 885663d3c0c7..c94f293ed876 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -388,7 +388,7 @@ namespace class RestoreMapMode { public: - explicit RestoreMapMode( SwViewShell* pViewShell ) + explicit RestoreMapMode( SwViewShell const * pViewShell ) : mbMapModeRestored( false ) , mpOutDev( pViewShell->GetOut() ) { diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 5c2c42ca8d99..b379362e4688 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -167,7 +167,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( return pGridLst.get(); } -bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, +bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView, const HelpEvent& rEvt ) { assert( pDoc ); diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx index f52d26feb06a..df715a8b1c4b 100644 --- a/sw/source/core/inc/threadmanager.hxx +++ b/sw/source/core/inc/threadmanager.hxx @@ -47,7 +47,7 @@ class ThreadManager final { public: - explicit ThreadManager( css::uno::Reference< css::util::XJobManager >& rThreadJoiner ); + explicit ThreadManager( css::uno::Reference< css::util::XJobManager > const & rThreadJoiner ); ~ThreadManager(); std::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef(); |