summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxvalue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/sbx/sbxvalue.cxx')
-rw-r--r--basic/source/sbx/sbxvalue.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 1d29fa3ca5ab..c32d51f31b42 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -157,8 +157,7 @@ void SbxValue::Clear()
{
SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = dynamic_cast<SbxVariable*>( this );
- bool bParentProp = pThisVar && static_cast<sal_uInt16>(pThisVar->GetUserData()) ==
- 5345;
+ bool bParentProp = pThisVar && (pThisVar->GetUserData() & 0xFFFF) == 5345;
if ( !bParentProp )
aData.pObj->ReleaseRef();
}
@@ -479,8 +478,7 @@ bool SbxValue::Put( const SbxValues& rVal )
}
SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = dynamic_cast<SbxVariable*>( this );
- bool bParentProp = pThisVar && static_cast<sal_uInt16>(pThisVar->GetUserData()) ==
- 5345;
+ bool bParentProp = pThisVar && (pThisVar->GetUserData() & 0xFFFF) == 5345;
if ( !bParentProp )
p->aData.pObj->AddFirstRef();
}
@@ -735,8 +733,8 @@ bool SbxValue::SetType( SbxDataType t )
{
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = dynamic_cast<SbxVariable*>( this );
- sal_uInt16 nSlotId = pThisVar
- ? static_cast<sal_uInt16>(pThisVar->GetUserData())
+ sal_uInt32 nSlotId = pThisVar
+ ? pThisVar->GetUserData() & 0xFFFF
: 0;
DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName() == "Parent",
"SID_PARENTOBJECT is not named 'Parent'" );