summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-29 09:07:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-29 23:42:26 +0000
commit309574394bd4ae3e9e10e5ff0d64bdd7bbbc8b83 (patch)
treef8b8cea0a81bc74ca34e8bda2d0dfce939b28ce0 /basic
parent20deac4903fc0697477e855feeff482b3da234f9 (diff)
callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin <noel@peralex.com> 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
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxobj.cxx79
1 files changed, 0 insertions, 79 deletions
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<SbxProperty*>( 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;