summaryrefslogtreecommitdiff
path: root/basic/source/classes/sbxmod.cxx
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-09-19 16:18:10 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-19 16:18:10 +0200
commit59bbf4b37f8572c3fa65bedbc4013fc0ef844c42 (patch)
treebbe9611b568fbb6fff08e1415aa4ac514da38200 /basic/source/classes/sbxmod.cxx
parent9dfcb24d5ec5d38d2362297d62dec46ae02d2359 (diff)
GSOC work, enable interface name usage instead of it's full namefeature/gsoc-basic-ide-completion-and-other-bits
From now, interfaces/structs/enums can be used as types in BASIC IDE. This example illustrates the feature the best: dim aPicker as star.ui.dialogs.XFilePicker dim aPicker2 as sun.star.ui.dialogs.XFilePicker dim aPicker3 as com.sun.star.ui.dialogs.XFilePicker dim aPicker4 as css.ui.dialogs.XFilePicker dim aPicker5 as ui.dialogs.XFilePicker dim aPicker6 as XFilePicker Any of the definitions above are accepted (css is shorthand for com.sun.star). Change-Id: I1ac2196f21ba0950d2932ef5bc11a1d5d2346b4c
Diffstat (limited to 'basic/source/classes/sbxmod.cxx')
-rw-r--r--basic/source/classes/sbxmod.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index d62b4001ef77..c011d51e951d 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1795,16 +1795,16 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache)
{
SbiSymDef* pSymDef = pPool->Get(i);
//std::cerr << "i: " << i << ", type: " << pSymDef->GetType() << "; name:" << pSymDef->GetName() << std::endl;
- if( (pSymDef->GetType() != SbxEMPTY) || (pSymDef->GetType() != SbxNULL) )
- aCache.InsertGlobalVar( pSymDef->GetName(), CodeCompleteOptions::AddUnoPrefix(pParser->aGblStrings.Find(pSymDef->GetTypeId())) );
+ if( ((pSymDef->GetType() != SbxEMPTY) || (pSymDef->GetType() != SbxNULL))/* && !CodeCompleteOptions::GetUnoType(pParser->aGblStrings.Find(pSymDef->GetTypeId())).isEmpty() */)
+ aCache.InsertGlobalVar( pSymDef->GetName(), CodeCompleteOptions::GetUnoType(pParser->aGblStrings.Find(pSymDef->GetTypeId())) );
SbiSymPool& pChildPool = pSymDef->GetPool();
for(sal_uInt16 j = 0; j < pChildPool.GetSize(); ++j )
{
SbiSymDef* pChildSymDef = pChildPool.Get(j);
//std::cerr << "j: " << j << ", type: " << pChildSymDef->GetType() << "; name:" << pChildSymDef->GetName() << std::endl;
- if( (pChildSymDef->GetType() != SbxEMPTY) || (pChildSymDef->GetType() != SbxNULL) )
- aCache.InsertLocalVar( pSymDef->GetName(), pChildSymDef->GetName(), CodeCompleteOptions::AddUnoPrefix(pParser->aGblStrings.Find(pChildSymDef->GetTypeId())) );
+ if( ((pChildSymDef->GetType() != SbxEMPTY) || (pChildSymDef->GetType() != SbxNULL))/* && !CodeCompleteOptions::GetUnoType(pParser->aGblStrings.Find(pSymDef->GetTypeId())).isEmpty() */)
+ aCache.InsertLocalVar( pSymDef->GetName(), pChildSymDef->GetName(), CodeCompleteOptions::GetUnoType(pParser->aGblStrings.Find(pChildSymDef->GetTypeId())) );
}
}
delete pParser;