diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-01 09:08:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-03 11:56:43 +0200 |
commit | 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea (patch) | |
tree | eb42ab5be5d8c5ca3d23b686a8781c28822381b4 /sw/source/core | |
parent | d5cc52fec12e3c8d1c3561f172d3e1c5434290b3 (diff) |
loplugin:constfields in sw
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f
Reviewed-on: https://gerrit.libreoffice.org/61177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
90 files changed, 233 insertions, 236 deletions
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index efa0fc7e3c1b..8df61e6c044b 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -81,7 +81,7 @@ private: std::weak_ptr<SwAccessibleMap> m_wMap; sal_uInt32 m_nClientId; // client id in the AccessibleEventNotifier queue - sal_Int16 m_nRole; // immutable outside constructor + sal_Int16 const m_nRole; // immutable outside constructor // The current states (protected by mutex) bool m_isShowingState : 1; diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index ed4ecafece0f..0c33b708ae4f 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -77,9 +77,9 @@ public: */ private: - LayerId m_eLayerId; - sal_uInt32 m_nOrdNum; - Point m_nPosNum; + LayerId const m_eLayerId; + sal_uInt32 const m_nOrdNum; + Point const m_nPosNum; }; diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx index a0a3de184598..4c8f450e3e80 100644 --- a/sw/source/core/access/acchyperlink.hxx +++ b/sw/source/core/access/acchyperlink.hxx @@ -34,10 +34,10 @@ class SwAccessibleHyperlink : { friend class SwAccessibleParagraph; friend class SwAccessibleHyperTextData; - size_t m_nHintPosition; + size_t const m_nHintPosition; ::rtl::Reference< SwAccessibleParagraph > m_xParagraph; - sal_Int32 m_nStartIndex; - sal_Int32 m_nEndIndex; + sal_Int32 const m_nStartIndex; + sal_Int32 const m_nEndIndex; SwAccessibleHyperlink( size_t nHintPos, SwAccessibleParagraph *p, diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 0257733cfccd..eb6557db7bea 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -339,7 +339,7 @@ private: SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED // and POS_CHANGED uno::WeakReference < XAccessible > mxAcc; // The object that fires the event - SwAccessibleChild maFrameOrObj; // the child for CHILD_POS_CHANGED and + SwAccessibleChild const maFrameOrObj; // the child for CHILD_POS_CHANGED and // the same as xAcc for any other // event type EventType meType; // The event type @@ -598,8 +598,8 @@ public: struct SwAccessibleParaSelection { - sal_Int32 nStartOfSelection; - sal_Int32 nEndOfSelection; + sal_Int32 const nStartOfSelection; + sal_Int32 const nEndOfSelection; SwAccessibleParaSelection( const sal_Int32 _nStartOfSelection, const sal_Int32 _nEndOfSelection ) diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 9f42970e2392..8015d832d3f5 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2943,7 +2943,7 @@ void SwAccessibleParagraph::deselectAccessibleChild( class SwHyperlinkIter_Impl { const SwpHints *m_pHints; - sal_Int32 m_nStt; + sal_Int32 const m_nStt; sal_Int32 m_nEnd; size_t m_nPos; diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 2d253cc3029e..5da541972e36 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -79,8 +79,8 @@ class SwAccessibleTableData_Impl std::list < Int32Pair_Impl > maExtents; // cell extends for event processing only Point maTabFramePos; const SwTabFrame *mpTabFrame; - bool mbIsInPagePreview; - bool mbOnlyTableColumnHeader; + bool const mbIsInPagePreview; + bool const mbOnlyTableColumnHeader; void CollectData( const SwFrame *pFrame ); void CollectExtents( const SwFrame *pFrame ); diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 7a7f9186ac18..2387c128a33b 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -61,7 +61,7 @@ namespace } SwCursor* m_pCursor; - SwCursorSaveState m_aSaveState; + SwCursorSaveState const m_aSaveState; }; bool lcl_ReverseMarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst, diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index d0b38b1288df..6aca102e00e3 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -201,8 +201,8 @@ class SwAttrCheckArr sal_uInt16 nArrStart, nArrLen; sal_uInt16 nFound, nStackCnt; SfxItemSet aCmpSet; - bool bNoColls; - bool bForward; + bool const bNoColls; + bool const bForward; public: SwAttrCheckArr( const SfxItemSet& rSet, bool bForward, bool bNoCollections ); @@ -1060,7 +1060,7 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFnCollection cons /// parameters for search for attributes struct SwFindParaAttr : public SwFindParas { - bool bValue; + bool const bValue; const SfxItemSet *pSet, *pReplSet; const i18nutil::SearchOptions2 *pSearchOpt; SwCursor& m_rCursor; diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 4417ed395f48..60654d3aace7 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -639,8 +639,8 @@ struct SwFindParaText : public SwFindParas const i18nutil::SearchOptions2& m_rSearchOpt; SwCursor& m_rCursor; utl::TextSearch m_aSText; - bool m_bReplace; - bool m_bSearchInNotes; + bool const m_bReplace; + bool const m_bSearchInNotes; SwFindParaText( const i18nutil::SearchOptions2& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor ) : m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( utl::TextSearch::UpgradeToSearchOptions2( rOpt) ), diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 7f8086955169..9b5922c62f8f 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -60,7 +60,7 @@ static const sal_uInt16 coSrchRplcThreshold = 60000; struct PercentHdl { - SwDocShell* pDSh; + SwDocShell* const pDSh; sal_uLong nActPos; bool bBack, bNodeIdx; diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 7703c1175094..0fdc1937ecae 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -89,8 +89,8 @@ namespace struct PaMEntry { SwPaM* m_pPaM; - bool m_isMark; - sal_Int32 m_nContent; + bool const m_isMark; + sal_Int32 const m_nContent; }; struct OffsetUpdater { diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 1b7798db28fd..e0b44789c499 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -118,8 +118,8 @@ namespace void lcl_SetDfltFont( DefaultFontType nFntType, SfxItemSet& rSet ) { static struct { - sal_uInt16 nResLngId; - sal_uInt16 nResFntId; + sal_uInt16 const nResLngId; + sal_uInt16 const nResFntId; } aArr[ 3 ] = { { RES_CHRATR_LANGUAGE, RES_CHRATR_FONT }, { RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT }, @@ -142,8 +142,8 @@ namespace DefaultFontType nCTLFntType, SfxItemSet& rSet ) { static struct { - sal_uInt16 nResLngId; - sal_uInt16 nResFntId; + sal_uInt16 const nResLngId; + sal_uInt16 const nResFntId; DefaultFontType nFntType; } aArr[ 3 ] = { { RES_CHRATR_LANGUAGE, RES_CHRATR_FONT, static_cast<DefaultFontType>(0) }, diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 95c12914bf31..59a6c68be3fe 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -64,7 +64,7 @@ NameToIdHash *SwStyleNameMapper::s_pParaUIMap = nullptr, // SwTableEntry so we can pass the length to the String CTOR struct SwTableEntry { - sal_uInt8 nLength; + sal_uInt8 const nLength; const sal_Char *pChar; }; diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index f632b7713708..6d7bcff2b5b8 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -92,7 +92,7 @@ private: static sal_uLong NextIdx( const SwNode* pNd ); vector< SwCompareLine* > aLines; - bool m_bRecordDiff; + bool const m_bRecordDiff; // Truncate beginning and end and add all others to the LinesArray void CheckRanges( CompareData& ); diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 15cde84afbb4..2691b8d0b5f4 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -681,8 +681,8 @@ class SwHyphArgs : public SwInterHyphInfo const SwNode *pStart; const SwNode *pEnd; SwNode *pNode; - sal_uInt16 *pPageCnt; - sal_uInt16 *pPageSt; + sal_uInt16 * const pPageCnt; + sal_uInt16 * const pPageSt; sal_uInt32 nNode; sal_Int32 nPamStart; diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index bee42efe9074..1448ce84e663 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1329,7 +1329,7 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl ) static SwTOOElements lcl_IsSOObject( const SvGlobalName& rFactoryNm ) { static const struct SoObjType { - SwTOOElements nFlag; + SwTOOElements const nFlag; // GlobalNameId struct GlobalNameIds { sal_uInt32 n1; diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 9afc28f24a87..0fe3775b2b4a 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -57,9 +57,9 @@ using namespace ::com::sun::star; class SwHTMLTableLayoutConstraints { - sal_uInt16 nRow; // start row - sal_uInt16 nCol; // start column - sal_uInt16 nColSpan; // the column's COLSPAN + sal_uInt16 const nRow; // start row + sal_uInt16 const nCol; // start column + sal_uInt16 const nColSpan; // the column's COLSPAN std::unique_ptr<SwHTMLTableLayoutConstraints> pNext; // the next constraint diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index e5e5f5ef49db..25dd8454f071 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -244,7 +244,7 @@ struct CpyPara sal_uInt16 nCpyCnt, nInsPos; sal_uInt16 nLnIdx, nBoxIdx; sal_uInt8 nDelBorderFlag; - bool bCpyContent; + bool const bCpyContent; CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, CpyTabFrames& rFrameArr ) : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrameArr(rFrameArr), diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 5ec923298e7e..f323f0a8ea58 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -44,7 +44,7 @@ struct MapTableFrameFormat { const SwFrameFormat *pOld; - SwFrameFormat *pNew; + SwFrameFormat * const pNew; MapTableFrameFormat( const SwFrameFormat *pOldFormat, SwFrameFormat*pNewFormat ) : pOld( pOldFormat ), pNew( pNewFormat ) {} @@ -121,7 +121,7 @@ static bool lcl_SrchNew( const MapTableFrameFormat& rMap, SwFrameFormat** pPara struct CopyTable { SwDoc* m_pDoc; - sal_uLong m_nOldTableSttIdx; + sal_uLong const m_nOldTableSttIdx; MapTableFrameFormats& m_rMapArr; SwTableLine* m_pInsLine; SwTableBox* m_pInsBox; diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 6de5ff89d98c..408822f08779 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1500,7 +1500,7 @@ struct DelTabPara SwTextNode* pLastNd; SwNodes& rNds; SwUndoTableToText* pUndo; - sal_Unicode cCh; + sal_Unicode const cCh; DelTabPara( SwNodes& rNodes, sal_Unicode cChar, SwUndoTableToText* pU ) : pLastNd(nullptr), rNds( rNodes ), pUndo( pU ), cCh( cChar ) {} diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 553a66407773..99a8ca078655 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -76,7 +76,7 @@ public: private: SwFrameFormat *pOld, *pNew; - sal_Int16 nType; + sal_Int16 const nType; }; SwTableFormatCmp::SwTableFormatCmp( SwFrameFormat *pO, SwFrameFormat *pN, sal_Int16 nT ) diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 8411274ab9de..f72efbc17003 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -39,7 +39,7 @@ class SwNode2LayImpl std::unique_ptr<SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>> pIter; SwModify* pMod; std::vector<SwFrame*> mvUpperFrames; // To collect the Upper - sal_uLong nIndex; // The Index of the to-be-inserted Nodes + sal_uLong const nIndex; // The Index of the to-be-inserted Nodes bool bMaster : 1; // true => only Master, false => only Frames without Follow bool bInit : 1; // Did we already call First() at SwClient? diff --git a/sw/source/core/docnode/threadmanager.hxx b/sw/source/core/docnode/threadmanager.hxx index 52db422c1f49..ab5dec95d960 100644 --- a/sw/source/core/docnode/threadmanager.hxx +++ b/sw/source/core/docnode/threadmanager.hxx @@ -128,7 +128,7 @@ class ThreadManager final struct ThreadPred { - oslInterlockedCount mnThreadID; + oslInterlockedCount const mnThreadID; explicit ThreadPred( oslInterlockedCount nThreadID ) : mnThreadID( nThreadID ) {} diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 2f5da1bb4e36..b7b6c2630314 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1002,8 +1002,8 @@ class NestedUserCallHdl { private: SwDrawContact* mpDrawContact; - bool mbParentUserCallActive; - SdrUserCallType meParentUserCallEventType; + bool const mbParentUserCallActive; + SdrUserCallType const meParentUserCallEventType; public: NestedUserCallHdl( SwDrawContact* _pDrawContact, diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index b80fe0403295..8211f3b18ebd 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1106,7 +1106,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark struct RefIdsMap { private: - OUString aName; + OUString const aName; std::set<sal_uInt16> aIds; std::set<sal_uInt16> aDstIds; std::map<sal_uInt16, sal_uInt16> sequencedIds; /// ID numbers sorted by sequence number. diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx index 201bd2aa6463..f097a1802b4f 100644 --- a/sw/source/core/inc/SwUndoFmt.hxx +++ b/sw/source/core/inc/SwUndoFmt.hxx @@ -61,8 +61,8 @@ class SwUndoFormatDelete : public SwUndo protected: OUString sDerivedFrom; SwDoc * pDoc; - OUString sOldName; - SfxItemSet aOldSet; + OUString const sOldName; + SfxItemSet const aOldSet; sal_uInt16 nId; // FormatId related bool bAuto; diff --git a/sw/source/core/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx index a29777551855..04094ab7498d 100644 --- a/sw/source/core/inc/SwUndoPageDesc.hxx +++ b/sw/source/core/inc/SwUndoPageDesc.hxx @@ -67,7 +67,7 @@ public: class SwUndoPageDescDelete : public SwUndo { - SwPageDescExt aOld; + SwPageDescExt const aOld; SwDoc * pDoc; void DoImpl(); diff --git a/sw/source/core/inc/SwXMLBlockImport.hxx b/sw/source/core/inc/SwXMLBlockImport.hxx index be658b8567dc..95515d229ca4 100644 --- a/sw/source/core/inc/SwXMLBlockImport.hxx +++ b/sw/source/core/inc/SwXMLBlockImport.hxx @@ -65,7 +65,7 @@ protected: const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; public: - bool bTextOnly; + bool const bTextOnly; OUString &m_rText; SwXMLTextBlockImport( const css::uno::Reference< css::uno::XComponentContext >& rContext, diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx index 560a92d8dba4..d5b7c2561141 100644 --- a/sw/source/core/inc/UndoCore.hxx +++ b/sw/source/core/inc/UndoCore.hxx @@ -146,7 +146,7 @@ class SwUndoFormatColl : public SwUndo, private SwUndRng { OUString aFormatName; std::unique_ptr<SwHistory> pHistory; - SwFormatColl* pFormatColl; + SwFormatColl* const pFormatColl; // for correct <ReDo(..)> and <Repeat(..)> // boolean, which indicates that the attributes are reset at the nodes // before the format has been applied. @@ -189,7 +189,7 @@ public: class SwUndoSetFlyFormat : public SwUndo, public SwClient { SwFrameFormat* pFrameFormat; // saved FlyFormat - SwFrameFormat* pOldFormat; + SwFrameFormat* const pOldFormat; SwFrameFormat* pNewFormat; std::unique_ptr<SfxItemSet> pItemSet; // the re-/ set attributes sal_uLong nOldNode, nNewNode; @@ -213,7 +213,7 @@ public: class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng { - short nOffset; + short const nOffset; public: SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset ); diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx index f22832b18d54..b9b52583971e 100644 --- a/sw/source/core/inc/UndoDelete.hxx +++ b/sw/source/core/inc/UndoDelete.hxx @@ -55,10 +55,10 @@ class SwUndoDelete bool m_bBackSp : 1; // TRUE: if Grouped and preceding content deleted bool m_bJoinNext: 1; // TRUE: if range is selected forwards bool m_bTableDelLastNd : 1; // TRUE: TextNode following Table inserted/deleted - bool m_bDelFullPara : 1; // TRUE: entire Nodes were deleted + bool const m_bDelFullPara : 1; // TRUE: entire Nodes were deleted bool m_bResetPgDesc : 1; // TRUE: reset PgDsc on following node bool m_bResetPgBrk : 1; // TRUE: reset PgBreak on following node - bool m_bFromTableCopy : 1; // TRUE: called by SwUndoTableCpyTable + bool const m_bFromTableCopy : 1; // TRUE: called by SwUndoTableCpyTable bool SaveContent( const SwPosition* pStt, const SwPosition* pEnd, SwTextNode* pSttTextNd, SwTextNode* pEndTextNd ); diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx index 557dba678825..e75d8b898a35 100644 --- a/sw/source/core/inc/UndoDraw.hxx +++ b/sw/source/core/inc/UndoDraw.hxx @@ -53,7 +53,7 @@ public: class SwUndoDrawGroup : public SwUndo { std::unique_ptr<SwUndoGroupObjImpl[]> pObjArr; - sal_uInt16 nSize; + sal_uInt16 const nSize; bool bDelFormat; public: diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx index 0037b46965a4..c5d8848dba20 100644 --- a/sw/source/core/inc/UndoInsert.hxx +++ b/sw/source/core/inc/UndoInsert.hxx @@ -46,8 +46,8 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent std::unique_ptr<SwRedlineData> pRedlData; sal_uLong nNode; sal_Int32 nContent, nLen; - bool bIsWordDelim : 1; - bool bIsAppend : 1; + bool const bIsWordDelim : 1; + bool const bIsAppend : 1; bool m_bWithRsid : 1; const SwInsertFlags m_nInsertFlags; @@ -167,18 +167,18 @@ class SwUndoInsertLabel : public SwUndo } NODE; }; - OUString sText; + OUString const sText; // #i39983# the separator is drawn with a character style - OUString sSeparator; - OUString sNumberSeparator; - OUString sCharacterStyle; + OUString const sSeparator; + OUString const sNumberSeparator; + OUString const sCharacterStyle; // #i26791# - re-store of drawing object position no longer needed - sal_uInt16 nFieldId; - SwLabelType eType; + sal_uInt16 const nFieldId; + SwLabelType const eType; SdrLayerID nLayerId; // for character objects - bool bBefore :1; + bool const bBefore :1; bool bUndoKeep :1; - bool bCpyBrd :1; + bool const bCpyBrd :1; public: SwUndoInsertLabel( const SwLabelType eTyp, const OUString &rText, diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx index 70e6149b383e..9490f51bc0ca 100644 --- a/sw/source/core/inc/UndoNumbering.hxx +++ b/sw/source/core/inc/UndoNumbering.hxx @@ -28,10 +28,10 @@ class SwUndoInsNum : public SwUndo, private SwUndRng { - SwNumRule aNumRule; + SwNumRule const aNumRule; std::unique_ptr<SwHistory> pHistory; std::unique_ptr<SwNumRule> pOldNumRule; - OUString sReplaceRule; + OUString const sReplaceRule; sal_uInt16 nLRSavePos; public: @@ -61,7 +61,7 @@ class SwUndoDelNum : public SwUndo, private SwUndRng struct NodeLevel { sal_uLong index; - int level; + int const level; NodeLevel(sal_uLong idx, int lvl) : index(idx), level(lvl) {}; }; std::vector<NodeLevel> aNodes; @@ -83,7 +83,7 @@ public: class SwUndoMoveNum : public SwUndo, private SwUndRng { sal_uLong nNewStt; - long nOffset; + long const nOffset; public: SwUndoMoveNum( const SwPaM& rPam, long nOffset, bool bIsOutlMv ); @@ -97,7 +97,7 @@ public: class SwUndoNumUpDown : public SwUndo, private SwUndRng { - short nOffset; + short const nOffset; public: SwUndoNumUpDown( const SwPaM& rPam, short nOffset ); @@ -109,7 +109,7 @@ public: class SwUndoNumOrNoNum : public SwUndo { - sal_uLong nIdx; + sal_uLong const nIdx; bool mbNewNum, mbOldNum; public: @@ -123,10 +123,10 @@ public: class SwUndoNumRuleStart : public SwUndo { - sal_uLong nIdx; + sal_uLong const nIdx; sal_uInt16 nOldStt, nNewStt; - bool bSetSttValue : 1; - bool bFlag : 1; + bool const bSetSttValue : 1; + bool const bFlag : 1; public: SwUndoNumRuleStart( const SwPosition& rPos, bool bDelete ); diff --git a/sw/source/core/inc/UndoOverwrite.hxx b/sw/source/core/inc/UndoOverwrite.hxx index a406834105be..443d13a7f347 100644 --- a/sw/source/core/inc/UndoOverwrite.hxx +++ b/sw/source/core/inc/UndoOverwrite.hxx @@ -70,7 +70,7 @@ struct UndoTransliterate_Data; class SwUndoTransliterate : public SwUndo, public SwUndRng { std::vector< std::unique_ptr<UndoTransliterate_Data> > aChanges; - TransliterationFlags nType; + TransliterationFlags const nType; void DoTransliterate(SwDoc & rDoc, SwPaM const & rPam); diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx index 76f478ad89d6..1db832095e4e 100644 --- a/sw/source/core/inc/UndoRedline.hxx +++ b/sw/source/core/inc/UndoRedline.hxx @@ -33,7 +33,7 @@ class SwUndoRedline : public SwUndo, public SwUndRng protected: std::unique_ptr<SwRedlineData> mpRedlData; std::unique_ptr<SwRedlineSaveDatas> mpRedlSaveData; - SwUndoId mnUserId; + SwUndoId const mnUserId; bool mbHiddenRedlines; virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam); @@ -121,7 +121,7 @@ class SwUndoCompDoc : public SwUndo, public SwUndRng std::unique_ptr<SwRedlineData> pRedlData; std::unique_ptr<SwUndoDelete> pUnDel, pUnDel2; std::unique_ptr<SwRedlineSaveDatas> pRedlSaveData; - bool bInsert; + bool const bInsert; public: SwUndoCompDoc( const SwPaM& rRg, bool bIns ); diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx index 08e59657c4d4..6641611da7f5 100644 --- a/sw/source/core/inc/UndoSplitMove.hxx +++ b/sw/source/core/inc/UndoSplitMove.hxx @@ -27,9 +27,9 @@ class SwUndoSplitNode: public SwUndo std::unique_ptr<SwHistory> m_pHistory; std::unique_ptr<SwRedlineData> pRedlData; sal_uLong nNode; - sal_Int32 nContent; + sal_Int32 const nContent; bool bTableFlag : 1; - bool bChkTableStt : 1; + bool const bChkTableStt : 1; sal_uInt32 nParRsid; public: diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 4343f09225ed..ccedcd83c06f 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -47,14 +47,14 @@ class SwTableSortBoxes; class SwUndoInsTable : public SwUndo { OUString sTableNm; - SwInsertTableOptions aInsTableOpts; + SwInsertTableOptions const aInsTableOpts; std::unique_ptr<SwDDEFieldType> pDDEFieldType; std::unique_ptr<std::vector<sal_uInt16>> pColWidth; std::unique_ptr<SwRedlineData> pRedlData; std::unique_ptr<SwTableAutoFormat> pAutoFormat; sal_uLong nSttNode; sal_uInt16 nRows, nCols; - sal_uInt16 nAdjust; + sal_uInt16 const nAdjust; public: SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows, @@ -74,12 +74,12 @@ public: class SwUndoTextToTable : public SwUndo, public SwUndRng { OUString sTableNm; - SwInsertTableOptions aInsTableOpts; + SwInsertTableOptions const aInsTableOpts; std::vector<sal_uLong> mvDelBoxes; std::unique_ptr<SwTableAutoFormat> pAutoFormat; SwHistory* pHistory; - sal_Unicode cTrenner; - sal_uInt16 nAdjust; + sal_Unicode const cTrenner; + sal_uInt16 const nAdjust; bool bSplitEnd : 1; public: @@ -99,14 +99,14 @@ public: class SwUndoTableToText : public SwUndo { - OUString sTableNm; + OUString const sTableNm; std::unique_ptr<SwDDEFieldType> pDDEFieldType; std::unique_ptr<SaveTable> pTableSave; SwTableToTextSaves m_vBoxSaves; std::unique_ptr<SwHistory> pHistory; sal_uLong nSttNd, nEndNd; - sal_Unicode cTrenner; - sal_uInt16 nHdlnRpt; + sal_Unicode const cTrenner; + sal_uInt16 const nHdlnRpt; bool bCheckNumFormat : 1; public: @@ -147,7 +147,7 @@ class SwUndoTableAutoFormat : public SwUndo std::unique_ptr<SaveTable> pSaveTable; std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos; bool bSaveContentAttr; - sal_uInt16 m_nRepeatHeading; + sal_uInt16 const m_nRepeatHeading; void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext); @@ -171,7 +171,7 @@ class SwUndoTableNdsChg : public SwUndo struct BoxMove { sal_uLong index; ///< Index of this box. - bool hasMoved; ///< Has this box been moved already. + bool const hasMoved; ///< Has this box been moved already. BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) {}; bool operator<(const BoxMove& other) const { return index < other.index; }; }; @@ -181,8 +181,8 @@ class SwUndoTableNdsChg : public SwUndo sal_uLong nSttNode, nCurrBox; sal_uInt16 nCount, nRelDiff, nAbsDiff; TableChgWidthHeightType nSetColType; - bool bFlag; - bool bSameHeight; // only used for SplitRow + bool const bFlag; + bool const bSameHeight; // only used for SplitRow SwUndoTableNdsChg(SwUndoTableNdsChg const&) = delete; SwUndoTableNdsChg& operator=(SwUndoTableNdsChg const&) = delete; @@ -327,9 +327,9 @@ class SwUndoSplitTable : public SwUndo std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row std::unique_ptr<SaveTable> pSavTable; std::unique_ptr<SwHistory> pHistory; - SplitTable_HeadlineOption nMode; + SplitTable_HeadlineOption const nMode; sal_uInt16 nFormulaEnd; - bool bCalcNewSize; + bool const bCalcNewSize; public: SwUndoSplitTable( const SwTableNode& rTableNd, std::unique_ptr<SwSaveRowSpan> pRowSp, @@ -352,8 +352,8 @@ class SwUndoMergeTable : public SwUndo sal_uLong nTableNode; std::unique_ptr<SaveTable> pSavTable, pSavHdl; std::unique_ptr<SwHistory> pHistory; - sal_uInt16 nMode; - bool bWithPrev; + sal_uInt16 const nMode; + bool const bWithPrev; public: SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& rDelTableNd, @@ -371,8 +371,8 @@ public: class SwUndoTableHeadline : public SwUndo { sal_uLong nTableNd; - sal_uInt16 nOldHeadline; - sal_uInt16 nNewHeadline; + sal_uInt16 const nOldHeadline; + sal_uInt16 const nNewHeadline; public: SwUndoTableHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl ); @@ -386,7 +386,7 @@ void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx ); class SwUndoTableStyleMake : public SwUndo { - OUString m_sName; + OUString const m_sName; std::unique_ptr<SwTableAutoFormat> m_pAutoFormat; public: SwUndoTableStyleMake(const OUString& rName, const SwDoc* pDoc); diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 321aec766901..7d4c570c78b8 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -89,12 +89,12 @@ public: class SwAutoCorrExceptWord { - OUString m_sWord; - ACFlags m_nFlags; - sal_uLong m_nNode; - sal_Int32 m_nContent; - sal_Unicode m_cChar; - LanguageType m_eLanguage; + OUString const m_sWord; + ACFlags const m_nFlags; + sal_uLong const m_nNode; + sal_Int32 const m_nContent; + sal_Unicode const m_cChar; + LanguageType const m_eLanguage; bool m_bDeleted; public: diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx index 61c45fda8044..c9a9f51a2d7d 100644 --- a/sw/source/core/inc/blink.hxx +++ b/sw/source/core/inc/blink.hxx @@ -36,7 +36,7 @@ class SwBlinkPortion Point aPos; const SwLinePortion *pPor; const SwRootFrame *pFrame; - sal_uInt16 nDir; + sal_uInt16 const nDir; public: SwBlinkPortion(const SwLinePortion* pPortion, sal_uInt16 nDirection) diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx index fd224ae4d8b8..893dc28ae732 100644 --- a/sw/source/core/inc/docsort.hxx +++ b/sw/source/core/inc/docsort.hxx @@ -100,7 +100,7 @@ private: // sort text struct SwSortTextElement : public SwSortElement { - sal_uLong nOrg; + sal_uLong const nOrg; SwNodeIndex aPos; SwSortTextElement( const SwNodeIndex& rPos ); @@ -112,7 +112,7 @@ struct SwSortTextElement : public SwSortElement // sort table struct SwSortBoxElement : public SwSortElement { - sal_uInt16 nRow; + sal_uInt16 const nRow; SwSortBoxElement( sal_uInt16 nRC ); virtual ~SwSortBoxElement() override; diff --git a/sw/source/core/inc/fieldhint.hxx b/sw/source/core/inc/fieldhint.hxx index 8821698580d5..a835f15714f6 100644 --- a/sw/source/core/inc/fieldhint.hxx +++ b/sw/source/core/inc/fieldhint.hxx @@ -24,7 +24,7 @@ class SwFieldHint : public SfxHint { - SwPaM* pPaM; + SwPaM* const pPaM; public: SwFieldHint( SwPaM* p ) diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index a7400f03d0d1..1fb81bde56e8 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -87,7 +87,7 @@ class SwFntObj : public SwCacheObj sal_uInt16 m_nPrtAscent; sal_uInt16 m_nScrHeight; sal_uInt16 m_nPrtHeight; - sal_uInt16 m_nPropWidth; + sal_uInt16 const m_nPropWidth; sal_uInt16 m_nZoom; bool m_bSymbol : 1; bool m_bPaintBlank : 1; diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 03888c4039df..3496b6d5eb59 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -207,7 +207,7 @@ protected: SwTwips mnFlyAnchorOfstNoWrap; bool mbHadFollow; bool mbInvaKeep; - bool mbValidSize; + bool const mbValidSize; public: SwFrameNotify( SwFrame *pFrame ); @@ -231,7 +231,7 @@ public: class SwFlyNotify : public SwLayNotify { - SwPageFrame *pOldPage; + SwPageFrame * const pOldPage; const SwRect aFrameAndSpace; public: diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index ec0a1e412787..f070a11a5bd6 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -56,10 +56,10 @@ namespace sw { namespace mark const SwIndex* pIdx =nullptr); private: - OUString m_aName; + OUString const m_aName; OUString m_aShortName; vcl::KeyCode m_aCode; - IDocumentMarkAccess::MarkType m_eOrigBkmType; + IDocumentMarkAccess::MarkType const m_eOrigBkmType; sal_uLong m_nNode1; sal_uLong m_nNode2; sal_Int32 m_nContent1; @@ -98,9 +98,9 @@ void DelBookmarks(const SwNodeIndex& rStt, * location. */ struct SaveFly { - sal_uLong nNdDiff; /// relative node difference - SwFrameFormat* pFrameFormat; /// the fly's frame format - bool bInsertPosition; /// if true, anchor _at_ insert position + sal_uLong const nNdDiff; /// relative node difference + SwFrameFormat* const pFrameFormat; /// the fly's frame format + bool const bInsertPosition; /// if true, anchor _at_ insert position SaveFly( sal_uLong nNodeDiff, SwFrameFormat* pFormat, bool bInsert ) : nNdDiff( nNodeDiff ), pFrameFormat( pFormat ), bInsertPosition( bInsert ) @@ -187,7 +187,7 @@ class SaveRedlEndPosForRestore { std::vector<SwPosition*> mvSavArr; std::unique_ptr<SwNodeIndex> pSavIdx; - sal_Int32 nSavContent; + sal_Int32 const nSavContent; public: SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nContent ); diff --git a/sw/source/core/inc/pagedeschint.hxx b/sw/source/core/inc/pagedeschint.hxx index d76aa95d3e70..1cdca3f111de 100644 --- a/sw/source/core/inc/pagedeschint.hxx +++ b/sw/source/core/inc/pagedeschint.hxx @@ -26,7 +26,7 @@ class SwPageDesc; class SwPageDescHint : public SfxHint { - SwPageDesc* pPageDesc; + SwPageDesc* const pPageDesc; public: SwPageDescHint( SwPageDesc* p ) : pPageDesc(p) diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index 27e4b96d8c07..945ed1948388 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -116,8 +116,8 @@ class SwHistorySetText : public SwHistoryHint const sal_uLong m_nNodeIndex; const sal_Int32 m_nStart; const sal_Int32 m_nEnd; - bool m_bFormatIgnoreStart : 1; - bool m_bFormatIgnoreEnd : 1; + bool const m_bFormatIgnoreStart : 1; + bool const m_bFormatIgnoreEnd : 1; public: SwHistorySetText( SwTextAttr* pTextHt, sal_uLong nNode ); diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index aee70da5029f..fa1c88ee79f5 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -435,7 +435,7 @@ class DisableCallbackAction { private: SwRootFrame & m_rRootFrame; - bool m_bOldCallbackActionState; + bool const m_bOldCallbackActionState; public: explicit DisableCallbackAction(SwRootFrame & rRootFrame) diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 1690b6d22eda..956a95b9623b 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -57,8 +57,8 @@ private: //! Records a single change in direction. struct DirectionChangeInfo { - TextFrameIndex position; //!< Character position at which we change direction. - sal_uInt8 type; //!< Direction that we change to. + TextFrameIndex const position; //!< Character position at which we change direction. + sal_uInt8 const type; //!< Direction that we change to. DirectionChangeInfo(TextFrameIndex pos, sal_uInt8 typ) : position(pos), type(typ) {}; }; std::vector<DirectionChangeInfo> m_DirectionChanges; diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index b29bd82e0b16..cce94ffc2a22 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -35,9 +35,9 @@ class SwBlockName friend class SwImpBlocks; sal_uInt16 nHashS, nHashL; // Hash codes for testing public: - OUString aShort; /// Shortname + OUString const aShort; /// Shortname OUString aLong; /// Longname - OUString aPackageName; /// Package name + OUString const aPackageName; /// Package name bool bIsOnlyTextFlagInit : 1; /// Is the Flag valid? bool bIsOnlyText : 1; /// Unformatted text @@ -54,7 +54,7 @@ class SwImpBlocks { friend class SwTextBlocks; protected: - OUString m_aFile; // Physical file name + OUString const m_aFile; // Physical file name OUString m_aName; // Logical file name OUString m_aCurrentText; // Current text OUString m_aShort, m_aLong; // Short- and longname (PutDoc) diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx index ebe64d841feb..585ef97d9e80 100644 --- a/sw/source/core/inc/swfntcch.hxx +++ b/sw/source/core/inc/swfntcch.hxx @@ -62,7 +62,7 @@ public: class SwFontAccess : public SwCacheAccess { - SwViewShell *m_pShell; + SwViewShell * const m_pShell; protected: virtual SwCacheObj *NewObj( ) override; diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 043836bad096..ff0e5d8a0b9d 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -944,7 +944,7 @@ inline void SwFont::SetHighlightColor( const Color& aNewColor ) class SwUnderlineFont { Point m_aPos; - TextFrameIndex m_nEnd; + TextFrameIndex const m_nEnd; std::unique_ptr<SwFont> m_pFont; public: diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx index 01669a9efabd..97416a63f72f 100644 --- a/sw/source/core/inc/tblrwcl.hxx +++ b/sw/source/core/inc/tblrwcl.hxx @@ -66,7 +66,7 @@ class SwCollectTableLineBoxes std::vector<sal_uInt16> aPosArr; std::vector<SwTableBox*> m_Boxes; SwHistory* pHst; - SplitTable_HeadlineOption nMode; + SplitTable_HeadlineOption const nMode; sal_uInt16 nWidth; bool bGetFromTop : 1; bool bGetValues : 1; @@ -113,7 +113,7 @@ void sw_BoxSetSplitBoxFormats( SwTableBox* pBox, SwCollectTableLineBoxes* pSplPa */ struct SwSaveRowSpan { - sal_uInt16 mnSplitLine; // the line number where the table has been splitted + sal_uInt16 const mnSplitLine; // the line number where the table has been splitted std::vector< long > mnRowSpans; // the row span attributes in this line SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn ); }; diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index 61091af43b8a..da33208dd297 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -45,8 +45,8 @@ enum TOXSortType struct SwTOXSource { const SwContentNode* pNd; - sal_Int32 nPos; - bool bMainEntry; + sal_Int32 const nPos; + bool const bMainEntry; SwTOXSource( const SwContentNode* pNode, sal_Int32 n, bool bMain ) : pNd(pNode), nPos(n), bMainEntry(bMain) @@ -71,9 +71,9 @@ class SwTOXInternational { std::unique_ptr<IndexEntrySupplierWrapper> m_pIndexWrapper; std::unique_ptr<CharClass> m_pCharClass; - LanguageType m_eLang; - OUString m_sSortAlgorithm; - SwTOIOptions m_nOptions; + LanguageType const m_eLang; + OUString m_sSortAlgorithm; + SwTOIOptions const m_nOptions; void Init(); @@ -125,7 +125,7 @@ struct SwTOXSortTabBase const SwTOXInternational* pTOXIntl; sal_uLong nPos; sal_Int32 nCntPos; - sal_uInt16 nType; + sal_uInt16 const nType; static SwTOIOptions nOpt; SwTOXSortTabBase( TOXSortType nType, @@ -189,7 +189,7 @@ struct SwTOXIndex : public SwTOXSortTabBase private: virtual TextAndReading GetText_Impl() const override; - sal_uInt8 nKeyLevel; + sal_uInt8 const nKeyLevel; }; struct SwTOXCustom : public SwTOXSortTabBase @@ -205,8 +205,8 @@ struct SwTOXCustom : public SwTOXSortTabBase private: virtual TextAndReading GetText_Impl() const override; - TextAndReading m_aKey; - sal_uInt16 nLev; + TextAndReading const m_aKey; + sal_uInt16 const nLev; }; /** @@ -238,11 +238,11 @@ struct SwTOXPara : public SwTOXSortTabBase private: virtual TextAndReading GetText_Impl() const override; - SwTOXElement eType; - sal_uInt16 m_nLevel; + SwTOXElement const eType; + sal_uInt16 const m_nLevel; sal_Int32 nStartIndex; sal_Int32 nEndIndex; - OUString m_sSequenceName; + OUString const m_sSequenceName; }; struct SwTOXTable : public SwTOXSortTabBase diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 0933a5e328db..5a9db1f0634a 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -907,7 +907,7 @@ public: class SwLayoutModeModifier { const OutputDevice& m_rOut; - ComplexTextLayoutFlags m_nOldLayoutMode; + ComplexTextLayoutFlags const m_nOldLayoutMode; public: SwLayoutModeModifier( const OutputDevice& rOutp ); ~SwLayoutModeModifier(); @@ -918,7 +918,7 @@ public: class SwDigitModeModifier { const OutputDevice& rOut; - LanguageType nOldLanguageType; + LanguageType const nOldLanguageType; public: SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang ); ~SwDigitModeModifier(); diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx index 7ec058e086bd..39a9e973502f 100644 --- a/sw/source/core/inc/unobookmark.hxx +++ b/sw/source/core/inc/unobookmark.hxx @@ -179,7 +179,7 @@ class SwXFieldmark final : public SwXFieldmark_Base { ::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark(); - bool isReplacementObject; + bool const isReplacementObject; SwXFieldmark(bool isReplacementObject, SwDoc* pDoc); diff --git a/sw/source/core/inc/unoevent.hxx b/sw/source/core/inc/unoevent.hxx index 4c6cbdc26193..dd99a5a882b8 100644 --- a/sw/source/core/inc/unoevent.hxx +++ b/sw/source/core/inc/unoevent.hxx @@ -54,7 +54,7 @@ public: // All these objects are an SwXFrame, so they can use a common implementation class SwFrameEventDescriptor : public SvEventDescriptor { - OUString sSwFrameEventDescriptor; + OUString const sSwFrameEventDescriptor; SwXFrame& rFrame; @@ -75,8 +75,6 @@ protected: class SwFrameStyleEventDescriptor : public SvEventDescriptor { - OUString sSwFrameStyleEventDescriptor; - sw::ICoreFrameStyle& m_rStyle; public: diff --git a/sw/source/core/inc/unoflatpara.hxx b/sw/source/core/inc/unoflatpara.hxx index f584f47a067d..5449119523e7 100644 --- a/sw/source/core/inc/unoflatpara.hxx +++ b/sw/source/core/inc/unoflatpara.hxx @@ -109,7 +109,7 @@ private: SwXFlatParagraph( const SwXFlatParagraph & ) = delete; SwXFlatParagraph & operator = ( const SwXFlatParagraph & ) = delete; - OUString maExpandText; + OUString const maExpandText; }; class SwXFlatParagraphIterator: diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index b99e56c53c7a..b3c346e81a6d 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -166,9 +166,9 @@ class SwImplEnterLeave { protected: const SwFrame* pFrame; // the frame - PROT nFunction; // the function - DbgAction nAction; // the action if needed - void* pParam; // further parameter + PROT const nFunction; // the function + DbgAction const nAction; // the action if needed + void* const pParam; // further parameter public: SwImplEnterLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar ) : pFrame( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {} diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 162669798f36..f4201ccb09b5 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -80,8 +80,8 @@ public: // by controlling nested sections. class SwActualSection { - SwActualSection *pUpper; - SwSectionFrame *pSectFrame; + SwActualSection * const pUpper; + SwSectionFrame *pSectFrame; SwSectionNode *pSectNode; public: SwActualSection( SwActualSection *pUpper, @@ -142,8 +142,8 @@ class SwLayCacheIoImpl { private: struct RecTypeSize { - sal_uInt8 type; - sal_uLong size; + sal_uInt8 const type; + sal_uLong const size; RecTypeSize(sal_uInt8 typ, sal_uLong siz) : type(typ), size(siz) {} }; std::vector<RecTypeSize> aRecords; @@ -155,7 +155,7 @@ private: sal_uInt16 nMajorVersion; sal_uInt16 nMinorVersion; - bool bWriteMode : 1; + bool const bWriteMode : 1; bool bError : 1; public: @@ -202,8 +202,8 @@ public: class SwFlyCache : public SwRect // position and size { public: - sal_uLong nOrdNum; ///< Id to recognize text frames - sal_uInt16 nPageNum; ///< page number + sal_uLong const nOrdNum; ///< Id to recognize text frames + sal_uInt16 const nPageNum; ///< page number SwFlyCache( sal_uInt16 nP, sal_uLong nO, long nXL, long nYL, long nWL, long nHL ) : SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){} }; diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 62e04cace373..27acb33779cb 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -46,7 +46,7 @@ public: class SwEndnoter { - SwLayouter* pMaster; + SwLayouter* const pMaster; SwSectionFrame* pSect; std::unique_ptr<SwFootnoteFrames> pEndArr; public: diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx index 15667b9ead60..cf3b955addb1 100644 --- a/sw/source/core/layout/objectformattertxtfrm.hxx +++ b/sw/source/core/layout/objectformattertxtfrm.hxx @@ -34,7 +34,7 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter SwTextFrame& mrAnchorTextFrame; // 'master' anchor text frame - SwTextFrame* mpMasterAnchorTextFrame; + SwTextFrame* const mpMasterAnchorTextFrame; SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame, const SwPageFrame& _rPageFrame, diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index af4ed98bfbec..487f6247b948 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4456,13 +4456,13 @@ namespace drawinglayer { private: /// the transformation defining the geometry of this BorderRectangle - basegfx::B2DHomMatrix maB2DHomMatrix; + basegfx::B2DHomMatrix const maB2DHomMatrix; /// the four styles to be used - svx::frame::Style maStyleTop; - svx::frame::Style maStyleRight; - svx::frame::Style maStyleBottom; - svx::frame::Style maStyleLeft; + svx::frame::Style const maStyleTop; + svx::frame::Style const maStyleRight; + svx::frame::Style const maStyleBottom; + svx::frame::Style const maStyleLeft; protected: /// local decomposition. diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx index e6a08f422d1b..688b0aed12c5 100644 --- a/sw/source/core/text/atrhndl.hxx +++ b/sw/source/core/text/atrhndl.hxx @@ -45,7 +45,7 @@ private: class SwAttrStack { private: - SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ]; + SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ]; SwTextAttr** m_pArray; sal_uInt16 m_nCount; // number of elements on stack sal_uInt16 m_nSize; // number of positions in Array diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx index c61e759eb289..bdf6cd043042 100644 --- a/sw/source/core/text/itrtxt.hxx +++ b/sw/source/core/text/itrtxt.hxx @@ -302,7 +302,7 @@ class SwHookOut { SwTextSizeInfo* pInf; VclPtr<OutputDevice> pOut; - bool bOnWin; + bool const bOnWin; public: explicit SwHookOut( SwTextSizeInfo& rInfo ); ~SwHookOut(); diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx index f2e20517261d..2001260768dd 100644 --- a/sw/source/core/text/pordrop.hxx +++ b/sw/source/core/text/pordrop.hxx @@ -35,7 +35,7 @@ class SwDropPortionPart { std::unique_ptr<SwDropPortionPart> pFollow; std::unique_ptr<SwFont> pFnt; - TextFrameIndex nLen; + TextFrameIndex const nLen; sal_uInt16 nWidth; bool m_bJoinBorderWithNext; bool m_bJoinBorderWithPrev; @@ -64,7 +64,7 @@ class SwDropPortion : public SwTextPortion std::unique_ptr<SwDropPortionPart> pPart; // due to script/attribute changes sal_uInt16 nLines; // Line count sal_uInt16 nDropHeight; // Height - sal_uInt16 nDropDescent; // Distance to the next line + sal_uInt16 const nDropDescent; // Distance to the next line sal_uInt16 nDistance; // Distance to the text sal_uInt16 nFix; // Fixed position short nY; // Y Offset diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index ad0448356495..3373cdfda8eb 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -39,7 +39,7 @@ public: class SwBlankPortion : public SwExpandPortion { sal_Unicode cChar; - bool bMulti; // For multiportion brackets + bool const bMulti; // For multiportion brackets public: SwBlankPortion( sal_Unicode cCh, bool bMult = false ) : cChar( cCh ), bMulti( bMult ) @@ -59,7 +59,7 @@ public: class SwPostItsPortion : public SwExpandPortion { - bool bScript; + bool const bScript; public: explicit SwPostItsPortion( bool bScrpt ); virtual void Paint( const SwTextPaintInfo &rInf ) const override; diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index d014ec9a0bce..151404197cd9 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -121,8 +121,8 @@ class SwNumberPortion : public SwFieldPortion { protected: sal_uInt16 nFixWidth; // See Glues - sal_uInt16 nMinDist; // Minimal distance to the text - bool mbLabelAlignmentPosAndSpaceModeActive; + sal_uInt16 const nMinDist; // Minimal distance to the text + bool const mbLabelAlignmentPosAndSpaceModeActive; public: SwNumberPortion( const OUString &rExpand, diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index 7b0ae819dbe0..97b5275ed696 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -26,7 +26,7 @@ class SwTextFootnote; class SwFootnotePortion : public SwFieldPortion { - SwTextFootnote *pFootnote; + SwTextFootnote * const pFootnote; sal_uInt16 nOrigHeight; // #i98418# bool mbPreferredScriptTypeSet; diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx index 1df9b1ed6500..b00bddc1cf5d 100644 --- a/sw/source/core/text/porhyph.hxx +++ b/sw/source/core/text/porhyph.hxx @@ -37,7 +37,7 @@ public: class SwHyphStrPortion : public SwHyphPortion { - OUString aExpand; + OUString const aExpand; public: explicit SwHyphStrPortion(const OUString &rStr) : aExpand(rStr + "-") diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index f0ad72a7577c..7d3f0348a0cf 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -217,7 +217,7 @@ public: class SwBidiPortion : public SwMultiPortion { - sal_uInt8 nLevel; + sal_uInt8 const nLevel; public: SwBidiPortion(TextFrameIndex nEnd, sal_uInt8 nLv); diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx index cadd8f871b43..f90e7abdf5f6 100644 --- a/sw/source/core/text/porrst.hxx +++ b/sw/source/core/text/porrst.hxx @@ -50,9 +50,9 @@ public: class SwKernPortion : public SwLinePortion { - short nKern; - bool bBackground; - bool bGridKern; + short const nKern; + bool const bBackground; + bool const bGridKern; public: @@ -75,7 +75,7 @@ public: class SwArrowPortion : public SwLinePortion { Point aPos; - bool bLeft; + bool const bLeft; public: explicit SwArrowPortion( const SwLinePortion &rPortion ); explicit SwArrowPortion( const SwTextPaintInfo &rInf ); @@ -91,7 +91,7 @@ public: // The SwHangingPortion is the corresponding textportion to do that. class SwHangingPortion : public SwTextPortion { - sal_uInt16 nInnerWidth; + sal_uInt16 const nInnerWidth; public: explicit SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() ) { @@ -122,7 +122,7 @@ class SwControlCharPortion : public SwLinePortion private: mutable sal_uInt16 mnViewWidth; // used to cache a calculated value mutable sal_uInt16 mnHalfCharWidth; // used to cache a calculated value - sal_Unicode mcChar; + sal_Unicode const mcChar; public: diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 043f3eb5e376..a19d7086f5ac 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -68,10 +68,10 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf, class SwDropSave { SwTextPaintInfo* pInf; - sal_Int32 nIdx; - sal_Int32 nLen; - long nX; - long nY; + sal_Int32 const nIdx; + sal_Int32 const nLen; + long const nX; + long const nY; public: explicit SwDropSave( const SwTextPaintInfo &rInf ); diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 62ba00132d7c..e42173f7ff9e 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -67,7 +67,7 @@ namespace // #i68520# struct AnchoredObjOrder { - bool mbR2L; + bool const mbR2L; SwRectFn mfnRect; AnchoredObjOrder( const bool bR2L, diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 7ad0a25fdf98..6dc0eb71971d 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -30,7 +30,7 @@ class XmlPortionDumper:public SwPortionHandler { private: - xmlTextWriterPtr writer; + xmlTextWriterPtr const writer; TextFrameIndex ofs; const OUString& m_rText; OUString m_aLine; diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index c3ad4bf86feb..f7dca91d90d9 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -743,8 +743,8 @@ static FormTokenType lcl_GetTokenType(const OUString & sToken, { static struct { - OUString sTokenStart; - sal_Int16 nTokenLength; + OUString const sTokenStart; + sal_Int16 const nTokenLength; FormTokenType eTokenType; } const aTokenArr[] = { { SwForm::GetFormTab().copy(0, 2), 3, TOKEN_TAB_STOP }, diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index bf98f097ec47..dd377d0c1090 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -243,11 +243,11 @@ struct CalcLinePosData { SwDrawTextInfo& rInf; vcl::Font& rFont; - TextFrameIndex nCnt; + TextFrameIndex const nCnt; const bool bSwitchH2V; const bool bSwitchL2R; - long nHalfSpace; - long* pKernArray; + long const nHalfSpace; + long* const pKernArray; const bool bBidiPor; CalcLinePosData( SwDrawTextInfo& _rInf, vcl::Font& _rFont, diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index e6f5b1885f56..8c2b2c078996 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -36,7 +36,7 @@ struct FieldResult { - sal_Int32 m_nFieldPos; + sal_Int32 const m_nFieldPos; OUString m_sExpand; enum { NONE, FIELD, FOOTNOTE } m_eType; explicit FieldResult(sal_Int32 const nPos) @@ -57,9 +57,9 @@ typedef std::set<FieldResult, sortfieldresults> FieldResultSet; struct block { - sal_Int32 m_nStart; - sal_Int32 m_nLen; - bool m_bVisible; + sal_Int32 const m_nStart; + sal_Int32 const m_nLen; + bool const m_bVisible; FieldResultSet m_aAttrs; block(sal_Int32 nStart, sal_Int32 nLen, bool bVisible) : m_nStart(nStart), m_nLen(nLen), m_bVisible(bVisible) diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 1c1b6d2e7714..0f600efedd4c 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -486,11 +486,11 @@ class SwUndoReplace::Impl : private SwUndoSaveContent { OUString m_sOld; - OUString m_sIns; + OUString const m_sIns; sal_uLong m_nSttNd, m_nEndNd, m_nOffset; sal_Int32 m_nSttCnt, m_nEndCnt, m_nSetPos, m_nSelEnd; bool m_bSplitNext : 1; - bool m_bRegExp : 1; + bool const m_bRegExp : 1; // metadata references for paragraph and following para (if m_bSplitNext) std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart; std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd; diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 19d754faa085..0ae45509fed4 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -326,7 +326,7 @@ SwRewriter SwUndoOverwrite::GetRewriter() const struct UndoTransliterate_Data { - OUString sText; + OUString const sText; std::unique_ptr<SwHistory> pHistory; std::unique_ptr<Sequence< sal_Int32 >> pOffsets; sal_uLong nNdIdx; diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 0700c917a696..9d00f4db5973 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -106,9 +106,9 @@ class SaveTable const SwTable* m_pSwTable; SfxItemSets m_aSets; SwFrameFormatsV m_aFrameFormats; - sal_uInt16 m_nLineCount; + sal_uInt16 const m_nLineCount; bool m_bModifyBox : 1; - bool m_bSaveFormula : 1; + bool const m_bSaveFormula : 1; bool m_bNewModel : 1; SaveTable(const SaveTable&) = delete; @@ -191,9 +191,9 @@ So we need to remember not only the start node position but the end node positio struct SwTableToTextSave { - sal_uLong m_nSttNd; + sal_uLong const m_nSttNd; sal_uLong m_nEndNd; - sal_Int32 m_nContent; + sal_Int32 const m_nContent; std::unique_ptr<SwHistory> m_pHstry; // metadata references for first and last paragraph in cell std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart; @@ -2271,7 +2271,7 @@ void SwUndoTableNumFormat::UndoImpl(::sw::UndoRedoContext & rContext) class RedlineFlagsInternGuard { SwDoc& mrDoc; - RedlineFlags meOldRedlineFlags; + RedlineFlags const meOldRedlineFlags; public: RedlineFlagsInternGuard( diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index ca2024f61ed4..8bc20f1ed03d 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -95,7 +95,7 @@ using namespace ::com::sun::star::lang; class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper< document::XCodeNameQuery > { - SwDocShell* mpDocShell; + SwDocShell* const mpDocShell; OUString msThisDocumentCodeName; public: explicit SwVbaCodeNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell ) {} @@ -233,7 +233,7 @@ public: class SwVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper< container::XNameAccess > { - SwDocShell* mpDocShell; + SwDocShell* const mpDocShell; public: explicit SwVbaObjectForCodeNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell ) { @@ -277,7 +277,7 @@ public: struct ProvNamesId_Type { const char * pName; - SwServiceType nType; + SwServiceType const nType; }; // note: this thing is indexed as an array, so do not insert/remove entries! diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index da3b4b2d49bf..fa903d7bf703 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -75,7 +75,7 @@ using namespace ::com::sun::star; class SwShapeDescriptor_Impl { - bool m_isInReading; + bool const m_isInReading; std::unique_ptr<SwFormatHoriOrient> m_pHOrient; std::unique_ptr<SwFormatVertOrient> m_pVOrient; std::unique_ptr<SwFormatAnchor> m_pAnchor; diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx index 13e8ddc61aa6..823de312d97b 100644 --- a/sw/source/core/unocore/unoevent.cxx +++ b/sw/source/core/unocore/unoevent.cxx @@ -206,7 +206,6 @@ SwFrameStyleEventDescriptor::SwFrameStyleEventDescriptor( sw::ICoreFrameStyle& rStyle ) : SvEventDescriptor(rStyle.GetEventsSupplier(), aFrameStyleEvents), - sSwFrameStyleEventDescriptor("SwFrameStyleEventDescriptor"), m_rStyle(rStyle) { } @@ -230,7 +229,7 @@ const SvxMacroItem& SwFrameStyleEventDescriptor::getMacroItem() OUString SwFrameStyleEventDescriptor::getImplementationName() { - return sSwFrameStyleEventDescriptor; + return OUString("SwFrameStyleEventDescriptor"); } sal_uInt16 SwFrameStyleEventDescriptor::getMacroItemWhich() const diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index dbebe8c4aaa7..81a3b1453eee 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -131,8 +131,8 @@ static const sal_uInt16 aDocInfoSubTypeFromService[] = struct ServiceIdResId { - SwFieldIds nResId; - SwServiceType nServiceId; + SwFieldIds const nResId; + SwServiceType const nServiceId; }; static const ServiceIdResId aServiceToRes[] = @@ -424,7 +424,7 @@ public: SwDoc* m_pDoc; SwFieldType* m_pType; - SwFieldIds m_nResTypeId; + SwFieldIds const m_nResTypeId; OUString m_sParam1; // Content / Database / NumberingSeparator OUString m_sParam2; // - /DataTablename @@ -1135,7 +1135,7 @@ public: // required to access field master of not yet inserted fields SwClient m_FieldTypeClient; bool m_bCallUpdate; - SwServiceType m_nServiceId; + SwServiceType const m_nServiceId; OUString m_sTypeName; std::unique_ptr<SwFieldProperties_Impl> m_pProps; diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 9f5a070d4611..1e62a996b2bf 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -2707,7 +2707,7 @@ SwXDocumentIndex::TokenAccess_Impl::getSupportedServiceNames() struct TokenType_ { const char *pName; - enum FormTokenType eTokenType; + enum FormTokenType const eTokenType; }; static const struct TokenType_ g_TokenTypes[] = diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index c097d53481c0..f4112d3e48c0 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -116,8 +116,8 @@ public: ::comphelper::OInterfaceContainerHelper2 m_EventListeners; SfxItemPropertySet const& m_rPropSet; bool m_bIsDescriptor; - sal_Int32 m_nSelectionStartPos; - sal_Int32 m_nSelectionEndPos; + sal_Int32 const m_nSelectionStartPos; + sal_Int32 const m_nSelectionEndPos; OUString m_sText; uno::Reference<text::XText> m_xParentText; SwTextNode* m_pTextNode; diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 1a8a95c23f91..ef5b27135594 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -92,7 +92,7 @@ namespace struct SwXBookmarkPortion_Impl { Reference<XTextContent> xBookmark; - BkmType nBkmType; + BkmType const nBkmType; const SwPosition aPosition; SwXBookmarkPortion_Impl(uno::Reference<text::XTextContent> const& xMark, diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index db28a9ad84f8..35a3eaefda8c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -108,15 +108,15 @@ namespace using GetCountOrName_t = std::function<sal_Int32 (const SwDoc&, OUString*, sal_Int32)>; using CreateStyle_t = std::function<uno::Reference<css::style::XStyle>(SfxStyleSheetBasePool*, SwDocShell*, const OUString&)>; using TranslateIndex_t = std::function<sal_uInt16(const sal_uInt16)>; - SfxStyleFamily m_eFamily; - sal_uInt16 m_nPropMapType; + SfxStyleFamily const m_eFamily; + sal_uInt16 const m_nPropMapType; uno::Reference<beans::XPropertySetInfo> m_xPSInfo; - SwGetPoolIdFromName m_aPoolId; - OUString m_sName; + SwGetPoolIdFromName const m_aPoolId; + OUString const m_sName; const char* m_pResId; - GetCountOrName_t m_fGetCountOrName; - CreateStyle_t m_fCreateStyle; - TranslateIndex_t m_fTranslateIndex; + GetCountOrName_t const m_fGetCountOrName; + CreateStyle_t const m_fCreateStyle; + TranslateIndex_t const m_fTranslateIndex; StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, const char* pResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex) : m_eFamily(eFamily) , m_nPropMapType(nPropMapType) @@ -151,9 +151,9 @@ namespace using collectionbits_t = sal_uInt16; struct ParagraphStyleCategoryEntry { - paragraphstyle_t m_eCategory; - SfxStyleSearchBits m_nSwStyleBits; - collectionbits_t m_nCollectionBits; + paragraphstyle_t const m_eCategory; + SfxStyleSearchBits const m_nSwStyleBits; + collectionbits_t const m_nCollectionBits; ParagraphStyleCategoryEntry(paragraphstyle_t eCategory, SfxStyleSearchBits nSwStyleBits, collectionbits_t nCollectionBits) : m_eCategory(eCategory) , m_nSwStyleBits(nSwStyleBits) @@ -284,7 +284,7 @@ class SwXStyle : public cppu::WeakImplHelper OUString m_sStyleName; const StyleFamilyEntry& m_rEntry; bool m_bIsDescriptor; - bool m_bIsConditional; + bool const m_bIsConditional; OUString m_sParentStyleName; protected: @@ -1460,7 +1460,7 @@ private: rtl::Reference<SwDocStyleSheet> m_xNewBase; SfxItemSet* m_pItemSet; std::unique_ptr<SfxItemSet> m_pMyItemSet; - OUString m_rStyleName; + OUString const m_rStyleName; const SwAttrSet* m_pParentStyle; public: SwStyleBase_Impl(SwDoc& rSwDoc, const OUString& rName, const SwAttrSet* pParentStyle) @@ -1507,7 +1507,7 @@ public: struct ItemSetOverrider { SwStyleBase_Impl& m_rStyleBase; - SfxItemSet* m_pOldSet; + SfxItemSet* const m_pOldSet; ItemSetOverrider(SwStyleBase_Impl& rStyleBase, SfxItemSet* pTemp) : m_rStyleBase(rStyleBase) , m_pOldSet(m_rStyleBase.m_pItemSet) @@ -3354,7 +3354,7 @@ class SwAutoStylesEnumImpl std::vector<std::shared_ptr<SfxItemSet>> mAutoStyles; std::vector<std::shared_ptr<SfxItemSet>>::iterator aIter; SwDoc* pDoc; - IStyleAccess::SwAutoStyleFamily eFamily; + IStyleAccess::SwAutoStyleFamily const eFamily; public: SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAutoStyleFamily eFam ); bool hasMoreElements() { return aIter != mAutoStyles.end(); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index bedc64cbf56d..dbf00411ece5 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1772,7 +1772,7 @@ SwXText::convertToTextFrame( struct VerticallyMergedCell { std::vector<uno::Reference< beans::XPropertySet > > aCells; - sal_Int32 nLeftPosition; + sal_Int32 const nLeftPosition; bool bOpen; VerticallyMergedCell(uno::Reference< beans::XPropertySet > const& rxCell, @@ -2440,7 +2440,7 @@ class SwXHeadFootText::Impl { public: SwFrameFormat* m_pHeadFootFormat; - bool m_bIsHeader; + bool const m_bIsHeader; Impl(SwFrameFormat& rHeadFootFormat, const bool bIsHeader) : m_pHeadFootFormat(&rHeadFootFormat) diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index ed68041ec0bb..b68ef540b980 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -77,7 +77,7 @@ class SwQueuedPaint { public: SwQueuedPaint *pNext; - SwViewShell *pSh; + SwViewShell* const pSh; SwRect aRect; SwQueuedPaint( SwViewShell *pNew, const SwRect &rRect ) : |