diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 14:55:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 21:20:25 +0200 |
commit | 4d89865ef2026f40a9a4d66f3e047b77454e6fee (patch) | |
tree | 237c8339b1ab11059415d8744ddce7b0c971df9f /basic | |
parent | 84fc4dec5f419cbe30fa6ac4e228f083837f7887 (diff) |
new loplugin:deadclass
look for classes which only have copy/move constructors, and so are
effectively dead
Change-Id: I0b844f301e2200c2b40031856bfdb0b0e2c8f77d
Reviewed-on: https://gerrit.libreoffice.org/41039
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 2e0d49c927a2..df30aad6ebe8 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -624,62 +624,6 @@ SbxInfo::SbxInfo( const OUString& r, sal_uInt32 n ) : aHelpFile( r ), nHelpId( n ) {} -// SbxAlias - -SbxAlias::SbxAlias( const SbxAlias& r ) - : SvRefBase( r ), SbxVariable( r ), - SfxListener( r ), xAlias( r.xAlias ) -{} - -SbxAlias& SbxAlias::operator=( const SbxAlias& r ) -{ - xAlias = r.xAlias; - return *this; -} - -SbxAlias::~SbxAlias() -{ - if( xAlias.is() ) - { - EndListening( xAlias->GetBroadcaster() ); - } -} - -void SbxAlias::Broadcast( SfxHintId nHt ) -{ - if( xAlias.is() ) - { - xAlias->SetParameters( GetParameters() ); - if( nHt == SfxHintId::BasicDataWanted ) - { - SbxVariable::operator=( *xAlias ); - } - else if( nHt == SfxHintId::BasicDataChanged || nHt == SfxHintId::BasicConverted ) - { - *xAlias = *this; - } - else if( nHt == SfxHintId::BasicInfoWanted ) - { - xAlias->Broadcast( nHt ); - pInfo = xAlias->GetInfo(); - } - } -} - -void SbxAlias::Notify( SfxBroadcaster&, const SfxHint& rHint ) -{ - const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); - if( p && p->GetId() == SfxHintId::BasicDying ) - { - xAlias.clear(); - // delete the alias? - if( pParent ) - { - pParent->Remove( this ); - } - } -} - void SbxVariable::Dump( SvStream& rStrm, bool bFill ) { OString aBNameStr(OUStringToOString(GetName( SbxNameType::ShortTypes ), RTL_TEXTENCODING_ASCII_US)); |