diff options
Diffstat (limited to 'sw/source/core')
41 files changed, 64 insertions, 64 deletions
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index fbdcab48cb44..52dfe42827d9 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -346,7 +346,7 @@ public: //This method is used to update the selected state and fire the selected state changed event. virtual bool SetSelectedState(bool bSeleted); - bool IsSeletedInDoc() { return m_isSelectedInDoc; } + bool IsSeletedInDoc() const { return m_isSelectedInDoc; } static OUString GetResource(const char* pResId, const OUString *pArg1 = nullptr, diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 6090c098a3b8..db2472e76407 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -55,7 +55,7 @@ public: SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient); - const SwDoc& GetDoc(){return *pDoc;} + const SwDoc& GetDoc() const {return *pDoc;} #if OSL_DEBUG_LEVEL > 0 static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;} #endif diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx index 3be5cdcfdd79..6e73f31168a9 100644 --- a/sw/source/core/docnode/threadmanager.cxx +++ b/sw/source/core/docnode/threadmanager.cxx @@ -61,7 +61,7 @@ ThreadManager::~ThreadManager() maStartedThreads.clear(); } -std::weak_ptr< IFinishedThreadListener > ThreadManager::GetThreadListenerWeakRef() +std::weak_ptr< IFinishedThreadListener > ThreadManager::GetThreadListenerWeakRef() const { return mpThreadListener; } diff --git a/sw/source/core/docnode/threadmanager.hxx b/sw/source/core/docnode/threadmanager.hxx index 84ee87b454a2..a0a43a78f2a4 100644 --- a/sw/source/core/docnode/threadmanager.hxx +++ b/sw/source/core/docnode/threadmanager.hxx @@ -51,7 +51,7 @@ class ThreadManager final explicit ThreadManager( css::uno::Reference< css::util::XJobManager > const & rThreadJoiner ); ~ThreadManager(); - std::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef(); + std::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef() const; void NotifyAboutFinishedThread( const oslInterlockedCount nThreadID ); /** initialization diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 8dce2d6731d6..aa0d763c7bde 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -1380,7 +1380,7 @@ static sal_Int16 lcl_GetAngle(const drawing::HomogenMatrix3& rMatrix) return nDeg < 0 ? round(nDeg) * -1 : round(360.0 - nDeg); } -SfxWatermarkItem SwEditShell::GetWatermark() +SfxWatermarkItem SwEditShell::GetWatermark() const { SwDocShell* pDocShell = GetDoc()->GetDocShell(); if (!pDocShell) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index df141dd389c3..26a0a411d159 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -412,7 +412,7 @@ void SwEditShell::SetTableName( SwFrameFormat& rTableFormat, const OUString &rNe } /// request current word -OUString SwEditShell::GetCurWord() +OUString SwEditShell::GetCurWord() const { const SwPaM& rPaM = *GetCursor(); const SwTextNode* pNd = rPaM.GetNode().GetTextNode(); diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 3490d548ad1b..033ccb556faf 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -561,7 +561,7 @@ void SwSetExpFieldType::SetSeqFormat(sal_uLong nFormat) pFormatField->GetField()->ChangeFormat( nFormat ); } -sal_uLong SwSetExpFieldType::GetSeqFormat() +sal_uLong SwSetExpFieldType::GetSeqFormat() const { if( !HasWriterListeners() ) return SVX_NUM_ARABIC; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 27a20a24bca0..3d430ee495be 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1273,7 +1273,7 @@ public: void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField, bool bField ); - const OUString& GetName() { return aName; } + const OUString& GetName() const { return aName; } }; /// Get a sorted list of the field IDs from a document. diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index 29729fd55290..ed8f6bead855 100644 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -183,7 +183,7 @@ std::unique_ptr<OutlinerParaObject> SwTextAPIEditSource::CreateText() return nullptr; } -OUString SwTextAPIEditSource::GetText() +OUString SwTextAPIEditSource::GetText() const { if ( pImpl->mpPool && pImpl->mpOutliner ) return pImpl->mpOutliner->GetEditEngine().GetText(); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index d6108875560c..6134d0f73f45 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -333,7 +333,7 @@ void SwFEShell::ShellLoseFocus() } } -sal_uInt16 SwFEShell::GetPhyPageNum() +sal_uInt16 SwFEShell::GetPhyPageNum() const { SwFrame *pFrame = GetCurrFrame(); if ( pFrame ) @@ -341,7 +341,7 @@ sal_uInt16 SwFEShell::GetPhyPageNum() return 0; } -sal_uInt16 SwFEShell::GetVirtPageNum() +sal_uInt16 SwFEShell::GetVirtPageNum() const { SwFrame *pFrame = GetCurrFrame(); if ( pFrame ) diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx index 6a2d9289b50b..0d09c20c34bb 100644 --- a/sw/source/core/inc/UndoCore.hxx +++ b/sw/source/core/inc/UndoCore.hxx @@ -156,7 +156,7 @@ class SwUndoFormatColl : public SwUndo, private SwUndRng void DoSetFormatColl(SwDoc & rDoc, SwPaM const & rPaM); public: - SwUndoFormatColl( const SwPaM&, SwFormatColl*, + SwUndoFormatColl( const SwPaM&, const SwFormatColl*, const bool bReset, const bool bResetListAttrs ); virtual ~SwUndoFormatColl() override; @@ -200,7 +200,7 @@ class SwUndoSetFlyFormat : public SwUndo, public SwClient void GetAnchor( SwFormatAnchor& rAnhor, sal_uLong nNode, sal_Int32 nContent ); public: - SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFrameFormat ); + SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, const SwFrameFormat& rNewFrameFormat ); virtual ~SwUndoSetFlyFormat() override; virtual void UndoImpl( ::sw::UndoRedoContext & ) override; diff --git a/sw/source/core/inc/dialoghelp.hxx b/sw/source/core/inc/dialoghelp.hxx index ce9c0721055f..a549523658e5 100644 --- a/sw/source/core/inc/dialoghelp.hxx +++ b/sw/source/core/inc/dialoghelp.hxx @@ -20,8 +20,8 @@ namespace weld class Window; } -weld::Window* GetFrameWeld(SfxFrame* pFrame); -weld::Window* GetFrameWeld(SfxMedium* pMedium); +weld::Window* GetFrameWeld(const SfxFrame* pFrame); +weld::Window* GetFrameWeld(const SfxMedium* pMedium); weld::Window* GetFrameWeld(SwDocShell* pDocSh); weld::Window* GetFrameWeld(SwDoc* pDoc); diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index d7dc6cfe0ebf..cf06172d0c06 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -122,7 +122,7 @@ protected: bool m_bFlyLock :1; // stop positioning of at-character flyframes // checks if forward flow makes sense to prevent infinite moves - inline bool IsFwdMoveAllowed(); + inline bool IsFwdMoveAllowed() const; // #i44049# - method <CalcContent(..)> has to check this property. friend void CalcContent( SwLayoutFrame *pLay, bool bNoColl ); bool IsKeepFwdMoveAllowed( bool bIgnoreMyOwnKeepValue = false ); // like above, forward flow for Keep. @@ -237,7 +237,7 @@ public: static const SwFlowFrame *CastFlowFrame( const SwFrame *pFrame ); }; -inline bool SwFlowFrame::IsFwdMoveAllowed() +inline bool SwFlowFrame::IsFwdMoveAllowed() const { return m_rThis.GetIndPrev() != nullptr; } diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index d2a5b7704cb1..3edf774c9828 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -233,7 +233,7 @@ public: ~SwLayNotify(); void SetLowersComplete( bool b ) { m_bLowersComplete = b; } - bool IsLowersComplete() { return m_bLowersComplete; } + bool IsLowersComplete() const { return m_bLowersComplete; } }; class SwFlyNotify : public SwLayNotify @@ -575,7 +575,7 @@ public: * true if mpFrame != 0 and mpFrame is not client of pRegIn * false otherwise */ - bool HasBeenDeleted(); + bool HasBeenDeleted() const; }; #endif diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index f0eb3112e20e..618353c6256b 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -115,7 +115,7 @@ public: void LockBackMove() { mbBackMoveLocked = true; } void UnlockBackMove() { mbBackMoveLocked = false;} - bool IsBackMoveLocked() { return mbBackMoveLocked; } + bool IsBackMoveLocked() const { return mbBackMoveLocked; } // prevents that the last content deletes the SwFootnoteFrame as well (Cut()) void ColLock() { mbColLocked = true; } @@ -130,7 +130,7 @@ public: { mbUnlockPosOfLowerObjs = false; } - bool IsUnlockPosOfLowerObjs() + bool IsUnlockPosOfLowerObjs() const { return mbUnlockPosOfLowerObjs; } diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index 5a1613efb4df..6fb81943af4d 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -139,7 +139,7 @@ class SwHistorySetTextField : public SwHistoryHint SwFieldIds m_nFieldWhich; public: - SwHistorySetTextField( SwTextField* pTextField, sal_uLong nNode ); + SwHistorySetTextField( const SwTextField* pTextField, sal_uLong nNode ); virtual ~SwHistorySetTextField() override; virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override; @@ -155,7 +155,7 @@ class SwHistorySetRefMark : public SwHistoryHint const sal_Int32 m_nEnd; public: - SwHistorySetRefMark( SwTextRefMark* pTextHt, sal_uLong nNode ); + SwHistorySetRefMark( const SwTextRefMark* pTextHt, sal_uLong nNode ); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override; }; @@ -170,7 +170,7 @@ class SwHistorySetTOXMark : public SwHistoryHint const sal_Int32 m_nEnd; public: - SwHistorySetTOXMark( SwTextTOXMark* pTextHt, sal_uLong nNode ); + SwHistorySetTOXMark( const SwTextTOXMark* pTextHt, sal_uLong nNode ); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override; bool IsEqual( const SwTOXMark& rCmp ) const; diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index c3e5d7e48a69..484ff172e25d 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -274,7 +274,7 @@ public: /// Makes sure that all requested page-bound Flys find a Page void SetAssertFlyPages() { mbAssertFlyPages = true; } void AssertFlyPages(); - bool IsAssertFlyPages() { return mbAssertFlyPages; } + bool IsAssertFlyPages() const { return mbAssertFlyPages; } /** * Makes sure that, starting from the passed Page, all page-bound Frames @@ -344,7 +344,7 @@ public: bool IsTurboAllowed() const { return mbTurboAllowed; } void SetTurbo( const SwContentFrame *pContent ) { mpTurbo = pContent; } void ResetTurbo() { mpTurbo = nullptr; } - const SwContentFrame *GetTurbo() { return mpTurbo; } + const SwContentFrame *GetTurbo() const { return mpTurbo; } /// Update the footnote numbers of all Pages void UpdateFootnoteNums(); // Only for page by page numbering! diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index 97af78f8d439..ae20aac45b82 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -99,7 +99,7 @@ public: const OUString& GetFileName() const {return m_aFile;} /// Return physical file name void SetName( const OUString& rName ) /// Logic name { m_aName = rName; m_bInfoChanged = true; } - const OUString& GetName() + const OUString& GetName() const { return m_aName; } const OUString& GetBaseURL() const { return m_sBaseURL;} diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 40b9923ba744..69e07ac9c692 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -144,7 +144,7 @@ public: const SwTable *GetTable() const { return m_pTable; } SwTable *GetTable() { return m_pTable; } - bool IsComplete() { return m_bComplete; } + bool IsComplete() const { return m_bComplete; } void SetComplete() { m_bComplete = true; } void ResetComplete() { m_bComplete = false; } diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index ee8bd319d407..3362621d7b03 100644 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -44,7 +44,7 @@ public: void SetText( OutlinerParaObject const & rText ); void SetString( const OUString& rText ); std::unique_ptr<OutlinerParaObject> CreateText(); - OUString GetText(); + OUString GetText() const; }; class SwTextAPIObject : public SvxUnoText @@ -57,7 +57,7 @@ public: std::unique_ptr<OutlinerParaObject> CreateText() { return pSource->CreateText(); } void SetString( const OUString& rText ) { pSource->SetString( rText ); } void SetText( OutlinerParaObject const & rText ) { pSource->SetText( rText ); } - OUString GetText() { return pSource->GetText(); } + OUString GetText() const { return pSource->GetText(); } }; #endif diff --git a/sw/source/core/inc/unotextmarkup.hxx b/sw/source/core/inc/unotextmarkup.hxx index e0e1551c169f..30e1b3bf3ebc 100644 --- a/sw/source/core/inc/unotextmarkup.hxx +++ b/sw/source/core/inc/unotextmarkup.hxx @@ -75,7 +75,7 @@ private: protected: SwTextNode* GetTextNode(); void ClearTextNode(); - const ModelToViewHelper& GetConversionMap(); + const ModelToViewHelper& GetConversionMap() const; }; /** Implementation of the css::container::XStringKeyMap interface diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 65041858c291..b1e414d46880 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -3495,7 +3495,7 @@ public: void SetFrame( SwFrame* pHold ); SwFrame* GetFrame() { return pFrame; } void Reset(); - bool IsSet() { return bSet; } + bool IsSet() const { return bSet; } }; void SwFrameHolder::SetFrame( SwFrame* pHold ) @@ -3738,7 +3738,7 @@ SwDeletionChecker::SwDeletionChecker(const SwFrame* pFrame) } /// Can be used to check if a frame has been deleted -bool SwDeletionChecker::HasBeenDeleted() +bool SwDeletionChecker::HasBeenDeleted() const { if ( !mpFrame || !mpRegIn ) return false; diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 0d388a56d21c..ace092727f1a 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -249,7 +249,7 @@ SwTextBlocks::~SwTextBlocks() { } -OUString SwTextBlocks::GetName() +OUString SwTextBlocks::GetName() const { return pImp ? pImp->m_aName : OUString(); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index e52f220ffbf2..393968dbd032 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -72,7 +72,7 @@ class SwExtraPainter sal_uLong m_nLineNr; sal_uInt16 m_nDivider; bool m_bGoLeft; - bool IsClipChg() { return m_aClip.IsChg(); } + bool IsClipChg() const { return m_aClip.IsChg(); } SwExtraPainter(const SwExtraPainter&) = delete; SwExtraPainter& operator=(const SwExtraPainter&) = delete; @@ -83,8 +83,8 @@ public: sal_Int16 eHor, bool bLnNm ); SwFont* GetFont() const { return m_pFnt.get(); } void IncLineNr() { ++m_nLineNr; } - bool HasNumber() { return !( m_nLineNr % m_rLineInf.GetCountBy() ); } - bool HasDivider() { + bool HasNumber() const { return !( m_nLineNr % m_rLineInf.GetCountBy() ); } + bool HasDivider() const { if( !m_nDivider ) return false; return !(m_nLineNr % m_rLineInf.GetDividerCountBy()); } diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index c9178e61ede2..94eb7de9f207 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -663,7 +663,7 @@ public: TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd); void SetTabOverflow( bool bOverflow ) { m_bTabOverflow = bOverflow; } - bool IsTabOverflow() { return m_bTabOverflow; } + bool IsTabOverflow() const { return m_bTabOverflow; } }; diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index ae0d717f6967..5806f06e3b76 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -1260,7 +1260,7 @@ void SwTextCursor::GetCharRect( SwRect* pOrig, TextFrameIndex const nOfst, * Determines if SwTextCursor::GetCursorOfst() should consider the next portion when calculating the * doc model position from a Point. */ -static bool ConsiderNextPortionForCursorOffset(SwLinePortion* pPor, sal_uInt16 nWidth30, sal_uInt16 nX) +static bool ConsiderNextPortionForCursorOffset(const SwLinePortion* pPor, sal_uInt16 nWidth30, sal_uInt16 nX) { if (!pPor->GetNextPortion()) { diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 2997b88c763d..2cbcd06c4824 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -162,7 +162,7 @@ public: virtual bool Format( SwTextFormatInfo &rInf ) override; // Stuff for justified alignment - bool IsSpaceAdd() { return m_pLLSpaceAdd != nullptr; } + bool IsSpaceAdd() const { return m_pLLSpaceAdd != nullptr; } void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary void CreateSpaceAdd( const long nInit = 0 ); void FinishSpaceAdd() { m_pLLSpaceAdd.reset(); } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 42980e3f7733..805d0dd1dddd 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -835,7 +835,7 @@ void MetaFieldManager::copyDocumentProperties(const SwDoc& rSource) m_xDocumentProperties.set(xCloneable->createClone(), uno::UNO_QUERY); } -const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties() +const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties() const { return m_xDocumentProperties; } diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index dac54161c7d3..171accf5ae5d 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -328,7 +328,7 @@ public: virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) override; virtual void Do() override; - TextFrameIndex GetCursor(){ return nCursor; } + TextFrameIndex GetCursor() const { return nCursor; } }; void SwDoCapitalCursorOfst::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index b155c0f98e4b..e2dea45e13fb 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -116,7 +116,7 @@ static void TextAttrDelete( SwDoc & rDoc, SwTextAttr * const pAttr ) SwTextAttr::Destroy( pAttr, rDoc.GetAttrPool() ); } -static bool TextAttrContains(const sal_Int32 nPos, SwTextAttrEnd * const pAttr) +static bool TextAttrContains(const sal_Int32 nPos, const SwTextAttrEnd * const pAttr) { return (pAttr->GetStart() < nPos) && (nPos < *pAttr->End()); } diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index e20c705a0228..77e594e9dafc 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -251,7 +251,7 @@ void SwHistorySetText::SetInDoc( SwDoc* pDoc, bool ) } } -SwHistorySetTextField::SwHistorySetTextField( SwTextField* pTextField, sal_uLong nNodePos ) +SwHistorySetTextField::SwHistorySetTextField( const SwTextField* pTextField, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTXTFLDHNT ) , m_pField( new SwFormatField( *pTextField->GetFormatField().GetField() ) ) { @@ -309,7 +309,7 @@ void SwHistorySetTextField::SetInDoc( SwDoc* pDoc, bool ) } } -SwHistorySetRefMark::SwHistorySetRefMark( SwTextRefMark* pTextHt, sal_uLong nNodePos ) +SwHistorySetRefMark::SwHistorySetRefMark( const SwTextRefMark* pTextHt, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETREFMARKHNT ) , m_RefName( pTextHt->GetRefMark().GetRefName() ) , m_nNodeIndex( nNodePos ) @@ -336,7 +336,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool ) } } -SwHistorySetTOXMark::SwHistorySetTOXMark( SwTextTOXMark* pTextHt, sal_uLong nNodePos ) +SwHistorySetTOXMark::SwHistorySetTOXMark( const SwTextTOXMark* pTextHt, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTOXMARKHNT ) , m_TOXMark( pTextHt->GetTOXMark() ) , m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() ) diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index 4e83a712dcb3..1fb7f4551881 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -455,7 +455,7 @@ void SwUndoDelLayFormat::RedoForRollback() DelFly( m_pFrameFormat->GetDoc() ); } -SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFrameFormat ) +SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, const SwFrameFormat& rNewFrameFormat ) : SwUndo( SwUndoId::SETFLYFRMFMT, rFlyFormat.GetDoc() ), SwClient( &rFlyFormat ), m_pFrameFormat( &rFlyFormat ), m_DerivedFromFormatName( rFlyFormat.IsDefault() ? "" : rFlyFormat.DerivedFrom()->GetName() ), m_NewFormatName( rNewFrameFormat.GetName() ), diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index b56aebe7f41d..722e61c7d440 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -26,7 +26,7 @@ #include <docary.hxx> SwUndoFormatColl::SwUndoFormatColl( const SwPaM& rRange, - SwFormatColl* pColl, + const SwFormatColl* pColl, const bool bReset, const bool bResetListAttrs ) : SwUndo( SwUndoId::SETFMTCOLL, rRange.GetDoc() ), diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index d8bf523b3a42..50a4bfc0cba1 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -95,7 +95,7 @@ public: return m_rThis.GetDoc() ? m_pFormatFootnote : nullptr; } - SwFormatFootnote const& GetFootnoteFormatOrThrow() { + SwFormatFootnote const& GetFootnoteFormatOrThrow() const { SwFormatFootnote const*const pFootnote( GetFootnoteFormat() ); if (!pFootnote) { throw uno::RuntimeException("SwXFootnote: disposed or invalid", nullptr); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index ac2197c36583..ae93e9c63b07 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1522,8 +1522,8 @@ public: Impl(SwXDocumentIndexMark& rThis, SwDoc* const pDoc, const enum TOXTypes eType, - SwTOXType* const pType, - SwTOXMark const*const pMark) + const SwTOXType* pType, + SwTOXMark const* pMark) : m_rThis(rThis) , m_bInReplaceMark(false) , m_rPropSet( diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 137bf4880c83..26a00c334746 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -101,7 +101,7 @@ namespace , aPosition ( rPosition ) { } - sal_Int32 getIndex () + sal_Int32 getIndex () const { return aPosition.nContent.GetIndex(); } @@ -236,7 +236,7 @@ namespace { } - sal_Int32 getIndex () + sal_Int32 getIndex () const { return maPosition.nContent.GetIndex(); } @@ -689,7 +689,7 @@ struct SwXRedlinePortion_Impl { } - sal_Int32 getRealIndex () + sal_Int32 getRealIndex () const { return m_bStart ? m_pRedline->Start()->nContent.GetIndex() : m_pRedline->End() ->nContent.GetIndex(); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index dde6652ff130..683afef3fd17 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4670,7 +4670,7 @@ void SwXTextCellStyle::SetPhysical() SAL_WARN("sw.uno", "calling SetPhysical on a physical SwXTextCellStyle"); } -bool SwXTextCellStyle::IsPhysical() +bool SwXTextCellStyle::IsPhysical() const { return m_bPhysical; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 48438301f112..8cdddc8d72d2 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1984,7 +1984,7 @@ public: StartListening(m_pFrameFormat->GetNotifier()); } - bool IsDescriptor() { return m_pTableProps != nullptr; } + bool IsDescriptor() const { return m_pTableProps != nullptr; } // note: lock mutex before calling this to avoid concurrent update static std::pair<sal_uInt16, sal_uInt16> ThrowIfComplex(SwXTextTable &rThis) @@ -3200,8 +3200,8 @@ public: void SetLabelDescriptions(SwXCellRange & rThis, const css::uno::Sequence<OUString>& rDesc, bool bRow); - sal_Int32 GetRowCount(); - sal_Int32 GetColumnCount(); + sal_Int32 GetRowCount() const; + sal_Int32 GetColumnCount() const; virtual void Notify(const SfxHint& ) override; @@ -3851,12 +3851,12 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD } } -sal_Int32 SwXCellRange::Impl::GetColumnCount() +sal_Int32 SwXCellRange::Impl::GetColumnCount() const { return m_RangeDescriptor.nRight - m_RangeDescriptor.nLeft + 1; } -sal_Int32 SwXCellRange::Impl::GetRowCount() +sal_Int32 SwXCellRange::Impl::GetRowCount() const { return m_RangeDescriptor.nBottom - m_RangeDescriptor.nTop + 1; } diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index 955793003b4a..09259ed571e1 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -81,7 +81,7 @@ void SwXTextMarkup::ClearTextNode() m_pImpl->EndListeningAll(); } -const ModelToViewHelper& SwXTextMarkup::GetConversionMap() +const ModelToViewHelper& SwXTextMarkup::GetConversionMap() const { return m_pImpl->m_ConversionMap; } diff --git a/sw/source/core/view/dialoghelp.cxx b/sw/source/core/view/dialoghelp.cxx index 0ee765845b29..cdb47694456e 100644 --- a/sw/source/core/view/dialoghelp.cxx +++ b/sw/source/core/view/dialoghelp.cxx @@ -17,12 +17,12 @@ #include <docsh.hxx> #include <view.hxx> -weld::Window* GetFrameWeld(SfxFrame* pFrame) +weld::Window* GetFrameWeld(const SfxFrame* pFrame) { return pFrame ? pFrame->GetWindow().GetFrameWeld() : nullptr; } -weld::Window* GetFrameWeld(SfxMedium* pMedium) +weld::Window* GetFrameWeld(const SfxMedium* pMedium) { return GetFrameWeld(pMedium ? pMedium->GetLoadTargetFrame() : nullptr); } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 6ec563446366..90f49a0c42ed 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -630,7 +630,7 @@ Point SwViewShell::GetPagePos( sal_uInt16 nPageNum ) const return GetLayout()->GetPagePos( nPageNum ); } -sal_uInt16 SwViewShell::GetNumPages() +sal_uInt16 SwViewShell::GetNumPages() const { //It is possible that no layout exists when the method from //root-Ctor is called. |