diff options
author | npower Developer <npower@openoffice.org> | 2010-03-05 16:32:12 +0000 |
---|---|---|
committer | npower Developer <npower@openoffice.org> | 2010-03-05 16:32:12 +0000 |
commit | e0b98d2f4afb1861c568535418bf69b2cbfb0d1d (patch) | |
tree | 72098870dee2bc420ab62f717fc6c1e16f7b1d76 | |
parent | 92f22b7636d7c18c6830e7da1298a5aa93537fa1 (diff) |
npower14miscfixes: #i106744#
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index ba54fabd3a3c..c33430ed57a0 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -138,16 +138,19 @@ bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, String& sDfltProp ) SbxVariable* getDefaultProp( SbxVariable* pRef ) { SbxVariable* pDefaultProp = NULL; - SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef); - if ( !pObj ) + if ( pRef->GetType() == SbxOBJECT ) { - SbxBase* pObjVarObj = pRef->GetObject(); - pObj = PTR_CAST(SbxObject,pObjVarObj); - } - if ( pObj && pObj->ISA(SbUnoObject) ) - { - SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj); - pDefaultProp = pUnoObj->GetDfltProperty(); + SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef); + if ( !pObj ) + { + SbxBase* pObjVarObj = pRef->GetObject(); + pObj = PTR_CAST(SbxObject,pObjVarObj); + } + if ( pObj && pObj->ISA(SbUnoObject) ) + { + SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj); + pDefaultProp = pUnoObj->GetDfltProperty(); + } } return pDefaultProp; } |