Update ooo320-m1
[ooovba.git] / applied_patches / 0329-vba-fix-isempty.diff
blob4bf3aa205079934845a8f91b17c1105d7b18ccfa
1 diff --git basic/source/classes/sbunoobj.cxx basic/source/classes/sbunoobj.cxx
2 index b02dca2..6abb00c 100644
3 --- basic/source/classes/sbunoobj.cxx
4 +++ basic/source/classes/sbunoobj.cxx
5 @@ -139,16 +139,19 @@ bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, String& sDfltProp )
6 SbxVariable* getDefaultProp( SbxVariable* pRef )
8 SbxVariable* pDefaultProp = NULL;
9 - SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef);
10 - if ( !pObj )
11 + if ( pRef->GetType() == SbxOBJECT )
13 - SbxBase* pObjVarObj = pRef->GetObject();
14 - pObj = PTR_CAST(SbxObject,pObjVarObj);
15 - }
16 - if ( pObj && pObj->ISA(SbUnoObject) )
17 - {
18 - SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj);
19 - pDefaultProp = pUnoObj->GetDfltProperty();
20 + SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef);
21 + if ( !pObj )
22 + {
23 + SbxBase* pObjVarObj = pRef->GetObject();
24 + pObj = PTR_CAST(SbxObject,pObjVarObj);
25 + }
26 + if ( pObj && pObj->ISA(SbUnoObject) )
27 + {
28 + SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj);
29 + pDefaultProp = pUnoObj->GetDfltProperty();
30 + }
32 return pDefaultProp;