diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 10:01:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 11:28:41 +0200 |
commit | 6c6c1eea82b259c7aec1e0ed5ff86bfd2eb0243f (patch) | |
tree | 87e8ccbbfc4d369e079098eb8be09abf988f1c44 /sw/inc | |
parent | fc79f23922ccae8b494b31a5dd7bb4767e50c87e (diff) |
loplugin:constmethod in sw
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488
Reviewed-on: https://gerrit.libreoffice.org/79780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/AnnotationWin.hxx | 34 | ||||
-rw-r--r-- | sw/inc/PostItMgr.hxx | 8 | ||||
-rw-r--r-- | sw/inc/SwAppletImpl.hxx | 2 | ||||
-rw-r--r-- | sw/inc/breakit.hxx | 2 | ||||
-rw-r--r-- | sw/inc/calbck.hxx | 2 | ||||
-rw-r--r-- | sw/inc/calc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 6 | ||||
-rw-r--r-- | sw/inc/dbmgr.hxx | 4 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 8 | ||||
-rw-r--r-- | sw/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/expfld.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/fmtmeta.hxx | 2 | ||||
-rw-r--r-- | sw/inc/hints.hxx | 6 | ||||
-rw-r--r-- | sw/inc/modcfg.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ndgrf.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 2 | ||||
-rw-r--r-- | sw/inc/node.hxx | 2 | ||||
-rw-r--r-- | sw/inc/prtopt.hxx | 2 | ||||
-rw-r--r-- | sw/inc/shellio.hxx | 6 | ||||
-rw-r--r-- | sw/inc/splargs.hxx | 2 | ||||
-rw-r--r-- | sw/inc/swmodule.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tblafmt.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unodraw.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unosett.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unostyle.hxx | 2 | ||||
-rw-r--r-- | sw/inc/view.hxx | 18 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 6 |
29 files changed, 72 insertions, 72 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 18ebe2e7f8c1..4d920621405e 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -70,12 +70,12 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void SetPostItText(); void Delete(); void GotoPos(); - const SwPostItField* GetPostItField() { return mpField; } + const SwPostItField* GetPostItField() const { return mpField; } void UpdateText(const OUString& aText); - OUString GetAuthor(); - Date GetDate(); - tools::Time GetTime(); + OUString GetAuthor() const; + Date GetDate() const; + tools::Time GetTime() const; sal_uInt32 MoveCaret(); @@ -83,7 +83,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window sal_uInt32 CalcParent(); void InitAnswer(OutlinerParaObject const * pText); - bool IsProtected(); + bool IsProtected() const; void SetSize( const Size& rNewSize ); void SetPosSizePixelRect( long nX, @@ -97,10 +97,10 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void CheckMetaText(); Point const & GetAnchorPos() { return mAnchorRect.Pos(); } - const SwRect& GetAnchorRect() { return mAnchorRect; } - bool IsAnchorRectChanged() { return mbAnchorRectChanged; } + const SwRect& GetAnchorRect() const { return mAnchorRect; } + bool IsAnchorRectChanged() const { return mbAnchorRectChanged; } void ResetAnchorRectChanged() { mbAnchorRectChanged = false; } - const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() { return maAnnotationTextRanges; } + const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() const { return maAnnotationTextRanges; } SwEditWin& EditWin(); SwSidebarItem& GetSidebarItem() { return mrSidebarItem; } @@ -136,7 +136,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition); void SetReadonly(bool bSet); - bool IsReadOnly() + bool IsReadOnly() const { return mbReadonly; } @@ -149,14 +149,14 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void SetViewState(::sw::sidebarwindows::ViewState bViewState); - bool IsFollow() { return mbIsFollow; } + bool IsFollow() const { return mbIsFollow; } void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; }; sal_Int32 GetMetaHeight(); - sal_Int32 GetMinimumSizeWithMeta(); - sal_Int32 GetMinimumSizeWithoutMeta(); - sal_Int32 GetMetaButtonAreaWidth(); - sal_Int32 GetScrollbarWidth(); + sal_Int32 GetMinimumSizeWithMeta() const; + sal_Int32 GetMinimumSizeWithoutMeta() const; + sal_Int32 GetMetaButtonAreaWidth() const; + sal_Int32 GetScrollbarWidth() const; sal_Int32 GetNumFields(); void SetSpellChecking(); @@ -168,8 +168,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus, const Color& aColor); - SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; } - const Color& GetChangeColor() { return mChangeColor; } + SwPostItHelper::SwLayoutStatus GetLayoutStatus() const { return mLayoutStatus; } + const Color& GetChangeColor() const { return mChangeColor; } DECL_LINK( WindowEventListener, VclWindowEvent&, void ); bool IsMouseOverSidebarWin() const { return mbMouseOver; } @@ -216,7 +216,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window sal_uInt32 CountFollowing(); - SvxLanguageItem GetLanguage(); + SvxLanguageItem GetLanguage() const; VclBuilder maBuilder; SwPostItMgr& mrMgr; diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 89edc53e62f4..8a6330dcecb3 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -105,7 +105,7 @@ class SwNoteProps: public utl::ConfigItem pValues[0]>>=m_bIsShowAnchor; } - bool IsShowAnchor() + bool IsShowAnchor() const { return m_bIsShowAnchor; } @@ -192,7 +192,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener bool ShowScrollbar(const unsigned long aPage) const; bool HasNotes() const ; bool ShowNotes() const; - bool IsShowAnchor() { return mbIsShowAnchor;} + bool IsShowAnchor() const { return mbIsShowAnchor;} unsigned long GetSidebarWidth(bool bPx = false) const; unsigned long GetSidebarBorderWidth(bool bPx = false) const; @@ -213,7 +213,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener void Hide( const OUString& rAuthor ); void Hide(); void Show(); - void UpdateResolvedStatus(sw::annotation::SwAnnotationWin* topNote); + void UpdateResolvedStatus(const sw::annotation::SwAnnotationWin* topNote); void ShowHideResolvedNotes(bool visible); void Rescale(); @@ -257,7 +257,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} OutlinerParaObject* IsAnswer() {return mpAnswer;} void RegisterAnswerText(const OUString& aAnswerText) { maAnswerText = aAnswerText; } - const OUString& GetAnswerText() { return maAnswerText; } + const OUString& GetAnswerText() const { return maAnswerText; } void CheckMetaText(); sal_uInt16 Replace(SvxSearchItem const * pItem); diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx index bf2f754995ca..e35fa84b239d 100644 --- a/sw/inc/SwAppletImpl.hxx +++ b/sw/inc/SwAppletImpl.hxx @@ -56,7 +56,7 @@ public: void AppendParam( const OUString& rName, const OUString& rValue ); #endif void FinishApplet(); - const css::uno::Reference < css::embed::XEmbeddedObject >& GetApplet() { return xApplet; } + const css::uno::Reference < css::embed::XEmbeddedObject >& GetApplet() const { return xApplet; } SfxItemSet& GetItemSet() { return aItemSet; } const OUString& GetAltText() const { return sAlt; } void SetAltText( const OUString& rAlt ) {sAlt = rAlt;} diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx index aad3d4757caa..f33c0cc771a8 100644 --- a/sw/inc/breakit.hxx +++ b/sw/inc/breakit.hxx @@ -59,7 +59,7 @@ public: public: static SwBreakIt * Get(); - css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() + css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const { return m_xBreak; } diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 5cc590989c8a..fde08c288577 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -223,7 +223,7 @@ public: bool IsInSwFntCache() const { return m_bInSwFntCache; } void CheckCaching( const sal_uInt16 nWhich ); - bool HasOnlyOneListener() { return m_pWriterListeners && m_pWriterListeners->IsLast(); } + bool HasOnlyOneListener() const { return m_pWriterListeners && m_pWriterListeners->IsLast(); } }; template<typename TElementType, typename TSource, sw::IteratorMode eMode> class SwIterator; diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 220fe79d21c5..c3404d8b402e 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -113,10 +113,10 @@ public: double GetDouble() const; SwSbxValue& MakeDouble(); - bool IsVoidValue() {return m_bVoid;} + bool IsVoidValue() const {return m_bVoid;} void SetVoidValue(bool bSet) {m_bVoid = bSet;} - bool IsDBvalue() {return m_bDBvalue;} + bool IsDBvalue() const {return m_bDBvalue;} void SetDBvalue(bool bSet) {m_bDBvalue = bSet;} }; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 5ad7a6ac2dd2..66c597b21bef 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -405,7 +405,7 @@ public: // Areas inline void SetMark(); - inline bool HasMark(); + inline bool HasMark() const; void ClearMark(); @@ -834,7 +834,7 @@ public: { m_bMacroExecAllowed = _bMacroExecAllowed; } - bool IsMacroExecAllowed() + bool IsMacroExecAllowed() const { return m_bMacroExecAllowed; } @@ -874,7 +874,7 @@ inline SwPaM* SwCursorShell::GetStackCursor() const { return m_pStackCursor; } inline void SwCursorShell::SetMark() { m_pCurrentCursor->SetMark(); } -inline bool SwCursorShell::HasMark() { return m_pCurrentCursor->HasMark(); } +inline bool SwCursorShell::HasMark() const { return m_pCurrentCursor->HasMark(); } inline bool SwCursorShell::IsSelection() const { diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index c9e69a9861e1..991062424c35 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -299,8 +299,8 @@ public: bool Merge( const SwMergeDescriptor& rMergeDesc ); void MergeCancel(); - bool IsMergeOk() { return MergeStatus::Ok == m_aMergeStatus; }; - bool IsMergeError() { return MergeStatus::Error <= m_aMergeStatus; }; + bool IsMergeOk() const { return MergeStatus::Ok == m_aMergeStatus; }; + bool IsMergeError() const { return MergeStatus::Error <= m_aMergeStatus; }; static std::shared_ptr<SwMailMergeConfigItem> PerformMailMerge(SwView const * pView); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index af2e97aa9985..79ae280c872a 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -387,7 +387,7 @@ public: DOCTYPE_MSWORD // This doc model comes from MS Word }; DocumentType meDocType; - DocumentType GetDocumentType(){ return meDocType; } + DocumentType GetDocumentType() const { return meDocType; } void SetDocumentType( DocumentType eDocType ) { meDocType = eDocType; } // Life cycle @@ -1345,7 +1345,7 @@ public: /** in case during copying of embedded object a new shell is created, it should be set here and cleaned later */ void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; } - const SfxObjectShellLock& GetTmpDocShell() { return mxTmpDocShell; } + const SfxObjectShellLock& GetTmpDocShell() const { return mxTmpDocShell; } // For Autotexts? (text modules) They have only one SVPersist at their disposal. SfxObjectShell* GetPersist() const; @@ -1605,7 +1605,7 @@ public: css::uno::Reference< css::script::vba::XVBAEventProcessor > const & GetVbaEventProcessor(); void SetVBATemplateToProjectCache( css::uno::Reference< css::container::XNameContainer > const & xCache ) { m_xTemplateToProjectCache = xCache; }; - const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; }; + const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() const { return m_xTemplateToProjectCache; }; ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); ::sw::UndoManager & GetUndoManager(); @@ -1644,7 +1644,7 @@ public: /// Use to notify if the dictionary can be found for a single content portion (has to be called for all portions) void SetMissingDictionaries( bool bIsMissing ); /// Returns true if no dictionary can be found for any content - bool IsDictionaryMissing() { return meDictionaryMissing == MissingDictionary::True; } + bool IsDictionaryMissing() const { return meDictionaryMissing == MissingDictionary::True; } private: // Copies master header to left / first one, if necessary - used by ChgPageDesc(). diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 291b20455c17..3834fc34ce02 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -305,7 +305,7 @@ public: GetController(); SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef ); - SAL_DLLPRIVATE bool IsTemplate() { return m_IsATemplate; } + SAL_DLLPRIVATE bool IsTemplate() const { return m_IsATemplate; } SAL_DLLPRIVATE void SetIsTemplate( bool bValue ) { m_IsATemplate = bValue; } virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const override; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 7d033edb76ea..8a2c2064d97b 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -362,7 +362,7 @@ public: void ApplyAdvancedClassification(std::vector<svx::ClassificationResult> const & rResult); std::vector<svx::ClassificationResult> CollectAdvancedClassification(); - SfxWatermarkItem GetWatermark(); + SfxWatermarkItem GetWatermark() const; void SetWatermark(const SfxWatermarkItem& rText); /// Sign the paragraph at the cursor. @@ -685,7 +685,7 @@ public: /// Update content of all charts for table with given name. void UpdateCharts( const OUString &rName ); - OUString GetCurWord(); + OUString GetCurWord() const; /** Glossary from glossary document in current document. Styles only if not already existent. */ diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index dcd1354619b3..01611c4aa8ea 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -162,7 +162,7 @@ public: inline sal_uInt16 GetType() const; void SetSeqFormat(sal_uLong nFormat); - sal_uLong GetSeqFormat(); + sal_uLong GetSeqFormat() const; bool IsDeleted() const { return m_bDeleted; } void SetDeleted( bool b ) { m_bDeleted = b; } diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 65732d8f384f..49d168233ebe 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -701,7 +701,7 @@ public: sal_uInt16 GetRowsToRepeat() const; void SetRowsToRepeat( sal_uInt16 nNumOfRows ); - sal_uInt16 GetVirtPageNum(); + sal_uInt16 GetVirtPageNum() const; /** @return the number of table rows currently selected if the selection start at the top of the table. */ @@ -733,7 +733,7 @@ public: /** Phy: real page count. Virt: consider offset that may have been set by user. */ - sal_uInt16 GetPhyPageNum(); + sal_uInt16 GetPhyPageNum() const; void SetNewPageOffset( sal_uInt16 nOffset ); void SetPageOffset( sal_uInt16 nOffset ); ///< Changes last page offset. diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index 2fe348cffce0..d2d403751211 100644 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -216,7 +216,7 @@ public: std::vector< css::uno::Reference<css::text::XTextField> > getMetaFields(); /// Copy document properties from rSource to m_xDocumentProperties. void copyDocumentProperties(const SwDoc& rSource); - const css::uno::Reference<css::document::XDocumentProperties>& getDocumentProperties(); + const css::uno::Reference<css::document::XDocumentProperties>& getDocumentProperties() const; }; } // namespace sw diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 29cc96a3b90e..3caa88e03da7 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -268,9 +268,9 @@ class SwVirtPageNumInfo: public SwMsgPoolItem public: SwVirtPageNumInfo( const SwPageFrame *pPg ); - const SwPageFrame *GetPage() { return m_pPage; } - const SwPageFrame *GetOrigPage() { return m_pOrigPage;} - const SwFrame *GetFrame() { return m_pFrame; } + const SwPageFrame *GetPage() const { return m_pPage; } + const SwPageFrame *GetOrigPage() const { return m_pOrigPage;} + const SwFrame *GetFrame() const { return m_pFrame; } void SetInfo( const SwPageFrame *pPg, const SwFrame *pF ) { m_pFrame = pF; m_pPage = pPg; } }; diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index 4cac78f4c883..217be9327139 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -130,7 +130,7 @@ class SAL_DLLPUBLIC_RTTI SwInsertConfig : public utl::ConfigItem SwInsertTableOptions m_aInsTableOpts; bool const m_bIsWeb; - const css::uno::Sequence<OUString>& GetPropertyNames(); + const css::uno::Sequence<OUString>& GetPropertyNames() const; virtual void ImplCommit() override; diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 2faed3ec01e8..65716602c16f 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -141,7 +141,7 @@ public: /// Returns the with our graphic attributes filled Graphic-Attr-Structure. GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrame* pFrame ) const; - std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer() { return mpThreadConsumer;} + std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer() const { return mpThreadConsumer;} bool IsLinkedInputStreamReady() const { return mbLinkedInputStreamReady;} void TriggerAsyncRetrieveInputStream(); void ApplyInputStream( diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 125891a8cb50..acef43b0010e 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -595,7 +595,7 @@ public: */ void SetAttrOutlineLevel(int nLevel); - bool IsEmptyListStyleDueToSetOutlineLevelAttr() { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;} + bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;} void SetEmptyListStyleDueToSetOutlineLevelAttr(); void ResetEmptyListStyleDueToResetOutlineLevelAttr(); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 143213035881..c403a75a136a 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -90,7 +90,7 @@ class SW_DLLPUBLIC SwNode public: /// sw_redlinehide: redline node merge state enum class Merge { None, First, NonFirst, Hidden }; - bool IsCreateFrameWhenHidingRedlines() { + bool IsCreateFrameWhenHidingRedlines() const { return m_eMerge == Merge::None || m_eMerge == Merge::First; } void SetRedlineMergeFlag(Merge const eMerge) { m_eMerge = eMerge; } diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx index 5c53ee1a84bd..e03714902b63 100644 --- a/sw/inc/prtopt.hxx +++ b/sw/inc/prtopt.hxx @@ -27,7 +27,7 @@ class SwPrintOptions : public SwPrintData, public utl::ConfigItem private: bool const bIsWeb; - css::uno::Sequence<OUString> GetPropertyNames(); + css::uno::Sequence<OUString> GetPropertyNames() const; virtual void ImplCommit() override; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 0b6d926d6b4c..025193a1c00c 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -267,7 +267,7 @@ public: virtual size_t GetSectionList( SfxMedium& rMedium, std::vector<OUString>& rStrings) const; - const tools::SvRef<SotStorage>& getSotStorageRef() { return m_pStorage; }; + const tools::SvRef<SotStorage>& getSotStorageRef() const { return m_pStorage; }; void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { m_pStorage = pStgRef; }; private: @@ -292,7 +292,7 @@ class SW_DLLPUBLIC StgReader : public Reader public: virtual SwReaderType GetReaderType() override; - const OUString& GetFltName() { return aFltName; } + const OUString& GetFltName() const { return aFltName; } virtual void SetFltName( const OUString& r ) override; }; @@ -312,7 +312,7 @@ public: SwDoc* GetDoc(); void ClearDoc(); // Delete Doc-contents. - OUString GetName(); + OUString GetName() const; void SetName( const OUString& ); ErrCode const & GetError() const { return nErr; } diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index 0c66737205f9..122b9c7b09ac 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -136,7 +136,7 @@ public: { xHyphWord = rxHW; } - const css::uno::Reference< css::linguistic2::XHyphenatedWord >& GetHyphWord() + const css::uno::Reference< css::linguistic2::XHyphenatedWord >& GetHyphWord() const { return xHyphWord; } diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index a102410d7118..6fbab3ad4f78 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -208,8 +208,8 @@ public: void GetDeletedAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet); void GetFormatAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet); - sal_uInt16 GetRedlineMarkPos(); - const Color& GetRedlineMarkColor(); + sal_uInt16 GetRedlineMarkPos() const; + const Color& GetRedlineMarkColor() const; SwCompareMode GetCompareMode() const; bool IsUseRsid() const; diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index fd74bee7c27a..23fdbe395c14 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -303,7 +303,7 @@ class SwCellStyleDescriptor public: SwCellStyleDescriptor(const std::pair<OUString, std::unique_ptr<SwBoxAutoFormat>>& rCellStyleDesc) : m_rCellStyleDesc(rCellStyleDesc) { } - const OUString& GetName() { return m_rCellStyleDesc.first; } + const OUString& GetName() const { return m_rCellStyleDesc.first; } }; class SwCellStyleTable diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 2938e7a79114..deaa34fc1636 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -257,7 +257,7 @@ public: SwShapeDescriptor_Impl* GetDescImpl() {return pImpl.get();} SwFrameFormat* GetFrameFormat() const { return m_pFormat; } - const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() {return xShapeAgg;} + const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() const {return xShapeAgg;} // helper static void AddExistingShapeToFormat( SdrObject const & _rObj ); diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index 7414645d9b54..a86c35700a16 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -202,7 +202,7 @@ public: const OUString* GetNewCharStyleNames() const {return m_sNewCharStyleNames;} const OUString* GetBulletFontNames() const {return m_sNewBulletFontNames;} - const SwNumRule* GetNumRule() {return m_pNumRule;} + const SwNumRule* GetNumRule() const {return m_pNumRule;} static bool isInvalidStyle(const OUString &rName); void Invalidate() {m_pDocShell = nullptr;} diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 5a2e66195c72..67c7dd996424 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -357,7 +357,7 @@ class SwXTextCellStyle : public cppu::WeakImplHelper /// Sets the address of SwBoxAutoFormat this style is bound to. Usable only when style is physical. void SetBoxFormat(SwBoxAutoFormat* pBoxFormat); void SetPhysical(); - bool IsPhysical(); + bool IsPhysical() const; //XStyle virtual sal_Bool SAL_CALL isUserDefined() override; diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index e6142006d50c..e2a18d00a231 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -377,7 +377,7 @@ public: virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL) override; - ShellMode GetShellMode(); + ShellMode GetShellMode() const; css::view::XSelectionSupplier* GetUNOObject(); @@ -513,9 +513,9 @@ public: SwDrawBase* GetDrawFuncPtr() const { return m_pDrawActual.get(); } void GetDrawState(SfxItemSet &rSet); void ExitDraw(); - bool IsDrawRotate() { return m_bDrawRotate; } + bool IsDrawRotate() const { return m_bDrawRotate; } void FlipDrawRotate() { m_bDrawRotate = !m_bDrawRotate; } - bool IsDrawSelMode() { return m_bDrawSelMode; } + bool IsDrawSelMode() const { return m_bDrawSelMode; } void SetSelDrawSlot(); void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; } void NoRotate(); // turn off rotate mode @@ -523,16 +523,16 @@ public: /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position. bool EnterShapeDrawTextMode(SdrObject* pObject); void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear();} - bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); } + bool IsDrawMode() const { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); } bool IsFormMode() const; - bool IsBezierEditMode(); + bool IsBezierEditMode() const; bool AreOnlyFormsSelected() const; bool HasOnlyObj(SdrObject const *pSdrObj, SdrInventor eObjInventor) const; bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=nullptr, vcl::Window* pWin=nullptr, bool bIsNewObj=false, bool bSetSelectionToStart=false ); - bool isSignatureLineSelected(); - bool isSignatureLineSigned(); - bool isQRCodeSelected(); + bool isSignatureLineSelected() const; + bool isSignatureLineSigned() const; + bool isQRCodeSelected() const; void StateTabWin(SfxItemSet&); @@ -638,7 +638,7 @@ public: /// See SfxViewShell::dumpAsXml(). void dumpAsXml(xmlTextWriterPtr pWriter) const override; void SetRedlineAuthor(const OUString& rAuthor); - const OUString& GetRedlineAuthor(); + const OUString& GetRedlineAuthor() const; /// See SfxViewShell::NotifyCursor(). void NotifyCursor(SfxViewShell* pViewShell) const override; void ShowUIElement(const OUString& sElementURL) const; diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 3f11b6d6fe24..dc6472b060cd 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -200,7 +200,7 @@ public: bool IsInEndAction() const { return mbInEndAction; } void SetEndActionByVirDev( bool b ) { mbEndActionByVirDev = b; } - bool IsEndActionByVirDev() { return mbEndActionByVirDev; } + bool IsEndActionByVirDev() const { return mbEndActionByVirDev; } // The ActionCount for all Shells is temporarily set to zero and then // restored at the RootFrame via UNO. @@ -264,7 +264,7 @@ public: Point GetPagePos( sal_uInt16 nPageNum ) const; - sal_uInt16 GetNumPages(); // Ask count of current pages from layout. + sal_uInt16 GetNumPages() const; // Ask count of current pages from layout. bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page? // Invalidate first visible page for all Shells in ring. @@ -565,7 +565,7 @@ public: bool IsHeaderFooterEdit() const { return mbHeaderFooterEdit; } bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; } virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ); - bool IsSelectAll() { return mbSelectAll; } + bool IsSelectAll() const { return mbSelectAll; } void setOutputToWindow(bool bOutputToWindow); bool isOutputToWindow() const; |