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 | |
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')
269 files changed, 848 insertions, 856 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 6aa5867377eb..933f7510c6e8 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -205,8 +205,8 @@ class SwEnhancedPDFExportHelper * in a page range without empty pages, or -1 if this page is empty. */ std::vector< sal_Int32 > maPageNumberMap; - bool mbSkipEmptyPages; - bool mbEditEngineOnly; + bool const mbSkipEmptyPages; + bool const mbEditEngineOnly; const SwPrintData& mrPrintData; diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index f27aed1a830c..f275e701f9bf 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -44,8 +44,8 @@ public: class SwUndoFieldFromDoc : public SwUndoField { std::unique_ptr<SwField> pOldField, pNewField; - SwMsgPoolItem * pHint; - bool bUpdate; + SwMsgPoolItem * const pHint; + bool const bUpdate; void DoImpl(); @@ -64,7 +64,7 @@ public: class SwUndoFieldFromAPI : public SwUndoField { css::uno::Any aOldVal, aNewVal; - sal_uInt16 nWhich; + sal_uInt16 const nWhich; void DoImpl(); diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx index e53c537b758e..989f9aff19ec 100644 --- a/sw/inc/ToxLinkProcessor.hxx +++ b/sw/inc/ToxLinkProcessor.hxx @@ -61,8 +61,8 @@ private: StartedLink(sal_Int32 startPosition, const OUString& characterStyle) : mStartPosition(startPosition), mCharacterStyle(characterStyle) { } - sal_Int32 mStartPosition; - OUString mCharacterStyle; + sal_Int32 const mStartPosition; + OUString const mCharacterStyle; }; /** A link that has been encountered while parsing a tox. @@ -76,8 +76,8 @@ private: { } SwFormatINetFormat mINetFormat; - sal_Int32 mStartTextPos; - sal_Int32 mEndTextPos; + sal_Int32 const mStartTextPos; + sal_Int32 const mEndTextPos; }; std::vector<std::unique_ptr<ClosedLink>> m_ClosedLinks; diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx index 7da924599b5e..23a66cc405db 100644 --- a/sw/inc/ToxTabStopTokenHandler.hxx +++ b/sw/inc/ToxTabStopTokenHandler.hxx @@ -100,10 +100,10 @@ private: long CalculatePageMarginFromPageDescription(const SwTextNode& targetNode) const; - sal_uInt32 mIndexOfSectionNode; + sal_uInt32 const mIndexOfSectionNode; const SwPageDesc& mDefaultPageDescription; - bool mTabPositionIsRelativeToParagraphIndent; - TabStopReferencePolicy mTabStopReferencePolicy; + bool const mTabPositionIsRelativeToParagraphIndent; + TabStopReferencePolicy const mTabStopReferencePolicy; }; } diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 6e2e0e2b7984..658bb171df91 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -120,7 +120,7 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, //mpSelectedFrameMap contains the old selected objects. std::unique_ptr<SwAccessibleContextMap_Impl> mpSeletedFrameMap; - OUString maDocName; + OUString const maDocName; //InvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects. void InvalidateShapeInParaSelection(); diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx index 03199909d9c2..eea8dad22227 100644 --- a/sw/inc/acmplwrd.hxx +++ b/sw/inc/acmplwrd.hxx @@ -39,7 +39,7 @@ class SwAutoCompleteWord /// contains extended strings carrying source information editeng::SortedAutoCompleteStrings m_WordList; - editeng::Trie m_LookupTree; + editeng::Trie const m_LookupTree; SwAutoCompleteStringPtrDeque aLRULst; std::unique_ptr<SwAutoCompleteWord_Impl> pImpl; diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 56241deed94b..ff1766d8cd39 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -193,7 +193,7 @@ class SwCalc sal_Int32 m_nCommandPos; SwDoc& m_rDoc; - SvtSysLocale m_aSysLocale; + SvtSysLocale const m_aSysLocale; const LocaleDataWrapper* m_pLocaleDataWrapper; CharClass* m_pCharClass; diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index 59be8f9e7cb4..180f9dbe6645 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -29,8 +29,8 @@ enum class Master_CollCondition; struct CommandStruct { - Master_CollCondition nCnd; - sal_uLong nSubCond; + Master_CollCondition const nCnd; + sal_uLong const nSubCond; }; sal_Int16 GetCommandContextIndex( const OUString &rContextName ); diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx index 29f959e196b8..56bbfac15f58 100644 --- a/sw/inc/crstate.hxx +++ b/sw/inc/crstate.hxx @@ -41,7 +41,7 @@ struct SwFillCursorPos sal_uInt16 nSpaceOnlyCnt; ///< number of spaces to insert ("only spaces, no tabs" mode) sal_uInt16 nColumnCnt; ///< number of necessary column breaks sal_Int16 eOrient; ///< paragraph alignment - SwFillMode eMode; ///< desired fill-up rule + SwFillMode const eMode; ///< desired fill-up rule SwFillCursorPos( SwFillMode eMd ) : nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nSpaceOnlyCnt(0), nColumnCnt( 0 ), eOrient( css::text::HoriOrientation::NONE ), eMode( eMd ) diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index 510f6223874e..278e6a2963fa 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -50,7 +50,7 @@ namespace sw // FieldType for DDE class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType { - OUString aName; + OUString const aName; OUString aExpansion; tools::SvRef<sfx2::SvBaseLink> refLink; diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 043e55d1e5c0..ead0f04620b4 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -376,7 +376,7 @@ public: class SwMacroFieldType : public SwFieldType { - SwDoc* m_pDoc; + SwDoc* const m_pDoc; public: SwMacroFieldType(SwDoc*); @@ -425,7 +425,7 @@ public: class SwPostItFieldType : public SwFieldType { private: - SwDoc* mpDoc; + SwDoc* const mpDoc; public: SwPostItFieldType(SwDoc* pDoc); @@ -668,7 +668,7 @@ public: class SwScriptFieldType : public SwFieldType { - SwDoc* m_pDoc; + SwDoc* const m_pDoc; public: SwScriptFieldType( SwDoc* pDoc ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 13617fb279df..b31fd2ce9943 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -118,7 +118,7 @@ enum class ParaBreakType { /// For querying the INet-attributes for Navigator. struct SwGetINetAttr { - OUString sText; + OUString const sText; const SwTextINetFormat& rINetAttr; SwGetINetAttr( const OUString& rText, const SwTextINetFormat& rAttr ) diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 3081423d3627..025ff802190f 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -45,7 +45,7 @@ OUString ReplacePoint(const OUString& sTmpName, bool bWithCommandType = false); struct SeqFieldLstElem { OUString sDlgEntry; - sal_uInt16 nSeqNo; + sal_uInt16 const nSeqNo; SeqFieldLstElem( const OUString& rStr, sal_uInt16 nNo ) : sDlgEntry( rStr ), nSeqNo( nNo ) @@ -144,7 +144,7 @@ class SwSetExpField; class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType { - OUString m_sName; + OUString const m_sName; const SwNode* m_pOutlChgNd; OUString m_sDelim; sal_uInt16 m_nType; @@ -278,7 +278,7 @@ inline bool SwSetExpField::IsSequenceField() const class SwInputFieldType : public SwFieldType { - SwDoc* mpDoc; + SwDoc* const mpDoc; public: SwInputFieldType( SwDoc* pDoc ); @@ -294,7 +294,7 @@ class SW_DLLPUBLIC SwInputField : public SwField OUString maHelp; OUString maToolTip; sal_uInt16 mnSubType; - bool mbIsFormField; + bool const mbIsFormField; SwFormatField* mpFormatField; // attribute to which the <SwInputField> belongs to diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 0204c99510a9..e6b977b5c295 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -231,7 +231,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify, public sw::BroadcasterMixin { css::uno::WeakReference<css::beans::XPropertySet> m_wXFieldMaster; - SwFieldIds m_nWhich; + SwFieldIds const m_nWhich; friend void FinitUI(); ///< In order to delete pointer! static std::vector<OUString>* s_pFieldNames; diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index 1b72d3e6b83c..6c1b805e952c 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -120,7 +120,7 @@ enum class SwFormatFieldHintWhich class SW_DLLPUBLIC SwFormatFieldHint : public SfxHint { const SwFormatField* m_pField; - SwFormatFieldHintWhich m_nWhich; + SwFormatFieldHintWhich const m_nWhich; const SwView* m_pView; public: diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx index 7107d80d2894..e8a0c7a95e08 100644 --- a/sw/inc/fmthdft.hxx +++ b/sw/inc/fmthdft.hxx @@ -32,7 +32,7 @@ class IntlWrapper; class SW_DLLPUBLIC SwFormatHeader: public SfxPoolItem, public SwClient { - bool bActive; ///< Only for controlling (creation of content). + bool const bActive; ///< Only for controlling (creation of content). public: SwFormatHeader( bool bOn = false ); @@ -63,7 +63,7 @@ public: class SW_DLLPUBLIC SwFormatFooter: public SfxPoolItem, public SwClient { - bool bActive; // Only for controlling (creation of content). + bool const bActive; // Only for controlling (creation of content). public: SwFormatFooter( bool bOn = false ); diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index bd77ab2cff3d..f06da7bb8006 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -268,7 +268,7 @@ namespace sw }; struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint { - DrawFrameFormatHintId m_eId; + DrawFrameFormatHintId const m_eId; DrawFrameFormatHint(DrawFrameFormatHintId eId) : m_eId(eId) {}; virtual ~DrawFrameFormatHint() override; }; diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx index d45e28f1c06f..46418c660e23 100644 --- a/sw/inc/gotodlg.hxx +++ b/sw/inc/gotodlg.hxx @@ -36,7 +36,7 @@ public: private: SwView *m_pCreateView; - SfxBindings *m_rBindings; + SfxBindings * const m_rBindings; sal_uInt16 mnMaxPageCnt; std::unique_ptr<weld::Entry> mxMtrPageCtrl; diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index 2b250a57e12b..4fff9948c883 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -80,7 +80,7 @@ public: class SwRotationGrf : public SfxUInt16Item { private: - Size aUnrotatedSize; + Size const aUnrotatedSize; // tdf#115529 check and evtl. correct value, it is in 10th // degrees and *has* to be in the range [0 .. 3600[ diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 6cfdec0f2347..95aa775c76d5 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion bool m_bIsDrawObj; bool m_bIsOtherContent; bool m_bStartChk; - bool m_bIsSelection; ///< true if only the selected text should be converted + bool const m_bIsSelection; ///< true if only the selected text should be converted bool m_bStartDone; bool m_bEndDone; diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index bdf2eceaa8a6..2519cf4700a9 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -64,15 +64,15 @@ public: class SwFormatChg: public SwMsgPoolItem { public: - SwFormat *pChangedFormat; + SwFormat * const pChangedFormat; SwFormatChg( SwFormat *pFormat ); }; class SwInsText: public SwMsgPoolItem { public: - sal_Int32 nPos; - sal_Int32 nLen; + sal_Int32 const nPos; + sal_Int32 const nLen; SwInsText( sal_Int32 nP, sal_Int32 nL ); }; @@ -80,7 +80,7 @@ public: class SwDelChr: public SwMsgPoolItem { public: - sal_Int32 nPos; + sal_Int32 const nPos; SwDelChr( sal_Int32 nP ); }; @@ -88,8 +88,8 @@ public: class SwDelText: public SwMsgPoolItem { public: - sal_Int32 nStart; - sal_Int32 nLen; + sal_Int32 const nStart; + sal_Int32 const nLen; SwDelText( sal_Int32 nS, sal_Int32 nL ); }; @@ -112,8 +112,8 @@ public: class RedlineDelText : public SfxHint { public: - sal_Int32 nStart; - sal_Int32 nLen; + sal_Int32 const nStart; + sal_Int32 const nLen; RedlineDelText(sal_Int32 nS, sal_Int32 nL); }; @@ -133,9 +133,9 @@ public: class SwUpdateAttr : public SwMsgPoolItem { private: - sal_Int32 m_nStart; - sal_Int32 m_nEnd; - sal_uInt16 m_nWhichAttr; + sal_Int32 const m_nStart; + sal_Int32 const m_nEnd; + sal_uInt16 const m_nWhichAttr; public: SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW ); @@ -220,7 +220,7 @@ public: */ class SwAttrSetChg: public SwMsgPoolItem { - bool m_bDelSet; + bool const m_bDelSet; SwAttrSet* m_pChgSet; ///< what has changed const SwAttrSet* m_pTheChgdSet; ///< is only used to compare public: @@ -247,7 +247,7 @@ public: class SwCondCollCondChg: public SwMsgPoolItem { public: - SwFormat *pChangedFormat; + SwFormat * const pChangedFormat; SwCondCollCondChg( SwFormat *pFormat ); }; @@ -280,7 +280,7 @@ public: class SwStringMsgPoolItem : public SwMsgPoolItem { - OUString m_sStr; + OUString const m_sStr; public: const OUString& GetString() const { return m_sStr; } diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 966b7c407f96..cc0880d5bad0 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -54,7 +54,7 @@ class SwHTMLTableLayoutCnts sal_uInt8 nPass1Done; ///< How many times has Pass 1 been called? sal_uInt8 nWidthSet; ///< How many times has the width been set? - bool bNoBreakTag; ///< <NOBR>-Tag over complete content. + bool const bNoBreakTag; ///< <NOBR>-Tag over complete content. public: @@ -86,10 +86,10 @@ class SwHTMLTableLayoutCell sal_uInt16 nRowSpan; ///< ROWSPAN of cell. sal_uInt16 nColSpan; ///< COLSPAN of cell. - sal_uInt16 nWidthOption; ///< Given width of cell in Twip or %. + sal_uInt16 const nWidthOption; ///< Given width of cell in Twip or %. - bool bPrcWidthOption : 1; ///< nWidth is %-value. - bool bNoWrapOption : 1; ///< NOWRAP-option. + bool const bPrcWidthOption : 1; ///< nWidth is %-value. + bool const bNoWrapOption : 1; ///< NOWRAP-option. public: @@ -131,7 +131,7 @@ class SwHTMLTableLayoutColumn sal_uInt16 nWidthOption; ///< Options of <COL> or <TD>/<TH>. bool bRelWidthOption : 1; - bool bLeftBorder : 1; + bool const bLeftBorder : 1; public: @@ -178,11 +178,11 @@ class SwHTMLTableLayout sal_uLong m_nMin; ///< Minimal width of table (Twips). sal_uLong m_nMax; ///< Maximal width of table (Twips). - sal_uInt16 m_nRows; ///< Row count. + sal_uInt16 const m_nRows; ///< Row count. sal_uInt16 m_nCols; ///< Column count. - sal_uInt16 m_nLeftMargin; ///< Space to left margin (from paragraph). - sal_uInt16 m_nRightMargin; ///< Space to left margin (from paragraph). + sal_uInt16 const m_nLeftMargin; ///< Space to left margin (from paragraph). + sal_uInt16 const m_nRightMargin; ///< Space to left margin (from paragraph). sal_uInt16 m_nInhAbsLeftSpace; ///< Space inherited from surrounding box sal_uInt16 m_nInhAbsRightSpace; ///< that was added to boxes. @@ -193,16 +193,16 @@ class SwHTMLTableLayout sal_uInt16 m_nRelTabWidth; ///< Relative width of table. sal_uInt16 m_nWidthOption; ///< Width of table (in Twips or %). - sal_uInt16 m_nCellPadding; ///< Space to contents (in Twips). - sal_uInt16 m_nCellSpacing; ///< Cell spacing (in Twips). - sal_uInt16 m_nBorder; /** Line strength of outer border, or rather the + sal_uInt16 const m_nCellPadding; ///< Space to contents (in Twips). + sal_uInt16 const m_nCellSpacing; ///< Cell spacing (in Twips). + sal_uInt16 const m_nBorder; /** Line strength of outer border, or rather the space needed for it as calculated by Netscape. */ - sal_uInt16 m_nLeftBorderWidth; - sal_uInt16 m_nRightBorderWidth; + sal_uInt16 const m_nLeftBorderWidth; + sal_uInt16 const m_nRightBorderWidth; sal_uInt16 m_nInhLeftBorderWidth; sal_uInt16 m_nInhRightBorderWidth; - sal_uInt16 m_nBorderWidth; + sal_uInt16 const m_nBorderWidth; sal_uInt16 m_nDelayedResizeAbsAvail; ///< Param for delayed Resize. sal_uInt16 m_nLastResizeAbsAvail; @@ -210,11 +210,11 @@ class SwHTMLTableLayout sal_uInt8 m_nPass1Done; ///< Reference-values for sal_uInt8 m_nWidthSet; ///< the runs through loop. - SvxAdjust m_eTableAdjust; ///< Alignment of table. + SvxAdjust const m_eTableAdjust; ///< Alignment of table. - bool m_bColsOption : 1; ///< Table has a COLS-option. - bool m_bColTags : 1; ///< Table has COL/COLGRP tags. - bool m_bPrcWidthOption : 1; ///< Width is given in percent. + bool const m_bColsOption : 1; ///< Table has a COLS-option. + bool const m_bColTags : 1; ///< Table has COL/COLGRP tags. + bool const m_bPrcWidthOption : 1; ///< Width is given in percent. bool m_bUseRelWidth : 1; ///< SwTable gets relative width. bool m_bMustResize : 1; ///< Table width must be defined. diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index dab488078d15..bf5148bee215 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -127,7 +127,7 @@ class SwInsertConfig : public utl::ConfigItem bool m_bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering SwInsertTableOptions m_aInsTableOpts; - bool m_bIsWeb; + bool const m_bIsWeb; const css::uno::Sequence<OUString>& GetPropertyNames(); diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx index 8c7783221757..03707596662d 100644 --- a/sw/inc/modeltoviewhelper.hxx +++ b/sw/inc/modeltoviewhelper.hxx @@ -94,9 +94,9 @@ class ModelToViewHelper , m_bVisible(bVisible) { } - sal_Int32 m_nModelPos; - sal_Int32 m_nViewPos; - bool m_bVisible; + sal_Int32 const m_nModelPos; + sal_Int32 const m_nViewPos; + bool const m_bVisible; }; typedef std::vector< ConversionMapEntry > ConversionMap; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 43ceb38e724c..b37d96ac1d04 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -81,7 +81,7 @@ class SW_DLLPUBLIC SwNode { friend class SwNodes; - SwNodeType m_nNodeType; + SwNodeType const m_nNodeType; /// For text nodes: level of auto format. Was put here because we had still free bits. sal_uInt8 m_nAFormatNumLvl : 3; @@ -100,7 +100,7 @@ private: #ifdef DBG_UTIL static long s_nSerial; - long m_nSerial; + long const m_nSerial; #endif /// all SwFrameFormat that are anchored at the node @@ -307,7 +307,7 @@ class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode friend class SwEndNode; ///< to set the theEndOfSection !! SwEndNode* m_pEndOfSection; - SwStartNodeType m_eStartNodeType; + SwStartNodeType const m_eStartNodeType; /// for the initial StartNode SwStartNode( SwNodes& rNodes, sal_uLong nPos ); diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 3dd5a1d2d9e1..522986f87c1b 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -354,7 +354,7 @@ class SwPageDescExt public: SwPageDesc m_PageDesc; private: - SwDoc * m_pDoc; + SwDoc * const m_pDoc; OUString m_sFollow; void SetPageDesc(const SwPageDesc & rPageDesc); diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx index 45eaa167d125..5c53ee1a84bd 100644 --- a/sw/inc/prtopt.hxx +++ b/sw/inc/prtopt.hxx @@ -25,7 +25,7 @@ class SwPrintOptions : public SwPrintData, public utl::ConfigItem { private: - bool bIsWeb; + bool const bIsWeb; css::uno::Sequence<OUString> GetPropertyNames(); diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index a2772c17caba..7e3b94ed1d0a 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -112,7 +112,7 @@ class SW_DLLPUBLIC SwRedlineData OUString m_sComment; DateTime m_aStamp; RedlineType_t m_eType; - std::size_t m_nAuthor; + std::size_t const m_nAuthor; sal_uInt16 m_nSeqNo; public: @@ -174,7 +174,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM SwNodeIndex* m_pContentSect; bool m_bDelLastPara : 1; bool m_bIsVisible : 1; - sal_uInt32 m_nId; + sal_uInt32 const m_nId; boost::optional<long> m_oLOKLastNodeTop; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 194ce40d0686..137cc4e4b50a 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -139,12 +139,12 @@ public: class SW_DLLPUBLIC SwReader: public SwDocFac { SvStream* pStrm; - tools::SvRef<SotStorage> pStg; + tools::SvRef<SotStorage> const pStg; css::uno::Reference < css::embed::XStorage > xStg; - SfxMedium* pMedium; // Who wants to obtain a Medium (W4W). + SfxMedium* const pMedium; // Who wants to obtain a Medium (W4W). - SwPaM* pCursor; - OUString aFileName; + SwPaM* const pCursor; + OUString const aFileName; OUString sBaseURL; bool mbSkipImages; @@ -500,7 +500,7 @@ class SW_DLLPUBLIC SwWriter css::uno::Reference < css::embed::XStorage > xStg; SfxMedium* pMedium; - SwPaM* pOutPam; + SwPaM* const pOutPam; SwCursorShell *pShell; SwDoc &rDoc; @@ -527,9 +527,9 @@ ErrCode GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS ); struct SwReaderWriterEntry { Reader* pReader; - FnGetReader fnGetReader; - FnGetWriter fnGetWriter; - bool bDelReader; + FnGetReader const fnGetReader; + FnGetWriter const fnGetWriter; + bool const bDelReader; SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel ) : pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel ) diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx index 7b8d70962350..c836592ccfbd 100644 --- a/sw/inc/shellres.hxx +++ b/sw/inc/shellres.hxx @@ -25,40 +25,40 @@ struct SW_DLLPUBLIC ShellResource { - OUString aPostItAuthor; - OUString aPostItPage; - OUString aPostItLine; + OUString const aPostItAuthor; + OUString const aPostItPage; + OUString const aPostItLine; // Calc error-strings. - OUString aCalc_Syntax; - OUString aCalc_ZeroDiv; - OUString aCalc_Brack; - OUString aCalc_Pow; - OUString aCalc_Overflow; - OUString aCalc_Default; - OUString aCalc_Error; + OUString const aCalc_Syntax; + OUString const aCalc_ZeroDiv; + OUString const aCalc_Brack; + OUString const aCalc_Pow; + OUString const aCalc_Overflow; + OUString const aCalc_Default; + OUString const aCalc_Error; // For GetRefField - referenced item not found. - OUString aGetRefField_RefItemNotFound; + OUString const aGetRefField_RefItemNotFound; // For some list boxes - string "none" - OUString aStrNone; + OUString const aStrNone; // For fixed fields. - OUString aFixedStr; + OUString const aFixedStr; // Custom fields of type css::util::Duration. - OUString sDurationFormat; + OUString const sDurationFormat; //Names of TOXs. - OUString aTOXIndexName; - OUString aTOXUserName; - OUString aTOXContentName; - OUString aTOXIllustrationsName; - OUString aTOXObjectsName; - OUString aTOXTablesName; - OUString aTOXAuthoritiesName; - OUString aTOXCitationName; + OUString const aTOXIndexName; + OUString const aTOXUserName; + OUString const aTOXContentName; + OUString const aTOXIllustrationsName; + OUString const aTOXObjectsName; + OUString const aTOXTablesName; + OUString const aTOXAuthoritiesName; + OUString const aTOXCitationName; OUString aLinkCtrlClick; - OUString aLinkClick; + OUString const aLinkClick; std::vector<OUString> aDocInfoLst; @@ -81,9 +81,9 @@ struct SW_DLLPUBLIC ShellResource private: void GetAutoFormatNameLst_() const; mutable std::unique_ptr<std::vector<OUString>> pAutoFormatNameLst; - OUString sPageDescFirstName; - OUString sPageDescFollowName; - OUString sPageDescName; + OUString const sPageDescFirstName; + OUString const sPageDescFollowName; + OUString const sPageDescName; }; inline const std::vector<OUString>& ShellResource::GetAutoFormatNameLst() const diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index efd4c33e6352..0c66737205f9 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -62,8 +62,8 @@ struct SwArgsBase // used for text conversion (Hangul/Hanja, ...) struct SwConversionArgs : SwArgsBase { OUString aConvText; // convertible text found - LanguageType nConvSrcLang; // (source) language to look for - LanguageType nConvTextLang; // language of aConvText (if the latter one was found) + LanguageType const nConvSrcLang; // (source) language to look for + LanguageType nConvTextLang; // language of aConvText (if the latter one was found) // used for chinese translation LanguageType nConvTargetLang; // target language of text to be changed @@ -89,7 +89,7 @@ struct SwSpellArgs : SwArgsBase css::uno::Reference< css::linguistic2::XSpellAlternatives > xSpellAlt; - bool bIsGrammarCheck; + bool const bIsGrammarCheck; SwSpellArgs(css::uno::Reference< css::linguistic2::XSpellChecker1 > const &rxSplChk, diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index 3e369480bc56..397887d09429 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -141,7 +141,7 @@ private: friend void InitCore(); // For creating/deleting of version maps. friend void FinitCore(); - SwDoc* m_pDoc; + SwDoc* const m_pDoc; public: SwAttrPool( SwDoc* pDoc ); diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx index 5149bec8fbf8..667e776ccd31 100644 --- a/sw/inc/swcli.hxx +++ b/sw/inc/swcli.hxx @@ -30,7 +30,7 @@ class EmbeddedObjectRef; class SwOleClient : public SfxInPlaceClient { bool m_IsInDoVerb; - bool m_IsOldCheckForOLEInCaption; + bool const m_IsOldCheckForOLEInCaption; virtual void ObjectAreaChanged() override; virtual void RequestNewObjectArea( tools::Rectangle& ) override; diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx index de273d679b8b..05115ed10b27 100644 --- a/sw/inc/swscanner.hxx +++ b/sw/inc/swscanner.hxx @@ -31,7 +31,7 @@ class SwTextNode; // during spell check class SwScanner { - std::function<LanguageType (sal_Int32, sal_Int32, bool)> m_pGetLangOfChar; + std::function<LanguageType (sal_Int32, sal_Int32, bool)> const m_pGetLangOfChar; OUString m_aWord; const OUString m_aPreDashReplacementText; OUString m_aText; @@ -43,8 +43,8 @@ class SwScanner sal_Int32 m_nLength; sal_Int32 m_nOverriddenDashCount; LanguageType m_aCurrentLang; - sal_uInt16 m_nWordType; - bool m_bClip; + sal_uInt16 const m_nWordType; + bool const m_bClip; public: SwScanner(const std::function<LanguageType(sal_Int32, sal_Int32, bool)>& pGetLangOfChar, diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index e7ef81b53ef3..0639db32f72e 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -121,7 +121,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, class SwSelUnion { SwRect m_aUnion; // The rectangle enclosing the selection. - SwTabFrame *m_pTable; // The (Follow-)Table for the Union. + SwTabFrame * const m_pTable; // The (Follow-)Table for the Union. public: SwSelUnion( const SwRect &rRect, SwTabFrame *pTab ) : @@ -156,9 +156,9 @@ typedef std::vector<std::unique_ptr<FndLine_>> FndLines_t; class FndBox_ { - SwTableBox* m_pBox; + SwTableBox* const m_pBox; FndLines_t m_Lines; - FndLine_* m_pUpper; + FndLine_* const m_pUpper; SwTableLine *m_pLineBefore; // For deleting/restoring the layout. SwTableLine *m_pLineBehind; @@ -191,7 +191,7 @@ public: class FndLine_ { - SwTableLine* m_pLine; + SwTableLine* const m_pLine; FndBoxes_t m_Boxes; FndBox_* m_pUpper; diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 2ca0604d3926..e5c938e4e34e 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -159,8 +159,8 @@ public: inline TOXTypes GetType() const; private: - OUString m_aName; - TOXTypes m_eType; + OUString const m_aName; + TOXTypes const m_eType; // @@@ public copy ctor, but no copy assignment? SwTOXType & operator= (const SwTOXType &) = delete; @@ -237,7 +237,7 @@ struct SW_DLLPUBLIC SwFormToken struct SwFormTokenEqualToFormTokenType { - FormTokenType eType; + FormTokenType const eType; SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {} bool operator()(const SwFormToken & rToken) diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 32b3e4bc3069..625b9cba2e1a 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -33,7 +33,7 @@ class SwScriptIterator const OUString& m_rText; sal_Int32 m_nChgPos; sal_uInt16 nCurScript; - bool bForward; + bool const bForward; public: SwScriptIterator( const OUString& rStr, sal_Int32 nStart, diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 2e84ff9c1d6e..8610ab3d38a6 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -52,7 +52,7 @@ class SwUndo { SwUndoId const m_nId; RedlineFlags nOrigRedlineFlags; - ViewShellId m_nViewShellId; + ViewShellId const m_nViewShellId; bool m_isRepeatIgnored; ///< for multi-selection, only repeat 1st selection protected: @@ -290,7 +290,7 @@ public: class SwUndoInsLayFormat : public SwUndoFlyBase { sal_uLong mnCursorSaveIndexPara; // Cursor position - sal_Int32 mnCursorSaveIndexPos; // for undo + sal_Int32 const mnCursorSaveIndexPos; // for undo public: SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx ); diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index e3e413420217..0b4e9c73e752 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -235,8 +235,8 @@ class SwChartDataSequence : ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners; css::chart2::data::DataSequenceRole m_aRole; - OUString m_aRowLabelText; - OUString m_aColLabelText; + OUString const m_aRowLabelText; + OUString const m_aColLabelText; rtl::Reference<SwChartDataProvider> m_xDataProvider; diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index e4203d3a315d..a6d49603cf7e 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -150,7 +150,7 @@ private: SwDocShell* pDocShell; // Only if used as chapter numbering. SwNumRule* pNumRule; const SfxItemPropertySet* m_pPropertySet; - bool bOwnNumRuleCreated; + bool const bOwnNumRuleCreated; protected: virtual ~SwXNumberingRules() override; diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index c59ac8602a49..4d60d9614630 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -117,7 +117,7 @@ class SwXAutoStyles : public cppu::WeakImplHelper< css::style::XAutoStyles >, public SwUnoCollection { - SwDocShell *m_pDocShell; + SwDocShell * const m_pDocShell; css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoCharStyles; css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoRubyStyles; css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoParaStyles; @@ -146,7 +146,7 @@ class SwXAutoStyleFamily : public cppu::WeakImplHelper< css::style::XAutoStyleFa public SwClient { SwDocShell *m_pDocShell; - IStyleAccess::SwAutoStyleFamily m_eFamily; + IStyleAccess::SwAutoStyleFamily const m_eFamily; protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; @@ -192,9 +192,9 @@ class SwXAutoStyle : public cppu::WeakImplHelper public SwClient { private: - std::shared_ptr<SfxItemSet> mpSet; - IStyleAccess::SwAutoStyleFamily meFamily; - SwDoc& mrDoc; + std::shared_ptr<SfxItemSet> mpSet; + IStyleAccess::SwAutoStyleFamily const meFamily; + SwDoc& mrDoc; /// @throws css::beans::UnknownPropertyException /// @throws css::lang::WrappedTargetException diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 6bb104a168ca..66ca09b98038 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -545,7 +545,7 @@ class SwXOutlineTarget : public cppu::WeakImplHelper > { const SfxItemPropertySet* pPropSet; - OUString sOutlineText; + OUString const sOutlineText; public: SwXOutlineTarget(const OUString& rOutlineText); @@ -597,8 +597,8 @@ public: // After printing the view options are restored class SwViewOptionAdjust_Impl { - SwViewShell * m_pShell; - SwViewOption m_aOldViewOptions; + SwViewShell * m_pShell; + SwViewOption const m_aOldViewOptions; public: SwViewOptionAdjust_Impl( SwViewShell& rSh, const SwViewOption &rViewOptions ); ~SwViewOptionAdjust_Impl(); 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 ) : diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index f4962f61692d..183f32a148d3 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -59,7 +59,7 @@ class SwASCIIParser std::unique_ptr<SfxItemSet> pItemSet; long nFileSize; SvtScriptType nScript; - bool bNewDoc; + bool const bNewDoc; ErrCode ReadChars(); void InsertText( const OUString& rStr ); diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 784d86d2f8e9..a2eec2792551 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -411,7 +411,7 @@ namespace struct CharSetNameMap { - rtl_TextEncoding eCode; + rtl_TextEncoding const eCode; const sal_Char* pName; }; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 3b09ec200ca9..ef36f1600e6a 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -210,7 +210,7 @@ bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty) class SwCSS1OutMode { SwHTMLWriter& rWrt; - sal_uInt16 nOldMode; + sal_uInt16 const nOldMode; public: diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index ef1b8d7bb636..5abf7f41cc20 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1078,11 +1078,11 @@ class HTMLEndPosLst std::vector<sal_uInt16> aScriptLst; SwDoc *pDoc; // the current document - SwDoc* pTemplate; // the HTML template (or 0) + SwDoc* const pTemplate; // the HTML template (or 0) boost::optional<Color> xDfltColor;// the default foreground colors std::set<OUString>& rScriptTextStyles; - sal_uLong nHTMLMode; + sal_uLong const nHTMLMode; bool bOutStyles : 1; // are styles exported // Insert/remove a SttEndPos in/from the Start and End lists. diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 9cdc2880e0c1..316dc4516011 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -74,9 +74,9 @@ static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc ); // Implementation of SwCSS1Parsers (actually swcss1.cxx) static struct SwCSS1ItemIds { - sal_uInt16 nFormatBreak; - sal_uInt16 nFormatPageDesc; - sal_uInt16 nFormatKeep; + sal_uInt16 const nFormatBreak; + sal_uInt16 const nFormatPageDesc; + sal_uInt16 const nFormatKeep; SwCSS1ItemIds() : nFormatBreak( RES_BREAK ), diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index c05dfc8bce74..513f01650887 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -40,7 +40,7 @@ using namespace ::com::sun::star; struct HTMLNumFormatTableEntry { const sal_Char *pName; - NfIndexTableOffset eFormat; + NfIndexTableOffset const eFormat; }; static HTMLOptionEnum<SwFieldIds> aHTMLFieldTypeTable[] = diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index e3ea1101be48..5873baf28dad 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -98,9 +98,9 @@ class SwHTMLPosFlyFrame const SwFrameFormat *pFrameFormat; // the frame const SdrObject *pSdrObject; // maybe Sdr-Object SwNodeIndex *pNdIdx; // Node-Index - sal_uInt32 nOrdNum; // from SwPosFlyFrame + sal_uInt32 const nOrdNum; // from SwPosFlyFrame sal_Int32 nContentIdx; // its position in content - AllHtmlFlags nAllFlags; + AllHtmlFlags const nAllFlags; SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame&) = delete; SwHTMLPosFlyFrame& operator=(const SwHTMLPosFlyFrame&) = delete; diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index fc03ba994a9d..bc1f660ff726 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -177,9 +177,9 @@ const sal_Char * aEventOptionTable[] = class SwHTMLForm_Impl { - SwDocShell *m_pDocShell; + SwDocShell * const m_pDocShell; - SvKeyValueIterator *m_pHeaderAttrs; + SvKeyValueIterator * const m_pHeaderAttrs; // Cached interfaces uno::Reference< drawing::XDrawPage > m_xDrawPage; @@ -366,8 +366,8 @@ class SwHTMLImageWatcher : uno::Reference< drawing::XShape > xShape; // the control uno::Reference< XImageProducerSupplier > xSrc; uno::Reference< awt::XImageConsumer > xThis; // reference to self - bool bSetWidth; - bool bSetHeight; + bool const bSetWidth; + bool const bSetHeight; void clear(); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 050066c8f0bc..1db29230c4d5 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -119,8 +119,8 @@ class HTMLTableContext SwFrameFormat *pFrameFormat; // the Fly frame::Frame, containing the table std::unique_ptr<SwPosition> pPos; // position behind the table - size_t nContextStAttrMin; - size_t nContextStMin; + size_t const nContextStAttrMin; + size_t const nContextStMin; bool bRestartPRE : 1; bool bRestartXMP : 1; @@ -432,14 +432,14 @@ private: bool m_bInheritedRightBorder; bool m_bBordersSet; // the border is set already bool m_bForceFrame; - bool m_bTableAdjustOfTag; // comes nTableAdjust from <TABLE>? + bool const m_bTableAdjustOfTag; // comes nTableAdjust from <TABLE>? sal_uInt32 m_nHeadlineRepeat; // repeating rows - bool m_bIsParentHead; + bool const m_bIsParentHead; bool m_bHasParentSection; - bool m_bHasToFly; - bool m_bFixedCols; + bool const m_bHasToFly; + bool const m_bFixedCols; bool m_bColSpec; // where there COL(GROUP)-elements? - bool m_bPrcWidth; // width is declared in % + bool const m_bPrcWidth; // width is declared in % SwHTMLParser *m_pParser; // the current parser std::unique_ptr<HTMLTableCnts> m_xParentContents; @@ -449,13 +449,13 @@ private: std::shared_ptr<SwHTMLTableLayout> m_xLayoutInfo; // the following parameters are from the <TABLE>-Tag - sal_uInt16 m_nWidth; // width of the table + sal_uInt16 const m_nWidth; // width of the table sal_uInt16 m_nHeight; // absolute height of the table - SvxAdjust m_eTableAdjust; // drawing::Alignment of the table - sal_Int16 m_eVertOrientation; // Default vertical direction of the cells + SvxAdjust const m_eTableAdjust; // drawing::Alignment of the table + sal_Int16 const m_eVertOrientation; // Default vertical direction of the cells sal_uInt16 m_nBorder; // width of the external border - HTMLTableFrame m_eFrame; // frame around the table - HTMLTableRules m_eRules; // frame in the table + HTMLTableFrame const m_eFrame; // frame around the table + HTMLTableRules const m_eRules; // frame in the table bool m_bTopCaption; // Caption of the table void InitCtor(const HTMLTableOptions& rOptions); @@ -2839,7 +2839,7 @@ class CellSaveStruct : public SectionSaveStruct sal_Int16 m_eVertOri; - bool m_bHead : 1; + bool const m_bHead : 1; bool m_bPrcWidth : 1; bool m_bHasNumFormat : 1; bool m_bHasValue : 1; @@ -4467,7 +4467,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, class CaptionSaveStruct : public SectionSaveStruct { - SwPosition aSavePos; + SwPosition const aSavePos; SwHTMLNumRuleInfo aNumRuleInfo; // valid numbering public: @@ -4898,8 +4898,8 @@ namespace class IndexInRange { private: - SwNodeIndex maStart; - SwNodeIndex maEnd; + SwNodeIndex const maStart; + SwNodeIndex const maEnd; public: explicit IndexInRange(const SwNodeIndex& rStart, const SwNodeIndex& rEnd) : maStart(rStart) diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx index 5a737bc4daf0..1e8c287fdced 100644 --- a/sw/source/filter/html/parcss1.hxx +++ b/sw/source/filter/html/parcss1.hxx @@ -85,8 +85,8 @@ enum CSS1SelectorType */ class CSS1Selector { - CSS1SelectorType eType; // the type - OUString aSelector; // the selector itself + CSS1SelectorType const eType; // the type + OUString const aSelector; // the selector itself CSS1Selector *pNext; // the following component public: diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index aa0e9ec5e1ba..97a314ffa341 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -85,7 +85,7 @@ namespace o3tl { struct CSS1PropertyEnum { const sal_Char *pName; // property value - sal_uInt16 nEnum; // and the corresponding value of enum + sal_uInt16 const nEnum; // and the corresponding value of enum }; namespace editeng { class SvxBorderLine; } @@ -191,7 +191,7 @@ class SvxCSS1Parser : public CSS1Parser CSS1Map m_Pages; CSS1Map m_Tags; - OUString sBaseURL; + OUString const sBaseURL; std::unique_ptr<SfxItemSet> pSheetItemSet; // item set of Style-Sheet SfxItemSet *pItemSet; // current item set @@ -199,7 +199,7 @@ class SvxCSS1Parser : public CSS1Parser std::unique_ptr<SvxCSS1PropertyInfo> pSheetPropInfo; SvxCSS1PropertyInfo *pPropInfo; - sal_uInt16 nMinFixLineSpace; // minimum spacing for fixed line spacing + sal_uInt16 const nMinFixLineSpace; // minimum spacing for fixed line spacing rtl_TextEncoding eDfltEnc; diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx index f750e3fe0110..d99e9c696f68 100644 --- a/sw/source/filter/html/swcss1.hxx +++ b/sw/source/filter/html/swcss1.hxx @@ -43,7 +43,7 @@ class SwCSS1Parser : public SvxCSS1Parser sal_uInt16 m_nDropCapCnt; - bool m_bIsNewDoc : 1; + bool const m_bIsNewDoc : 1; bool m_bBodyBGColorSet : 1; bool m_bBodyBackgroundSet : 1; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 667407d4a9b0..596b56261fd6 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -205,14 +205,14 @@ class HTMLAttrContext { HTMLAttrs m_aAttrs; // the attributes created in the context - OUString m_aClass; // context class + OUString const m_aClass; // context class std::unique_ptr<HTMLAttrContext_SaveDoc> m_pSaveDocContext; std::unique_ptr<SfxItemSet> m_pFrameItemSet; - HtmlTokenId m_nToken; // the token of the context + HtmlTokenId const m_nToken; // the token of the context - sal_uInt16 m_nTextFormatColl; // a style created in the context or zero + sal_uInt16 const m_nTextFormatColl; // a style created in the context or zero sal_uInt16 m_nLeftMargin; // a changed left border sal_uInt16 m_nRightMargin; // a changed right border @@ -225,7 +225,7 @@ class HTMLAttrContext bool m_bLRSpaceChanged : 1; // left/right border, changed indent? bool m_bULSpaceChanged : 1; // top/bottom border changed? - bool m_bDefaultTextFormatColl : 1;// nTextFormatColl is only default + bool const m_bDefaultTextFormatColl : 1;// nTextFormatColl is only default bool m_bSpansSection : 1; // the context opens a SwSection bool m_bPopStack : 1; // delete above stack elements bool m_bFinishPREListingXMP : 1; @@ -338,7 +338,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient */ std::unique_ptr<ImportProgress> m_xProgress; - OUString m_aPathToFile; + OUString const m_aPathToFile; OUString m_sBaseURL; OUString m_aBasicLib; OUString m_aBasicModule; @@ -448,7 +448,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient bool m_bSelect : 1; bool m_bInFootEndNoteAnchor : 1; bool m_bInFootEndNoteSymbol : 1; - bool m_bIgnoreHTMLComments : 1; + bool const m_bIgnoreHTMLComments : 1; bool m_bRemoveHidden : 1; // the filter implementation might set the hidden flag bool m_bBodySeen : 1; @@ -937,7 +937,7 @@ struct SwPendingData struct SwPending { - HtmlTokenId nToken; + HtmlTokenId const nToken; std::unique_ptr<SwPendingData> pData; SwPending( HtmlTokenId nTkn ) diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index d34ae94c5681..279ed3ba04c5 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -622,12 +622,12 @@ struct HTMLSaveData SwPaM* pOldPam, *pOldEnd; std::unique_ptr<SwHTMLNumRuleInfo> pOldNumRuleInfo; // Owner = this std::unique_ptr<SwHTMLNumRuleInfo> pOldNextNumRuleInfo; - sal_uInt16 nOldDefListLvl; - SvxFrameDirection nOldDirection; + sal_uInt16 const nOldDefListLvl; + SvxFrameDirection const nOldDirection; bool bOldWriteAll : 1; - bool bOldOutHeader : 1; - bool bOldOutFooter : 1; - bool bOldOutFlyFrame : 1; + bool const bOldOutHeader : 1; + bool const bOldOutFooter : 1; + bool const bOldOutFlyFrame : 1; HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd, bool bSaveNum=true, diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 032ccbe00d81..7007a5ec1454 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -127,7 +127,7 @@ private: typedef std::vector<std::unique_ptr<SwFltStackEntry>> Entries; Entries m_Entries; - sal_uLong nFieldFlags; + sal_uLong const nFieldFlags; bool bHasSdOD; bool bSdODChecked; @@ -215,12 +215,12 @@ public: class SW_DLLPUBLIC SwFltRedline : public SfxPoolItem { public: - DateTime aStamp; - DateTime aStampPrev; - RedlineType_t eType; - RedlineType_t eTypePrev; - std::size_t nAutorNo; - std::size_t nAutorNoPrev; + DateTime const aStamp; + DateTime const aStampPrev; + RedlineType_t const eType; + RedlineType_t const eTypePrev; + std::size_t const nAutorNo; + std::size_t const nAutorNoPrev; static constexpr auto NoPrevAuthor = std::numeric_limits<std::size_t>::max(); @@ -246,10 +246,10 @@ class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem { private: - long mnHandle; + long const mnHandle; OUString maName; - OUString maVal; - bool mbIsTOCBookmark; + OUString const maVal; + bool const mbIsTOCBookmark; public: SwFltBookmark( const OUString& rNa, @@ -290,7 +290,7 @@ public: class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem { - SwTOXBase* pTOXBase; + SwTOXBase* const pTOXBase; bool bHadBreakItem; // there was a break item BEFORE insertion of the TOX bool bHadPageDescItem; public: @@ -323,7 +323,7 @@ SW_DLLPUBLIC void UpdatePageDescs(SwDoc &rDoc, size_t nInPageDescOffset); class ImportProgress { private: - SwDocShell *m_pDocShell; + SwDocShell * const m_pDocShell; public: ImportProgress(SwDocShell *pDocShell, long nStartVal, long nEndVal) : m_pDocShell(pDocShell) diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 4babe2e56c95..8a79ae919c3f 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -285,7 +285,7 @@ namespace sw void InsertTable(SwTableNode &rTableNode, SwPaM &rPaM); explicit InsertedTablesManager(const SwDoc &rDoc); private: - bool mbHasRoot; + bool const mbHasRoot; TableMap maTables; }; diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index 7c61ba07de8c..c19b6b929e90 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -48,15 +48,15 @@ class SW_DLLPUBLIC SwWriteTableCell const SwTableBox *pBox; // SwTableBox of the cell const SvxBrushItem *pBackground; // inherited background of a row - long nHeight; // fix/minimum height of a row + long const nHeight; // fix/minimum height of a row sal_uInt32 nWidthOpt; // width from option; - sal_uInt16 nRow; // start row - sal_uInt16 nCol; // start column + sal_uInt16 const nRow; // start row + sal_uInt16 const nCol; // start column - sal_uInt16 nRowSpan; // spanned rows - sal_uInt16 nColSpan; // spanned columns + sal_uInt16 const nRowSpan; // spanned rows + sal_uInt16 const nColSpan; // spanned columns bool bPrcWidthOpt; @@ -98,8 +98,8 @@ class SW_DLLPUBLIC SwWriteTableRow final SwWriteTableCells m_Cells; ///< all cells of the rows const SvxBrushItem *pBackground; // background - long nPos; // end position (twips) of the row - bool mbUseLayoutHeights; + long const nPos; // end position (twips) of the row + bool const mbUseLayoutHeights; SwWriteTableRow & operator= (const SwWriteTableRow &) = delete; @@ -156,7 +156,7 @@ using SwWriteTableRows class SW_DLLPUBLIC SwWriteTableCol { - sal_uInt32 nPos; // end position of the column + sal_uInt32 const nPos; // end position of the column sal_uInt32 nWidthOpt; @@ -227,24 +227,24 @@ protected: sal_uInt16 m_nBorder; // thickness of the outer border sal_uInt16 m_nInnerBorder; // thickness of the inner border - sal_uInt32 m_nBaseWidth; // reference value for SwFormatFrameSize width + sal_uInt32 const m_nBaseWidth; // reference value for SwFormatFrameSize width sal_uInt16 m_nHeadEndRow; // last row of the table heading - sal_uInt16 m_nLeftSub; - sal_uInt16 m_nRightSub; + sal_uInt16 const m_nLeftSub; + sal_uInt16 const m_nRightSub; sal_uInt32 m_nTabWidth; // absolute/relative width of the table - bool m_bRelWidths : 1; // generate relative widths? + bool const m_bRelWidths : 1; // generate relative widths? bool m_bUseLayoutHeights : 1; // use layout to determine the height? #ifdef DBG_UTIL bool m_bGetLineHeightCalled : 1; #endif - bool m_bColTags : 1; - bool m_bLayoutExport : 1; - bool m_bCollectBorderWidth : 1; + bool const m_bColTags : 1; + bool const m_bLayoutExport : 1; + bool const m_bCollectBorderWidth : 1; virtual bool ShouldExpandSub( const SwTableBox *pBox, bool bExpandedBefore, sal_uInt16 nDepth ) const; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index a3b6df799180..e9504e650420 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -114,8 +114,8 @@ public: class CellInfo { - SwRect m_aRect; - WW8TableNodeInfo * m_pNodeInfo; + SwRect const m_aRect; + WW8TableNodeInfo * const m_pNodeInfo; unsigned long m_nFormatFrameWidth; public: @@ -167,7 +167,7 @@ public: std::greater<sal_uInt32> > Inners_t; private: - WW8TableInfo * mpParent; + WW8TableInfo * const mpParent; sal_uInt32 mnDepth; const SwNode * mpNode; Inners_t mInners; diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 7a9100937163..214befe3428f 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -148,7 +148,7 @@ enum StyleType class AttributeOutputBase { private: - SvtSaveOptions m_aSaveOpt; + SvtSaveOptions const m_aSaveOpt; OUString ConvertURL( const OUString& rUrl, bool bAbsoluteOut ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a39ba872cf04..76e9be65b463 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2109,8 +2109,8 @@ namespace struct NameToId { - OUString maName; - sal_Int32 maId; + OUString const maName; + sal_Int32 const maId; }; const NameToId constNameToIdMapping[] = diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 66c1dc5b52c1..47cc6575ecb2 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -844,7 +844,7 @@ private: : grfNode( n ), size( s ), pSdrObj(sObj) {}; const SwGrfNode* grfNode; - Size size; + Size const size; const SdrObject* pSdrObj; }; std::unique_ptr< std::vector<PostponedGraphic> > m_pPostponedGraphic; diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 59a8dd9df2ba..f237460026a9 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -106,7 +106,7 @@ class DocxExport : public MSWordExportBase std::unique_ptr<DocxSdrExport> m_pSdrExport; /// If the result will be a .docm file or not. - bool m_bDocm; + bool const m_bDocm; DocxSettingsData m_aSettings; diff --git a/sw/source/filter/ww8/docxhelper.hxx b/sw/source/filter/ww8/docxhelper.hxx index 4791aaa8306c..b90059ac37b3 100644 --- a/sw/source/filter/ww8/docxhelper.hxx +++ b/sw/source/filter/ww8/docxhelper.hxx @@ -15,7 +15,7 @@ struct DocxStringTokenMap { const char* pToken; - sal_Int32 nToken; + sal_Int32 const nToken; }; sal_Int32 DocxStringGetToken(DocxStringTokenMap const * pMap, const OUString& rName); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index a1255cac5a11..4b00d75f354a 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -46,7 +46,7 @@ class RtfExport : public MSWordExportBase MSWordSections* m_pSections; std::unique_ptr<RtfSdrExport> m_pSdrExport; - bool m_bOutOutlineOnly; + bool const m_bOutOutlineOnly; public: /// Access to the attribute output class. diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 3530448518bb..8f61cab73603 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -139,7 +139,7 @@ namespace class anchoredto { private: - sal_uLong mnNode; + sal_uLong const mnNode; public: explicit anchoredto(sal_uLong nNode) : mnNode(nNode) {} bool operator()(const ww8::Frame &rFrame) const @@ -688,7 +688,7 @@ namespace sw class SameOpenRedlineType { private: - RedlineType_t meType; + RedlineType_t const meType; public: explicit SameOpenRedlineType(RedlineType_t eType) : meType(eType) {} bool operator()(const std::unique_ptr<SwFltStackEntry> & pEntry) const diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index e7d4ee46f61a..c34e9f6e3e06 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -324,7 +324,7 @@ namespace myImplHelpers class IfBeforeStart { private: - sal_Int32 mnStart; + sal_Int32 const mnStart; public: explicit IfBeforeStart(sal_Int32 nStart) : mnStart(nStart) {} bool operator()(const sw::util::CharRunEntry &rEntry) const diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index da01f2a01069..db7ea154cc4c 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -177,9 +177,9 @@ struct WW8_SepInfo const SwPageDesc* pPageDesc; const SwSectionFormat* pSectionFormat; const SwNode* pPDNd; - sal_uLong nLnNumRestartNo; - ::boost::optional<sal_uInt16> oPgRestartNo; - bool bIsFirstParagraph; + sal_uLong const nLnNumRestartNo; + ::boost::optional<sal_uInt16> const oPgRestartNo; + bool const bIsFirstParagraph; WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat, sal_uLong nLnRestart, ::boost::optional<sal_uInt16> oPgRestart = boost::none, @@ -304,9 +304,9 @@ sal_uInt8 maWW8_FFN[6]; OUString msFamilyNm; OUString msAltNm; bool mbAlt; - FontPitch mePitch; - FontFamily meFamily; - rtl_TextEncoding meChrSet; + FontPitch const mePitch; + FontFamily const meFamily; + rtl_TextEncoding const meChrSet; public: wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet); @@ -343,13 +343,13 @@ public: class DrawObj { public: - WW8_CP mnCp; // CP-Pos of references + WW8_CP const mnCp; // CP-Pos of references sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats ww8::Frame maContent; // the frame itself - Point maParentPos; // Points + Point const maParentPos; // Points sal_Int32 mnThick; // Border Thicknesses - SvxFrameDirection mnDirection; // If BiDi or not - unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent + SvxFrameDirection const mnDirection; // If BiDi or not + unsigned int const mnHdFtIndex; // 0 for main text, +1 for each subsequent // msword hd/ft DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir, @@ -453,7 +453,7 @@ class MSWordExportBase public: wwFontHelper m_aFontHelper; std::vector<sal_uLong> m_aChapterFieldLocs; - OUString m_aMainStg; + OUString const m_aMainStg; std::vector<const SwTOXType*> m_aTOXArr; const SfxItemSet* m_pISet; // for double attributes WW8_WrPct* m_pPiece; // Pointer to Piece-Table @@ -970,7 +970,7 @@ public: std::unique_ptr<WW8_WrPlcFootnoteEdn> pEdn; ///< Endnotes - structure to remember them, and output std::unique_ptr<WW8_WrPlcSepx> pSepx; ///< Sections/headers/footers - bool m_bDot; ///< Template or document. + bool const m_bDot; ///< Template or document. protected: SwWW8Writer *m_pWriter; ///< Pointer to the writer @@ -1205,7 +1205,7 @@ protected: class WW8_WrPlcFootnoteEdn : public WW8_WrPlcSubDoc { private: - sal_uInt8 nTyp; + sal_uInt8 const nTyp; WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn&) = delete; WW8_WrPlcFootnoteEdn& operator=(WW8_WrPlcFootnoteEdn &) = delete; @@ -1302,7 +1302,7 @@ private: std::vector<WW8_CP> aPos; std::unique_ptr<sal_uInt8[]> pData; // content ( structures ) sal_uLong nDataLen; - sal_uInt16 nStructSiz; + sal_uInt16 const nStructSiz; WW8_WrPlc1(const WW8_WrPlc1&) = delete; WW8_WrPlc1& operator=(const WW8_WrPlc1&) = delete; @@ -1321,7 +1321,7 @@ public: class WW8_WrPlcField : public WW8_WrPlc1 { private: - sal_uInt8 nTextTyp; + sal_uInt8 const nTextTyp; sal_uInt16 nResults; WW8_WrPlcField(const WW8_WrPlcField&) = delete; @@ -1349,10 +1349,10 @@ public: class GraphicDetails { public: - ww8::Frame maFly; // surrounding FlyFrames + ww8::Frame const maFly; // surrounding FlyFrames sal_uLong mnPos; // FilePos of the graphics - sal_uInt16 mnWid; // Width of the graphics - sal_uInt16 mnHei; // Height of the graphics + sal_uInt16 const mnWid; // Width of the graphics + sal_uInt16 const mnHei; // Height of the graphics GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei) : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei) @@ -1403,7 +1403,7 @@ public: class MSWordAttrIter { private: - MSWordAttrIter* pOld; + MSWordAttrIter* const pOld; MSWordAttrIter(const MSWordAttrIter&) = delete; MSWordAttrIter& operator=(const MSWordAttrIter&) = delete; protected: @@ -1430,7 +1430,7 @@ private: sal_Int32 nTmpSwPos; // for HasItem() rtl_TextEncoding eNdChrSet; sal_uInt16 nScript; - sal_uInt8 mnTyp; + sal_uInt8 const mnTyp; sal_Int32 SearchNext( sal_Int32 nStartPos ); void SetCharSet(const EECharAttrib& rTextAttr, bool bStart); @@ -1536,7 +1536,7 @@ class MSWordStyles sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL]; std::unique_ptr<SwFormat*[]> m_pFormatA; ///< Slot <-> Character and paragraph style array (0 for list styles). sal_uInt16 m_nUsedSlots; - bool m_bListStyles; ///< If list styles are requested to be exported as well. + bool const m_bListStyles; ///< If list styles are requested to be exported as well. std::map<sal_uInt16, const SwNumRule*> m_aNumRules; ///< Slot <-> List style map. /// We need to build style id's for DOCX export; ideally we should roundtrip that, but this is good enough. diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx index 461d40f19cba..6d865ad787c5 100644 --- a/sw/source/filter/ww8/ww8glsy.hxx +++ b/sw/source/filter/ww8/ww8glsy.hxx @@ -73,7 +73,7 @@ private: std::shared_ptr<WW8GlossaryFib> xGlossary; tools::SvRef<SotStorageStream> xTableStream; tools::SvRef<SotStorageStream> &rStrm; - tools::SvRef<SotStorage> xStg; + tools::SvRef<SotStorage> const xStg; sal_uInt16 nStrings; static bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile, diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx index 0a78445f02ce..ce3c2e4410a0 100644 --- a/sw/source/filter/ww8/ww8graf.hxx +++ b/sw/source/filter/ww8/ww8graf.hxx @@ -54,7 +54,7 @@ private: std::stack<sal_uInt16> maIndexes; - sw::util::SetLayer maSetLayer; + sw::util::SetLayer const maSetLayer; sal_uLong mnNoInitialObjects; sal_uLong mnInlines; diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 1387ad1b5c6f..4809c7e5d136 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -157,7 +157,7 @@ public: SwNumRule* GetNumRule(size_t i); size_t GetWW8LSTInfoNum() const{return maLSTInfos.size();} private: - wwSprmParser maSprmParser; + wwSprmParser const maSprmParser; SwWW8ImplReader& rReader; SwDoc& rDoc; const WW8Fib& rFib; @@ -586,31 +586,31 @@ class WW8ReaderSave { private: WW8PLCFxSaveAll maPLCFxSave; - SwPosition maTmpPos; + SwPosition const maTmpPos; std::deque<bool> maOldApos; std::deque<WW8FieldEntry> maOldFieldStack; std::unique_ptr<SwWW8FltControlStack> mxOldStck; std::unique_ptr<SwWW8FltAnchorStack> mxOldAnchorStck; std::unique_ptr<sw::util::RedlineStack> mxOldRedlines; std::shared_ptr<WW8PLCFMan> mxOldPlcxMan; - WW8FlyPara* mpWFlyPara; - WW8SwFlyPara* mpSFlyPara; - SwPaM* mpPreviousNumPaM; + WW8FlyPara* const mpWFlyPara; + WW8SwFlyPara* const mpSFlyPara; + SwPaM* const mpPreviousNumPaM; const SwNumRule* mpPrevNumRule; std::unique_ptr<WW8TabDesc> mxTableDesc; - int mnInTable; - sal_uInt16 mnCurrentColl; - sal_Unicode mcSymbol; - bool mbIgnoreText; - bool mbSymbol; - bool mbHdFtFootnoteEdn; - bool mbTxbxFlySection; - bool mbAnl; - bool mbInHyperlink; - bool mbPgSecBreak; - bool mbWasParaEnd; - bool mbHasBorder; - bool mbFirstPara; + int const mnInTable; + sal_uInt16 const mnCurrentColl; + sal_Unicode const mcSymbol; + bool const mbIgnoreText; + bool const mbSymbol; + bool const mbHdFtFootnoteEdn; + bool const mbTxbxFlySection; + bool const mbAnl; + bool const mbInHyperlink; + bool const mbPgSecBreak; + bool const mbWasParaEnd; + bool const mbHasBorder; + bool const mbFirstPara; public: WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1); void Restore(SwWW8ImplReader* pRdr); @@ -681,7 +681,7 @@ public: virtual bool Import(const css::uno::Reference< css::lang::XMultiServiceFactory> &rServiceFactory, css::uno::Reference< css::form::XFormComponent> &rFComp, css::awt::Size &rSz) = 0; - OUString msName; + OUString const msName; }; class WW8FormulaCheckBox : public WW8FormulaControl @@ -738,7 +738,7 @@ public: css::uno::Reference< css::drawing::XShape > *pShapeRef, bool bFloatingCtrl=false ); private: - SwPaM *pPaM; + SwPaM * const pPaM; sal_uInt32 mnObjectId; }; @@ -923,9 +923,9 @@ public: class wwFrameNamer { private: - OUString msSeed; + OUString const msSeed; sal_Int32 mnImportedGraphicsCount; - bool mbIsDisabled; + bool const mbIsDisabled; wwFrameNamer(wwFrameNamer const&) = delete; wwFrameNamer& operator=(wwFrameNamer const&) = delete; @@ -942,7 +942,7 @@ class wwSectionNamer { private: const SwDoc &mrDoc; - OUString msFileLinkSeed; + OUString const msFileLinkSeed; int mnFileSectionNo; wwSectionNamer(const wwSectionNamer&) = delete; wwSectionNamer& operator=(const wwSectionNamer&) = delete; @@ -990,8 +990,8 @@ class SwDocShell; struct WW8PostProcessAttrsInfo { bool mbCopy; - WW8_CP mnCpStart; - WW8_CP mnCpEnd; + WW8_CP const mnCpStart; + WW8_CP const mnCpEnd; SwPaM mPaM; SfxItemSet mItemSet; @@ -1257,7 +1257,7 @@ private: std::unique_ptr<WW8SmartTagData> m_pSmartTagData; sw::util::AuthorInfos m_aAuthorInfos; - OUString m_sBaseURL; + OUString const m_sBaseURL; // Ini-Flags: sal_uInt32 m_nIniFlags; // flags from writer.ini @@ -1291,14 +1291,14 @@ private: sal_Unicode m_cSymbol; // symbol to be read now - sal_uInt8 m_nWantedVersion; // originally requested WW-Doc version by Writer + sal_uInt8 const m_nWantedVersion; // originally requested WW-Doc version by Writer sal_uInt8 m_nSwNumLevel; // level number for outline / enumeration sal_uInt8 m_nWwNumType; // outline / number / enumeration sal_uInt8 m_nListLevel; - bool m_bNewDoc; // new document? - bool m_bSkipImages; // skip images for text extraction/indexing + bool const m_bNewDoc; // new document? + bool const m_bSkipImages; // skip images for text extraction/indexing bool m_bReadNoTable; // no tables bool m_bPgSecBreak; // Page- or Sectionbreak is still to be added bool m_bSpec; // special char follows in text diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx index 2cd397d040fc..a0918c71e771 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx @@ -48,7 +48,7 @@ class XMLRedlineImportHelper final // if true, no redlines should be inserted into document // (This typically happen when a document is loaded in 'insert'-mode.) - bool bIgnoreRedlines; + bool const bIgnoreRedlines; // save information for saving and reconstruction of the redline mode css::uno::Reference<css::beans::XPropertySet> xModelPropertySet; diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 1388d3b5a557..d20bac180097 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -65,13 +65,13 @@ using namespace ::xmloff::token; class SwXMLConditionParser_Impl { - OUString sInput; + OUString const sInput; Master_CollCondition nCondition; sal_uInt32 nSubCondition; sal_Int32 nPos; - sal_Int32 nLength; + sal_Int32 const nLength; inline bool SkipWS(); inline bool MatchChar( sal_Unicode c ); diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx index 8cc89046d00a..3123dae2255e 100644 --- a/sw/source/filter/xml/xmlitmap.hxx +++ b/sw/source/filter/xml/xmlitmap.hxx @@ -38,14 +38,14 @@ struct SvXMLItemMapEntry { - sal_uInt16 nNameSpace; // declares the Namespace in which this item + sal_uInt16 const nNameSpace; // declares the Namespace in which this item // exists - enum ::xmloff::token::XMLTokenEnum eLocalName; + enum ::xmloff::token::XMLTokenEnum const eLocalName; // the local name for the item inside // the Namespace (as an XMLTokenEnum) sal_uInt16 nWhichId; // the WhichId to identify the item // in the pool - sal_uInt32 nMemberId; // the memberid specifies which part + sal_uInt32 const nMemberId; // the memberid specifies which part // of the item should be imported or // exported with this Namespace // and localName diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 3dcf81038287..d984abb6017e 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -84,7 +84,7 @@ enum SvXMLTokenMapAttrs }; struct statistic { - SvXMLTokenMapAttrs token; + SvXMLTokenMapAttrs const token; const char* name; sal_uInt16 SwDocStat::* target16; sal_uLong SwDocStat::* target32; /* or 64, on LP64 platforms */ diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 9dbc82d0e92a..a15b7269da01 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -485,7 +485,7 @@ class SwXMLTableInfo_Impl const SwTable *m_pTable; Reference<XTextSection> m_xBaseSection; bool m_bBaseSectionValid; - sal_uInt32 m_nPrefix; + sal_uInt32 const m_nPrefix; public: diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 92c53688a6cd..8517963383f8 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -399,7 +399,7 @@ class SwXMLTableCellContext_Impl : public SvXMLImportContext OUString mXmlId; OUString m_StringValue; - SvXMLImportContextRef m_xMyTable; + SvXMLImportContextRef const m_xMyTable; double m_fValue; bool m_bHasValue; @@ -728,7 +728,7 @@ void SwXMLTableCellContext_Impl::EndElement() class SwXMLTableColContext_Impl : public SvXMLImportContext { - SvXMLImportContextRef xMyTable; + SvXMLImportContextRef const xMyTable; SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); } @@ -813,7 +813,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( class SwXMLTableColsContext_Impl : public SvXMLImportContext { - SvXMLImportContextRef xMyTable; + SvXMLImportContextRef const xMyTable; SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); } @@ -861,7 +861,7 @@ SvXMLImportContextRef SwXMLTableColsContext_Impl::CreateChildContext( class SwXMLTableRowContext_Impl : public SvXMLImportContext { - SvXMLImportContextRef xMyTable; + SvXMLImportContextRef const xMyTable; sal_uInt32 nRowRepeat; @@ -978,9 +978,9 @@ SvXMLImportContextRef SwXMLTableRowContext_Impl::CreateChildContext( class SwXMLTableRowsContext_Impl : public SvXMLImportContext { - SvXMLImportContextRef xMyTable; + SvXMLImportContextRef const xMyTable; - bool bHeader; + bool const bHeader; SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); } @@ -1199,9 +1199,9 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, class TableBoxIndex { public: - OUString msName; - sal_Int32 mnWidth; - bool mbProtected; + OUString const msName; + sal_Int32 const mnWidth; + bool const mbProtected; TableBoxIndex( const OUString& rName, sal_Int32 nWidth, bool bProtected ) : diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 0fd22a8b2309..b53404402342 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -72,9 +72,9 @@ using namespace xml::sax; struct XMLServiceMapEntry_Impl { const sal_Char *sFilterService; - sal_Int32 nFilterServiceLen; + sal_Int32 const nFilterServiceLen; - sal_uInt32 n1; + sal_uInt32 const n1; sal_uInt16 n2, n3; sal_uInt8 n4, n5, n6, n7, n8, n9, n10, n11; }; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index d08a64899854..2d1a08096f70 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1510,8 +1510,8 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) // TabPage for Redlining struct CharAttr { - sal_uInt16 nItemId; - sal_uInt16 nAttr; + sal_uInt16 const nItemId; + sal_uInt16 const nAttr; }; // Edit corresponds to Paste-attributes diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index 8961898dcb0d..a2543f545920 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -56,7 +56,7 @@ class SwCreateAddressListDialog : public SfxModalDialog VclPtr<OKButton> m_pOK; - OUString m_sAddressListFilterName; + OUString const m_sAddressListFilterName; OUString m_sURL; std::unique_ptr<SwCSVData> m_pCSVData; diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 00541fb7181e..97d86afa71dc 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -113,9 +113,9 @@ struct DB_Column const enum class Type { FILLTEXT, COL_FIELD, COL_TEXT, SPLITPARA } eColType; union { - OUString* pText; + OUString* const pText; SwField* pField; - sal_uInt32 nFormat; + sal_uInt32 const nFormat; }; const SwInsDBColumn* pColInfo; diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index dcc18a1df03b..6c9f38ca1cb3 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -223,7 +223,7 @@ private: OUString m_sCurrentText; SwMailMergeConfigItem& m_rConfigItem; - DialogType m_eType; + DialogType const m_eType; DECL_LINK(OKHdl_Impl, Button*, void); DECL_LINK(ListBoxSelectHdl_Impl, SvTreeListBox*, void); @@ -257,8 +257,8 @@ class SwAssignFieldsDialog : public SfxModalDialog VclPtr<OKButton> m_pOK; - OUString m_sNone; - OUString m_rPreviewString; + OUString const m_sNone; + OUString const m_rPreviewString; SwMailMergeConfigItem& m_rConfigItem; diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 115c6b89d83b..cbd8d665271c 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -41,7 +41,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > const & xM static const struct SwLabItemMap { const char* pName; - OUString SwLabItem:: *pValue; + OUString SwLabItem:: * const pValue; } aArr[] = { { "BC_PRIV_FIRSTNAME" , &SwLabItem::m_aPrivFirstName }, { "BC_PRIV_NAME" , &SwLabItem::m_aPrivName }, diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 69cddc7c38e8..5a7258f7e73a 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -29,16 +29,16 @@ class SwLabFormatPage; class SwLabPreview : public weld::CustomWidgetController { - Color m_aGrayColor; - - OUString m_aHDistStr; - OUString m_aVDistStr; - OUString m_aWidthStr; - OUString m_aHeightStr; - OUString m_aLeftStr; - OUString m_aUpperStr; - OUString m_aColsStr; - OUString m_aRowsStr; + Color const m_aGrayColor; + + OUString const m_aHDistStr; + OUString const m_aVDistStr; + OUString const m_aWidthStr; + OUString const m_aHeightStr; + OUString const m_aLeftStr; + OUString const m_aUpperStr; + OUString const m_aColsStr; + OUString const m_aRowsStr; long m_lHDistWidth; long m_lVDistWidth; diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 177b2cd0284b..e06f3aa78eec 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -376,11 +376,12 @@ void SwColumnPage::ResetColWidth() } +constexpr sal_uInt16 g_nMinWidth(MINLAY); + // Now as TabPage SwColumnPage::SwColumnPage(TabPageParent pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, "modules/swriter/ui/columnpage.ui", "ColumnPage", &rSet) , m_nFirstVis(0) - , m_nMinWidth(MINLAY) , m_pModifiedField(nullptr) , m_bFormat(false) , m_bFrame(false) @@ -808,7 +809,7 @@ void SwColumnPage::Init() // set maximum number of columns // values below 1 are not allowed m_xCLNrEdt->set_max(std::max(1L, - std::min(long(nMaxCols), long( m_xColMgr->GetActualSize() / m_nMinWidth) ))); + std::min(long(nMaxCols), long( m_xColMgr->GetActualSize() / g_nMinWidth) ))); } bool SwColumnPage::isLineNotNone() const @@ -1086,20 +1087,20 @@ void SwColumnPage::Timeout() if(nChanged == m_nCols - 1) { m_nColWidth[0] -= nDiff; - if(m_nColWidth[0] < static_cast<long>(m_nMinWidth)) + if(m_nColWidth[0] < static_cast<long>(g_nMinWidth)) { - nNewWidth -= m_nMinWidth - m_nColWidth[0]; - m_nColWidth[0] = m_nMinWidth; + nNewWidth -= g_nMinWidth - m_nColWidth[0]; + m_nColWidth[0] = g_nMinWidth; } } else if(nDiff) { m_nColWidth[nChanged + 1] -= nDiff; - if(m_nColWidth[nChanged + 1] < static_cast<long>(m_nMinWidth)) + if(m_nColWidth[nChanged + 1] < static_cast<long>(g_nMinWidth)) { - nNewWidth -= m_nMinWidth - m_nColWidth[nChanged + 1]; - m_nColWidth[nChanged + 1] = m_nMinWidth; + nNewWidth -= g_nMinWidth - m_nColWidth[nChanged + 1]; + m_nColWidth[nChanged + 1] = g_nMinWidth; } } m_nColWidth[nChanged] = nNewWidth; diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 05c48712e6f6..d5ce4e3f3a0b 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; class SwSequenceOptionDialog : public weld::GenericDialogController { SwView& m_rView; - OUString m_aFieldTypeName; + OUString const m_aFieldTypeName; std::unique_ptr<weld::ComboBox> m_xLbLevel; std::unique_ptr<weld::Entry> m_xEdDelim; diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 2ceeaa30b729..65b6260dfc16 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -79,8 +79,8 @@ using namespace ::sfx2; struct StringIdPair_Impl { - SvxSwFramePosString::StringId eHori; - SvxSwFramePosString::StringId eVert; + SvxSwFramePosString::StringId const eHori; + SvxSwFramePosString::StringId const eVert; }; #define MAX_PERCENT_WIDTH 254 @@ -120,18 +120,18 @@ namespace o3tl { struct RelationMap { - SvxSwFramePosString::StringId eStrId; - SvxSwFramePosString::StringId eMirrorStrId; - LB nLBRelation; - sal_Int16 nRelation; + SvxSwFramePosString::StringId const eStrId; + SvxSwFramePosString::StringId const eMirrorStrId; + LB const nLBRelation; + sal_Int16 const nRelation; }; struct FrameMap { - SvxSwFramePosString::StringId eStrId; - SvxSwFramePosString::StringId eMirrorStrId; - sal_Int16 nAlign; - LB nLBRelations; + SvxSwFramePosString::StringId const eStrId; + SvxSwFramePosString::StringId const eMirrorStrId; + sal_Int16 const nAlign; + LB const nLBRelations; }; @@ -768,8 +768,8 @@ namespace { struct FrameMaps { - FrameMap *pMap; - size_t nCount; + FrameMap * const pMap; + size_t const nCount; }; } @@ -828,8 +828,8 @@ namespace { struct RelationMaps { - RelationMap *pMap; - size_t nCount; + RelationMap * const pMap; + size_t const nCount; }; } @@ -2167,7 +2167,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset) const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() ); struct GlobalNameId { - sal_uInt32 n1; + sal_uInt32 const n1; sal_uInt16 n2, n3; sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; } const aGlbNmIds[] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 }, diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx index 8a85adf01573..6652be9e1962 100644 --- a/sw/source/ui/inc/mmresultdialogs.hxx +++ b/sw/source/ui/inc/mmresultdialogs.hxx @@ -117,7 +117,7 @@ class SwMMResultEmailDialog : public SfxModalDialog VclPtr<Button> m_pOKButton; - OUString m_sConfigureMail; + OUString const m_sConfigureMail; OUString m_sCC; OUString m_sBCC; @@ -168,19 +168,19 @@ class SwSendMailDialog : public Dialog VclPtr<PushButton> m_pStop; VclPtr<PushButton> m_pClose; - OUString m_sContinue; - OUString m_sStop; - OUString m_sTransferStatus; - OUString m_sErrorStatus; - OUString m_sSendingTo; - OUString m_sCompleted; - OUString m_sFailed; + OUString const m_sContinue; + OUString const m_sStop; + OUString const m_sTransferStatus; + OUString const m_sErrorStatus; + OUString const m_sSendingTo; + OUString const m_sCompleted; + OUString const m_sFailed; bool m_bCancel; bool m_bDestructionEnabled; std::unique_ptr<SwSendMailDialog_Impl> m_pImpl; - SwMailMergeConfigItem* m_pConfigItem; + SwMailMergeConfigItem* const m_pConfigItem; sal_Int32 m_nExpectedCount; sal_Int32 m_nSendCount; sal_Int32 m_nErrorCount; diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index 3a2c396cd8d1..fba53a2e0c5c 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -33,7 +33,7 @@ class SwEndNoteOptionPage : public SfxTabPage OUString aNumChapter; SwWrtShell *pSh; bool bPosDoc; - bool bEndNote; + bool const bEndNote; std::unique_ptr<SwNumberingTypeListBox> m_xNumViewBox; std::unique_ptr<weld::Label> m_xOffsetLbl; diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index 7b66b6ba6218..f74e77fcb2bd 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -27,7 +27,7 @@ typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XAddin > SwVbaAddin_BA class SwVbaAddin : public SwVbaAddin_BASE { private: - OUString msFileURL; + OUString const msFileURL; bool mbInstalled; public: diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx index ab91b7333bfc..33922b45aad6 100644 --- a/sw/source/ui/vba/vbabookmark.hxx +++ b/sw/source/ui/vba/vbabookmark.hxx @@ -31,7 +31,7 @@ class SwVbaBookmark : public SwVbaBookmark_BASE private: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::text::XTextContent > mxBookmark; - OUString maBookmarkName; + OUString const maBookmarkName; bool mbValid; private: diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index c3a396ada279..2b0d276a9138 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -45,7 +45,7 @@ class SwVbaBorder : public SwVbaBorder_Base { private: uno::Reference< beans::XPropertySet > m_xProps; - sal_Int32 m_LineType; + sal_Int32 const m_LineType; void setBorderLine( table::BorderLine const & rBorderLine ) { table::TableBorder aTableBorder; @@ -231,7 +231,7 @@ class RangeBorders : public RangeBorders_Base private: uno::Reference< table::XCellRange > m_xRange; uno::Reference< uno::XComponentContext > m_xContext; - VbaPalette m_Palette; + VbaPalette const m_Palette; sal_Int32 getTableIndex( sal_Int32 nConst ) { // okay return position of the index in the table diff --git a/sw/source/ui/vba/vbacell.hxx b/sw/source/ui/vba/vbacell.hxx index 9c9e7524e43f..5d5b99476346 100644 --- a/sw/source/ui/vba/vbacell.hxx +++ b/sw/source/ui/vba/vbacell.hxx @@ -29,8 +29,8 @@ class SwVbaCell : public SwVbaCell_BASE { private: css::uno::Reference< css::text::XTextTable > mxTextTable; - sal_Int32 mnColumn; - sal_Int32 mnRow; + sal_Int32 const mnColumn; + sal_Int32 const mnRow; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index b47d6a48c3ae..cddf9c2fe2c1 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -57,10 +57,10 @@ private: uno::Reference< XHelperInterface > mxParent; uno::Reference< uno::XComponentContext > mxContext; uno::Reference< css::text::XTextTable > mxTextTable; - sal_Int32 mnLeft; - sal_Int32 mnTop; - sal_Int32 mnRight; - sal_Int32 mnBottom; + sal_Int32 const mnLeft; + sal_Int32 const mnTop; + sal_Int32 const mnRight; + sal_Int32 const mnBottom; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbacells.hxx b/sw/source/ui/vba/vbacells.hxx index be6b1b1af122..5dac59e3f1f7 100644 --- a/sw/source/ui/vba/vbacells.hxx +++ b/sw/source/ui/vba/vbacells.hxx @@ -30,8 +30,8 @@ class SwVbaCells : public SwVbaCells_BASE { private: css::uno::Reference< css::text::XTextTable > mxTextTable; - sal_Int32 mnTop; - sal_Int32 mnBottom; + sal_Int32 const mnTop; + sal_Int32 const mnBottom; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbacolumn.hxx b/sw/source/ui/vba/vbacolumn.hxx index dd4f31820176..739fe99b8939 100644 --- a/sw/source/ui/vba/vbacolumn.hxx +++ b/sw/source/ui/vba/vbacolumn.hxx @@ -32,7 +32,7 @@ class SwVbaColumn : public SwVbaColumn_BASE private: css::uno::Reference< css::text::XTextTable > mxTextTable; css::uno::Reference< css::table::XTableColumns > mxTableColumns; - sal_Int32 mnIndex; + sal_Int32 const mnIndex; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx index cb1384d1122e..1a91e28cd50a 100644 --- a/sw/source/ui/vba/vbadialog.cxx +++ b/sw/source/ui/vba/vbadialog.cxx @@ -24,7 +24,7 @@ using namespace ::com::sun::star; struct WordDialogTable { - sal_Int32 wdDialog; + sal_Int32 const wdDialog; const sal_Char* ooDialog; }; diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index c2f2dfb8d701..968c0b7904df 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -54,7 +54,7 @@ getDocument( uno::Reference< uno::XComponentContext > const & xContext, const un class DocumentEnumImpl : public EnumerationHelperImpl { - uno::Any m_aApplication; + uno::Any const m_aApplication; public: /// @throws uno::RuntimeException DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index 01f0d1541b00..5b9f8802ecbd 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -74,7 +74,7 @@ SwVbaField::getServiceNames() class SwVbaReadFieldParams { private: - OUString aData; + OUString const aData; sal_Int32 nLen, nFnd, nNext, nSavPtr; OUString aFieldName; public: diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx index fd3a3dea462b..d652231d5e9d 100644 --- a/sw/source/ui/vba/vbaheaderfooter.hxx +++ b/sw/source/ui/vba/vbaheaderfooter.hxx @@ -30,8 +30,8 @@ class SwVbaHeaderFooter : public SwVbaHeaderFooter_BASE private: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps; - bool mbHeader; - sal_Int32 mnIndex; + bool const mbHeader; + sal_Int32 const mnIndex; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index c4cedf3f3a14..1d8a10563273 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -32,7 +32,7 @@ private: uno::Reference< uno::XComponentContext > mxContext; uno::Reference< frame::XModel > mxModel; uno::Reference< beans::XPropertySet > mxPageStyleProps; - bool mbHeader; + bool const mbHeader; public: HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {} diff --git a/sw/source/ui/vba/vbaheadersfooters.hxx b/sw/source/ui/vba/vbaheadersfooters.hxx index 3e9e32d9909e..b836d1b5a5c5 100644 --- a/sw/source/ui/vba/vbaheadersfooters.hxx +++ b/sw/source/ui/vba/vbaheadersfooters.hxx @@ -30,7 +30,7 @@ class SwVbaHeadersFooters : public SwVbaHeadersFooters_BASE private: css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps; - bool mbHeader; + bool const mbHeader; public: SwVbaHeadersFooters( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, bool isHeader ); diff --git a/sw/source/ui/vba/vbalistgallery.hxx b/sw/source/ui/vba/vbalistgallery.hxx index 187cdd418dde..b139e876ab0b 100644 --- a/sw/source/ui/vba/vbalistgallery.hxx +++ b/sw/source/ui/vba/vbalistgallery.hxx @@ -29,7 +29,7 @@ class SwVbaListGallery : public SwVbaListGallery_BASE { private: css::uno::Reference< css::text::XTextDocument > mxTextDocument; - sal_Int32 mnType; + sal_Int32 const mnType; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx index 0cc0efafca85..f68df37e25e6 100644 --- a/sw/source/ui/vba/vbalisthelper.hxx +++ b/sw/source/ui/vba/vbalisthelper.hxx @@ -24,8 +24,8 @@ private: css::uno::Reference< css::container::XIndexReplace > mxNumberingRules; css::uno::Reference< css::container::XNameContainer > mxStyleFamily; css::uno::Reference< css::beans::XPropertySet > mxStyleProps; - sal_Int32 mnGalleryType; - sal_Int32 mnTemplateType; + sal_Int32 const mnGalleryType; + sal_Int32 const mnTemplateType; OUString msStyleName; /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbalistlevel.hxx b/sw/source/ui/vba/vbalistlevel.hxx index 3b40c45f80b4..47cb9d774729 100644 --- a/sw/source/ui/vba/vbalistlevel.hxx +++ b/sw/source/ui/vba/vbalistlevel.hxx @@ -30,7 +30,7 @@ class SwVbaListLevel : public SwVbaListLevel_BASE { private: SwVbaListHelperRef pListHelper; - sal_Int32 mnLevel; + sal_Int32 const mnLevel; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbalistlevels.hxx b/sw/source/ui/vba/vbalistlevels.hxx index a3252c8fab6c..874529fd1878 100644 --- a/sw/source/ui/vba/vbalistlevels.hxx +++ b/sw/source/ui/vba/vbalistlevels.hxx @@ -29,7 +29,7 @@ typedef CollTestImplHelper< ooo::vba::word::XListLevels > SwVbaListLevels_BASE; class SwVbaListLevels : public SwVbaListLevels_BASE { private: - SwVbaListHelperRef pListHelper; + SwVbaListHelperRef const pListHelper; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbalisttemplates.hxx b/sw/source/ui/vba/vbalisttemplates.hxx index 6a3f71cc2253..31592cd9d042 100644 --- a/sw/source/ui/vba/vbalisttemplates.hxx +++ b/sw/source/ui/vba/vbalisttemplates.hxx @@ -30,7 +30,7 @@ class SwVbaListTemplates : public SwVbaListTemplates_BASE { private: css::uno::Reference< css::text::XTextDocument > mxTextDocument; - sal_Int32 mnGalleryType; + sal_Int32 const mnGalleryType; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbarow.hxx b/sw/source/ui/vba/vbarow.hxx index 7c6e6f3ccf8b..86628324c8d3 100644 --- a/sw/source/ui/vba/vbarow.hxx +++ b/sw/source/ui/vba/vbarow.hxx @@ -32,7 +32,7 @@ private: css::uno::Reference< css::text::XTextTable > mxTextTable; css::uno::Reference< css::table::XTableRows > mxTableRows; css::uno::Reference< css::beans::XPropertySet > mxRowProps; - sal_Int32 mnIndex; + sal_Int32 const mnIndex; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 06ea4d159375..9f7de35ddf57 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -33,9 +33,9 @@ using namespace ::com::sun::star; struct BuiltinStyleTable { - sal_Int32 wdBuiltinStyle; + sal_Int32 const wdBuiltinStyle; const sal_Char* pOOoStyleName; - sal_Int32 wdStyleType; + sal_Int32 const wdStyleType; }; static const BuiltinStyleTable aBuiltinStyleTable[] = diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx index 5765c06a8ee5..2798c5eccf43 100644 --- a/sw/source/ui/vba/vbatemplate.hxx +++ b/sw/source/ui/vba/vbatemplate.hxx @@ -27,7 +27,7 @@ typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XTemplate > SwVbaTempl class SwVbaTemplate : public SwVbaTemplate_BASE { private: - OUString msFullUrl; + OUString const msFullUrl; public: SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const OUString& ); diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx index a278ed16d2b6..c69ddfce023c 100644 --- a/sw/source/ui/vba/vbavariable.hxx +++ b/sw/source/ui/vba/vbavariable.hxx @@ -29,7 +29,7 @@ class SwVbaVariable : public SwVbaVariable_BASE { private: css::uno::Reference< css::beans::XPropertyAccess > mxUserDefined; - OUString maVariableName; + OUString const maVariableName; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 534f96f4fadd..ba4b554f935d 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -564,12 +564,12 @@ public: } private: SwDocShell &m_rDocSh; - bool m_bNew; + bool const m_bNew; rtl::Reference< SwDocStyleSheet > m_xTmp; - SfxStyleFamily m_nFamily; + SfxStyleFamily const m_nFamily; VclPtr<SfxAbstractApplyTabDialog> m_pDlg; rtl::Reference< SfxStyleSheetBasePool > m_xBasePool; - bool m_bModified; + bool const m_bModified; }; IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void) diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 54b2c1064c51..9db2f39a0134 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -532,8 +532,8 @@ void SwViewOption::SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveIn svtools::EditableColorConfig aEditableConfig; struct FlagToConfig_Impl { - ViewOptFlags nFlag; - svtools::ColorConfigEntry eEntry; + ViewOptFlags const nFlag; + svtools::ColorConfigEntry const eEntry; }; static const FlagToConfig_Impl aFlags[] = { diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index bcc3119648f4..a8df1532b8ac 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -53,8 +53,6 @@ CreateMonitor::CreateMonitor(weld::Window *pParent) : GenericDialogController(pParent, "modules/swriter/ui/mmcreatingdialog.ui", "MMCreatingDialog") , m_sCountingPattern() - , m_sVariable_Total("%Y") - , m_sVariable_Position("%X") , m_nTotalCount(0) , m_nCurrentPosition(0) , m_xCounting(m_xBuilder->weld_label("progress")) @@ -69,9 +67,12 @@ CreateMonitor::~CreateMonitor() void CreateMonitor::UpdateCountingText() { + constexpr OUStringLiteral sVariable_Total("%Y"); + constexpr OUStringLiteral sVariable_Position("%X"); + OUString sText(m_sCountingPattern); - sText = sText.replaceAll( m_sVariable_Total, OUString::number( m_nTotalCount ) ); - sText = sText.replaceAll( m_sVariable_Position, OUString::number( m_nCurrentPosition ) ); + sText = sText.replaceAll( sVariable_Total, OUString::number( m_nTotalCount ) ); + sText = sText.replaceAll( sVariable_Position, OUString::number( m_nCurrentPosition ) ); m_xCounting->set_label(sText); } diff --git a/sw/source/uibase/dbui/maildispatcher.cxx b/sw/source/uibase/dbui/maildispatcher.cxx index ae789beb30c5..5b1a1d80708d 100644 --- a/sw/source/uibase/dbui/maildispatcher.cxx +++ b/sw/source/uibase/dbui/maildispatcher.cxx @@ -89,7 +89,7 @@ namespace /* private */ private: ::rtl::Reference<MailDispatcher> mail_dispatcher_; uno::Reference<mail::XMailMessage> message_; - OUString error_message_; + OUString const error_message_; }; } // namespace private diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 13a21cf5ceb5..8bf13f421310 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -64,9 +64,9 @@ const short RET_EDIT = 100; struct TextBlockInfo_Impl { - OUString sTitle; - OUString sLongName; - OUString sGroupName; + OUString const sTitle; + OUString const sLongName; + OUString const sGroupName; TextBlockInfo_Impl(OUString const& rTitle, OUString const& rLongName, OUString const& rGroupName) : sTitle(rTitle), sLongName(rLongName), sGroupName(rGroupName) {} }; diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index 0a60d4afff30..5949d82859cc 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -38,16 +38,16 @@ namespace sw { namespace sidebarwindows { class AnchorPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D { private: - basegfx::B2DPolygon maTriangle; - basegfx::B2DPolygon maLine; - basegfx::B2DPolygon maLineTop; + basegfx::B2DPolygon const maTriangle; + basegfx::B2DPolygon const maLine; + basegfx::B2DPolygon const maLineTop; const AnchorState maAnchorState; - basegfx::BColor maColor; + basegfx::BColor const maColor; // discrete line width - double mfDiscreteLineWidth; + double const mfDiscreteLineWidth; - bool mbLineSolid : 1; + bool const mbLineSolid : 1; protected: virtual void create2DDecomposition( diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 8804206f707f..0a04f222a4c1 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1343,7 +1343,7 @@ public: class IsPostitFieldWithAuthorOf : public FilterFunctor { - OUString m_sAuthor; + OUString const m_sAuthor; public: explicit IsPostitFieldWithAuthorOf(const OUString &rAuthor) : m_sAuthor(rAuthor) @@ -1359,7 +1359,7 @@ public: class IsPostitFieldWithPostitId : public FilterFunctor { - sal_uInt32 m_nPostItId; + sal_uInt32 const m_nPostItId; public: explicit IsPostitFieldWithPostitId(sal_uInt32 nPostItId) : m_nPostItId(nPostItId) diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx index eaafd60febc8..b69ecf481421 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx @@ -39,9 +39,9 @@ namespace sw { namespace sidebarwindows { class ShadowPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D { private: - basegfx::B2DPoint maBasePosition; - basegfx::B2DPoint maSecondPosition; - ShadowState maShadowState; + basegfx::B2DPoint const maBasePosition; + basegfx::B2DPoint const maSecondPosition; + ShadowState const maShadowState; protected: virtual void create2DDecomposition( diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index c44b2db80faf..2c2b01533628 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -217,7 +217,7 @@ static bool lcl_goIntoTextBox(SwEditWin& rEditWin, SwWrtShell& rSh) class SwAnchorMarker { SdrHdl* pHdl; - Point aHdlPos; + Point const aHdlPos; Point aLastPos; bool bTopRightHandle; public: diff --git a/sw/source/uibase/docvw/romenu.hxx b/sw/source/uibase/docvw/romenu.hxx index 5803adbab8e0..18a9bccd0f35 100644 --- a/sw/source/uibase/docvw/romenu.hxx +++ b/sw/source/uibase/docvw/romenu.hxx @@ -34,28 +34,28 @@ class SwReadOnlyPopup { VclBuilder m_aBuilder; ScopedVclPtr<PopupMenu> m_xMenu; - sal_uInt16 m_nReadonlyOpenurl; - sal_uInt16 m_nReadonlyOpendoc; - sal_uInt16 m_nReadonlyEditdoc; - sal_uInt16 m_nReadonlySelectionMode; - sal_uInt16 m_nReadonlyReload; - sal_uInt16 m_nReadonlyReloadFrame; - sal_uInt16 m_nReadonlySourceview; - sal_uInt16 m_nReadonlyBrowseBackward; - sal_uInt16 m_nReadonlyBrowseForward; - sal_uInt16 m_nReadonlySaveGraphic; - sal_uInt16 m_nReadonlyGraphictogallery; - sal_uInt16 m_nReadonlyTogallerylink; - sal_uInt16 m_nReadonlyTogallerycopy; - sal_uInt16 m_nReadonlySaveBackground; - sal_uInt16 m_nReadonlyBackgroundtogallery; - sal_uInt16 m_nReadonlyBackgroundTogallerylink; - sal_uInt16 m_nReadonlyBackgroundTogallerycopy; - sal_uInt16 m_nReadonlyCopylink; - sal_uInt16 m_nReadonlyLoadGraphic; - sal_uInt16 m_nReadonlyGraphicoff; - sal_uInt16 m_nReadonlyFullscreen; - sal_uInt16 m_nReadonlyCopy; + sal_uInt16 const m_nReadonlyOpenurl; + sal_uInt16 const m_nReadonlyOpendoc; + sal_uInt16 const m_nReadonlyEditdoc; + sal_uInt16 const m_nReadonlySelectionMode; + sal_uInt16 const m_nReadonlyReload; + sal_uInt16 const m_nReadonlyReloadFrame; + sal_uInt16 const m_nReadonlySourceview; + sal_uInt16 const m_nReadonlyBrowseBackward; + sal_uInt16 const m_nReadonlyBrowseForward; + sal_uInt16 const m_nReadonlySaveGraphic; + sal_uInt16 const m_nReadonlyGraphictogallery; + sal_uInt16 const m_nReadonlyTogallerylink; + sal_uInt16 const m_nReadonlyTogallerycopy; + sal_uInt16 const m_nReadonlySaveBackground; + sal_uInt16 const m_nReadonlyBackgroundtogallery; + sal_uInt16 const m_nReadonlyBackgroundTogallerylink; + sal_uInt16 const m_nReadonlyBackgroundTogallerycopy; + sal_uInt16 const m_nReadonlyCopylink; + sal_uInt16 const m_nReadonlyLoadGraphic; + sal_uInt16 const m_nReadonlyGraphicoff; + sal_uInt16 const m_nReadonlyFullscreen; + sal_uInt16 const m_nReadonlyCopy; SwView &m_rView; SvxBrushItem m_aBrushItem; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 36ee43952296..30dfbed969c2 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -290,13 +290,13 @@ static const char* FMT_USERVAR_ARY[] = // field types and subtypes struct SwFieldPack { - sal_uInt16 nTypeId; + sal_uInt16 const nTypeId; - const char** pSubTypeResIds; - size_t nSubTypeLength; + const char** pSubTypeResIds; + size_t const nSubTypeLength; - const char** pFormatResIds; - size_t nFormatLength; + const char** pFormatResIds; + size_t const nFormatLength; }; // strings and formats diff --git a/sw/source/uibase/inc/DashedLine.hxx b/sw/source/uibase/inc/DashedLine.hxx index 6b01a342b9c9..57f8deddbae6 100644 --- a/sw/source/uibase/inc/DashedLine.hxx +++ b/sw/source/uibase/inc/DashedLine.hxx @@ -16,7 +16,7 @@ */ class SwDashedLine : public FixedLine { - Color& (*m_pColorFn)(); + Color& (* const m_pColorFn)(); public: SwDashedLine( vcl::Window* pParent, Color& ( *pColorFn )() ); diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index ba45f41fab88..47853074eec9 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -22,7 +22,7 @@ class SwHeaderFooterWin : public SwFrameMenuButtonBase { VclBuilder m_aBuilder; OUString m_sLabel; - bool m_bIsHeader; + bool const m_bIsHeader; VclPtr<PopupMenu> m_pPopupMenu; VclPtr<vcl::Window> m_pLine; bool m_bIsAppearing; diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index fe79a5eb9a09..3b6966e6f534 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -45,7 +45,7 @@ class SwBreakDlg : public weld::GenericDialogController sal_uInt16 nKind; ::boost::optional<sal_uInt16> oPgNum; - bool bHtmlMode; + bool const bHtmlMode; DECL_LINK(ToggleHdl, weld::ToggleButton&, void); DECL_LINK(ChangeHdl, weld::ComboBox&, void); diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index 668613c4d627..73a2309764b2 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -34,7 +34,7 @@ class SvxMacroItem; class SwCharDlg : public SfxTabDialogController { SwView& m_rView; - SwCharDlgMode m_nDialogMode; + SwCharDlgMode const m_nDialogMode; public: SwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx index 16794c818ee5..faf1d95f4444 100644 --- a/sw/source/uibase/inc/colex.hxx +++ b/sw/source/uibase/inc/colex.hxx @@ -88,7 +88,7 @@ class SW_DLLPUBLIC SwColumnOnlyExample : public weld::CustomWidgetController private: Size m_aWinSize; - Size m_aFrameSize; + Size const m_aFrameSize; SwFormatCol m_aCols; protected: diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index 322bed0ffac3..1afcfb152b4f 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -98,7 +98,6 @@ class SwColumnPage : public SfxTabPage sal_uInt16 m_nCols; long m_nColWidth[nMaxCols]; long m_nColDist[nMaxCols]; - sal_uInt16 m_nMinWidth; SwPercentField* m_pModifiedField; std::map<weld::MetricSpinButton*, SwPercentField*> m_aPercentFieldsMap; diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index d579346fecca..ba47cb1f116d 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -36,9 +36,9 @@ class SwRangeRedline; class SwOutlineContent : public SwContent { - SwOutlineNodes::size_type nOutlinePos; - sal_uInt8 nOutlineLevel; - bool bIsMoveable; + SwOutlineNodes::size_type const nOutlinePos; + sal_uInt8 const nOutlineLevel; + bool const bIsMoveable; public: SwOutlineContent( const SwContentType* pCnt, const OUString& rName, @@ -57,7 +57,7 @@ class SwOutlineContent : public SwContent class SwRegionContent : public SwContent { - sal_uInt8 nRegionLevel; + sal_uInt8 const nRegionLevel; public: SwRegionContent( const SwContentType* pCnt, @@ -71,7 +71,7 @@ class SwRegionContent : public SwContent class SwURLFieldContent : public SwContent { - OUString sURL; + OUString const sURL; const SwTextINetFormat* pINetAttr; public: @@ -106,7 +106,7 @@ public: class SwGraphicContent : public SwContent { - OUString sLink; + OUString const sLink; public: SwGraphicContent(const SwContentType* pCnt, const OUString& rName, const OUString& rLink, long nYPos) : SwContent( pCnt, rName, nYPos ), sLink( rLink ) @@ -141,11 +141,11 @@ class SwContentType : public SwTypeNumber SwWrtShell* pWrtShell; std::unique_ptr<SwContentArr> pMember; // array for content - OUString sContentTypeName; // name of content type - OUString sSingleContentTypeName; // name of content type, singular + OUString const sContentTypeName; // name of content type + OUString const sSingleContentTypeName; // name of content type, singular OUString sTypeToken; // attachment for URL size_t nMemberCount; // content count - ContentTypeId nContentType; // content type's Id + ContentTypeId const nContentType; // content type's Id sal_uInt8 nOutlineLevel; bool bDataValid : 1; bool bEdit: 1; // can this type be edited? diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 008968101a35..186da31e64bf 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -73,21 +73,21 @@ class SwContentTree final , public SfxListener { VclPtr<SwNavigationPI> m_xDialog; - OUString m_sSpace; + OUString const m_sSpace; AutoTimer m_aUpdTimer; o3tl::enumarray<ContentTypeId,SwContentType*> m_aActiveContentArr; o3tl::enumarray<ContentTypeId,SwContentType*> m_aHiddenContentArr; OUString m_aContextStrings[CONTEXT_COUNT + 1]; - OUString m_sRemoveIdx; - OUString m_sUpdateIdx; - OUString m_sUnprotTable; - OUString m_sRename; - OUString m_sReadonlyIdx; - OUString m_sInvisible; - OUString m_sPostItShow; - OUString m_sPostItHide; - OUString m_sPostItDelete; + OUString const m_sRemoveIdx; + OUString const m_sUpdateIdx; + OUString const m_sUnprotTable; + OUString const m_sRename; + OUString const m_sReadonlyIdx; + OUString const m_sInvisible; + OUString const m_sPostItShow; + OUString const m_sPostItHide; + OUString const m_sPostItDelete; SwWrtShell* m_pHiddenShell; // dropped Doc SwWrtShell* m_pActiveShell; // the active or a const. open view diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx index e62b7cbccad3..1c10ad388f47 100644 --- a/sw/source/uibase/inc/convert.hxx +++ b/sw/source/uibase/inc/convert.hxx @@ -48,7 +48,7 @@ class SwConvertTableDlg : public weld::GenericDialogController std::unique_ptr<weld::Button> m_xAutoFormatBtn; std::unique_ptr<SwTableAutoFormat> mxTAutoFormat; - SwWrtShell* pShell; + SwWrtShell* const pShell; DECL_LINK(AutoFormatHdl, weld::Button&, void); DECL_LINK(BtnHdl, weld::Button&, void); diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index abf3855c52e1..143e8bf95ddf 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -40,7 +40,7 @@ class SwCaptionDialog : public SvxStandardDialog { VclPtr<Edit> m_pTextEdit; VclPtr<ComboBox> m_pCategoryBox; - OUString m_sNone; + OUString const m_sNone; TextFilterAutoConvert m_aTextFilter; VclPtr<FixedText> m_pFormatText; VclPtr<ListBox> m_pFormatBox; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index c3362a52686c..c260b2b07c23 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -123,7 +123,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem const SwDBData aDBData; Link<ListBox&,void> aOldNumFormatLnk; - OUString sNoTmpl; + OUString const sNoTmpl; SwView* pView; std::unique_ptr<SwTableAutoFormat> m_xTAutoFormat; diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx index 225f96240fbd..a6261f880e17 100644 --- a/sw/source/uibase/inc/dbui.hxx +++ b/sw/source/uibase/inc/dbui.hxx @@ -61,8 +61,6 @@ private: private: OUString m_sCountingPattern; - OUString m_sVariable_Total; - OUString m_sVariable_Position; sal_Int32 m_nTotalCount; sal_Int32 m_nCurrentPosition; diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx index e7bdaa00e84e..e3181e96ec09 100644 --- a/sw/source/uibase/inc/drpcps.hxx +++ b/sw/source/uibase/inc/drpcps.hxx @@ -63,8 +63,8 @@ class SwDropCapsPict : public weld::CustomWidgetController struct ScriptInfo { sal_uLong textWidth; ///< Physical width of this segment. - sal_uInt16 scriptType; ///< Script type (e.g. Latin, Asian, Complex) - sal_Int32 changePos; ///< Character position where the script changes. + sal_uInt16 const scriptType; ///< Script type (e.g. Latin, Asian, Complex) + sal_Int32 const changePos; ///< Character position where the script changes. ScriptInfo(sal_uInt16 scrptType, sal_Int32 position) : textWidth(0), scriptType(scrptType), changePos(position) {} }; diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index c6a29827a06c..2e6ba24ebeaf 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -59,23 +59,23 @@ enum SwFieldGroups struct SwFieldGroupRgn { - sal_uInt16 nStart; - sal_uInt16 nEnd; + sal_uInt16 const nStart; + sal_uInt16 const nEnd; }; // the field manager handles the insertation of fields // with command strings struct SwInsertField_Data { - sal_uInt16 m_nTypeId; - sal_uInt16 m_nSubType; + sal_uInt16 const m_nTypeId; + sal_uInt16 const m_nSubType; const OUString m_sPar1; const OUString m_sPar2; - sal_uInt32 m_nFormatId; - SwWrtShell* m_pSh; - sal_Unicode m_cSeparator; - bool m_bIsAutomaticLanguage; - css::uno::Any m_aDBDataSource; + sal_uInt32 const m_nFormatId; + SwWrtShell* const m_pSh; + sal_Unicode const m_cSeparator; + bool const m_bIsAutomaticLanguage; + css::uno::Any const m_aDBDataSource; css::uno::Any m_aDBConnection; css::uno::Any m_aDBColumn; VclPtr<vcl::Window> m_pParent; // parent dialog used for SwWrtShell::StartInputFieldDlg() diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index 1a05a1ea09c9..f92a39593f48 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -27,10 +27,10 @@ class SwWrtShell; // frame dialog class SwFrameDlg : public SfxTabDialog { - bool m_bFormat; - bool m_bNew; + bool const m_bFormat; + bool const m_bNew; const SfxItemSet& m_rSet; - OUString m_sDlgType; + OUString const m_sDlgType; SwWrtShell* m_pWrtShell; sal_uInt16 m_nStdId; diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 1bc51b9f1801..94f3c3b00b82 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -54,7 +54,7 @@ class SW_DLLPUBLIC SwFlyFrameAttrMgr SwWrtShell* m_pOwnSh; bool m_bAbsPos, - m_bNewFrame; + m_bNewFrame; bool m_bIsInVertical; // #mongolianlayout# bool m_bIsInVerticalL2R; diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx index 87e5c807a698..34bd0f719c65 100644 --- a/sw/source/uibase/inc/gloshdl.hxx +++ b/sw/source/uibase/inc/gloshdl.hxx @@ -34,7 +34,7 @@ class SW_DLLPUBLIC SwGlossaryHdl SwGlossaries& rStatGlossaries; OUString aCurGrp; - SfxViewFrame* pViewFrame; + SfxViewFrame* const pViewFrame; SwWrtShell* pWrtShell; std::unique_ptr<SwTextBlocks> pCurGrp; diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index 9b6e0b17dc28..8911634211dd 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -103,7 +103,7 @@ class SwGlossaryDlg : public SvxStandardDialog VclPtr<PushButton> m_pBibBtn; VclPtr<PushButton> m_pPathBtn; - OUString sReadonlyPath; + OUString const sReadonlyPath; css::uno::Reference< css::text::XAutoTextContainer2 > m_xAutoText; std::unique_ptr<SwOneExampleFrame> pExampleFrame; diff --git a/sw/source/uibase/inc/hyp.hxx b/sw/source/uibase/inc/hyp.hxx index c614344abcc5..0eaeb64af40a 100644 --- a/sw/source/uibase/inc/hyp.hxx +++ b/sw/source/uibase/inc/hyp.hxx @@ -32,7 +32,7 @@ private: SwView* pView; sal_uInt16 nPageCount; // page count for progress view sal_uInt16 nPageStart; // 1st checked page - bool bInSelection : 1; // separating selected text + bool const bInSelection : 1; // separating selected text bool bAutomatic : 1; // insert separators without further inquiry bool bInfoBox : 1; // display info-box when ending diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx index c86b53f00146..5d3daed7f1c3 100644 --- a/sw/source/uibase/inc/insfnote.hxx +++ b/sw/source/uibase/inc/insfnote.hxx @@ -33,7 +33,7 @@ class SwInsFootNoteDlg: public weld::GenericDialogController OUString m_aFontName; rtl_TextEncoding m_eCharSet; bool m_bExtCharAvailable; - bool m_bEdit; + bool const m_bEdit; std::unique_ptr<weld::Widget> m_xNumberFrame; std::unique_ptr<weld::RadioButton> m_xNumberAutoBtn; diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx index a0471ceaafc9..b014e408b6a8 100644 --- a/sw/source/uibase/inc/label.hxx +++ b/sw/source/uibase/inc/label.hxx @@ -32,7 +32,7 @@ class Printer; class SwLabDlg : public SfxTabDialogController { SwLabelConfig aLabelsCfg; - SwDBManager* pDBManager; + SwDBManager* const pDBManager; VclPtr<SwLabPrtPage> pPrtPage; std::vector<sal_uInt16> aTypeIds; @@ -41,7 +41,7 @@ class SwLabDlg : public SfxTabDialogController std::unique_ptr<SwLabRecs> m_pRecs; OUString aLstGroup; OUString m_sBusinessCardDlg; - bool m_bLabel; + bool const m_bLabel; void ReplaceGroup_( const OUString &rMake ); virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx index e81a986e025f..941cb4e35847 100644 --- a/sw/source/uibase/inc/labimg.hxx +++ b/sw/source/uibase/inc/labimg.hxx @@ -107,7 +107,7 @@ class SwLabCfgItem : public utl::ConfigItem { private: SwLabItem aItem; - bool bIsLabel; + bool const bIsLabel; css::uno::Sequence<OUString> GetPropertyNames(); diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index c415e0fa5880..13929d48e445 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -140,7 +140,7 @@ public: class SW_DLLPUBLIC SwAuthenticator : public cppu::WeakImplHelper<css::mail::XAuthenticator> { - OUString m_aUserName; + OUString const m_aUserName; OUString m_aPassword; weld::Window* m_pParentWindow; public: @@ -161,9 +161,9 @@ public: class SW_DLLPUBLIC SwConnectionContext : public cppu::WeakImplHelper<css::uno::XCurrentContext> { - OUString m_sMailServer; - sal_Int16 m_nPort; - OUString m_sConnectionType; + OUString const m_sMailServer; + sal_Int16 const m_nPort; + OUString const m_sConnectionType; public: SwConnectionContext(const OUString& rMailServer, sal_Int16 nPort, const OUString& rConnectionType); @@ -201,11 +201,11 @@ class SW_DLLPUBLIC SwMailTransferable : public SwMutexBase, public cppu::WeakComponentImplHelper<css::datatransfer::XTransferable, css::beans::XPropertySet> { - OUString m_aMimeType; - OUString m_sBody; - OUString m_aURL; - OUString m_aName; - bool m_bIsBody; + OUString const m_aMimeType; + OUString const m_sBody; + OUString const m_aURL; + OUString const m_aName; + bool const m_bIsBody; public: SwMailTransferable(const OUString& rURL, const OUString& rName, const OUString& rMimeType); diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index a184216a917a..4867a5e15668 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -33,18 +33,18 @@ class SwMailMergeConfigItem; class SwMailMergeWizard : public ::svt::RoadmapWizard { - SwView* m_pSwView; + SwView* const m_pSwView; OUString sDocumentURL; bool m_bDocumentLoad; std::shared_ptr<SwMailMergeConfigItem> m_xConfigItem; - OUString m_sStarting; - OUString m_sDocumentType; - OUString m_sAddressBlock; - OUString m_sAddressList; - OUString m_sGreetingsLine; - OUString m_sLayout; + OUString const m_sStarting; + OUString const m_sDocumentType; + OUString const m_sAddressBlock; + OUString const m_sAddressList; + OUString const m_sGreetingsLine; + OUString const m_sLayout; sal_uInt16 m_nRestartPage; diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index 0f42b7ff05c5..bda8b7ddb3d4 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -76,18 +76,18 @@ class SW_DLLPUBLIC SwSpellPopup { VclBuilder m_aBuilder; VclPtr<PopupMenu> m_xPopupMenu; - sal_uInt16 m_nIgnoreWordId; - sal_uInt16 m_nAddMenuId; - sal_uInt16 m_nAddId; - sal_uInt16 m_nSpellDialogId; - sal_uInt16 m_nCorrectMenuId; - sal_uInt16 m_nCorrectDialogId; - sal_uInt16 m_nLangSelectionMenuId; - sal_uInt16 m_nLangParaMenuId; - sal_uInt16 m_nRedlineAcceptId; - sal_uInt16 m_nRedlineRejectId; - sal_uInt16 m_nRedlineNextId; - sal_uInt16 m_nRedlinePrevId; + sal_uInt16 const m_nIgnoreWordId; + sal_uInt16 const m_nAddMenuId; + sal_uInt16 const m_nAddId; + sal_uInt16 const m_nSpellDialogId; + sal_uInt16 const m_nCorrectMenuId; + sal_uInt16 const m_nCorrectDialogId; + sal_uInt16 const m_nLangSelectionMenuId; + sal_uInt16 const m_nLangParaMenuId; + sal_uInt16 const m_nRedlineAcceptId; + sal_uInt16 const m_nRedlineRejectId; + sal_uInt16 const m_nRedlineNextId; + sal_uInt16 const m_nRedlinePrevId; SwWrtShell* m_pSh; css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionary > > m_aDics; css::uno::Reference< css::linguistic2::XSpellAlternatives > m_xSpellAlt; @@ -103,8 +103,8 @@ class SW_DLLPUBLIC SwSpellPopup std::map< sal_Int16, OUString > m_aLangTable_Text; std::map< sal_Int16, OUString > m_aLangTable_Paragraph; - OUString m_aDicNameSingle; - bool m_bGrammarResults; // show grammar results? Or show spellcheck results? + OUString m_aDicNameSingle; + bool const m_bGrammarResults; // show grammar results? Or show spellcheck results? static void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart, const css::uno::Sequence< OUString >& aSeq, SwWrtShell* pWrtSh, diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index e8a8169abe8e..ae9d637e6052 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -47,7 +47,7 @@ class TextFilterAutoConvert : public TextFilter { private: OUString m_sLastGoodText; - OUString m_sNone; + OUString const m_sNone; public: TextFilterAutoConvert(const OUString &rNone) : m_sNone(rNone) @@ -104,7 +104,7 @@ class CaptionComboBox : public ComboBox { std::vector<OUString> m_EntryList; std::vector<OUString> m_DelEntryList; - OUString aDefault; + OUString const aDefault; void InsertSorted(OUString const& rEntry); @@ -163,22 +163,22 @@ private: VclPtr<ListBox> m_pCharStyleLB; VclPtr<CheckBox> m_pApplyBorderCB; - OUString m_sSWTable; - OUString m_sSWFrame; - OUString m_sSWGraphic; - OUString m_sOLE; + OUString const m_sSWTable; + OUString const m_sSWFrame; + OUString const m_sSWGraphic; + OUString const m_sOLE; OUString m_sIllustration; OUString m_sTable; OUString m_sText; OUString m_sDrawing; - OUString m_sBegin; - OUString m_sEnd; - OUString m_sAbove; - OUString m_sBelow; + OUString const m_sBegin; + OUString const m_sEnd; + OUString const m_sAbove; + OUString const m_sBelow; - OUString m_sNone; + OUString const m_sNone; std::unique_ptr<SwFieldMgr> pMgr; bool bHTMLMode; diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index e00b1dc1e79b..660993c79495 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -76,7 +76,7 @@ public: // TabPage printer settings additions class SwAddPrinterTabPage : public SfxTabPage { - OUString sNone; + OUString const sNone; bool bAttrModified; bool bPreview; @@ -166,9 +166,9 @@ class SwStdFontTabPage : public SfxTabPage sal_uInt8 m_nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL] - OUString m_sScriptWestern; - OUString m_sScriptAsian; - OUString m_sScriptComplex; + OUString const m_sScriptWestern; + OUString const m_sScriptAsian; + OUString const m_sScriptComplex; DECL_LINK(StandardHdl, Button*, void ); DECL_LINK(ModifyHdl, Edit&, void ); @@ -277,7 +277,7 @@ class SwMarkPreview : public vcl::Window Size m_aInitialSize; Color m_aBgCol; // background - Color m_aTransCol; // transparency + Color const m_aTransCol; // transparency Color m_aMarkCol; // marks Color m_aLineCol; // general lines Color m_aShadowCol; // shadow diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index 9f5054e66caf..114372f39863 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -53,7 +53,7 @@ class SwOutlineTabDialog final : public SfxTabDialogController std::unique_ptr<SwNumRule> xNumRule; SwChapterNumRules* pChapterNumRules; - bool bModified : 1; + bool const bModified : 1; std::unique_ptr<weld::MenuButton> m_xMenuButton; @@ -78,7 +78,7 @@ public: class SwOutlineSettingsTabPage : public SfxTabPage { - OUString aNoFormatName; + OUString const aNoFormatName; OUString aSaveCollNames[MAXLEVEL]; SwWrtShell* pSh; SwNumRule* pNumRule; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 5d046f60933e..cb4b6f5a788e 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -170,7 +170,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell // to support keyboard the number of the page to go to can be set too sal_uInt16 m_nNewPage; // visible range - OUString m_sPageStr; + OUString const m_sPageStr; Size m_aDocSize; tools::Rectangle m_aVisArea; diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 2e3e34aa87fa..4f551e76ddec 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -68,28 +68,28 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final VclPtr<PopupMenu> m_xPopup; Timer m_aDeselectTimer; Timer m_aSelectTimer; - OUString m_sInserted; - OUString m_sDeleted; - OUString m_sFormated; - OUString m_sTableChgd; - OUString m_sFormatCollSet; + OUString const m_sInserted; + OUString const m_sDeleted; + OUString const m_sFormated; + OUString const m_sTableChgd; + OUString const m_sFormatCollSet; OUString m_sFilterAction; - OUString m_sAutoFormat; + OUString const m_sAutoFormat; VclPtr<SvxTPView> m_pTPView; VclPtr<SvxRedlinTable> m_pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox Link<SvTreeListBox*,void> m_aOldSelectHdl; Link<SvTreeListBox*,void> m_aOldDeselectHdl; bool m_bOnlyFormatedRedlines; - bool m_bRedlnAutoFormat; + bool const m_bRedlnAutoFormat; // prevent update dialog data during longer operations (cf #102657#) bool m_bInhibitActivate; - Image m_aInserted; - Image m_aDeleted; - Image m_aFormated; - Image m_aTableChgd; - Image m_aFormatCollSet; + Image const m_aInserted; + Image const m_aDeleted; + Image const m_aFormated; + Image const m_aTableChgd; + Image const m_aFormatCollSet; DECL_DLLPRIVATE_LINK( AcceptHdl, SvxTPView*, void ); DECL_DLLPRIVATE_LINK( AcceptAllHdl, SvxTPView*, void ); diff --git a/sw/source/uibase/inc/scroll.hxx b/sw/source/uibase/inc/scroll.hxx index d279f73fa54f..2741f3cf194e 100644 --- a/sw/source/uibase/inc/scroll.hxx +++ b/sw/source/uibase/inc/scroll.hxx @@ -22,11 +22,11 @@ class SwScrollbar: public ScrollBar { - Size aDocSz; - bool bHori :1; // horizontal = salTrue, otherwise vertical - bool bAuto :1; // for scrolling mode - bool bVisible :1; // show/hide should only set this flag - bool bSizeSet :1; // was the size already set? + Size aDocSz; + bool const bHori :1; // horizontal = salTrue, otherwise vertical + bool bAuto :1; // for scrolling mode + bool bVisible :1; // show/hide should only set this flag + bool bSizeSet :1; // was the size already set? void AutoShow(); diff --git a/sw/source/uibase/inc/shdwcrsr.hxx b/sw/source/uibase/inc/shdwcrsr.hxx index bade87e6d821..8f79f7722e63 100644 --- a/sw/source/uibase/inc/shdwcrsr.hxx +++ b/sw/source/uibase/inc/shdwcrsr.hxx @@ -28,7 +28,7 @@ namespace vcl { class Window; } class SwShadowCursor { VclPtr<vcl::Window> pWin; - Color aCol; + Color const aCol; Point aOldPt; long nOldHeight; sal_uInt16 nOldMode; diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index b15ea2c550a2..ff32b8f0569f 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -27,7 +27,7 @@ class SwWrtShell; class SwSortDlg : public weld::GenericDialogController { - weld::Window* m_pParent; + weld::Window* const m_pParent; std::unique_ptr<weld::Label> m_xColLbl; std::unique_ptr<weld::CheckButton> m_xKeyCB1; @@ -60,9 +60,9 @@ class SwSortDlg : public weld::GenericDialogController std::unique_ptr<weld::CheckButton> m_xCaseCB; - OUString aColText; - OUString aRowText; - OUString aNumericText; + OUString const aColText; + OUString const aRowText; + OUString const aNumericText; SwWrtShell &rSh; std::unique_ptr<CollatorResource> m_xColRes; diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx index 69b2f91198b5..54d80fc7ccbe 100644 --- a/sw/source/uibase/inc/swcont.hxx +++ b/sw/source/uibase/inc/swcont.hxx @@ -58,7 +58,7 @@ enum class RegionMode //mini rtti class SwTypeNumber { - sal_uInt8 nTypeId; + sal_uInt8 const nTypeId; public: SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){} @@ -70,8 +70,8 @@ class SwTypeNumber class SwContent : public SwTypeNumber { const SwContentType* pParent; - OUString sContentName; - long nYPosition; + OUString const sContentName; + long const nYPosition; // most subclasses appear to use this for a tools/gen.hxx-style // geometric Y position, while SwOutlineContent wants to store a // SwOutlineNodes::size_type value (where all such values used in diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 32bbdec0c218..88d7c907bef4 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -87,12 +87,12 @@ class SwMultiTOXTabDialog : public SfxTabDialog CurTOXType m_eCurrentTOXType; - OUString m_sUserDefinedIndex; - sal_uInt16 m_nInitialTOXType; + OUString const m_sUserDefinedIndex; + sal_uInt16 const m_nInitialTOXType; bool m_bEditTOX; bool m_bExampleCreated; - bool m_bGlobalFlag; + bool const m_bGlobalFlag; virtual short Ok() override; std::unique_ptr<SwTOXDescription> CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); @@ -194,7 +194,7 @@ class SwTOXSelectTabPage : public SfxTabPage OUString aStyleArr[MAXLEVEL]; OUString sAutoMarkURL; - OUString sAutoMarkType; + OUString const sAutoMarkType; OUString sAddStyleUser; OUString sAddStyleContent; @@ -248,7 +248,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer bool m_bValid; OUString m_aButtonTexts[TOKEN_END]; // Text of the buttons OUString m_aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons - OUString m_sCharStyle; + OUString const m_sCharStyle; Link<SwFormToken&,void> m_aButtonSelectedHdl; VclPtr<Control> m_pActiveCtrl; Link<LinkParamNone*,void> m_aModifyHdl; @@ -388,12 +388,12 @@ class SwTOXEntryTabPage : public SfxTabPage VclPtr<RadioButton> m_pThirdSortUpRB; VclPtr<RadioButton> m_pThirdSortDownRB; - OUString sDelimStr; + OUString const sDelimStr; OUString sLevelStr; OUString sAuthTypeStr; - OUString sNoCharStyle; - OUString sNoCharSortKey; + OUString const sNoCharStyle; + OUString const sNoCharSortKey; SwForm* m_pCurrentForm; CurTOXType aLastTOXType; diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index b1ad4e718a6e..4c5502073ed0 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -90,7 +90,7 @@ class SwIndexMarkPane OUString aOrgStr; bool bDel; - bool bNewMark; + bool const bNewMark; bool bSelected; bool bPhoneticED0_ChangedByUser; @@ -200,8 +200,8 @@ class SwAuthorMarkPane VclPtr<PushButton> m_pCreateEntryPB; VclPtr<PushButton> m_pEditEntryPB; - bool bNewEntry; - bool bBibAccessInitialized; + bool const bNewEntry; + bool bBibAccessInitialized; SwWrtShell* pSh; diff --git a/sw/source/uibase/inc/swuipardlg.hxx b/sw/source/uibase/inc/swuipardlg.hxx index 303be16ba70e..8783176f9ffe 100644 --- a/sw/source/uibase/inc/swuipardlg.hxx +++ b/sw/source/uibase/inc/swuipardlg.hxx @@ -24,7 +24,7 @@ class SwParaDlg: public SfxTabDialogController { SwView& rView; sal_uInt16 nHtmlMode; - bool bDrawParaDlg; + bool const bDrawParaDlg; void PageCreated(const OString& rId, SfxTabPage& rPage) override; diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx index 0cc7b32deebc..ef0c9ba203c5 100644 --- a/sw/source/uibase/inc/swwrtshitem.hxx +++ b/sw/source/uibase/inc/swwrtshitem.hxx @@ -25,7 +25,7 @@ class SwWrtShell; class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem { - SwWrtShell* pWrtSh; + SwWrtShell* const pWrtSh; public: SwWrtShellItem( SwWrtShell* pWrtSh ); diff --git a/sw/source/uibase/inc/tabledlg.hxx b/sw/source/uibase/inc/tabledlg.hxx index 75b555d63ccf..4111a0485ff1 100644 --- a/sw/source/uibase/inc/tabledlg.hxx +++ b/sw/source/uibase/inc/tabledlg.hxx @@ -30,7 +30,7 @@ struct TColumn; // table dialog class SwTableTabDlg : public SfxTabDialogController { - SwWrtShell* pShell; + SwWrtShell* const pShell; virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; public: diff --git a/sw/source/uibase/inc/tablemgr.hxx b/sw/source/uibase/inc/tablemgr.hxx index 3f6d3200a48f..baf1ee6746c7 100644 --- a/sw/source/uibase/inc/tablemgr.hxx +++ b/sw/source/uibase/inc/tablemgr.hxx @@ -41,7 +41,7 @@ const char cParaDelim = 0x0a; class SW_DLLPUBLIC SwTableFUNC { - SwFrameFormat *pFormat; + SwFrameFormat * const pFormat; SwWrtShell *pSh; SwTabCols aCols; diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx index 59f80d722f69..6b46283b80f0 100644 --- a/sw/source/uibase/inc/tautofmt.hxx +++ b/sw/source/uibase/inc/tautofmt.hxx @@ -37,19 +37,19 @@ enum AutoFormatLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; class SwAutoFormatDlg : public weld::GenericDialogController { - OUString m_aStrTitle; - OUString m_aStrLabel; - OUString m_aStrClose; - OUString m_aStrDelTitle; - OUString m_aStrDelMsg; - OUString m_aStrRenameTitle; - OUString m_aStrInvalidFormat; + OUString const m_aStrTitle; + OUString const m_aStrLabel; + OUString const m_aStrClose; + OUString const m_aStrDelTitle; + OUString const m_aStrDelMsg; + OUString const m_aStrRenameTitle; + OUString const m_aStrInvalidFormat; SwWrtShell* m_pShell; sal_uInt8 m_nIndex; sal_uInt8 m_nDfltStylePos; bool m_bCoreDataChanged : 1; - bool m_bSetAutoFormat : 1; + bool const m_bSetAutoFormat : 1; AutoFormatPreview m_aWndPreview; std::unique_ptr<SwTableAutoFormatTable> m_xTableTable; diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx index b9a2c7253782..fcb1f8b4c18f 100644 --- a/sw/source/uibase/inc/tmpdlg.hxx +++ b/sw/source/uibase/inc/tmpdlg.hxx @@ -28,10 +28,10 @@ class SwWrtShell; class SwTemplateDlg: public SfxStyleDialog { - SfxStyleFamily nType; + SfxStyleFamily const nType; sal_uInt16 nHtmlMode; SwWrtShell* pWrtShell; - bool bNewStyle; + bool const bNewStyle; sal_uInt16 m_nIndentsId; sal_uInt16 m_nAlignId; @@ -78,7 +78,7 @@ public: class SwTemplateDlgController : public SfxStyleDialogController { - SfxStyleFamily nType; + SfxStyleFamily const nType; sal_uInt16 nHtmlMode; SwWrtShell* pWrtShell; diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx index deac6631a37a..9be4523c00b7 100644 --- a/sw/source/uibase/inc/uiitems.hxx +++ b/sw/source/uibase/inc/uiitems.hxx @@ -61,7 +61,7 @@ public: class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem { - void* pMisc; + void* const pMisc; public: SwPtrItem( const sal_uInt16 nId, void* pPtr); @@ -93,7 +93,7 @@ public: class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem { - SwPaM* m_pPaM; + SwPaM* const m_pPaM; public: SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM); diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx index 44b7b3f5cca5..006be555cc81 100644 --- a/sw/source/uibase/inc/uivwimp.hxx +++ b/sw/source/uibase/inc/uivwimp.hxx @@ -92,7 +92,7 @@ class SwView_Impl // temporary document for printing text of selection / multi selection // in PDF export. - SfxObjectShellLock xTmpSelDocSh; + SfxObjectShellLock const xTmpSelDocSh; SwView* pView; rtl::Reference<SwScannerEventListener> diff --git a/sw/source/uibase/inc/unoatxt.hxx b/sw/source/uibase/inc/unoatxt.hxx index 5ddcea49d0d1..d1c80753a423 100644 --- a/sw/source/uibase/inc/unoatxt.hxx +++ b/sw/source/uibase/inc/unoatxt.hxx @@ -166,8 +166,8 @@ class SwXAutoTextEntry final > { SwGlossaries* pGlossaries; - OUString sGroupName; - OUString sEntryName; + OUString const sGroupName; + OUString const sEntryName; SwDocShellRef xDocSh; rtl::Reference<SwXBodyText> mxBodyText; @@ -242,8 +242,6 @@ public: /** Implement the XNameAccess for the AutoText events */ class SwAutoTextEventDescriptor : public SvBaseEventDescriptor { - OUString sSwAutoTextEventDescriptor; - SwXAutoTextEntry& rAutoTextEntry; using SvBaseEventDescriptor::replaceByName; diff --git a/sw/source/uibase/inc/unodispatch.hxx b/sw/source/uibase/inc/unodispatch.hxx index 448b8e379dd9..547e90b108dd 100644 --- a/sw/source/uibase/inc/unodispatch.hxx +++ b/sw/source/uibase/inc/unodispatch.hxx @@ -43,7 +43,7 @@ class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper class DispatchMutexLock_Impl { //::osl::MutexGuard aGuard; #102295# solar mutex has to be used currently - SolarMutexGuard aGuard; + SolarMutexGuard const aGuard; public: DispatchMutexLock_Impl(); ~DispatchMutexLock_Impl(); diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx index 5f385aaffbf1..016e7c576443 100644 --- a/sw/source/uibase/inc/unomod.hxx +++ b/sw/source/uibase/inc/unomod.hxx @@ -73,7 +73,7 @@ class SwXPrintSettings final : public comphelper::ChainablePropertySet { friend class SwXDocumentSettings; - SwXPrintSettingsType meType; + SwXPrintSettingsType const meType; SwPrintData * mpPrtOpt; SwDoc *mpDoc; diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 688475720b5e..17e780c7877e 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -66,9 +66,9 @@ class SW_DLLPUBLIC SwOneExampleFrame OUString m_sArgumentURL; - SwView* m_pModuleView; + SwView* const m_pModuleView; - sal_uInt32 m_nStyleFlags; + sal_uInt32 const m_nStyleFlags; bool m_bIsInitialized; bool m_bServiceAvailable; diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index be76a80a979f..08306e66008e 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -31,7 +31,7 @@ class SwContentViewConfig : public utl::ConfigItem { private: SwMasterUsrPref& rParent; - bool bWeb; + bool const bWeb; css::uno::Sequence<OUString> GetPropertyNames(); @@ -52,7 +52,7 @@ class SwLayoutViewConfig : public utl::ConfigItem { private: SwMasterUsrPref& rParent; - bool bWeb; + bool const bWeb; css::uno::Sequence<OUString> GetPropertyNames(); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 95877cbfe9d9..0c7272221002 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -487,7 +487,7 @@ private: struct ModeStack { ModeStack *pNext; - bool bAdd, + bool const bAdd, bBlock, bExt, bIns; @@ -512,9 +512,9 @@ private: { Point aDocPos; std::unique_ptr<CursorStack> pNext; - bool bValidCurPos : 1; + bool const bValidCurPos : 1; bool bIsFrameSel : 1; - SwTwips lOffset; + SwTwips const lOffset; CursorStack( bool bValid, bool bFrameSel, const Point &rDocPos, SwTwips lOff, std::unique_ptr<CursorStack> pN ) diff --git a/sw/source/uibase/lingu/sdrhhcwrap.hxx b/sw/source/uibase/lingu/sdrhhcwrap.hxx index 133e47cc9200..ea5ff07ceddb 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.hxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.hxx @@ -32,12 +32,12 @@ class SdrHHCWrapper : public SdrOutliner SwView* pView; SdrTextObj* pTextObj; std::unique_ptr<OutlinerView> pOutlView; - sal_Int32 nOptions; + sal_Int32 const nOptions; sal_uInt16 nDocIndex; - LanguageType nSourceLang; - LanguageType nTargetLang; + LanguageType const nSourceLang; + LanguageType const nTargetLang; const vcl::Font* pTargetFont; - bool bIsInteractive; + bool const bIsInteractive; public: SdrHHCWrapper( SwView* pVw, diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index c9955176cd12..f95fa36b32f5 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -435,8 +435,8 @@ void SwScrollNaviPopup::statusChanged( const css::frame::FeatureStateEvent& rEve class SwZoomBox_Impl : public ComboBox { - sal_uInt16 nSlotId; - bool bRelease; + sal_uInt16 const nSlotId; + bool bRelease; public: SwZoomBox_Impl( @@ -597,7 +597,7 @@ VclPtr<vcl::Window> SwPreviewZoomControl::CreateItemWindow( vcl::Window *pParent class SwJumpToSpecificBox_Impl : public NumericField { - sal_uInt16 nSlotId; + sal_uInt16 const nSlotId; public: SwJumpToSpecificBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot); @@ -981,7 +981,7 @@ public: virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override; private: - Type meType; + Type const meType; }; PrevNextScrollToolboxController::PrevNextScrollToolboxController( const css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType ) diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx index 18a1f771dd8a..f5b18a7671e3 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx @@ -61,7 +61,7 @@ private: : maURL(rURL) {} - OUString maURL; + OUString const maURL; }; void RefreshList(); diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 5560e5520fa4..d11f9d9e6f7a 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -70,7 +70,7 @@ class StyleRedefinition ColorVariable maVariable; public: - OUString maElementName; + OUString const maElementName; public: explicit StyleRedefinition(const OUString& aElementName) diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 05a7afb55d59..956e76c9f646 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -968,8 +968,6 @@ const struct SvEventDescription aAutotextEvents[] = SwAutoTextEventDescriptor::SwAutoTextEventDescriptor( SwXAutoTextEntry& rAutoText ) : SvBaseEventDescriptor(aAutotextEvents), - sSwAutoTextEventDescriptor( - "SwAutoTextEventDescriptor"), rAutoTextEntry(rAutoText) { } @@ -980,7 +978,7 @@ SwAutoTextEventDescriptor::~SwAutoTextEventDescriptor() OUString SwAutoTextEventDescriptor::getImplementationName() { - return sSwAutoTextEventDescriptor; + return OUString("SwAutoTextEventDescriptor"); } void SwAutoTextEventDescriptor::replaceByName( diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index cdbd0ff171d5..f38cfba8782c 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -187,7 +187,7 @@ namespace ::osl::Mutex m_aMutex; Reference< util::XCloseable > m_xDocument; Timer m_aDeleteTimer; - OUString m_sTemporaryFile; + OUString const m_sTemporaryFile; sal_Int32 m_nPendingDeleteAttempts; DelayedFileDeletion(DelayedFileDeletion const&) = delete; |