Kaydet (Commit) 6f428c38 authored tarafından Noel Grandin's avatar Noel Grandin

remove unused SfxListener subclassing

where the Notify method is doing nothing

Change-Id: I834aa40a9bcb0dd8d7335a5688acc5da6f40b0a2
üst 5c1bb338
...@@ -62,7 +62,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin ...@@ -62,7 +62,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
css::lang::XServiceInfo, css::lang::XServiceInfo,
css::lang::XUnoTunnel, css::lang::XUnoTunnel,
css::lang::XComponent>, css::lang::XComponent>,
public SfxListener,
protected SvxMutexHelper protected SvxMutexHelper
{ {
protected: protected:
...@@ -105,9 +104,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin ...@@ -105,9 +104,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage ) UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage )
// SfxListener
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
// XInterface // XInterface
virtual void SAL_CALL release() throw() override; virtual void SAL_CALL release() throw() override;
......
...@@ -118,8 +118,7 @@ class ScAutoFormatObj : public ::cppu::WeakImplHelper< ...@@ -118,8 +118,7 @@ class ScAutoFormatObj : public ::cppu::WeakImplHelper<
css::container::XNamed, css::container::XNamed,
css::beans::XPropertySet, css::beans::XPropertySet,
css::lang::XUnoTunnel, css::lang::XUnoTunnel,
css::lang::XServiceInfo >, css::lang::XServiceInfo >
public SfxListener
{ {
private: private:
SfxItemPropertySet aPropSet; SfxItemPropertySet aPropSet;
...@@ -131,8 +130,6 @@ public: ...@@ -131,8 +130,6 @@ public:
ScAutoFormatObj(sal_uInt16 nIndex); ScAutoFormatObj(sal_uInt16 nIndex);
virtual ~ScAutoFormatObj() override; virtual ~ScAutoFormatObj() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
// per getImplementation gerufen: // per getImplementation gerufen:
bool IsInserted() const { return nFormatIndex != SC_AFMTOBJ_INVALID; } bool IsInserted() const { return nFormatIndex != SC_AFMTOBJ_INVALID; }
void InitFormat( sal_uInt16 nNewIndex ); void InitFormat( sal_uInt16 nNewIndex );
...@@ -219,20 +216,17 @@ public: ...@@ -219,20 +216,17 @@ public:
class ScAutoFormatFieldObj : public ::cppu::WeakImplHelper< class ScAutoFormatFieldObj : public ::cppu::WeakImplHelper<
css::beans::XPropertySet, css::beans::XPropertySet,
css::lang::XServiceInfo >, css::lang::XServiceInfo >
public SfxListener
{ {
private: private:
SfxItemPropertySet aPropSet; SfxItemPropertySet aPropSet;
sal_uInt16 nFormatIndex; sal_uInt16 nFormatIndex;
sal_uInt16 nFieldIndex; sal_uInt16 nFieldIndex;
public: public:
ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField); ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField);
virtual ~ScAutoFormatFieldObj() override; virtual ~ScAutoFormatFieldObj() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
// XPropertySet // XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > virtual css::uno::Reference< css::beans::XPropertySetInfo >
SAL_CALL getPropertySetInfo() SAL_CALL getPropertySetInfo()
......
...@@ -366,7 +366,6 @@ ScAutoFormatObj::ScAutoFormatObj(sal_uInt16 nIndex) : ...@@ -366,7 +366,6 @@ ScAutoFormatObj::ScAutoFormatObj(sal_uInt16 nIndex) :
aPropSet( lcl_GetAutoFormatMap() ), aPropSet( lcl_GetAutoFormatMap() ),
nFormatIndex( nIndex ) nFormatIndex( nIndex )
{ {
//! Listening !!!
} }
ScAutoFormatObj::~ScAutoFormatObj() ScAutoFormatObj::~ScAutoFormatObj()
...@@ -388,7 +387,6 @@ void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex ) ...@@ -388,7 +387,6 @@ void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex )
{ {
OSL_ENSURE( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat mehrfach" ); OSL_ENSURE( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat mehrfach" );
nFormatIndex = nNewIndex; nFormatIndex = nNewIndex;
//! Listening !!!
} }
// XUnoTunnel // XUnoTunnel
...@@ -424,11 +422,6 @@ ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XI ...@@ -424,11 +422,6 @@ ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XI
return pRet; return pRet;
} }
void ScAutoFormatObj::Notify( SfxBroadcaster& /* rBC */, const SfxHint& /* rHint */ )
{
// spaeter...
}
// XTableAutoFormat // XTableAutoFormat
ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
...@@ -627,18 +620,12 @@ ScAutoFormatFieldObj::ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField ...@@ -627,18 +620,12 @@ ScAutoFormatFieldObj::ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField
nFormatIndex( nFormat ), nFormatIndex( nFormat ),
nFieldIndex( nField ) nFieldIndex( nField )
{ {
//! Listening !!!
} }
ScAutoFormatFieldObj::~ScAutoFormatFieldObj() ScAutoFormatFieldObj::~ScAutoFormatFieldObj()
{ {
} }
void ScAutoFormatFieldObj::Notify( SfxBroadcaster& /* rBC */, const SfxHint& /* rHint */ )
{
// spaeter...
}
// beans::XPropertySet // beans::XPropertySet
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatFieldObj::getPropertySetInfo() uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatFieldObj::getPropertySetInfo()
......
...@@ -75,18 +75,16 @@ typedef std::map< OUString, SmSym > SymbolMap_t; ...@@ -75,18 +75,16 @@ typedef std::map< OUString, SmSym > SymbolMap_t;
typedef std::vector< const SmSym * > SymbolPtrVec_t; typedef std::vector< const SmSym * > SymbolPtrVec_t;
class SmSymbolManager : public SfxListener class SmSymbolManager
{ {
private: private:
SymbolMap_t m_aSymbols; SymbolMap_t m_aSymbols;
bool m_bModified; bool m_bModified;
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
public: public:
SmSymbolManager(); SmSymbolManager();
SmSymbolManager(const SmSymbolManager& rSymbolSetManager); SmSymbolManager(const SmSymbolManager& rSymbolSetManager);
virtual ~SmSymbolManager() override; ~SmSymbolManager();
SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager); SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager);
......
...@@ -91,10 +91,6 @@ bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const ...@@ -91,10 +91,6 @@ bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const
/**************************************************************************/ /**************************************************************************/
void SmSymbolManager::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
{
}
SmSymbolManager::SmSymbolManager() SmSymbolManager::SmSymbolManager()
{ {
...@@ -102,8 +98,7 @@ SmSymbolManager::SmSymbolManager() ...@@ -102,8 +98,7 @@ SmSymbolManager::SmSymbolManager()
} }
SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager) : SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager)
SfxListener()
{ {
m_aSymbols = rSymbolSetManager.m_aSymbols; m_aSymbols = rSymbolSetManager.m_aSymbols;
m_bModified = true; m_bModified = true;
......
...@@ -67,9 +67,6 @@ SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw() ...@@ -67,9 +67,6 @@ SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw()
// register at broadcaster // register at broadcaster
if( mpPage ) if( mpPage )
mpModel = mpPage->GetModel(); mpModel = mpPage->GetModel();
if( mpModel )
StartListening( *mpModel );
// create (hidden) view // create (hidden) view
mpView = new SdrView( mpModel ); mpView = new SdrView( mpModel );
...@@ -97,7 +94,6 @@ void SvxDrawPage::disposing() throw() ...@@ -97,7 +94,6 @@ void SvxDrawPage::disposing() throw()
{ {
if( mpModel ) if( mpModel )
{ {
EndListening( *mpModel );
mpModel = nullptr; mpModel = nullptr;
} }
...@@ -186,11 +182,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const css::uno::Reference< css:: ...@@ -186,11 +182,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const css::uno::Reference< css::
mrBHelper.removeListener( cppu::UnoType<decltype(aListener)>::get() , aListener ); mrBHelper.removeListener( cppu::UnoType<decltype(aListener)>::get() , aListener );
} }
// SfxListener
void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ )
{
}
void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape ) void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape )
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException, std::exception )
{ {
...@@ -877,12 +868,6 @@ void SvxDrawPage::ChangeModel( SdrModel* pNewModel ) ...@@ -877,12 +868,6 @@ void SvxDrawPage::ChangeModel( SdrModel* pNewModel )
{ {
if( pNewModel != mpModel ) if( pNewModel != mpModel )
{ {
if( mpModel )
EndListening( *mpModel );
if( pNewModel )
StartListening( *pNewModel );
mpModel = pNewModel; mpModel = pNewModel;
if( mpView ) if( mpView )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment