diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 299ea38d8a9f..216210f17985 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -135,15 +135,14 @@ SbxVariable* getDefaultProp( SbxVariable* pRef ) SbxVariable* pDefaultProp = NULL; if ( pRef->GetType() == SbxOBJECT ) { - SbxObject* pObj = dynamic_cast( pRef ); - if ( !pObj ) + SbxObject* pObj = dynamic_cast(pRef); + if (!pObj) { SbxBase* pObjVarObj = pRef->GetObject(); pObj = dynamic_cast( pObjVarObj ); } - if ( pObj && 0 != dynamic_cast( pObj) ) + if (SbUnoObject* pUnoObj = dynamic_cast(pObj)) { - SbUnoObject* pUnoObj = dynamic_cast( pObj ); pDefaultProp = pUnoObj->GetDfltProperty(); } }