From a566fd1c1a50f9bcb4c69a19bdf4fb1955285d93 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Nov 2017 10:10:40 +0200 Subject: loplugin:unusedmethods Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1 Reviewed-on: https://gerrit.libreoffice.org/45386 Tested-by: Jenkins Reviewed-by: Noel Grandin --- reportdesign/inc/UndoEnv.hxx | 2 -- reportdesign/source/core/sdr/UndoEnv.cxx | 26 --------------- .../source/ui/inc/ReportControllerObserver.hxx | 5 --- .../source/ui/report/ReportControllerObserver.cxx | 38 ---------------------- 4 files changed, 71 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/inc/UndoEnv.hxx b/reportdesign/inc/UndoEnv.hxx index 3741800d2617..b0f3b863534a 100644 --- a/reportdesign/inc/UndoEnv.hxx +++ b/reportdesign/inc/UndoEnv.hxx @@ -127,8 +127,6 @@ namespace rptui virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; private: - void TogglePropertyListening(const css::uno::Reference< css::uno::XInterface>& Element); - void implSetModified(); void switchListening( const css::uno::Reference< css::container::XIndexAccess >& _rxContainer, bool _bStartListening ); diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 8511c6e65167..430a8bd57b50 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -508,32 +508,6 @@ void OXUndoEnvironment::RemoveSection(const Reference< report::XSection > & _xSe } -void OXUndoEnvironment::TogglePropertyListening(const Reference< XInterface > & Element) -{ - // am Container horchen - Reference< XIndexAccess > xContainer(Element, UNO_QUERY); - if (xContainer.is()) - { - Reference< XInterface > xInterface; - sal_Int32 nCount = xContainer->getCount(); - for(sal_Int32 i = 0;i != nCount;++i) - { - xInterface.set(xContainer->getByIndex( i ),uno::UNO_QUERY); - TogglePropertyListening(xInterface); - } - } - - Reference< XPropertySet > xSet(Element, UNO_QUERY); - if (xSet.is()) - { - if (!m_pImpl->m_bReadOnly) - xSet->addPropertyChangeListener( OUString(), this ); - else - xSet->removePropertyChangeListener( OUString(), this ); - } -} - - void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxContainer, bool _bStartListening ) { OSL_PRECOND( _rxContainer.is(), "OXUndoEnvironment::switchListening: invalid container!" ); diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx index 287d478afcbb..7cbde89539d4 100644 --- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx +++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx @@ -97,15 +97,10 @@ namespace rptui void Clear(); private: - void TogglePropertyListening(const css::uno::Reference< css::uno::XInterface>& Element); void switchListening( const css::uno::Reference< css::container::XIndexAccess >& _rxContainer, bool _bStartListening ); void switchListening( const css::uno::Reference< css::uno::XInterface >& _rxObject, bool _bStartListening ); DECL_LINK(SettingsChanged, VclSimpleEvent&, void ); - private: - - ::std::vector< css::uno::Reference< css::container::XChild> >::const_iterator getSection(const css::uno::Reference< css::container::XChild>& _xContainer) const; - }; } // namespace rptui diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index 6ceacbe92010..df1aed082188 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -204,29 +204,6 @@ void OXReportControllerObserver::RemoveSection(const uno::Reference< report::XSe } -void OXReportControllerObserver::TogglePropertyListening(const uno::Reference< uno::XInterface > & Element) -{ - // listen at Container - uno::Reference< container::XIndexAccess > xContainer(Element, uno::UNO_QUERY); - if (xContainer.is()) - { - uno::Reference< uno::XInterface > xInterface; - sal_Int32 nCount = xContainer->getCount(); - for(sal_Int32 i = 0;i != nCount;++i) - { - xInterface.set(xContainer->getByIndex( i ),uno::UNO_QUERY); - TogglePropertyListening(xInterface); - } - } - - uno::Reference< beans::XPropertySet > xSet(Element, uno::UNO_QUERY); - if (xSet.is()) - { - xSet->addPropertyChangeListener( OUString(), this ); - } -} - - void OXReportControllerObserver::switchListening( const uno::Reference< container::XIndexAccess >& _rxContainer, bool _bStartListening ) { OSL_PRECOND( _rxContainer.is(), "OXReportControllerObserver::switchListening: invalid container!" ); @@ -324,21 +301,6 @@ void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInter } -::std::vector< uno::Reference< container::XChild> >::const_iterator OXReportControllerObserver::getSection(const uno::Reference& _xContainer) const -{ - ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = m_pImpl->m_aSections.end(); - if ( _xContainer.is() ) - { - aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer); - - if ( aFind == m_pImpl->m_aSections.end() ) - { - uno::Reference xParent(_xContainer->getParent(),uno::UNO_QUERY); - aFind = getSection(xParent); - } - } - return aFind; -} // XContainerListener void SAL_CALL OXReportControllerObserver::elementInserted(const container::ContainerEvent& evt) -- cgit