From 1690b84015b7fa882076d6fb7d79e1959e467544 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Oct 2016 15:27:34 +0200 Subject: loplugin:expandablemethodds in reportdesign..sal Change-Id: Idb133e442b881d263fcb83a4858c4a08b451c0f0 Reviewed-on: https://gerrit.libreoffice.org/30032 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- reportdesign/inc/ReportDefinition.hxx | 6 ------ reportdesign/source/core/api/ReportDefinition.cxx | 10 ++++------ reportdesign/source/ui/inc/DefaultInspection.hxx | 1 - reportdesign/source/ui/inc/ReportControllerObserver.hxx | 1 - reportdesign/source/ui/inspection/DefaultInspection.cxx | 7 +------ reportdesign/source/ui/report/ReportControllerObserver.cxx | 8 +------- rsc/inc/rscdb.hxx | 1 - rsc/inc/rscdef.hxx | 1 - rsc/source/parser/rscibas.cxx | 5 ----- rsc/source/parser/rscinit.cxx | 2 +- rsc/source/tools/rscdef.cxx | 2 +- sal/osl/all/utility.cxx | 5 ----- 12 files changed, 8 insertions(+), 41 deletions(-) diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index daad8704918f..5235ae008225 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -184,12 +184,6 @@ namespace reportdesign css::uno::Reference< css::uno::XComponentContext > getContext(); - /** return the SdrModel of the real model - * - * \return - */ - std::shared_ptr getSdrModel() const; - static std::shared_ptr getSdrModel(const css::uno::Reference< css::report::XReportDefinition >& _xReportDefinition); private: DECLARE_XINTERFACE( ) diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 6227c71a6e9c..3e5fc118b3b7 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2034,17 +2034,15 @@ uno::Reference< uno::XComponentContext > OReportDefinition::getContext() return m_aProps->m_xContext; } -std::shared_ptr OReportDefinition::getSdrModel() const -{ - return m_pImpl->m_pReportModel; -} - std::shared_ptr OReportDefinition::getSdrModel(const uno::Reference< report::XReportDefinition >& _xReportDefinition) { std::shared_ptr pReportModel; uno::Reference< lang::XUnoTunnel > xUT( _xReportDefinition, uno::UNO_QUERY ); if( xUT.is() ) - pReportModel = reinterpret_cast(sal::static_int_cast(xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId())))->getSdrModel(); + pReportModel = reinterpret_cast( + sal::static_int_cast( + xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId())) + )->m_pImpl->m_pReportModel; return pReportModel; } diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx b/reportdesign/source/ui/inc/DefaultInspection.hxx index eca2c1240e87..d4e1741dc451 100644 --- a/reportdesign/source/ui/inc/DefaultInspection.hxx +++ b/reportdesign/source/ui/inc/DefaultInspection.hxx @@ -87,7 +87,6 @@ namespace rptui protected: // Service constructors - void createDefault(); void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines ); }; diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx index 0e1f5b37953e..0d3a0db0b736 100644 --- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx +++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx @@ -94,7 +94,6 @@ namespace rptui void Lock(); void UnLock(); - bool IsLocked() const; void Clear(); private: diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index fe0e6c122c46..aa93293b2d93 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -167,7 +167,7 @@ namespace rptui if ( !_arguments.hasElements() ) { // constructor: "createDefault()" - createDefault(); + m_bConstructed = true; return; } @@ -184,11 +184,6 @@ namespace rptui } - void DefaultComponentInspectorModel::createDefault() - { - m_bConstructed = true; - } - void DefaultComponentInspectorModel::createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines ) { if ( ( _nMinHelpTextLines <= 0 ) || ( _nMaxHelpTextLines <= 0 ) || ( _nMinHelpTextLines > _nMaxHelpTextLines ) ) diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index 748cf10d6dbf..9b0677e40435 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -151,7 +151,7 @@ public: (void) _rEvent; ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex ); - if ( IsLocked() ) + if ( m_pImpl->m_nLocks != 0 ) return; m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent); @@ -172,12 +172,6 @@ void OXReportControllerObserver::UnLock() osl_atomic_decrement( &m_pImpl->m_nLocks ); } -bool OXReportControllerObserver::IsLocked() const -{ - return m_pImpl->m_nLocks != 0; -} - - void OXReportControllerObserver::AddSection(const uno::Reference< report::XSection > & _xSection) { OEnvLock aLock(*this); diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index c4663c41f1aa..715a88f2a94e 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -151,7 +151,6 @@ class RscTypCont inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast(p3)); } inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast(p3)); } inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast(p3)); } - void InitLangType(); RscEnum * InitFieldUnitsType(); RscEnum * InitColor(); RscEnum * InitMapUnit(); diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index c9a2f9e6af45..a4f7708c63e2 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -136,7 +136,6 @@ protected: void IncRef(){ nRefCount++; } void DecRef(); void DefineToNumber(); - void SetName(const OString& rNewName) { m_aName = rNewName; } using StringNode::Search; public: diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index e035ea97405d..d632ebdf3187 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -165,11 +165,6 @@ Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames ) return nResult; } -void RscTypCont::InitLangType() -{ - aLangType.Init( aNmTb ); -} - RscEnum * RscTypCont::InitFieldUnitsType() { RscEnum * pFieldUnits; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 78126c4d948b..735acef364fd 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -233,7 +233,7 @@ void RscTypCont::Init() aWinBits.SetConstant( nStdPopupId, sal::static_int_cast(WB_STDPOPUP) ); } { - InitLangType(); + aLangType.Init( aNmTb ); aBaseLst.push_back( pFieldUnits = InitFieldUnitsType() ); aBaseLst.push_back( pColor = InitColor() ); aBaseLst.push_back( pMapUnit = InitMapUnit() ); diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index 5bf4eae70644..9beb17e4d5f8 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -154,7 +154,7 @@ void RscDefine::DefineToNumber() { delete pExp; pExp = nullptr; - SetName(OString::number(lId)); + m_aName = OString::number(lId); } void RscDefine::Evaluate() diff --git a/sal/osl/all/utility.cxx b/sal/osl/all/utility.cxx index 584a1be08d3b..5f157c120b2d 100644 --- a/sal/osl/all/utility.cxx +++ b/sal/osl/all/utility.cxx @@ -33,11 +33,6 @@ class OGlobalTimer public: OGlobalTimer() { - getTime(); - } - - void getTime() - { osl_getGlobalTimer(); } -- cgit