From 309574394bd4ae3e9e10e5ff0d64bdd7bbbc8b83 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 29 Jan 2015 09:07:25 +0000 Subject: callcatcher: large newly detected unused methods post de-virtualization i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin Date: Tue Jan 20 12:38:10 2015 +0200 new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d --- basic/source/sbx/sbxobj.cxx | 79 --------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'basic') diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index e677d7dfe8c4..46e37ba2f8d2 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -427,31 +427,6 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp return pVar; } -SbxObject* SbxObject::MakeObject( const OUString& rName, const OUString& rClass ) -{ - // Is the object already available? - if( !ISA(SbxCollection) ) - { - SbxVariable* pRes = pObjs->Find( rName, SbxCLASS_OBJECT ); - if( pRes ) - { - return PTR_CAST(SbxObject,pRes); - } - } - SbxObject* pVar = CreateObject( rClass ); - if( pVar ) - { - pVar->SetName( rName ); - pVar->SetParent( this ); - pObjs->Put( pVar, pObjs->Count() ); - SetModified( true ); - // The object listen always - StartListening( pVar->GetBroadcaster(), true ); - Broadcast( SBX_HINT_OBJECTCHANGED ); - } - return pVar; -} - void SbxObject::Insert( SbxVariable* pVar ) { sal_uInt16 nIdx; @@ -708,60 +683,6 @@ bool SbxObject::StoreData( SvStream& rStrm ) const return true; } -OUString SbxObject::GenerateSource( const OUString &rLinePrefix, - const SbxObject* ) -{ - // Collect the properties in a String - OUString aSource; - SbxArrayRef xProps( GetProperties() ); - bool bLineFeed = false; - for ( sal_uInt16 nProp = 0; nProp < xProps->Count(); ++nProp ) - { - SbxPropertyRef xProp = static_cast( xProps->Get(nProp) ); - OUString aPropName( xProp->GetName() ); - if ( xProp->CanWrite() && - !( xProp->GetHashCode() == nNameHash && - aPropName.equalsIgnoreAsciiCase(pNameProp))) - { - // Insert a break except in front of the first property - if ( bLineFeed ) - { - aSource += "\n"; - } - else - { - bLineFeed = true; - } - aSource += rLinePrefix; - aSource += "."; - aSource += aPropName; - aSource += " = "; - - // convert the property value to text - switch ( xProp->GetType() ) - { - case SbxEMPTY: - case SbxNULL: - // no value - break; - - case SbxSTRING: - // Strings in quotation mark - aSource += "\""; - aSource += xProp->GetOUString(); - aSource += "\""; - break; - - default: - // miscellaneous, such as e.g. numbers directly - aSource += xProp->GetOUString(); - break; - } - } - } - return aSource; -} - static bool CollectAttrs( const SbxBase* p, OUString& rRes ) { OUString aAttrs; -- cgit