From 8bf1542f856bd2b8617d7a0870824a3a2ada4b6c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 21 Aug 2019 17:11:45 +0200 Subject: loplugin:constmethod in basctl Change-Id: Ib4d7a6690aea4e6f009162cd5b6407906deaaa75 Reviewed-on: https://gerrit.libreoffice.org/77925 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/accessibility/accessibledialogcontrolshape.cxx | 6 +++--- basctl/source/basicide/basicrenderable.cxx | 6 +++--- basctl/source/basicide/basicrenderable.hxx | 6 +++--- basctl/source/basicide/baside2.hxx | 2 +- basctl/source/basicide/baside2b.cxx | 2 +- basctl/source/basicide/linenumberwindow.hxx | 2 +- basctl/source/basicide/moduldl2.cxx | 2 +- basctl/source/inc/accessibledialogcontrolshape.hxx | 6 +++--- basctl/source/inc/bastype2.hxx | 6 +++--- basctl/source/inc/bastypes.hxx | 2 +- basctl/source/inc/localizationmgr.hxx | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) (limited to 'basctl') diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index 1d725842fdf0..759dd69dfab9 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -73,7 +73,7 @@ AccessibleDialogControlShape::~AccessibleDialogControlShape() } -bool AccessibleDialogControlShape::IsFocused() +bool AccessibleDialogControlShape::IsFocused() const { bool bFocused = false; if ( m_pDialogWindow ) @@ -87,7 +87,7 @@ bool AccessibleDialogControlShape::IsFocused() } -bool AccessibleDialogControlShape::IsSelected() +bool AccessibleDialogControlShape::IsSelected() const { if ( m_pDialogWindow ) return m_pDialogWindow->GetView().IsObjMarked(m_pDlgEdObj); @@ -125,7 +125,7 @@ void AccessibleDialogControlShape::SetSelected( bool bSelected ) } -awt::Rectangle AccessibleDialogControlShape::GetBounds() +awt::Rectangle AccessibleDialogControlShape::GetBounds() const { awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pDlgEdObj ) diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index b32925317547..ce4f7005f124 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -75,7 +75,7 @@ Renderable::~Renderable() { } -VclPtr< Printer > Renderable::getPrinter() +VclPtr< Printer > Renderable::getPrinter() const { VclPtr< Printer > pPrinter; Any aValue( getValue( "RenderDevice" ) ); @@ -90,13 +90,13 @@ VclPtr< Printer > Renderable::getPrinter() return pPrinter; } -bool Renderable::isPrintOddPages() +bool Renderable::isPrintOddPages() const { sal_Int64 nContent = getIntValue( "PrintContent", -1 ); return nContent != 2; } -bool Renderable::isPrintEvenPages() +bool Renderable::isPrintEvenPages() const { sal_Int64 nContent = getIntValue( "PrintContent", -1 ); return nContent != 3; diff --git a/basctl/source/basicide/basicrenderable.hxx b/basctl/source/basicide/basicrenderable.hxx index 6f5bd29396bf..2618e5faa9d2 100644 --- a/basctl/source/basicide/basicrenderable.hxx +++ b/basctl/source/basicide/basicrenderable.hxx @@ -37,9 +37,9 @@ class Renderable : osl::Mutex maMutex; std::vector maValidPages; - VclPtr getPrinter(); - bool isPrintOddPages(); - bool isPrintEvenPages(); + VclPtr getPrinter() const; + bool isPrintOddPages() const; + bool isPrintEvenPages() const; static bool isOnEvenPage( sal_Int32 nPage ) { return nPage % 2 == 0; }; public: explicit Renderable (BaseWindow*); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index dadcf639c666..d46dc4c966c0 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -113,7 +113,7 @@ private: void HandleAutoCloseDoubleQuotes(); void HandleCodeCompletion(); void HandleProcedureCompletion(); - TextSelection GetLastHighlightPortionTextSelection(); + TextSelection GetLastHighlightPortionTextSelection() const; virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; virtual void Resize() override; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 57c18788319f..6bf425a65c8b 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -675,7 +675,7 @@ void EditorWindow::HandleAutoCorrect() } } -TextSelection EditorWindow::GetLastHighlightPortionTextSelection() +TextSelection EditorWindow::GetLastHighlightPortionTextSelection() const {//creates a text selection from the highlight portion on the cursor const sal_uInt32 nLine = GetEditView()->GetSelection().GetStart().GetPara(); const sal_Int32 nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); diff --git a/basctl/source/basicide/linenumberwindow.hxx b/basctl/source/basicide/linenumberwindow.hxx index 81aaa8d93a00..e97dedb3822a 100644 --- a/basctl/source/basicide/linenumberwindow.hxx +++ b/basctl/source/basicide/linenumberwindow.hxx @@ -38,7 +38,7 @@ public: bool SyncYOffset(); long& GetCurYOffset() { return m_nCurYOffset;} - int GetWidth() { return m_nWidth;} + int GetWidth() const { return m_nWidth;} }; } // namespace basctl diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index e999f4622189..773738f2bd86 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -102,7 +102,7 @@ public: namespace { - int FindEntry(weld::TreeView& rBox, const OUString& rName) + int FindEntry(const weld::TreeView& rBox, const OUString& rName) { int nCount = rBox.n_children(); for (int i = 0; i < nCount; ++i) diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx index 3f2c8b63cee5..45946173a48f 100644 --- a/basctl/source/inc/accessibledialogcontrolshape.hxx +++ b/basctl/source/inc/accessibledialogcontrolshape.hxx @@ -60,13 +60,13 @@ private: css::awt::Rectangle m_aBounds; css::uno::Reference< css::beans::XPropertySet > m_xControlModel; - bool IsFocused(); - bool IsSelected(); + bool IsFocused() const; + bool IsSelected() const; void SetFocused (bool bFocused); void SetSelected (bool bSelected); - css::awt::Rectangle GetBounds(); + css::awt::Rectangle GetBounds() const; void SetBounds( const css::awt::Rectangle& aBounds ); vcl::Window* GetWindow() const; diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx index 90fdb6915303..7b75426e6043 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -319,7 +319,7 @@ public: bool iter_parent(weld::TreeIter& rIter) const { return m_xControl->iter_parent(rIter); } int get_iter_depth(const weld::TreeIter& rIter) const { return m_xControl->get_iter_depth(rIter); } bool get_row_expanded(const weld::TreeIter& rIter) const { return m_xControl->get_row_expanded(rIter); } - void expand_row(weld::TreeIter& rIter) { m_xControl->expand_row(rIter); } + void expand_row(const weld::TreeIter& rIter) { m_xControl->expand_row(rIter); } void set_size_request(int nWidth, int nHeight) { m_xControl->set_size_request(nWidth, nHeight); } float get_approximate_digit_width() const { return m_xControl->get_approximate_digit_width(); } int get_height_rows(int nRows) const { return m_xControl->get_height_rows(nRows); } @@ -335,7 +335,7 @@ public: void make_sorted() { m_xControl->make_sorted(); }; void make_unsorted() { m_xControl->make_unsorted(); } - bool get_sort_order() { return m_xControl->get_sort_order(); } + bool get_sort_order() const { return m_xControl->get_sort_order(); } void set_sort_order(bool bAscending) { m_xControl->set_sort_order(bAscending); } void set_sort_indicator(TriState eState, int nColumn = -1) @@ -347,7 +347,7 @@ public: return m_xControl->get_sort_indicator(nColumn); } - int get_sort_column() { return m_xControl->get_sort_column(); } + int get_sort_column() const { return m_xControl->get_sort_column(); } void set_sort_column(int nColumn) { m_xControl->set_sort_column(nColumn); } void set_sort_func(const std::function& func) diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 87a5ffc644c9..6f76e941f0f8 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -206,7 +206,7 @@ public: virtual void SetReadOnly (bool bReadOnly); virtual bool IsReadOnly(); - int GetStatus() { return nStatus; } + int GetStatus() const { return nStatus; } void SetStatus(int n) { nStatus = n; } void AddStatus(int n) { nStatus |= n; } void ClearStatus(int n) { nStatus &= ~n; } diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx index 906fed0aea40..230efa658eb1 100644 --- a/basctl/source/inc/localizationmgr.hxx +++ b/basctl/source/inc/localizationmgr.hxx @@ -72,7 +72,7 @@ public: LocalizationMgr(Shell*, ScriptDocument const&, OUString const& aLibName, const css::uno::Reference < css::resource::XStringResourceManager >& xStringResourceManager ); - const css::uno::Reference< css::resource::XStringResourceManager >& getStringResourceManager() + const css::uno::Reference< css::resource::XStringResourceManager >& getStringResourceManager() const { return m_xStringResourceManager; } -- cgit