diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 15:27:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-19 08:36:31 +0000 |
commit | 1690b84015b7fa882076d6fb7d79e1959e467544 (patch) | |
tree | 20aa80fa0b6f362ae4afab067d5449a3b790c0b8 /reportdesign | |
parent | loplugin:expandablemethodds in sc (diff) | |
download | core-1690b84015b7fa882076d6fb7d79e1959e467544.tar.gz core-1690b84015b7fa882076d6fb7d79e1959e467544.zip |
loplugin:expandablemethodds in reportdesign..sal
Change-Id: Idb133e442b881d263fcb83a4858c4a08b451c0f0
Reviewed-on: https://gerrit.libreoffice.org/30032
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
6 files changed, 6 insertions, 27 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<rptui::OReportModel> getSdrModel() const; - static std::shared_ptr<rptui::OReportModel> 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<rptui::OReportModel> OReportDefinition::getSdrModel() const -{ - return m_pImpl->m_pReportModel; -} - std::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel(const uno::Reference< report::XReportDefinition >& _xReportDefinition) { std::shared_ptr<rptui::OReportModel> pReportModel; uno::Reference< lang::XUnoTunnel > xUT( _xReportDefinition, uno::UNO_QUERY ); if( xUT.is() ) - pReportModel = reinterpret_cast<OReportDefinition*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId())))->getSdrModel(); + pReportModel = reinterpret_cast<OReportDefinition*>( + sal::static_int_cast<sal_uIntPtr>( + 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); |