summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxvar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 10:26:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 12:35:09 +0000
commita66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 (patch)
tree19064090be4d97781c16aa6e79a4f7a09d561ae9 /basic/source/sbx/sbxvar.cxx
parent20475c78db5c62f2c8711e59753476bd9b4e2f1c (diff)
convert SFX_HINT to scoped enum
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/sbx/sbxvar.cxx')
-rw-r--r--basic/source/sbx/sbxvar.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 27766dfc7fd4..5e8307d0a6a9 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -155,20 +155,20 @@ SbxArray* SbxVariable::GetParameters() const
// Perhaps some day one could cut the parameter 0.
// Then the copying will be dropped...
-void SbxVariable::Broadcast( sal_uInt32 nHintId )
+void SbxVariable::Broadcast( SfxHintId nHintId )
{
if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{
// Because the method could be called from outside, check the
// rights here again
- if( nHintId & SBX_HINT_DATAWANTED )
+ if( nHintId == SfxHintId::BasicDataWanted )
{
if( !CanRead() )
{
return;
}
}
- if( nHintId & SBX_HINT_DATACHANGED )
+ if( nHintId == SfxHintId::BasicDataChanged )
{
if( !CanWrite() )
{
@@ -201,7 +201,7 @@ SbxInfo* SbxVariable::GetInfo()
{
if( !pInfo.Is() )
{
- Broadcast( SBX_HINT_INFOWANTED );
+ Broadcast( SfxHintId::BasicInfoWanted );
if( pInfo.Is() )
{
SetModified( true );
@@ -582,7 +582,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
pInfo = new SbxInfo;
pInfo->LoadData( rStrm, (sal_uInt16) cMark );
}
- Broadcast( SBX_HINT_DATACHANGED );
+ Broadcast( SfxHintId::BasicDataChanged );
nHash = MakeHashCode( maName );
SetModified( true );
return true;
@@ -662,20 +662,20 @@ SbxAlias::~SbxAlias()
}
}
-void SbxAlias::Broadcast( sal_uInt32 nHt )
+void SbxAlias::Broadcast( SfxHintId nHt )
{
if( xAlias.Is() )
{
xAlias->SetParameters( GetParameters() );
- if( nHt == SBX_HINT_DATAWANTED )
+ if( nHt == SfxHintId::BasicDataWanted )
{
SbxVariable::operator=( *xAlias );
}
- else if( nHt == SBX_HINT_DATACHANGED || nHt == SBX_HINT_CONVERTED )
+ else if( nHt == SfxHintId::BasicDataChanged || nHt == SfxHintId::BasicConverted )
{
*xAlias = *this;
}
- else if( nHt == SBX_HINT_INFOWANTED )
+ else if( nHt == SfxHintId::BasicInfoWanted )
{
xAlias->Broadcast( nHt );
pInfo = xAlias->GetInfo();
@@ -686,7 +686,7 @@ void SbxAlias::Broadcast( sal_uInt32 nHt )
void SbxAlias::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
- if( p && p->GetId() == SBX_HINT_DYING )
+ if( p && p->GetId() == SfxHintId::BasicDying )
{
xAlias.Clear();
// delete the alias?