Kaydet (Commit) f7a2795c authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uIntPtr to sal_uInt32, for consistency

Change-Id: Ib78dce61e8fb8c8e3bf8c7a2b02966100a4db0e8
üst c1edceb2
...@@ -2116,7 +2116,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller ) ...@@ -2116,7 +2116,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
// #100883 Own Broadcast for SbMethod // #100883 Own Broadcast for SbMethod
void SbMethod::Broadcast( sal_uIntPtr nHintId ) void SbMethod::Broadcast( sal_uInt32 nHintId )
{ {
if( pCst && !IsSet( SBX_NO_BROADCAST ) ) if( pCst && !IsSet( SBX_NO_BROADCAST ) )
{ {
......
...@@ -825,11 +825,11 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -825,11 +825,11 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
sal_uLong t = pHint->GetId(); sal_uLong t = pHint->GetId();
sal_uInt16 nCallId = (sal_uInt16) pVar->GetUserData(); const sal_uInt16 nCallId = static_cast<sal_uInt16>(pVar->GetUserData());
if( nCallId ) if( nCallId )
{ {
if( t == SBX_HINT_INFOWANTED ) if( t == SBX_HINT_INFOWANTED )
pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) ); pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) );
else else
{ {
bool bWrite = false; bool bWrite = false;
......
...@@ -155,7 +155,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -155,7 +155,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
// Propteries // Propteries
...@@ -280,7 +280,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -280,7 +280,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
// Propteries // Propteries
...@@ -448,7 +448,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -448,7 +448,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
// Methods // Methods
......
...@@ -195,7 +195,7 @@ void SbxValue::Clear() ...@@ -195,7 +195,7 @@ void SbxValue::Clear()
SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef"); SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
bool bParentProp = pThisVar && 5345 == bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); static_cast<sal_uInt16>(pThisVar->GetUserData());
if ( !bParentProp ) if ( !bParentProp )
aData.pObj->ReleaseRef(); aData.pObj->ReleaseRef();
} }
...@@ -220,7 +220,7 @@ void SbxValue::Clear() ...@@ -220,7 +220,7 @@ void SbxValue::Clear()
// Dummy // Dummy
void SbxValue::Broadcast( sal_uIntPtr ) void SbxValue::Broadcast( sal_uInt32 )
{} {}
//////////////////////////// Readout data //////////////////////////// Readout data
...@@ -541,7 +541,7 @@ bool SbxValue::Put( const SbxValues& rVal ) ...@@ -541,7 +541,7 @@ bool SbxValue::Put( const SbxValues& rVal )
SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef"); SAL_INFO("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
bool bParentProp = pThisVar && 5345 == bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); static_cast<sal_uInt16>(pThisVar->GetUserData());
if ( !bParentProp ) if ( !bParentProp )
p->aData.pObj->AddFirstRef(); p->aData.pObj->AddFirstRef();
} }
...@@ -804,7 +804,7 @@ bool SbxValue::SetType( SbxDataType t ) ...@@ -804,7 +804,7 @@ bool SbxValue::SetType( SbxDataType t )
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef"); SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_uInt16 nSlotId = pThisVar sal_uInt16 nSlotId = pThisVar
? ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ) ? static_cast<sal_uInt16>(pThisVar->GetUserData())
: 0; : 0;
DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName() == "Parent", DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName() == "Parent",
"SID_PARENTOBJECT is not named 'Parent'" ); "SID_PARENTOBJECT is not named 'Parent'" );
......
...@@ -144,7 +144,7 @@ SbxArray* SbxVariable::GetParameters() const ...@@ -144,7 +144,7 @@ SbxArray* SbxVariable::GetParameters() const
// Perhaps some day one could cut the parameter 0. // Perhaps some day one could cut the parameter 0.
// then the copying will be dropped ... // then the copying will be dropped ...
void SbxVariable::Broadcast( sal_uIntPtr nHintId ) void SbxVariable::Broadcast( sal_uInt32 nHintId )
{ {
if( pCst && !IsSet( SBX_NO_BROADCAST ) ) if( pCst && !IsSet( SBX_NO_BROADCAST ) )
{ {
...@@ -668,7 +668,7 @@ SbxAlias::~SbxAlias() ...@@ -668,7 +668,7 @@ SbxAlias::~SbxAlias()
} }
} }
void SbxAlias::Broadcast( sal_uIntPtr nHt ) void SbxAlias::Broadcast( sal_uInt32 nHt )
{ {
if( xAlias.Is() ) if( xAlias.Is() )
{ {
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
// Interface to execute a method from the applications // Interface to execute a method from the applications
ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL ); ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL );
virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE; virtual void Broadcast( sal_uInt32 nHintId ) SAL_OVERRIDE;
}; };
typedef tools::SvRef<SbMethod> SbMethodRef; typedef tools::SvRef<SbMethod> SbMethodRef;
......
...@@ -95,7 +95,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxSimpleHint ...@@ -95,7 +95,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxSimpleHint
{ {
SbxVariable* pVar; SbxVariable* pVar;
public: public:
SbxHint( sal_uIntPtr n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {} SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; } SbxVariable* GetVar() const { return pVar; }
}; };
...@@ -104,7 +104,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener ...@@ -104,7 +104,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener
{ {
SbxVariableRef xAlias; SbxVariableRef xAlias;
virtual ~SbxAlias(); virtual ~SbxAlias();
virtual void Broadcast( sal_uIntPtr ) SAL_OVERRIDE; virtual void Broadcast( sal_uInt32 ) SAL_OVERRIDE;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
public: public:
SbxAlias( const SbxAlias& ); SbxAlias( const SbxAlias& );
......
...@@ -97,7 +97,7 @@ protected: ...@@ -97,7 +97,7 @@ protected:
OUString aPic; // Picture-String OUString aPic; // Picture-String
OUString aToolString; // tool string copy OUString aToolString; // tool string copy
virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call virtual void Broadcast( sal_uInt32 ); // Broadcast-Call
virtual ~SbxValue(); virtual ~SbxValue();
virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
virtual bool StoreData( SvStream& ) const SAL_OVERRIDE; virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
...@@ -285,7 +285,7 @@ class BASIC_DLLPUBLIC SbxVariable : public SbxValue ...@@ -285,7 +285,7 @@ class BASIC_DLLPUBLIC SbxVariable : public SbxValue
protected: protected:
SbxInfoRef pInfo; // Probably called information SbxInfoRef pInfo; // Probably called information
sal_uIntPtr nUserData; // User data for Call() sal_uInt32 nUserData; // User data for Call()
SbxObject* pParent; // Currently attached object SbxObject* pParent; // Currently attached object
virtual ~SbxVariable(); virtual ~SbxVariable();
virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE; virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
...@@ -306,8 +306,8 @@ public: ...@@ -306,8 +306,8 @@ public:
virtual void SetModified( bool ) SAL_OVERRIDE; virtual void SetModified( bool ) SAL_OVERRIDE;
sal_uIntPtr GetUserData() const { return nUserData; } sal_uInt32 GetUserData() const { return nUserData; }
void SetUserData( sal_uIntPtr n ) { nUserData = n; } void SetUserData( sal_uInt32 n ) { nUserData = n; }
virtual SbxDataType GetType() const SAL_OVERRIDE; virtual SbxDataType GetType() const SAL_OVERRIDE;
virtual SbxClassType GetClass() const SAL_OVERRIDE; virtual SbxClassType GetClass() const SAL_OVERRIDE;
...@@ -322,7 +322,7 @@ public: ...@@ -322,7 +322,7 @@ public:
// Due to data reduction and better DLL-hierarchy currently via casting // Due to data reduction and better DLL-hierarchy currently via casting
SfxBroadcaster& GetBroadcaster(); SfxBroadcaster& GetBroadcaster();
bool IsBroadcaster() const { return pCst != NULL; } bool IsBroadcaster() const { return pCst != NULL; }
virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE; virtual void Broadcast( sal_uInt32 nHintId ) SAL_OVERRIDE;
inline const SbxObject* GetParent() const { return pParent; } inline const SbxObject* GetParent() const { return pParent; }
SbxObject* GetParent() { return pParent;} SbxObject* GetParent() { return pParent;}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment