From 20602779bf5f1f06f94e985c552ec05565856c64 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 13 Feb 2011 15:23:45 +0100 Subject: Some cppcheck cleaning --- vbahelper/source/vbahelper/vbacolorformat.cxx | 2 +- vbahelper/source/vbahelper/vbacommandbar.cxx | 2 +- vbahelper/source/vbahelper/vbacommandbarcontrols.hxx | 2 +- vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 10 +++++----- vbahelper/source/vbahelper/vbalineformat.cxx | 2 +- vbahelper/source/vbahelper/vbalineformat.hxx | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx index f50c93acbfa7..19cf96e71135 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.cxx +++ b/vbahelper/source/vbahelper/vbacolorformat.cxx @@ -57,7 +57,7 @@ ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< XHelperInterface >& xP { uno::Reference< ov::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW ); m_pFillFormat = ( ScVbaFillFormat* )( xFillFormat.get() ); - }catch ( uno::RuntimeException e ) + }catch ( uno::RuntimeException& ) { m_pFillFormat = NULL; } diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx index 41b718ee255a..ea58e8e86e31 100644 --- a/vbahelper/source/vbahelper/vbacommandbar.cxx +++ b/vbahelper/source/vbahelper/vbacommandbar.cxx @@ -122,7 +122,7 @@ ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException) xLayoutManager->destroyElement( m_sResourceUrl ); } } - catch( uno::Exception e ) + catch( uno::Exception& ) { OSL_TRACE( "SetVisible get an exception\n" ); } diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx index 53ec12d2f154..674e7132895a 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx @@ -50,7 +50,7 @@ private: public: ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, const css::uno::Reference< css::awt::XMenu >& xMenu ) throw( css::uno::RuntimeException ); - sal_Bool IsMenu(){ return m_bIsMenu; } + sal_Bool IsMenu() const { return m_bIsMenu; } // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index b93d037c1213..36202ad53039 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -73,17 +73,17 @@ private: public: VbaCommandBarHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException ); - css::uno::Reference< css::frame::XModel > getModel() { return mxModel; } + css::uno::Reference< css::frame::XModel > getModel() const { return mxModel; } - css::uno::Reference< css::ui::XUIConfigurationManager > getDocCfgManager() throw (css::uno::RuntimeException) + css::uno::Reference< css::ui::XUIConfigurationManager > getDocCfgManager() const throw (css::uno::RuntimeException) { return m_xDocCfgMgr; } - css::uno::Reference< css::ui::XUIConfigurationManager > getAppCfgManager() throw (css::uno::RuntimeException) + css::uno::Reference< css::ui::XUIConfigurationManager > getAppCfgManager() const throw (css::uno::RuntimeException) { return m_xAppCfgMgr; } - css::uno::Reference< css::container::XNameAccess > getPersistentWindowState() throw (css::uno::RuntimeException) + css::uno::Reference< css::container::XNameAccess > getPersistentWindowState() const throw (css::uno::RuntimeException) { return m_xWindowState; } @@ -94,7 +94,7 @@ public: css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() throw (css::uno::RuntimeException); - const rtl::OUString getModuleId(){ return maModuleId; } + const rtl::OUString getModuleId() const { return maModuleId; } rtl::OUString findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const rtl::OUString& sName ) throw (css::uno::RuntimeException); static sal_Int32 findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const rtl::OUString& sName, bool bMenu = false ) throw (css::uno::RuntimeException); static rtl::OUString generateCustomURL(); diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx index d7b44c32a146..4a66960763dc 100644 --- a/vbahelper/source/vbahelper/vbalineformat.cxx +++ b/vbahelper/source/vbahelper/vbalineformat.cxx @@ -45,7 +45,7 @@ ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& } sal_Int32 -ScVbaLineFormat::calculateArrowheadSize() +ScVbaLineFormat::calculateArrowheadSize() const { return 0; } diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx index 2596056e86b2..4e74ae827227 100644 --- a/vbahelper/source/vbahelper/vbalineformat.hxx +++ b/vbahelper/source/vbahelper/vbalineformat.hxx @@ -47,7 +47,7 @@ protected: virtual css::uno::Sequence getServiceNames(); sal_Int32 convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName ); rtl::OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException); - sal_Int32 calculateArrowheadSize(); + sal_Int32 calculateArrowheadSize() const; public: ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape ); -- cgit