summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index d1a29ae6f003..d4961d559481 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -860,8 +860,10 @@ void EditorWindow::HandleCodeCompletion()
if( aVect.empty() )//nothing to do
return;
+
OUString sBaseName = aVect[0];//variable name
OUString sVarType = aCodeCompleteCache.GetVarType( sBaseName );
+
if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectOn() )
{//correct variable name, if autocorrection on
const OUString& sStr = aCodeCompleteCache.GetCorrectCaseVarName( sBaseName, GetActualSubName(nLine) );
@@ -3002,6 +3004,10 @@ std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassFields() const
bool UnoTypeCodeCompletetor::CheckField( const OUString& sFieldName )
{// modifies xClass!!!
+
+ if ( xClass == NULL )
+ return false;
+
Reference< reflection::XIdlField> xField = xClass->getField( sFieldName );
if( xField != NULL )
{
@@ -3016,6 +3022,11 @@ bool UnoTypeCodeCompletetor::CheckField( const OUString& sFieldName )
bool UnoTypeCodeCompletetor::CheckMethod( const OUString& sMethName )
{// modifies xClass!!!
+
+
+ if ( xClass == NULL )
+ return false;
+
Reference< reflection::XIdlMethod> xMethod = xClass->getMethod( sMethName );
if( xMethod != NULL ) //method OK, check return type
{