summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-04 08:29:58 +0200
committerNoel Grandin <noel@peralex.com>2015-06-04 08:30:24 +0200
commit623445aa0edb6647bab37fc7f8adcec11d43e317 (patch)
tree1482de389dc211fef2c09e3301f9b13cbbd74987 /basic
parent42f771d6e9c02c50acc49f7feb1a9b5d0a9368ae (diff)
convert PropertyMode to scoped enum
Change-Id: I9b0bbf6273aa18ae918d1d69af5dcc7652181f5c
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/codegen.cxx8
-rw-r--r--basic/source/comp/dim.cxx10
-rw-r--r--basic/source/comp/symtbl.cxx12
3 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 332bb7b91517..81f9de277898 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -227,15 +227,15 @@ void SbiCodeGen::Save()
aProcName = aIfaceProcName;
}
PropertyMode ePropMode = pProc->getPropertyMode();
- if( ePropMode != PROPERTY_MODE_NONE )
+ if( ePropMode != PropertyMode::NONE )
{
SbxDataType ePropType = SbxEMPTY;
switch( ePropMode )
{
- case PROPERTY_MODE_GET:
+ case PropertyMode::Get:
ePropType = pProc->GetType();
break;
- case PROPERTY_MODE_LET:
+ case PropertyMode::Let:
{
// type == type of first parameter
ePropType = SbxVARIANT; // Default
@@ -250,7 +250,7 @@ void SbiCodeGen::Save()
}
break;
}
- case PROPERTY_MODE_SET:
+ case PropertyMode::Set:
ePropType = SbxOBJECT;
break;
default:
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index e0366f88e089..461dcf6328f0 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -1172,21 +1172,21 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
sal_uInt16 l1 = nLine;
bool bSub = ( eCurTok == SUB );
bool bProperty = ( eCurTok == PROPERTY );
- PropertyMode ePropertyMode = PROPERTY_MODE_NONE;
+ PropertyMode ePropertyMode = PropertyMode::NONE;
if( bProperty )
{
Next();
if( eCurTok == GET )
{
- ePropertyMode = PROPERTY_MODE_GET;
+ ePropertyMode = PropertyMode::Get;
}
else if( eCurTok == LET )
{
- ePropertyMode = PROPERTY_MODE_LET;
+ ePropertyMode = PropertyMode::Let;
}
else if( eCurTok == SET )
{
- ePropertyMode = PROPERTY_MODE_SET;
+ ePropertyMode = PropertyMode::Set;
}
else
{
@@ -1222,7 +1222,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
else if( pProc->IsUsedForProcDecl() )
{
PropertyMode ePropMode = pDef->getPropertyMode();
- if( ePropMode == PROPERTY_MODE_NONE || ePropMode == pProc->getPropertyMode() )
+ if( ePropMode == PropertyMode::NONE || ePropMode == pProc->getPropertyMode() )
{
Error( SbERR_PROC_DEFINED, pDef->GetName() );
delete pDef;
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 90b555353637..bc3862847ab5 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -405,7 +405,7 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const OUString& rName,
pPool->SetParent( &aParams );
nLine1 =
nLine2 = 0;
- mePropMode = PROPERTY_MODE_NONE;
+ mePropMode = PropertyMode::NONE;
bPublic = true;
bCdecl = false;
bStatic = false;
@@ -470,7 +470,7 @@ void SbiProcDef::Match( SbiProcDef* pOld )
void SbiProcDef::setPropertyMode( PropertyMode ePropMode )
{
mePropMode = ePropMode;
- if( mePropMode != PROPERTY_MODE_NONE )
+ if( mePropMode != PropertyMode::NONE )
{
// Prop name = original scanned procedure name
maPropName = aName;
@@ -480,10 +480,10 @@ void SbiProcDef::setPropertyMode( PropertyMode ePropMode )
OUString aCompleteProcName = "Property ";
switch( mePropMode )
{
- case PROPERTY_MODE_GET: aCompleteProcName += "Get "; break;
- case PROPERTY_MODE_LET: aCompleteProcName += "Let "; break;
- case PROPERTY_MODE_SET: aCompleteProcName += "Set "; break;
- case PROPERTY_MODE_NONE: OSL_FAIL( "Illegal PropertyMode PROPERTY_MODE_NONE" ); break;
+ case PropertyMode::Get: aCompleteProcName += "Get "; break;
+ case PropertyMode::Let: aCompleteProcName += "Let "; break;
+ case PropertyMode::Set: aCompleteProcName += "Set "; break;
+ case PropertyMode::NONE: OSL_FAIL( "Illegal PropertyMode PropertyMode::NONE" ); break;
}
aCompleteProcName += aName;
aName = aCompleteProcName;