summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-30 09:43:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-30 12:57:58 +0100
commit437adaac0af448ef1ffe48a7f59f1770d2dd2458 (patch)
treeddcba2e2780583eaf37b87e57417649d92f7670b /basctl/source/basicide
parent4b850b204fbbe13e3ed11434f262dfabe528241a (diff)
loplugin:unusedmethods
Change-Id: Id0d68d659fa06a8230ed0d927b85b6b504525d1e Reviewed-on: https://gerrit.libreoffice.org/64328 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/bastype3.cxx93
1 files changed, 0 insertions, 93 deletions
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index c8f9506014ad..6d3a70cff637 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -257,99 +257,6 @@ void SbTreeListBox::ScanAllEntries()
}
}
-SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
-{
- if ( !pEntry )
- return nullptr;
-
- ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
- EntryArray aEntries;
-
- while ( pEntry )
- {
- sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
- switch ( nDepth )
- {
- case 4:
- case 3:
- case 2:
- case 1:
- {
- aEntries.push_front( pEntry );
- }
- break;
- case 0:
- {
- aDocument = static_cast<DocumentEntry*>(pEntry->GetUserData())->GetDocument();
- }
- break;
- }
- pEntry = GetParent( pEntry );
- }
-
- SbxVariable* pVar = nullptr;
- if ( !aEntries.empty() )
- {
- bool bDocumentObjects = false;
- for (SvTreeListEntry* pLE : aEntries)
- {
- assert(pLE && "Can not find entry in array");
- Entry* pBE = static_cast<Entry*>(pLE->GetUserData());
- assert(pBE && "The data in the entry not found!");
- OUString aName( GetEntryText( pLE ) );
-
- switch ( pBE->GetType() )
- {
- case OBJ_TYPE_LIBRARY:
- if (BasicManager* pBasMgr = aDocument.getBasicManager())
- pVar = pBasMgr->GetLib( aName );
- break;
- case OBJ_TYPE_MODULE:
- DBG_ASSERT(dynamic_cast<StarBASIC*>(pVar), "FindVariable: invalid Basic");
- if(!pVar)
- {
- break;
- }
- // extract the module name from the string like "Sheet1 (Example1)"
- if( bDocumentObjects )
- {
- sal_Int32 nIndex = 0;
- aName = aName.getToken( 0, ' ', nIndex );
- }
- pVar = static_cast<StarBASIC*>(pVar)->FindModule( aName );
- break;
- case OBJ_TYPE_METHOD:
- DBG_ASSERT(dynamic_cast<SbxObject*>(pVar), "FindVariable: invalid module/object");
- if(!pVar)
- {
- break;
- }
- pVar = static_cast<SbxObject*>(pVar)->GetMethods()->Find(aName, SbxClassType::Method);
- break;
- case OBJ_TYPE_DIALOG:
- // sbx dialogs removed
- break;
- case OBJ_TYPE_DOCUMENT_OBJECTS:
- bDocumentObjects = true;
- SAL_FALLTHROUGH;
- case OBJ_TYPE_USERFORMS:
- case OBJ_TYPE_NORMAL_MODULES:
- case OBJ_TYPE_CLASS_MODULES:
- // skip, to find the child entry.
- continue;
- default:
- OSL_FAIL( "FindVariable: unknown type" );
- pVar = nullptr;
- break;
- }
- if ( !pVar )
- break;
- }
- }
-
- return pVar;
-}
-
SbxVariable* SbTreeListBox::FindVariable(weld::TreeIter* pEntry)
{
if ( !pEntry )