diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-01 13:01:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-01 20:58:11 +0200 |
commit | 581efdec36787dc5e378e54d13e7328fddcf3a50 (patch) | |
tree | 29f04e719f8402028a4e26088a8ea825ebe9fdca /include | |
parent | e512b53ef8ae7945131876d32121fdbbdeb1de35 (diff) |
loplugin:constmethod
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/editeng.hxx | 6 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 8 | ||||
-rw-r--r-- | include/editeng/unoedprx.hxx | 2 | ||||
-rw-r--r-- | include/package/Inflater.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/listview.hxx | 8 | ||||
-rw-r--r-- | include/sfx2/thumbnailview.hxx | 4 | ||||
-rw-r--r-- | include/svtools/brwbox.hxx | 6 | ||||
-rw-r--r-- | include/svtools/ctrlbox.hxx | 14 | ||||
-rw-r--r-- | include/svtools/miscopt.hxx | 2 | ||||
-rw-r--r-- | include/svtools/valueset.hxx | 2 | ||||
-rw-r--r-- | include/svx/gallerybinaryengineentry.hxx | 2 | ||||
-rw-r--r-- | include/svx/obj3d.hxx | 2 | ||||
-rw-r--r-- | include/svx/svditer.hxx | 2 | ||||
-rw-r--r-- | include/svx/svdpntv.hxx | 2 | ||||
-rw-r--r-- | include/toolkit/awt/vclxwindows.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlnumfi.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmluconv.hxx | 6 |
17 files changed, 37 insertions, 37 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 9f078cc5f0ab..97b1437f3b5d 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -330,9 +330,9 @@ public: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ); bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; - const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ); + const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; template<class T> - const T& GetParaAttrib( sal_Int32 nPara, TypedWhichId<T> nWhich ) + const T& GetParaAttrib( sal_Int32 nPara, TypedWhichId<T> nWhich ) const { return static_cast<const T&>(GetParaAttrib(nPara, sal_uInt16(nWhich))); } @@ -585,7 +585,7 @@ public: EditPaM DeleteSelection(const EditSelection& rSel); - ESelection CreateESelection(const EditSelection& rSel); + ESelection CreateESelection(const EditSelection& rSel) const; EditSelection CreateSelection(const ESelection& rSel); const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) const; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 999981c69af0..fc0f75d89c62 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -712,7 +712,7 @@ public: sal_Int32 GetChildCount( Paragraph const * pParent ) const; bool IsExpanded( Paragraph const * pPara ) const; Paragraph* GetParent( Paragraph const * pParagraph ) const; - sal_Int32 GetAbsPos( Paragraph const * pPara ); + sal_Int32 GetAbsPos( Paragraph const * pPara ) const; sal_Int16 GetDepth( sal_Int32 nPara ) const; void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); @@ -839,7 +839,7 @@ public: SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ); void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& ); - SfxItemSet const & GetParaAttribs( sal_Int32 nPara ); + SfxItemSet const & GetParaAttribs( sal_Int32 nPara ) const; void Remove( Paragraph const * pPara, sal_Int32 nParaCount ); bool Expand( Paragraph const * ); @@ -947,10 +947,10 @@ public: /** sets a link that is called after a drop or paste operation. */ void SetEndPasteOrDropHdl( const Link<PasteOrDropInfos*,void>& rLink ); - sal_Int16 GetNumberingStartValue( sal_Int32 nPara ); + sal_Int16 GetNumberingStartValue( sal_Int32 nPara ) const; void SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue ); - bool IsParaIsNumberingRestart( sal_Int32 nPara ); + bool IsParaIsNumberingRestart( sal_Int32 nPara ) const; void SetParaIsNumberingRestart( sal_Int32 nPara, bool bParaIsNumberingRestart ); /** determine the bullets/numbering status of the given paragraphs diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index 9786b2399ce3..f1db61fe9b63 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -102,7 +102,7 @@ public: be changed, and sal_False if e.g. a field or a bullet is contained therein. */ - bool IsEditable( const ESelection& rSelection ); + bool IsEditable( const ESelection& rSelection ) const; private: SvxTextForwarder* mpTextForwarder; diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx index 1b9b134a4ff7..d8b36e175a6b 100644 --- a/include/package/Inflater.hxx +++ b/include/package/Inflater.hxx @@ -42,8 +42,8 @@ public: Inflater(bool bNoWrap); ~Inflater(); void setInput( const css::uno::Sequence< sal_Int8 >& rBuffer ); - bool needsDictionary( ) { return bNeedDict;} - bool finished( ) { return bFinished;} + bool needsDictionary() const { return bNeedDict; } + bool finished() const { return bFinished; } sal_Int32 doInflateSegment( css::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ); void end( ); diff --git a/include/sfx2/listview.hxx b/include/sfx2/listview.hxx index 4343d2519afd..fbcdd0cbdb61 100644 --- a/include/sfx2/listview.hxx +++ b/include/sfx2/listview.hxx @@ -60,7 +60,7 @@ public: void refreshDefaultColumn(); protected: - sal_uInt16 get_nId(int pos); + sal_uInt16 get_nId(int pos) const; void select_id(const OUString& sId) { mxTreeView->select_id(sId); } @@ -70,17 +70,17 @@ protected: bool IsListViewVisible() const { return mxTreeView->is_visible(); } - OUString get_id(int pos) { return mxTreeView->get_id(pos); } + OUString get_id(int pos) const { return mxTreeView->get_id(pos); } void set_cursor(int pos) { mxTreeView->set_cursor(pos); } int get_cursor_index() const { return mxTreeView->get_cursor_index(); } - sal_uInt16 get_cursor_nId() { return get_nId(mxTreeView->get_cursor_index()); } + sal_uInt16 get_cursor_nId() const { return get_nId(mxTreeView->get_cursor_index()); } void select(int pos) { mxTreeView->select(pos); } - int get_index(sal_uInt16 nId) { return mxTreeView->find_id(OUString::number(nId)); } + int get_index(sal_uInt16 nId) const { return mxTreeView->find_id(OUString::number(nId)); } DECL_LINK(ColumnClickedHdl, const int, void); diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx index c485fc0274cf..392d93cf5fba 100644 --- a/include/sfx2/thumbnailview.hxx +++ b/include/sfx2/thumbnailview.hxx @@ -256,7 +256,7 @@ protected: virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - css::uno::Reference<css::accessibility::XAccessible> getAccessible(); + css::uno::Reference<css::accessibility::XAccessible> getAccessible() const; protected: @@ -285,7 +285,7 @@ protected: sal_uInt16 ImplGetVisibleItemCount() const; ThumbnailViewItem* ImplGetVisibleItem(sal_uInt16 nVisiblePos); void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); - bool ImplHasAccessibleListeners(); + bool ImplHasAccessibleListeners() const; DECL_LINK( ImplScrollHdl, weld::ScrolledWindow&, void ); protected: diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 60e37de7d432..035334f5f77f 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -216,7 +216,7 @@ public: private: void StartRowDividerDrag( const Point& _rStartPos ); - bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ); + bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent ) const; }; class BrowserMouseEvent: public MouseEvent, public BrowseEvent @@ -442,12 +442,12 @@ protected: // HACK(virtual create is not called in Ctor) void SetHeaderBar( BrowserHeader* ); - tools::Long CalcReverseZoom(tools::Long nVal); + tools::Long CalcReverseZoom(tools::Long nVal) const; const DataFlavorExVector& GetDataFlavors() const; - bool IsDropFormatSupported( SotClipboardFormatId nFormat ); // need this because the base class' IsDropFormatSupported is not const ... + bool IsDropFormatSupported( SotClipboardFormatId nFormat ) const; // need this because the base class' IsDropFormatSupported is not const ... void DisposeAccessible(); diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 58a4b8c420af..a9ffc014bf2a 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -64,25 +64,25 @@ public: } /** Returns the computed width of the line 1 in twips. */ - tools::Long GetLine1ForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetLine1( nWidth ); } + tools::Long GetLine1ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine1( nWidth ); } /** Returns the computed width of the line 2 in twips. */ - tools::Long GetLine2ForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetLine2( nWidth ); } + tools::Long GetLine2ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine2( nWidth ); } /** Returns the computed width of the gap in twips. */ - tools::Long GetDistForWidth( tools::Long nWidth ) { return m_aWidthImpl.GetGap( nWidth ); } + tools::Long GetDistForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetGap( nWidth ); } - Color GetColorLine1( const Color& rMain ) + Color GetColorLine1( const Color& rMain ) const { return ( *m_pColor1Fn )( rMain ); } - Color GetColorLine2( const Color& rMain ) + Color GetColorLine2( const Color& rMain ) const { return ( *m_pColor2Fn )( rMain ); } - Color GetColorDist( const Color& rMain, const Color& rDefault ) + Color GetColorDist( const Color& rMain, const Color& rDefault ) const { return ( *m_pColorDistFn )( rMain, rDefault ); } @@ -257,7 +257,7 @@ private: DECL_LINK(NoneHdl, weld::Button&, void); void UpdateEntries(); - sal_Int32 GetStylePos(sal_Int32 nListPos); + sal_Int32 GetStylePos(sal_Int32 nListPos) const; const Color& GetPaintColor() const { diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx index 1b04df72195d..82b15340dc63 100644 --- a/include/svtools/miscopt.hxx +++ b/include/svtools/miscopt.hxx @@ -61,7 +61,7 @@ class SVT_DLLPUBLIC SvtMiscOptions final : public utl::detail::Options OUString GetIconTheme() const; void SetIconTheme(const OUString&); - bool IconThemeWasSetAutomatically(); + bool IconThemeWasSetAutomatically() const; private: diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 084008c79e2e..95caa8fffa9f 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -249,7 +249,7 @@ private: SVT_DLLPRIVATE void ImplInsertItem( std::unique_ptr<ValueSetItem> pItem, const size_t nPos ); SVT_DLLPRIVATE tools::Rectangle ImplGetItemRect( size_t nPos ) const; SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); - SVT_DLLPRIVATE bool ImplHasAccessibleListeners(); + SVT_DLLPRIVATE bool ImplHasAccessibleListeners() const; SVT_DLLPRIVATE void ImplTracking(const Point& rPos); SVT_DLLPRIVATE void QueueReformat(); SVT_DLLPRIVATE void SetFirstLine(sal_uInt16 nNewFirstLine); // set mnFirstLine and update scrollbar to match diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx index 48a27113ace1..f624e9177bd5 100644 --- a/include/svx/gallerybinaryengineentry.hxx +++ b/include/svx/gallerybinaryengineentry.hxx @@ -38,7 +38,7 @@ public: GalleryBinaryEngineEntry(); static void CreateUniqueURL(const INetURLObject& rBaseURL, INetURLObject& aURL); - OUString ReadStrFromIni(std::u16string_view aKeyName); + OUString ReadStrFromIni(std::u16string_view aKeyName) const; const INetURLObject& GetThmURL() const { return mpGalleryStorageLocations->GetThmURL(); } const INetURLObject& GetSdgURL() const { return mpGalleryStorageLocations->GetSdgURL(); } diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 0cbaa62ef3ee..29feec983475 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -164,7 +164,7 @@ protected: protected: // convert given basegfx::B3DPolyPolygon to screen coor - basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate); + basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate) const; // protected destructor virtual ~E3dCompoundObject() override; diff --git a/include/svx/svditer.hxx b/include/svx/svditer.hxx index 8f1b022db894..9b43b5637855 100644 --- a/include/svx/svditer.hxx +++ b/include/svx/svditer.hxx @@ -66,7 +66,7 @@ public: return (idx < maObjList.size()) ? const_cast< SdrObject* >(maObjList[idx]) : nullptr; } - size_t Count() { return maObjList.size(); } + size_t Count() const { return maObjList.size(); } }; #endif // INCLUDED_SVX_SVDITER_HXX diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 66c1e33e378b..b8212b1fcae4 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -236,7 +236,7 @@ protected: void ImpSetGlueVisible4(bool bOn) { if (mbGlueVisible4!=bOn) { mbGlueVisible4=bOn; if (!mbGlueVisible && !mbGlueVisible2 && !mbGlueVisible3) GlueInvalidate(); } } public: - bool ImpIsGlueVisible() { return mbGlueVisible || mbGlueVisible2 || mbGlueVisible3 || mbGlueVisible4; } + bool ImpIsGlueVisible() const { return mbGlueVisible || mbGlueVisible2 || mbGlueVisible3 || mbGlueVisible4; } protected: virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx index 9e365eeb6d3f..e67f6b619a15 100644 --- a/include/toolkit/awt/vclxwindows.hxx +++ b/include/toolkit/awt/vclxwindows.hxx @@ -534,7 +534,7 @@ protected: css::uno::Any GetMaxValue() const; void NotifyTextListeners(); - css::uno::Any convertEffectiveValue(const css::uno::Any& rValue); + css::uno::Any convertEffectiveValue(const css::uno::Any& rValue) const; virtual void SetWindow( const VclPtr< vcl::Window > &_pWindow) override; diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index 8026b4e1846b..d45a1aaa83e2 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -89,7 +89,7 @@ public: SvXMLNumImpData* getData() { return pData.get(); } - LanguageType GetLanguageForKey(sal_Int32 nKey); + LanguageType GetLanguageForKey(sal_Int32 nKey) const; // sal_uInt32 GetKeyForName( const OUString& rName ); }; diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index 0a5619153917..38c84270635d 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -233,11 +233,11 @@ public: /** convert ISO Date Time String to double */ bool convertDateTime(double& fDateTime, - std::u16string_view rString); + std::u16string_view rString) const; /** convert ISO Date Time String to double */ bool convertDateTime(double& fDateTime, - std::string_view rString); + std::string_view rString) const; /// these 2 functions use tools Date, so they're not yet moved to sax @@ -270,7 +270,7 @@ public: /** convert string to Position3D */ bool convertPosition3D( css::drawing::Position3D& rPosition, - std::string_view rValue ); + std::string_view rValue ) const; /** convert Position3D to string */ void convertPosition3D( OUStringBuffer &rBuffer, |