[Libreoffice-commits] core.git: include/svx sc/inc sc/source starmath/inc starmath/source svx/source
Noel Grandin
noel at peralex.com
Mon Oct 24 06:52:23 UTC 2016
include/svx/unopage.hxx | 4 ----
sc/inc/afmtuno.hxx | 14 ++++----------
sc/source/ui/unoobj/afmtuno.cxx | 13 -------------
starmath/inc/symbol.hxx | 6 ++----
starmath/source/symbol.cxx | 7 +------
svx/source/unodraw/unopage.cxx | 15 ---------------
6 files changed, 7 insertions(+), 52 deletions(-)
New commits:
commit 6f428c38c533026c9749f71ed3144db2d4575ab6
Author: Noel Grandin <noel at peralex.com>
Date: Mon Oct 24 08:20:45 2016 +0200
remove unused SfxListener subclassing
where the Notify method is doing nothing
Change-Id: I834aa40a9bcb0dd8d7335a5688acc5da6f40b0a2
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index cf2d1b6..8810327 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -62,7 +62,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
css::lang::XServiceInfo,
css::lang::XUnoTunnel,
css::lang::XComponent>,
- public SfxListener,
protected SvxMutexHelper
{
protected:
@@ -105,9 +104,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage )
- // SfxListener
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
-
// XInterface
virtual void SAL_CALL release() throw() override;
diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx
index cbc1cf2..8ed8eb0 100644
--- a/sc/inc/afmtuno.hxx
+++ b/sc/inc/afmtuno.hxx
@@ -118,8 +118,7 @@ class ScAutoFormatObj : public ::cppu::WeakImplHelper<
css::container::XNamed,
css::beans::XPropertySet,
css::lang::XUnoTunnel,
- css::lang::XServiceInfo >,
- public SfxListener
+ css::lang::XServiceInfo >
{
private:
SfxItemPropertySet aPropSet;
@@ -131,8 +130,6 @@ public:
ScAutoFormatObj(sal_uInt16 nIndex);
virtual ~ScAutoFormatObj() override;
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
-
// per getImplementation gerufen:
bool IsInserted() const { return nFormatIndex != SC_AFMTOBJ_INVALID; }
void InitFormat( sal_uInt16 nNewIndex );
@@ -219,20 +216,17 @@ public:
class ScAutoFormatFieldObj : public ::cppu::WeakImplHelper<
css::beans::XPropertySet,
- css::lang::XServiceInfo >,
- public SfxListener
+ css::lang::XServiceInfo >
{
private:
SfxItemPropertySet aPropSet;
- sal_uInt16 nFormatIndex;
- sal_uInt16 nFieldIndex;
+ sal_uInt16 nFormatIndex;
+ sal_uInt16 nFieldIndex;
public:
ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField);
virtual ~ScAutoFormatFieldObj() override;
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
-
// XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo >
SAL_CALL getPropertySetInfo()
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 8f04462..d6efeac 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -366,7 +366,6 @@ ScAutoFormatObj::ScAutoFormatObj(sal_uInt16 nIndex) :
aPropSet( lcl_GetAutoFormatMap() ),
nFormatIndex( nIndex )
{
- //! Listening !!!
}
ScAutoFormatObj::~ScAutoFormatObj()
@@ -388,7 +387,6 @@ void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex )
{
OSL_ENSURE( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat mehrfach" );
nFormatIndex = nNewIndex;
- //! Listening !!!
}
// XUnoTunnel
@@ -424,11 +422,6 @@ ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XI
return pRet;
}
-void ScAutoFormatObj::Notify( SfxBroadcaster& /* rBC */, const SfxHint& /* rHint */ )
-{
- // spaeter...
-}
-
// XTableAutoFormat
ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
@@ -627,18 +620,12 @@ ScAutoFormatFieldObj::ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField
nFormatIndex( nFormat ),
nFieldIndex( nField )
{
- //! Listening !!!
}
ScAutoFormatFieldObj::~ScAutoFormatFieldObj()
{
}
-void ScAutoFormatFieldObj::Notify( SfxBroadcaster& /* rBC */, const SfxHint& /* rHint */ )
-{
- // spaeter...
-}
-
// beans::XPropertySet
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatFieldObj::getPropertySetInfo()
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 24e46bd..fbddd9f 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -75,18 +75,16 @@ typedef std::map< OUString, SmSym > SymbolMap_t;
typedef std::vector< const SmSym * > SymbolPtrVec_t;
-class SmSymbolManager : public SfxListener
+class SmSymbolManager
{
private:
SymbolMap_t m_aSymbols;
bool m_bModified;
- virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
-
public:
SmSymbolManager();
SmSymbolManager(const SmSymbolManager& rSymbolSetManager);
- virtual ~SmSymbolManager() override;
+ ~SmSymbolManager();
SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager);
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index b1b0bb1..927680e 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -91,10 +91,6 @@ bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const
/**************************************************************************/
-void SmSymbolManager::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
-{
-}
-
SmSymbolManager::SmSymbolManager()
{
@@ -102,8 +98,7 @@ SmSymbolManager::SmSymbolManager()
}
-SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager) :
- SfxListener()
+SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager)
{
m_aSymbols = rSymbolSetManager.m_aSymbols;
m_bModified = true;
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 19a869b..e1cb31a 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -67,9 +67,6 @@ SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw()
// register at broadcaster
if( mpPage )
mpModel = mpPage->GetModel();
- if( mpModel )
- StartListening( *mpModel );
-
// create (hidden) view
mpView = new SdrView( mpModel );
@@ -97,7 +94,6 @@ void SvxDrawPage::disposing() throw()
{
if( mpModel )
{
- EndListening( *mpModel );
mpModel = nullptr;
}
@@ -186,11 +182,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const css::uno::Reference< css::
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 )
throw( uno::RuntimeException, std::exception )
{
@@ -877,12 +868,6 @@ void SvxDrawPage::ChangeModel( SdrModel* pNewModel )
{
if( pNewModel != mpModel )
{
- if( mpModel )
- EndListening( *mpModel );
-
- if( pNewModel )
- StartListening( *pNewModel );
-
mpModel = pNewModel;
if( mpView )
More information about the Libreoffice-commits
mailing list