diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-04 10:15:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-04 11:55:27 +0200 |
commit | 902d87147d779c84b4ea84ef7779897d89b1fab2 (patch) | |
tree | 3ed603fedf6db10111a3f47202d83c5b223eff65 | |
parent | bca55386e187e2cb4ab277a597a420f15c6cebcf (diff) |
loplugin:constparams in sw part3
Change-Id: I05ad3204af4e6ec3c832b185a1b35fdb75a229b2
Reviewed-on: https://gerrit.libreoffice.org/40760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
35 files changed, 84 insertions, 75 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index 4f683317f3a8..f0f4baf761b4 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -164,6 +164,15 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl) || name == "GoNext" || name == "GoPrevious" || name == "lcl_SetOtherLineHeight" + || name == "BoxNmsToPtr" + || name == "PtrToBoxNms" + || name == "RelNmsToBoxNms" + || name == "RelBoxNmsToPtr" + || name == "BoxNmsToRelNm" + || name == "MakeFormula_" + || name == "GetFormulaBoxes" + || name == "HasValidBoxes_" + || name == "SplitMergeBoxNm_" // #ifdef win32 || name == "convert_slashes" // UNO component entry points diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx index 8261c86c16d6..576efa46890f 100644 --- a/sw/inc/HandleAnchorNodeChg.hxx +++ b/sw/inc/HandleAnchorNodeChg.hxx @@ -49,7 +49,7 @@ public: */ SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat, const SwFormatAnchor& _rNewAnchorFormat, - SwFlyFrame* _pKeepThisFlyFrame = nullptr ); + SwFlyFrame const * _pKeepThisFlyFrame = nullptr ); /** calls <SwFlyFrameFormat::MakeFrames>, if re-creation of fly frames is necessary. diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index 2696ef619b26..653e43f96e6a 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -129,7 +129,7 @@ public: sal_uInt16 GetSortKeyCount() const ; const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ; - void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]); + void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const nKeys[]); //initui.cxx static OUString GetAuthFieldName(ToxAuthorityField eType); diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 62318b162b34..b751fcc76345 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -106,7 +106,7 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; - static bool FormatValue( SvNumberFormatter* pDocFormatter, OUString &aString, sal_uInt32 nFormat, + static bool FormatValue( SvNumberFormatter* pDocFormatter, OUString const &aString, sal_uInt32 nFormat, double &aNumber, sal_Int32 nColumnType, SwDBField *pField = nullptr ); }; @@ -167,7 +167,7 @@ public: virtual OUString Expand() const override; virtual SwField* Copy() const override; - void Evaluate(SwDoc*); + void Evaluate(SwDoc const *); inline void SetCondValid(bool bCond); inline bool IsCondValid() const; @@ -209,7 +209,7 @@ public: inline bool IsCondValid() const; inline void SetCondValid(bool bCond); - void Evaluate(SwDoc*); + void Evaluate(SwDoc const *); // Condition virtual OUString GetPar1() const override; @@ -271,7 +271,7 @@ public: virtual OUString Expand() const override; virtual SwField* Copy() const override; - void Evaluate(SwDoc*); + void Evaluate(SwDoc const *); inline long GetSetNumber() const; inline void SetSetNumber(long nNum); diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index b1fb68ff9785..19535cfa395f 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -596,7 +596,7 @@ class SwRefPageGetFieldType : public SwFieldType SwDoc* pDoc; sal_Int16 nNumberingType; - void UpdateField( SwTextField* pTextField, SetGetExpFields& rSetList ); + void UpdateField( SwTextField const * pTextField, SetGetExpFields const & rSetList ); protected: /// overwritten to update all RefPageGet fields virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 7e2d8b739427..85ad57b560fa 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -377,7 +377,7 @@ public: /// Verify the paragraph at the cursor. void VerifyParagraph(SwPaM* pPaM); - void Insert2(SwField&, const bool bForceExpandHints); + void Insert2(SwField const &, const bool bForceExpandHints); void UpdateFields( SwField & ); ///< One single field. @@ -388,7 +388,7 @@ public: void RemoveFieldType(size_t nField); void RemoveFieldType(SwFieldIds nResId, const OUString& rName); - void FieldToText( SwFieldType* pType ); + void FieldToText( SwFieldType const * pType ); void ChangeAuthorityData(const SwAuthEntry* pNewData); @@ -399,7 +399,7 @@ public: void ChangeDBFields( const std::vector<OUString>& rOldNames, const OUString& rNewName ); void GetAllUsedDB( std::vector<OUString>& rDBNameList, - std::vector<OUString>* pAllDBNames ); + std::vector<OUString> const * pAllDBNames ); bool IsAnyDatabaseFieldInDoc()const; @@ -430,7 +430,7 @@ public: void Insert(const SwTOXMark& rMark); - void DeleteTOXMark(SwTOXMark* pMark); + void DeleteTOXMark(SwTOXMark const * pMark); /// Get all marks at current SPoint. void GetCurTOXMarks(SwTOXMarks& rMarks) const ; @@ -743,10 +743,10 @@ public: SwDocPositions eCurr, SwConversionArgs *pConvArgs = nullptr ); /// Restore selections. - void SpellEnd( SwConversionArgs *pConvArgs = nullptr, bool bRestoreSelection = true ); + void SpellEnd( SwConversionArgs const *pConvArgs = nullptr, bool bRestoreSelection = true ); css::uno::Any SpellContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt, - SwConversionArgs *pConvArgs ); + SwConversionArgs const *pConvArgs ); /** Spells on a sentence basis - the SpellPortions are needed @return false if no error could be found. */ @@ -792,7 +792,7 @@ public: /// Call AutoCorrect void AutoCorrect( SvxAutoCorrect& rACorr, bool bInsertMode, sal_Unicode cChar ); - bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, OUString& rWord ); + bool GetPrevAutoCorrWord( SvxAutoCorrect const & rACorr, OUString& rWord ); /// Set our styles according to the respective rules. void AutoFormat( const SvxSwAutoFormatFlags* pAFlags ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index cd4b562bd7da..a196e46b7fc0 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -391,7 +391,7 @@ public: bool IsFrameVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const; SwFrameFormat* GetSelectedFrameFormat() const; ///< If frame then frame style, else 0. - void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = nullptr ); ///< If frame then set frame style. + void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point const * pDocPos = nullptr ); ///< If frame then set frame style. // Get selected fly SwFlyFrame* GetSelectedFlyFrame() const; @@ -805,7 +805,7 @@ public: const Point& _rDocPos ); void ToggleHeaderFooterEdit( ); - static void SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlotId); + static void SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj, sal_uInt16 nSlotId); }; void ClearFEShellTabCols(); diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index a5d8c3f2694e..a2cddd0133bc 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -220,7 +220,7 @@ public: const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl *pColl, - SwAttrSet* pAutoAttr = nullptr, + SwAttrSet const * pAutoAttr = nullptr, bool bDelayed = false ); ///< in ndgrf.cxx static SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 60ae5ca36cb4..4676395dfae3 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -56,16 +56,16 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTextNode const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl* pGrfColl, - SwAttrSet* pAutoAttr ); + SwAttrSet const * pAutoAttr ); ///< Ctor for reading (SW/G) without graphics. SwGrfNode( const SwNodeIndex& rWhere, const OUString& rGrfName, const OUString& rFltName, SwGrfFormatColl* pGrfColl, - SwAttrSet* pAutoAttr ); + SwAttrSet const * pAutoAttr ); SwGrfNode( const SwNodeIndex& rWhere, const GraphicObject& rGrfObj, SwGrfFormatColl* pGrfColl, - SwAttrSet* pAutoAttr ); + SwAttrSet const * pAutoAttr ); void InsertLink( const OUString& rGrfName, const OUString& rFltName ); bool ImportGraphic( SvStream& rStrm ); diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index b2a15b34c601..e958a24b0d50 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -44,7 +44,7 @@ class PaMIntoCursorShellRing SwPaM* pPrevDelPam; SwPaM* pPrevCursor; - static void RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ); + static void RemoveFromRing( SwPaM& rPam, SwPaM const * pPrev ); public: PaMIntoCursorShellRing( SwCursorShell& rSh, SwPaM& rCursor, SwPaM& rPam ); ~PaMIntoCursorShellRing(); @@ -70,7 +70,7 @@ PaMIntoCursorShellRing::~PaMIntoCursorShellRing() RemoveFromRing( rCursor, pPrevCursor ); } -void PaMIntoCursorShellRing::RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ) +void PaMIntoCursorShellRing::RemoveFromRing( SwPaM& rPam, SwPaM const * pPrev ) { SwPaM* p; SwPaM* pNext = &rPam; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 9466da7e0bbd..2dcae5d94d73 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -232,8 +232,8 @@ class SwAutoFormat } public: - SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, - SwNodeIndex* pSttNd = nullptr, SwNodeIndex* pEndNd = nullptr ); + SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const & rFlags, + SwNodeIndex const * pSttNd = nullptr, SwNodeIndex const * pEndNd = nullptr ); }; const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c ) @@ -2087,8 +2087,8 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) ClearRedlineText(); } -SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, - SwNodeIndex* pSttNd, SwNodeIndex* pEndNd ) +SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const & rFlags, + SwNodeIndex const * pSttNd, SwNodeIndex const * pEndNd ) : m_aFlags( rFlags ), m_aDelPam( pEdShell->GetDoc()->GetNodes().GetEndOfExtras() ), m_aNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfExtras(), +1 ), diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 6dfbded172ff..c91d8e08712e 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -71,7 +71,7 @@ namespace { /// Find all page styles which are currently used in the document. -std::set<OUString> lcl_getUsedPageStyles(SwViewShell* pShell) +std::set<OUString> lcl_getUsedPageStyles(SwViewShell const * pShell) { std::set<OUString> aRet; diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index e5442a77deaa..c901cbe9f005 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -122,7 +122,7 @@ void SwEditShell::RemoveFieldType(SwFieldIds nResId, const OUString& rStr) } } -void SwEditShell::FieldToText( SwFieldType* pType ) +void SwEditShell::FieldToText( SwFieldType const * pType ) { if( !pType->HasWriterListeners() ) return; @@ -147,7 +147,7 @@ void SwEditShell::FieldToText( SwFieldType* pType ) } /// add a field at the cursor position -void SwEditShell::Insert2(SwField& rField, const bool bForceExpandHints) +void SwEditShell::Insert2(SwField const & rField, const bool bForceExpandHints) { SET_CURR_SHELL( this ); StartAllAction(); @@ -311,7 +311,7 @@ void SwEditShell::ChgDBData(const SwDBData& rNewData) } void SwEditShell::GetAllUsedDB( std::vector<OUString>& rDBNameList, - std::vector<OUString>* pAllDBNames ) + std::vector<OUString> const * pAllDBNames ) { GetDoc()->GetAllUsedDB( rDBNameList, pAllDBNames ); } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d8fe4bbbfb41..94186299947a 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -655,7 +655,7 @@ void SwEditShell::SpellStart( g_pConvIter->Start( this, eStart, eEnd ); } -void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection ) +void SwEditShell::SpellEnd( SwConversionArgs const *pConvArgs, bool bRestoreSelection ) { if (!pConvArgs && g_pSpellIter && g_pSpellIter->GetSh() == this) { @@ -674,7 +674,7 @@ void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection /// @returns SPL_ return values as in splchk.hxx uno::Any SwEditShell::SpellContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt, - SwConversionArgs *pConvArgs ) + SwConversionArgs const *pConvArgs ) { uno::Any aRes; @@ -1262,7 +1262,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b /** Collect all deleted redlines of the current text node * beginning at the start of the cursor position */ -static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh) +static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh) { SpellContentPositions aRedlines; SwDoc* pDoc = pSh->GetDoc(); @@ -1302,7 +1302,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh) } /// remove the redline positions after the current selection -static void lcl_CutRedlines( SpellContentPositions& aDeletedRedlines, SwEditShell* pSh ) +static void lcl_CutRedlines( SpellContentPositions& aDeletedRedlines, SwEditShell const * pSh ) { if(!aDeletedRedlines.empty()) { diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index fd0fab3b7700..ec4b672bf7a0 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -80,7 +80,7 @@ void SwEditShell::Insert(const SwTOXMark& rMark) EndAllAction(); } -void SwEditShell::DeleteTOXMark( SwTOXMark* pMark ) +void SwEditShell::DeleteTOXMark( SwTOXMark const * pMark ) { SET_CURR_SHELL( this ); StartAllAction(); diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 13edb1325851..46e5e48687fe 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -268,7 +268,7 @@ void SwEditShell::SetNewDoc() GetDoc()->getIDocumentState().SetNewDoc(true); } -bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, OUString& rWord ) +bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect const & rACorr, OUString& rWord ) { SET_CURR_SHELL( this ); diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 2945f4d93fd8..df38e7b9674b 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -487,7 +487,7 @@ const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const return nullptr; } -void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[]) +void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const aKeys[]) { m_SortKeyArr.clear(); for(sal_uInt16 i = 0; i < nKeyCount; i++) diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 84f76590b1dd..7d7e4cf840fb 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -601,7 +601,7 @@ void SwTableFormula::ToRelBoxNm( const SwTable* pTable ) } OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTable, - void* pPara ) const + void* pPara ) const { OUString aStr; sal_Int32 nFormula = 0; diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index d77b6d25927b..422a55bd138d 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -264,7 +264,7 @@ SwFieldType* SwDBField::ChgTyp( SwFieldType* pNewType ) return pOld; } -bool SwDBField::FormatValue( SvNumberFormatter* pDocFormatter, OUString &aString, sal_uInt32 nFormat, +bool SwDBField::FormatValue( SvNumberFormatter* pDocFormatter, OUString const &aString, sal_uInt32 nFormat, double &aNumber, sal_Int32 nColumnType, SwDBField *pField ) { bool bValidValue = false; @@ -582,7 +582,7 @@ SwField* SwDBNextSetField::Copy() const return pTmp; } -void SwDBNextSetField::Evaluate(SwDoc* pDoc) +void SwDBNextSetField::Evaluate(SwDoc const * pDoc) { SwDBManager* pMgr = pDoc->GetDBManager(); const SwDBData& rData = GetDBData(); @@ -669,7 +669,7 @@ SwField* SwDBNumSetField::Copy() const return pTmp; } -void SwDBNumSetField::Evaluate(SwDoc* pDoc) +void SwDBNumSetField::Evaluate(SwDoc const * pDoc) { SwDBManager* pMgr = pDoc->GetDBManager(); const SwDBData& aTmpData = GetDBData(); @@ -819,7 +819,7 @@ OUString SwDBSetNumberField::Expand() const return FormatNumber(nNumber, (SvxNumType)GetFormat()); } -void SwDBSetNumberField::Evaluate(SwDoc* pDoc) +void SwDBSetNumberField::Evaluate(SwDoc const * pDoc) { SwDBManager* pMgr = pDoc->GetDBManager(); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 969ac29d08bb..f04aed5e2044 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -2129,8 +2129,8 @@ bool SwRefPageGetFieldType::MakeSetList( SetGetExpFields& rTmpLst ) return !rTmpLst.empty(); } -void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField, - SetGetExpFields& rSetList ) +void SwRefPageGetFieldType::UpdateField( SwTextField const * pTextField, + SetGetExpFields const & rSetList ) { SwRefPageGetField* pGetField = const_cast<SwRefPageGetField*>(static_cast<const SwRefPageGetField*>(pTextField->GetFormatField().GetField())); pGetField->SetText( OUString() ); diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index 565eb8f9ef01..2bffe90f0f0c 100644 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -135,7 +135,7 @@ SvxTextForwarder* SwTextAPIEditSource::GetTextForwarder() return pImpl->mpTextForwarder; } -void SwTextAPIEditSource::SetText( OutlinerParaObject& rText ) +void SwTextAPIEditSource::SetText( OutlinerParaObject const & rText ) { if ( pImpl->mpPool ) { diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index b091eeba134b..4e015c1df804 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -252,8 +252,8 @@ static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt ) return pFrame->Frame().Pos(); } -static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame* pFly, - const Point& rInsPt, SwFEShell& rDestShell, SwFormatAnchor& rAnchor, +static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame const * pFly, + const Point& rInsPt, SwFEShell const & rDestShell, SwFormatAnchor& rAnchor, Point& rNewPos, bool bCheckFlyRecur ) { bool bRet = true; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index dd34c7002f26..6f012705c491 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1151,7 +1151,7 @@ SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const return pRet; } -void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos ) +void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point const * pDocPos ) { SwFlyFrame *pFly = nullptr; if(pDocPos) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 3fca3c3782b7..bee5e916cae0 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -110,7 +110,7 @@ using namespace com::sun::star; namespace { -::basegfx::B2DPolyPolygon getPolygon(const char* pResId, SdrModel* pDoc) +::basegfx::B2DPolyPolygon getPolygon(const char* pResId, SdrModel const * pDoc) { ::basegfx::B2DPolyPolygon aRetval; XLineEndListRef pLineEndList = pDoc->GetLineEndList(); @@ -889,7 +889,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) } } -void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlotId) +void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj, sal_uInt16 nSlotId) { SdrModel *pDoc = pObj->GetModel(); diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 5cd20aa37c2c..5105e919de27 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2012,7 +2012,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, // into a new structure, retaining the table structure // new: SS for targeted erasing/restoring of the layout -static void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrame *pUpper, SwFrame *pSibling ) +static void lcl_InsertRow( SwTableLine const &rLine, SwLayoutFrame *pUpper, SwFrame *pSibling ) { SwRowFrame *pRow = new SwRowFrame( rLine, pUpper ); if ( pUpper->IsTabFrame() && static_cast<SwTabFrame*>(pUpper)->IsFollow() ) diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index c16c548ca626..8501948cdd99 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -63,7 +63,7 @@ SwGrfNode::SwGrfNode( const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl *pGrfColl, - SwAttrSet* pAutoAttr ) : + SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(), mpReplacementGraphic(nullptr), @@ -81,7 +81,7 @@ SwGrfNode::SwGrfNode( SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, const GraphicObject& rGrfObj, - SwGrfFormatColl *pGrfColl, SwAttrSet* pAutoAttr ) : + SwGrfFormatColl *pGrfColl, SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(rGrfObj), mpReplacementGraphic(nullptr), @@ -104,7 +104,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, const OUString& rGrfName, const OUString& rFltName, SwGrfFormatColl *pGrfColl, - SwAttrSet* pAutoAttr ) : + SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(), mpReplacementGraphic(nullptr), @@ -425,7 +425,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere, const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl* pGrfColl, - SwAttrSet* pAutoAttr, + SwAttrSet const * pAutoAttr, bool bDelayed ) { OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer is 0." ); @@ -952,8 +952,8 @@ SwContentNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const } SwGrfNode* pGrfNd = SwNodes::MakeGrfNode( rIdx, sFile, sFilter, - &aTmpGrf, pColl, - const_cast<SwAttrSet*>(GetpSwAttrSet()) ); + &aTmpGrf, pColl, + GetpSwAttrSet() ); pGrfNd->SetTitle( GetTitle() ); pGrfNd->SetDescription( GetDescription() ); pGrfNd->SetContour( HasContour(), HasAutomaticContour() ); diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 68f0abd4304c..4e284eaea530 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -173,7 +173,7 @@ public: static void ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ); static void UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ); - SwFlyFrame *FindChainNeighbour( SwFrameFormat &rFormat, SwFrame *pAnch = nullptr ); + SwFlyFrame *FindChainNeighbour( SwFrameFormat const &rFormat, SwFrame *pAnch = nullptr ); // #i26791# const SwVirtFlyDrawObj* GetVirtDrawObj() const; diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx index e92191726da9..a04c8ae172eb 100644 --- a/sw/source/core/inc/ftnboss.hxx +++ b/sw/source/core/inc/ftnboss.hxx @@ -79,7 +79,7 @@ public: static SwFootnoteFrame *FindFootnote( const SwContentFrame *, const SwTextFootnote * ); SwFootnoteContFrame *FindFootnoteCont(); inline const SwFootnoteContFrame *FindFootnoteCont() const; - const SwFootnoteFrame *FindFirstFootnote( SwContentFrame* ) const; + const SwFootnoteFrame *FindFirstFootnote( SwContentFrame const * ) const; SwFootnoteContFrame *FindNearestFootnoteCont( bool bDontLeave = false ); static void ChangeFootnoteRef( const SwContentFrame *pOld, const SwTextFootnote *, @@ -115,7 +115,7 @@ public: const bool _bCollectOnlyPreviousFootnotes = false ); void MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool bCalc = false ); void MoveFootnotes( const SwContentFrame *pSrc, SwContentFrame *pDest, - SwTextFootnote *pAttr ); + SwTextFootnote const *pAttr ); // should AdjustNeighbourhood be called (or Grow/Shrink)? SwNeighbourAdjust NeighbourhoodAdjustment() const diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index abec9e53fe0f..15d8c78ea432 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -98,7 +98,7 @@ public: void SetMaster( SwFootnoteFrame *pNew ) { pMaster = pNew; } void SetRef ( SwContentFrame *pNew ) { pRef = pNew; } - void InvalidateNxtFootnoteCnts( SwPageFrame* pPage ); + void InvalidateNxtFootnoteCnts( SwPageFrame const * pPage ); void LockBackMove() { bBackMoveLocked = true; } void UnlockBackMove() { bBackMoveLocked = false;} diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index cc9c8fdc3e0e..ff9305585610 100644 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -45,7 +45,7 @@ public: virtual ~SwTextAPIEditSource() override; void Dispose(); - void SetText( OutlinerParaObject& rText ); + void SetText( OutlinerParaObject const & rText ); void SetString( const OUString& rText ); OutlinerParaObject* CreateText(); OUString GetText(); @@ -60,7 +60,7 @@ public: void DisposeEditSource() { pSource->Dispose(); } OutlinerParaObject* CreateText() { return pSource->CreateText(); } void SetString( const OUString& rText ) { pSource->SetString( rText ); } - void SetText( OutlinerParaObject& rText ) { pSource->SetText( rText ); } + void SetText( OutlinerParaObject const & rText ) { pSource->SetText( rText ); } OUString GetText() { return pSource->GetText(); } }; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index f0e29e9e906b..721bf51d5479 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -3219,7 +3219,7 @@ bool SwFlyFrameFormat::IsBackgroundBrushInherited() const SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat, const SwFormatAnchor& _rNewAnchorFormat, - SwFlyFrame* _pKeepThisFlyFrame ) + SwFlyFrame const * _pKeepThisFlyFrame ) : mrFlyFrameFormat( _rFlyFrameFormat ), mbAnchorNodeChanged( false ) { diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 16b5776c1d7b..23c3d879306a 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -132,7 +132,7 @@ class SwImplProtocol void Record_( const SwFrame* pFrame, PROT nFunction, DbgAction nAct, void* pParam ); bool NewStream(); void CheckLine( OString& rLine ); - static void SectFunc( OStringBuffer& rOut, DbgAction nAct, void* pParam ); + static void SectFunc( OStringBuffer& rOut, DbgAction nAct, void const * pParam ); public: SwImplProtocol(); ~SwImplProtocol(); @@ -663,13 +663,13 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n } /// Handle the output of the SectionFrames. -void SwImplProtocol::SectFunc(OStringBuffer &rOut, DbgAction nAct, void* pParam) +void SwImplProtocol::SectFunc(OStringBuffer &rOut, DbgAction nAct, void const * pParam) { bool bTmp = false; switch( nAct ) { - case DbgAction::Merge: rOut.append("Merge Section "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); + case DbgAction::Merge: rOut.append("Merge Section "); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame const *>(pParam)))); break; case DbgAction::CreateMaster: bTmp = true; SAL_FALLTHROUGH; @@ -678,7 +678,7 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, DbgAction nAct, void* pParam) rOut.append("Master to "); else rOut.append("Follow from "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame const *>(pParam)))); break; case DbgAction::DelMaster: bTmp = true; SAL_FALLTHROUGH; @@ -687,7 +687,7 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, DbgAction nAct, void* pParam) rOut.append("Master to "); else rOut.append("Follow from "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame const *>(pParam)))); break; default: break; } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 7a45f973ecef..c8e73eab2ee3 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -463,7 +463,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) } } -SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat &rChain, SwFrame *pAnch ) +SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat const &rChain, SwFrame *pAnch ) { // We look for the Fly that's in the same Area. // Areas can for now only be Head/Footer or Flys. diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 09e6e197f07c..79750ef898bf 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -429,7 +429,7 @@ SwFootnoteFrame::SwFootnoteFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwConte mnFrameType = SwFrameType::Ftn; } -void SwFootnoteFrame::InvalidateNxtFootnoteCnts( SwPageFrame *pPage ) +void SwFootnoteFrame::InvalidateNxtFootnoteCnts( SwPageFrame const *pPage ) { if ( GetNext() ) { @@ -1039,7 +1039,7 @@ SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote() } /// Get the first footnote of a given content -const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame *pCnt ) const +const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame const *pCnt ) const { const SwFootnoteFrame *pRet = const_cast<SwFootnoteBossFrame*>(this)->FindFirstFootnote(); if ( pRet ) @@ -2048,7 +2048,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b } void SwFootnoteBossFrame::MoveFootnotes( const SwContentFrame *pSrc, SwContentFrame *pDest, - SwTextFootnote *pAttr ) + SwTextFootnote const *pAttr ) { if( ( GetFormat()->GetDoc()->GetFootnoteInfo().ePos == FTNPOS_CHAPTER && (!GetUpper()->IsSctFrame() || !static_cast<SwSectionFrame*>(GetUpper())->IsFootnoteAtEnd())) diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 36c261f11088..fb51dcb40d6e 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -635,7 +635,7 @@ bool SwHeadFootFrame::GetEatSpacing() const return pFormat->GetHeaderAndFooterEatSpacing().GetValue(); } -void DelFlys( SwLayoutFrame *pFrame, SwPageFrame *pPage ) +void DelFlys( SwLayoutFrame const *pFrame, SwPageFrame *pPage ) { size_t i = 0; while ( pPage->GetSortedObjs() && |