summaryrefslogtreecommitdiff
path: root/basic/source/runtime/runtime.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/runtime/runtime.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/runtime/runtime.cxx')
-rw-r--r--basic/source/runtime/runtime.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 98510c629d28..23d3f82d5955 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1019,13 +1019,13 @@ void SbiRuntime::TOSMakeTemp()
SbxVariable* p = refExprStk->Get( nExprLvl - 1 );
if ( p->GetType() == SbxEMPTY )
{
- p->Broadcast( SBX_HINT_DATAWANTED );
+ p->Broadcast( SfxHintId::BasicDataWanted );
}
SbxVariable* pDflt = nullptr;
if ( bVBAEnabled && ( p->GetType() == SbxOBJECT || p->GetType() == SbxVARIANT ) && ((pDflt = getDefaultProp(p)) != nullptr) )
{
- pDflt->Broadcast( SBX_HINT_DATAWANTED );
+ pDflt->Broadcast( SfxHintId::BasicDataWanted );
// replacing new p on stack causes object pointed by
// pDft->pParent to be deleted, when p2->Compute() is
// called below pParent is accessed (but it's deleted)
@@ -1301,12 +1301,12 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
SbxDataType p2Type = p2->GetType();
if ( p1Type == SbxEMPTY )
{
- p1->Broadcast( SBX_HINT_DATAWANTED );
+ p1->Broadcast( SfxHintId::BasicDataWanted );
p1Type = p1->GetType();
}
if ( p2Type == SbxEMPTY )
{
- p2->Broadcast( SBX_HINT_DATAWANTED );
+ p2->Broadcast( SfxHintId::BasicDataWanted );
p2Type = p2->GetType();
}
if ( p1Type == p2Type )
@@ -1322,13 +1322,13 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if ( pDflt )
{
p1 = pDflt;
- p1->Broadcast( SBX_HINT_DATAWANTED );
+ p1->Broadcast( SfxHintId::BasicDataWanted );
}
pDflt = getDefaultProp( p2.get() );
if ( pDflt )
{
p2 = pDflt;
- p2->Broadcast( SBX_HINT_DATAWANTED );
+ p2->Broadcast( SfxHintId::BasicDataWanted );
}
}
@@ -1543,12 +1543,12 @@ void SbiRuntime::StepIS()
SbxDataType eType2 = refVar2->GetType();
if ( eType1 == SbxEMPTY )
{
- refVar1->Broadcast( SBX_HINT_DATAWANTED );
+ refVar1->Broadcast( SfxHintId::BasicDataWanted );
eType1 = refVar1->GetType();
}
if ( eType2 == SbxEMPTY )
{
- refVar2->Broadcast( SBX_HINT_DATAWANTED );
+ refVar2->Broadcast( SfxHintId::BasicDataWanted );
eType2 = refVar2->GetType();
}
@@ -1568,7 +1568,7 @@ void SbiRuntime::StepIS()
void SbiRuntime::StepGET()
{
SbxVariable* p = GetTOS();
- p->Broadcast( SBX_HINT_DATAWANTED );
+ p->Broadcast( SfxHintId::BasicDataWanted );
}
// #67607 copy Uno-Structs
@@ -1672,7 +1672,7 @@ void SbiRuntime::StepPUT()
// aren't dealt with if the object is a member of some parent object
bool bObjAssign = false;
if ( refVar->GetType() == SbxEMPTY )
- refVar->Broadcast( SBX_HINT_DATAWANTED );
+ refVar->Broadcast( SfxHintId::BasicDataWanted );
if ( refVar->GetType() == SbxOBJECT )
{
if ( dynamic_cast<const SbxMethod *>(refVar.get()) != nullptr || ! refVar->GetParent() )
@@ -2806,7 +2806,7 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 )
{
// named variables ( that are Any especially properties ) can be empty at this point and need a broadcast
if ( pVal->GetType() == SbxEMPTY )
- pVal->Broadcast( SBX_HINT_DATAWANTED );
+ pVal->Broadcast( SfxHintId::BasicDataWanted );
// evaluate methods and properties!
SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes;
@@ -3862,7 +3862,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
SbxVariable* pDflt = getDefaultProp( pElem );
if ( pDflt )
{
- pDflt->Broadcast( SBX_HINT_DATAWANTED );
+ pDflt->Broadcast( SfxHintId::BasicDataWanted );
SbxBaseRef pDfltObj = pDflt->GetObject();
if( pDfltObj.Is() )
{