summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-08-20 13:29:18 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-02 18:17:01 +0200
commit755a74906ef3564f17d694787ba8de650e577677 (patch)
treeda2edaaa26b31491395a59302fb4df494a95dc88 /basic
parent31f3859884618cc19d0810795c45c9f6ed73e622 (diff)
GSOC work, multiple fixes
Code completion: parser recognizes extended types ony when the checkbox is checked. Fixed a crash caused by a misspelled uno type. Fixed function CodeCompleteDataCache::Clear() to clear both internal variables. Change-Id: I82fdd2e1cf749237e2e2de4a9a2fc7d07fb7eb4a
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/codecompletecache.cxx1
-rw-r--r--basic/source/comp/dim.cxx6
2 files changed, 4 insertions, 3 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index a5b9ce6a8601..aad0e4fcd622 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -136,6 +136,7 @@ void CodeCompleteDataCache::print() const
void CodeCompleteDataCache::Clear()
{
aVarScopes.clear();
+ aGlobalVars.clear();
}
void CodeCompleteDataCache::InsertGlobalVar( const OUString& sVarName, const OUString& sVarType )
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 2b94c397ef52..64d056534c8f 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -407,13 +407,13 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
OUString aTypeName( aGblStrings.Find( pDef->GetTypeId() ) );
if( rTypeArray->Find( aTypeName, SbxCLASS_OBJECT ) == NULL )
{
- if(!CodeCompleteOptions::IsCodeCompleteOn())
- Error( SbERR_UNDEF_TYPE, aTypeName );
- else
+ if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
{
if(!IsUnoInterface(aTypeName))
Error( SbERR_UNDEF_TYPE, aTypeName );
}
+ else
+ Error( SbERR_UNDEF_TYPE, aTypeName );
}
}