diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 15:45:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-17 07:57:52 +0200 |
commit | 4ea27cf64f050b98b8384d0acfe6df8e203413ba (patch) | |
tree | 5a2b1b97cbde0436bb53c687e88657e752cad4be /basic | |
parent | 792886d34bd87ad5e2b3d197e86ab41205a33618 (diff) |
convert INVOKETYPE to scoped enum
and drop unused SetProp enumerator
Change-Id: Ic8a71991f6a4e08d0189d2eb93580b0c33204d1b
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 4f3406bf05f6..9d4d00d60c0f 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -1500,7 +1500,7 @@ void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, bool bOL } } -enum INVOKETYPE +enum class INVOKETYPE { GetProp = 0, SetProp, @@ -1514,23 +1514,17 @@ Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArra Any aRetAny; switch( invokeType ) { - case Func: + case INVOKETYPE::Func: aRetAny = rxInvocation->invoke( Name, args, OutParamIndex, OutParam ); break; - case GetProp: + case INVOKETYPE::GetProp: { Reference< XAutomationInvocation > xAutoInv( rxInvocation, UNO_QUERY ); aRetAny = xAutoInv->invokeGetProperty( Name, args, OutParamIndex, OutParam ); break; } - case SetProp: - { - Reference< XAutomationInvocation > xAutoInv( rxInvocation, UNO_QUERY_THROW ); - aRetAny = xAutoInv->invokePutProperty( Name, args, OutParamIndex, OutParam ); - break; - } default: - break; // should introduce an error here + assert(false); break; } const sal_Int16* pIndices = OutParamIndex.getConstArray(); @@ -2085,7 +2079,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) // XInvocation Sequence<Any> args; processAutomationParams( pParams, args, true, nParamCount ); - aRetAny = invokeAutomationMethod( pProp->GetName(), args, pParams, nParamCount, mxInvocation, GetProp ); + aRetAny = invokeAutomationMethod( pProp->GetName(), args, pParams, nParamCount, mxInvocation, INVOKETYPE::GetProp ); } else aRetAny = mxInvocation->getValue( pProp->GetName() ); @@ -2265,7 +2259,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if( bInvocation && mxInvocation.is() ) { - Any aRetAny = invokeAutomationMethod( pMeth->GetName(), args, pParams, nParamCount, mxInvocation, Func ); + Any aRetAny = invokeAutomationMethod( pMeth->GetName(), args, pParams, nParamCount, mxInvocation, INVOKETYPE::Func ); unoToSbxValue( pVar, aRetAny ); } |