From f04bd7975292d297b72e8bb23aa74a2a5198aa23 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Sep 2019 03:32:12 +0200 Subject: loplugin:constmethod in vbahelper Change-Id: I40a59224286cb1eaece58f5f52b26f9191171be8 Reviewed-on: https://gerrit.libreoffice.org/79581 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vbahelper/source/msforms/vbacontrol.cxx | 2 +- vbahelper/source/msforms/vbacontrol.hxx | 2 +- vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 2 +- vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 2 +- vbahelper/source/vbahelper/vbahelper.cxx | 2 +- vbahelper/source/vbahelper/vbawindowbase.cxx | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index ba0a6f994035..aa386fdae3e7 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -728,7 +728,7 @@ void ScVbaControl::setBackColor( sal_Int32 nBackColor ) m_xProps->setPropertyValue( "BackgroundColor" , uno::makeAny( XLRGBToOORGB( nBackColor ) ) ); } -bool ScVbaControl::getAutoSize() +bool ScVbaControl::getAutoSize() const { bool bIsResizeEnabled = false; uno::Reference< uno::XInterface > xIf( m_xControl, uno::UNO_SET_THROW ); diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index 675bb0874e03..2e7c408d5cf2 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -111,7 +111,7 @@ public: /// @throws css::uno::RuntimeException void setBackColor( sal_Int32 nBackColor ); /// @throws css::uno::RuntimeException - bool getAutoSize(); + bool getAutoSize() const; /// @throws css::uno::RuntimeException void setAutoSize( bool bAutoSize ); /// @throws css::uno::RuntimeException diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index 31dcb7d5667c..014e04035be9 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -156,7 +156,7 @@ void VbaCommandBarHelper::ApplyTempChange( const OUString& sResourceUrl, const c } } -uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager() +uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager() const { uno::Reference< frame::XFrame > xFrame( getModel()->getCurrentController()->getFrame(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xPropertySet( xFrame, uno::UNO_QUERY_THROW ); diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 75f1a82ecfff..17d6519d1475 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -81,7 +81,7 @@ public: void ApplyTempChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings); /// @throws css::uno::RuntimeException - css::uno::Reference< css::frame::XLayoutManager > getLayoutManager(); + css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() const; const OUString& getModuleId() const { return maModuleId; } /// @throws css::uno::RuntimeException diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 459761c632df..ee55df6b651e 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -1060,7 +1060,7 @@ void Millimeter::setInPoints(double points) m_nMillimeter = points * factor / 100.0; } -double Millimeter::getInHundredthsOfOneMillimeter() +double Millimeter::getInHundredthsOfOneMillimeter() const { return m_nMillimeter * 100; } diff --git a/vbahelper/source/vbahelper/vbawindowbase.cxx b/vbahelper/source/vbahelper/vbawindowbase.cxx index 3e86fe0399ea..015a9d832da9 100644 --- a/vbahelper/source/vbahelper/vbawindowbase.cxx +++ b/vbahelper/source/vbahelper/vbawindowbase.cxx @@ -145,17 +145,17 @@ VbaWindowBase::getServiceNames() return aServiceNames; } -uno::Reference< frame::XController > VbaWindowBase::getController() +uno::Reference< frame::XController > VbaWindowBase::getController() const { return uno::Reference< frame::XController >( m_xController, uno::UNO_SET_THROW ); } -uno::Reference< awt::XWindow > VbaWindowBase::getWindow() +uno::Reference< awt::XWindow > VbaWindowBase::getWindow() const { return uno::Reference< awt::XWindow >( m_xWindow, uno::UNO_SET_THROW ); } -uno::Reference< awt::XWindow2 > VbaWindowBase::getWindow2() +uno::Reference< awt::XWindow2 > VbaWindowBase::getWindow2() const { return uno::Reference< awt::XWindow2 >( getWindow(), uno::UNO_QUERY_THROW ); } -- cgit