summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-21 16:22:07 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-23 11:49:32 +0000
commitf107d453819fe06e1e8d46ffb3cc866f119d74fd (patch)
treec736accea43af430d2f7ba6233840060df1cad19 /basic
parent833088b18015381dc8f90e4e868f96b7e882334f (diff)
Convert SbxClassType to scoped enum
Change-Id: I48afcdd9924d22b52a8db21aa253061e4d38c85b Reviewed-on: https://gerrit.libreoffice.org/25259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basictest.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx10
-rw-r--r--basic/source/classes/eventatt.cxx6
-rw-r--r--basic/source/classes/image.cxx8
-rw-r--r--basic/source/classes/sb.cxx38
-rw-r--r--basic/source/classes/sbunoobj.cxx22
-rw-r--r--basic/source/classes/sbxmod.cxx48
-rw-r--r--basic/source/comp/dim.cxx20
-rw-r--r--basic/source/comp/exprtree.cxx2
-rw-r--r--basic/source/comp/parser.cxx2
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--basic/source/runtime/methods1.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx30
-rw-r--r--basic/source/runtime/stdobj.cxx16
-rw-r--r--basic/source/runtime/stdobj1.cxx32
-rw-r--r--basic/source/sbx/sbxarray.cxx18
-rw-r--r--basic/source/sbx/sbxbase.cxx2
-rw-r--r--basic/source/sbx/sbxcoll.cxx10
-rw-r--r--basic/source/sbx/sbxexec.cxx4
-rw-r--r--basic/source/sbx/sbxobj.cxx86
-rw-r--r--basic/source/sbx/sbxvalue.cxx2
-rw-r--r--basic/source/sbx/sbxvar.cxx6
22 files changed, 186 insertions, 186 deletions
diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx
index ba4ace91765a..0ff361966758 100644
--- a/basic/qa/cppunit/basictest.cxx
+++ b/basic/qa/cppunit/basictest.cxx
@@ -78,7 +78,7 @@ SbxVariableRef MacroSnippet::Run( const css::uno::Sequence< css::uno::Any >& rAr
SbxVariableRef pReturn = nullptr;
if ( !Compile() )
return pReturn;
- SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( "doUnitTest", SbxCLASS_METHOD )) : nullptr;
+ SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( "doUnitTest", SbxClassType::Method )) : nullptr;
if ( pMeth )
{
if ( rArgs.getLength() )
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 804230b3b002..6b3d70ea1015 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1474,7 +1474,7 @@ uno::Any BasicManager::SetGlobalUNOConstant( const OUString& rName, const uno::A
return aOldValue;
// obtain the old value
- SbxVariable* pVariable = pStandardLib->Find( rName, SbxCLASS_OBJECT );
+ SbxVariable* pVariable = pStandardLib->Find( rName, SbxClassType::Object );
if ( pVariable )
aOldValue = sbxToUnoValue( pVariable );
@@ -1574,7 +1574,7 @@ namespace
{
if ( rTransliteration.isEqual( pMod->GetName(), sModule ) )
{
- SbMethod* pMethod = static_cast<SbMethod*>(pMod->Find( sMacro, SbxCLASS_METHOD ));
+ SbMethod* pMethod = static_cast<SbMethod*>(pMod->Find( sMacro, SbxClassType::Method ));
if( pMethod )
{
return pMethod;
@@ -1951,7 +1951,7 @@ sal_Bool DialogContainer_Impl::hasElements()
uno::Any DialogContainer_Impl::getByName( const OUString& aName )
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
- SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxCLASS_DONTCARE );
+ SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxClassType::DontCare );
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
if( !( pObj && pObj->GetSbxId() == SBXID_DIALOG ) )
{
@@ -1992,7 +1992,7 @@ sal_Bool DialogContainer_Impl::hasByName( const OUString& aName )
throw(uno::RuntimeException, std::exception)
{
bool bRet = false;
- SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxCLASS_DONTCARE );
+ SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxClassType::DontCare );
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
if( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) )
{
@@ -2032,7 +2032,7 @@ void DialogContainer_Impl::removeByName( const OUString& Name )
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
(void)Name;
- SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxCLASS_DONTCARE );
+ SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxClassType::DontCare );
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
if( !( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) ) )
{
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 72ae4de533b4..c89e3523f9a7 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -275,7 +275,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
// Search only in the lib, not automatically in application basic
SbxFlagBits nFlags = pBasic->GetFlags();
pBasic->ResetFlag( SbxFlagBits::GlobalSearch );
- pMethVar = pBasic->Find( aMacro, SbxCLASS_DONTCARE );
+ pMethVar = pBasic->Find( aMacro, SbxClassType::DontCare );
pBasic->SetFlags( nFlags );
break;
}
@@ -286,7 +286,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
// Default: Be tolerant and search everywhere
if( (!pMethVar || nullptr == dynamic_cast<const SbMethod*>( pMethVar)) && maBasicRef.Is() )
{
- pMethVar = maBasicRef->FindQualified( aMacro, SbxCLASS_DONTCARE );
+ pMethVar = maBasicRef->FindQualified( aMacro, SbxClassType::DontCare );
}
SbMethod* pMeth = dynamic_cast<SbMethod*>( pMethVar );
if( !pMeth )
@@ -332,7 +332,7 @@ css::uno::Reference< css::container::XNameContainer > implFindDialogLibForDialog
{
css::uno::Reference< css::container::XNameContainer > aRetDlgLib;
- SbxVariable* pDlgLibContVar = pBasic->Find("DialogLibraries", SbxCLASS_OBJECT);
+ SbxVariable* pDlgLibContVar = pBasic->Find("DialogLibraries", SbxClassType::Object);
if( pDlgLibContVar && nullptr != dynamic_cast<const SbUnoObject*>( pDlgLibContVar) )
{
SbUnoObject* pDlgLibContUnoObj = static_cast<SbUnoObject*>(static_cast<SbxBase*>(pDlgLibContVar));
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 00d5456710df..4100a833ea1d 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -299,7 +299,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
// nested user defined types
// declared before use, so it is ok to reference it by name on load
OUString aNestedTypeName = r.ReadUniOrByteString(eCharSet);
- SbxObject* pNestedTypeObj = static_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxCLASS_OBJECT ) );
+ SbxObject* pNestedTypeObj = static_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxClassType::Object ) );
if (pNestedTypeObj)
{
SbxObject* pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj );
@@ -334,8 +334,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
}
- pType->Remove( "Name", SbxCLASS_DONTCARE );
- pType->Remove( "Parent", SbxCLASS_DONTCARE );
+ pType->Remove( "Name", SbxClassType::DontCare );
+ pType->Remove( "Parent", SbxClassType::DontCare );
AddType(pType);
}
@@ -674,7 +674,7 @@ OUString SbiImage::GetString( short nId ) const
const SbxObject* SbiImage::FindType (const OUString& aTypeName) const
{
- return rTypes.Is() ? static_cast<SbxObject*>(rTypes->Find(aTypeName,SbxCLASS_OBJECT)) : nullptr;
+ return rTypes.Is() ? static_cast<SbxObject*>(rTypes->Find(aTypeName,SbxClassType::Object)) : nullptr;
}
sal_uInt16 SbiImage::CalcLegacyOffset( sal_Int32 nOffset )
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index db0acd917875..9bf4cda4ae42 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -251,7 +251,7 @@ SbxObject* StarBASIC::getVBAGlobals( )
}
}
const OUString aVBAHook("VBAGlobals");
- pVBAGlobals = static_cast<SbUnoObject*>(Find( aVBAHook , SbxCLASS_DONTCARE ));
+ pVBAGlobals = static_cast<SbUnoObject*>(Find( aVBAHook , SbxClassType::DontCare ));
}
return pVBAGlobals;
}
@@ -504,7 +504,7 @@ SbxObject* SbFormFactory::CreateObject( const OUString& rClassName )
{
if( SbModule* pMod = GetSbData()->pMod )
{
- if( SbxVariable* pVar = pMod->Find( rClassName, SbxCLASS_OBJECT ) )
+ if( SbxVariable* pVar = pMod->Find( rClassName, SbxClassType::Object ) )
{
if( SbUserFormModule* pFormModule = dynamic_cast<SbUserFormModule*>( pVar->GetObject() ) )
{
@@ -685,7 +685,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
}
// Search for own copy of ImplMethod
- SbxVariable* p = pMethods->Find( pImplMethod->GetName(), SbxCLASS_METHOD );
+ SbxVariable* p = pMethods->Find( pImplMethod->GetName(), SbxClassType::Method );
SbMethod* pImplMethodCopy = p ? dynamic_cast<SbMethod*>( p ) : nullptr;
if( !pImplMethodCopy )
{
@@ -815,7 +815,7 @@ void SbClassModuleObject::triggerInitializeEvent()
mbInitializeEventDone = true;
// Search method
- SbxVariable* pMeth = SbxObject::Find("Class_Initialize", SbxCLASS_METHOD);
+ SbxVariable* pMeth = SbxObject::Find("Class_Initialize", SbxClassType::Method);
if( pMeth )
{
SbxValues aVals;
@@ -830,7 +830,7 @@ void SbClassModuleObject::triggerTerminateEvent()
return;
}
// Search method
- SbxVariable* pMeth = SbxObject::Find("Class_Terminate", SbxCLASS_METHOD );
+ SbxVariable* pMeth = SbxObject::Find("Class_Terminate", SbxClassType::Method );
if( pMeth )
{
SbxValues aVals;
@@ -897,7 +897,7 @@ SbxObject* SbClassFactory::CreateObject( const OUString& rClassName )
}
}
}
- SbxVariable* pVar = xToUseClassModules->Find( rClassName, SbxCLASS_OBJECT );
+ SbxVariable* pVar = xToUseClassModules->Find( rClassName, SbxClassType::Object );
SbxObject* pRet = nullptr;
if( pVar )
{
@@ -909,7 +909,7 @@ SbxObject* SbClassFactory::CreateObject( const OUString& rClassName )
SbModule* SbClassFactory::FindClass( const OUString& rClassName )
{
- SbxVariable* pVar = xClassModules->Find( rClassName, SbxCLASS_DONTCARE );
+ SbxVariable* pVar = xClassModules->Find( rClassName, SbxClassType::DontCare );
SbModule* pMod = pVar ? static_cast<SbModule*>(pVar) : nullptr;
return pMod;
}
@@ -1286,7 +1286,7 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
// but only if SbiRuntime has not set the flag
if( !bNoRtl )
{
- if( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT )
+ if( t == SbxClassType::DontCare || t == SbxClassType::Object )
{
if( rName.equalsIgnoreAsciiCase( RTLNAME ) )
{
@@ -1313,7 +1313,7 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
// or is the name equal?!?
if( pModule->GetName().equalsIgnoreAsciiCase( rName ) )
{
- if( t == SbxCLASS_OBJECT || t == SbxCLASS_DONTCARE )
+ if( t == SbxClassType::Object || t == SbxClassType::DontCare )
{
pRes = pModule.get(); break;
}
@@ -1340,10 +1340,10 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
}
}
OUString aMainStr("Main");
- if( !pRes && pNamed && ( t == SbxCLASS_METHOD || t == SbxCLASS_DONTCARE ) &&
+ if( !pRes && pNamed && ( t == SbxClassType::Method || t == SbxClassType::DontCare ) &&
!pNamed->GetName().equalsIgnoreAsciiCase( aMainStr ) )
{
- pRes = pNamed->Find( aMainStr, SbxCLASS_METHOD );
+ pRes = pNamed->Find( aMainStr, SbxClassType::Method );
}
if( !pRes )
{
@@ -1890,12 +1890,12 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
}
}
// HACK for SFX-Bullshit!
- SbxVariable* p = Find( "FALSE", SbxCLASS_PROPERTY );
+ SbxVariable* p = Find( "FALSE", SbxClassType::Property );
if( p )
{
Remove( p );
}
- p = Find( "TRUE", SbxCLASS_PROPERTY );
+ p = Find( "TRUE", SbxClassType::Property );
if( p )
{
Remove( p );
@@ -1928,7 +1928,7 @@ bool StarBASIC::StoreData( SvStream& r ) const
bool StarBASIC::GetUNOConstant( const OUString& rName, css::uno::Any& aOut )
{
bool bRes = false;
- SbUnoObject* pGlobs = dynamic_cast<SbUnoObject*>( Find( rName, SbxCLASS_DONTCARE ) );
+ SbUnoObject* pGlobs = dynamic_cast<SbUnoObject*>( Find( rName, SbxClassType::DontCare ) );
if ( pGlobs )
{
aOut = pGlobs->getUnoAny();
@@ -1953,7 +1953,7 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic )
SbxObject* pLookup = pBasic->GetParent();
while ( pLookup && !pThisComponent )
{
- pThisComponent = pLookup->Find( sThisComponent, SbxCLASS_OBJECT );
+ pThisComponent = pLookup->Find( sThisComponent, SbxClassType::Object );
pLookup = pLookup->GetParent();
}
if ( !pThisComponent )
@@ -2040,14 +2040,14 @@ void BasicCollection::Initialize()
SetFlag( SbxFlagBits::Fixed );
ResetFlag( SbxFlagBits::Write );
SbxVariable* p;
- p = Make( pCountStr, SbxCLASS_PROPERTY, SbxINTEGER );
+ p = Make( pCountStr, SbxClassType::Property, SbxINTEGER );
p->ResetFlag( SbxFlagBits::Write );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pAddStr, SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( pAddStr, SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pItemStr, SbxCLASS_METHOD, SbxVARIANT );
+ p = Make( pItemStr, SbxClassType::Method, SbxVARIANT );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pRemoveStr, SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( pRemoveStr, SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
if ( !xAddInfo.Is() )
{
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 41290cf40682..4d8bc81628d5 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2313,8 +2313,8 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
static Reference< XIntrospection > xIntrospection;
// beat out again the default properties of Sbx
- Remove( "Name", SbxCLASS_DONTCARE );
- Remove( "Parent", SbxCLASS_DONTCARE );
+ Remove( "Name", SbxClassType::DontCare );
+ Remove( "Parent", SbxClassType::DontCare );
// check the type of the objects
TypeClass eType = aUnoObj_.getValueType().getTypeClass();
@@ -2760,7 +2760,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t )
implCreateDbgProperties();
// Now they have to be found regular
- pRes = SbxObject::Find( rName, SbxCLASS_DONTCARE );
+ pRes = SbxObject::Find( rName, SbxClassType::DontCare );
}
}
return pRes;
@@ -3375,7 +3375,7 @@ SbUnoClass* findUnoClass( const OUString& rName )
SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType )
{
- SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_VARIABLE );
+ SbxVariable* pRes = SbxObject::Find( rName, SbxClassType::Variable );
// If nothing were located the submodule isn't known yet
if( !pRes )
@@ -3529,7 +3529,7 @@ SbUnoService* findUnoService( const OUString& rName )
SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
{
- SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_METHOD );
+ SbxVariable* pRes = SbxObject::Find( rName, SbxClassType::Method );
if( !pRes )
{
@@ -3561,7 +3561,7 @@ SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
QuickInsert( static_cast<SbxVariable*>(xSbCtorRef) );
}
}
- pRes = SbxObject::Find( rName, SbxCLASS_METHOD );
+ pRes = SbxObject::Find( rName, SbxClassType::Method );
}
}
@@ -4322,7 +4322,7 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A
aPropertyFunctionName += m_aPrefix;
aPropertyFunctionName += rProperty;
- SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxCLASS_METHOD );
+ SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
if( pMeth == nullptr )
{
@@ -4361,7 +4361,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty)
aPropertyFunctionName += m_aPrefix;
aPropertyFunctionName += rProperty;
- SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxCLASS_METHOD );
+ SbxVariable* p = m_xScopeObj->Find( aPropertyFunctionName, SbxClassType::Method );
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
if( pMeth == nullptr )
{
@@ -4418,7 +4418,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction,
}
}
- SbxVariable* p = xScopeObj->Find( aFunctionName, SbxCLASS_METHOD );
+ SbxVariable* p = xScopeObj->Find( aFunctionName, SbxClassType::Method );
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
if( pMeth == nullptr )
{
@@ -4696,7 +4696,7 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal )
// Only for native COM objects
if( pUnoObj->isNativeCOMObject() )
{
- SbxVariableRef pMeth = pObj->Find( "toString", SbxCLASS_METHOD );
+ SbxVariableRef pMeth = pObj->Find( "toString", SbxClassType::Method );
if ( pMeth.Is() )
{
SbxValues aRes;
@@ -4821,7 +4821,7 @@ SbxVariable* SbUnoStructRefObject::Find( const OUString& rName, SbxClassType t )
implCreateDbgProperties();
// Now they have to be found regular
- pRes = SbxObject::Find( rName, SbxCLASS_DONTCARE );
+ pRes = SbxObject::Find( rName, SbxClassType::DontCare );
}
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index f96f03af197f..375678fd0932 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -390,7 +390,7 @@ SbMethodRef DocObjectWrapper::getMethod( const OUString& aName ) throw (RuntimeE
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module
m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
- pMethod = dynamic_cast<SbMethod*>(m_pMod->SbModule::Find(aName, SbxCLASS_METHOD));
+ pMethod = dynamic_cast<SbMethod*>(m_pMod->SbModule::Find(aName, SbxClassType::Method));
m_pMod->SetFlags( nSaveFlgs );
}
@@ -405,7 +405,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const OUString& aName ) throw (Runt
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module.
m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
- pProperty = dynamic_cast<SbProperty*>(m_pMod->SbModule::Find(aName, SbxCLASS_PROPERTY));
+ pProperty = dynamic_cast<SbProperty*>(m_pMod->SbModule::Find(aName, SbxClassType::Property));
m_pMod->SetFlag( nSaveFlgs );
}
@@ -483,7 +483,7 @@ SbModule::SbModule( const OUString& rName, bool bVBACompat )
SetModuleType( script::ModuleType::NORMAL );
// #i92642: Set name property to intitial name
- SbxVariable* pNameProp = pProps->Find( "Name", SbxCLASS_PROPERTY );
+ SbxVariable* pNameProp = pProps->Find( "Name", SbxClassType::Property );
if( pNameProp != nullptr )
{
pNameProp->PutString( GetName() );
@@ -551,7 +551,7 @@ void SbModule::StartDefinitions()
SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
{
- SbxVariable* p = pMethods->Find( rName, SbxCLASS_METHOD );
+ SbxVariable* p = pMethods->Find( rName, SbxClassType::Method );
SbMethod* pMeth = p ? dynamic_cast<SbMethod*>( p ) : nullptr;
if( p && !pMeth )
{
@@ -583,7 +583,7 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
{
- SbxVariable* p = pProps->Find( rName, SbxCLASS_PROPERTY );
+ SbxVariable* p = pProps->Find( rName, SbxClassType::Property );
SbProperty* pProp = p ? dynamic_cast<SbProperty*>( p ) : nullptr;
if( p && !pProp )
{
@@ -602,7 +602,7 @@ SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
void SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
{
- SbxVariable* p = pProps->Find( rName, SbxCLASS_PROPERTY );
+ SbxVariable* p = pProps->Find( rName, SbxClassType::Property );
SbProcedureProperty* pProp = p ? dynamic_cast<SbProcedureProperty*>( p ) : nullptr;
if( p && !pProp )
{
@@ -620,7 +620,7 @@ void SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
void SbModule::GetIfaceMapperMethod( const OUString& rName, SbMethod* pImplMeth )
{
- SbxVariable* p = pMethods->Find( rName, SbxCLASS_METHOD );
+ SbxVariable* p = pMethods->Find( rName, SbxClassType::Method );
SbIfaceMapperMethod* pMapperMethod = p ? dynamic_cast<SbIfaceMapperMethod*>( p ) : nullptr;
if( p && !pMapperMethod )
{
@@ -693,7 +693,7 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
SbxArrayRef xArray = pImage->GetEnums();
if( xArray.Is() )
{
- SbxVariable* pEnumVar = xArray->Find( rName, SbxCLASS_DONTCARE );
+ SbxVariable* pEnumVar = xArray->Find( rName, SbxClassType::DontCare );
SbxObject* pEnumObject = dynamic_cast<SbxObject*>( pEnumVar );
if( pEnumObject )
{
@@ -746,7 +746,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
OUString aProcName("Property Get ");
aProcName += pProcProperty->GetName();
- SbxVariable* pMethVar = Find( aProcName, SbxCLASS_METHOD );
+ SbxVariable* pMethVar = Find( aProcName, SbxClassType::Method );
if( pMethVar )
{
SbxValues aVals;
@@ -787,13 +787,13 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
OUString aProcName("Property Set ");
aProcName += pProcProperty->GetName();
- pMethVar = Find( aProcName, SbxCLASS_METHOD );
+ pMethVar = Find( aProcName, SbxClassType::Method );
}
if( !pMethVar ) // Let
{
OUString aProcName("Property Let " );
aProcName += pProcProperty->GetName();
- pMethVar = Find( aProcName, SbxCLASS_METHOD );
+ pMethVar = Find( aProcName, SbxClassType::Method );
}
if( pMethVar )
@@ -979,25 +979,25 @@ static void SendHint( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
{
// delete the return value of CreateUnoService
- SbxVariable* pVar = pBasic->GetRtl()->Find( "CreateUnoService", SbxCLASS_METHOD );
+ SbxVariable* pVar = pBasic->GetRtl()->Find( "CreateUnoService", SbxClassType::Method );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete the return value of CreateUnoDialog
- pVar = pBasic->GetRtl()->Find( "CreateUnoDialog", SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( "CreateUnoDialog", SbxClassType::Method );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete the return value of CDec
- pVar = pBasic->GetRtl()->Find( "CDec", SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( "CDec", SbxClassType::Method );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete return value of CreateObject
- pVar = pBasic->GetRtl()->Find( "CreateObject", SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( "CreateObject", SbxClassType::Method );
if( pVar )
{
pVar->SbxValue::Clear();
@@ -1090,7 +1090,7 @@ void SbModule::Run( SbMethod* pMeth )
// Launcher problem
// i80726 The Find below will generate an error in Testtool so we reset it unless there was one before already
bool bWasError = SbxBase::GetError() != 0;
- SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
+ SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxClassType::Object );
if ( !bWasError && (SbxBase::GetError() == ERRCODE_SBX_PROC_UNDEFINED) )
SbxBase::ResetError();
if( pMSOMacroRuntimeLibVar )
@@ -1100,7 +1100,7 @@ void SbModule::Run( SbMethod* pMeth )
{
SbxFlagBits nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SbxFlagBits::GlobalSearch;
pMSOMacroRuntimeLib->ResetFlag( SbxFlagBits::GlobalSearch );
- SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxCLASS_METHOD );
+ SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxClassType::Method );
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
if( pAppSymbol )
{
@@ -1308,7 +1308,7 @@ void SbModule::RemoveVars()
// We don't want a Find being called in a derived class ( e.g.
// SbUserform because it could trigger say an initialise event
// which would cause basic to be re-run in the middle of the init ( and remember RemoveVars is called from compile and we don't want code to run as part of the compile )
- SbxVariableRef p = SbModule::Find( rModuleVariableName, SbxCLASS_PROPERTY );
+ SbxVariableRef p = SbModule::Find( rModuleVariableName, SbxClassType::Property );
if( p.Is() )
Remove (p);
}
@@ -1875,7 +1875,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
OUString aProcName("Property Get ");
aProcName += pProcProperty->GetName();
- SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD );
+ SbxVariable* pMeth = Find( aProcName, SbxClassType::Method );
if( pMeth )
{
SbxValues aVals;
@@ -1916,13 +1916,13 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
OUString aProcName("Property Set " );
aProcName += pProcProperty->GetName();
- pMeth = Find( aProcName, SbxCLASS_METHOD );
+ pMeth = Find( aProcName, SbxClassType::Method );
}
if( !pMeth ) // Let
{
OUString aProcName("Property Let " );
aProcName += pProcProperty->GetName();
- pMeth = Find( aProcName, SbxCLASS_METHOD );
+ pMeth = Find( aProcName, SbxClassType::Method );
}
if( pMeth )
@@ -2479,7 +2479,7 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
{
SAL_INFO("basic", "*** trigger " << OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() << " ***");
// Search method
- SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
+ SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxClassType::Method );
if( pMeth )
{
if ( aArguments.getLength() > 0 ) // Setup parameters
@@ -2619,7 +2619,7 @@ void SbUserFormModule::Unload()
triggerTerminateEvent();
}
// Search method
- SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxCLASS_METHOD );
+ SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxClassType::Method );
if( pMeth )
{
SAL_INFO("basic", "Attempting too run the UnloadObjectMethod");
@@ -2647,7 +2647,7 @@ void SbUserFormModule::InitObject()
try
{
OUString aHook("VBAGlobals");
- SbUnoObject* pGlobs = static_cast<SbUnoObject*>(GetParent()->Find( aHook, SbxCLASS_DONTCARE ));
+ SbUnoObject* pGlobs = static_cast<SbUnoObject*>(GetParent()->Find( aHook, SbxClassType::DontCare ));
if ( m_xModel.is() && pGlobs )
{
// broadcast INITIALIZE_USERFORM script event before the dialog is created
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 8d7ca38c0c75..e6c6b9390dd0 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -157,7 +157,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
}
}
}
- else if( rEnumArray->Find( aCompleteName, SbxCLASS_OBJECT ) || ( IsVBASupportOn() && VBAConstantHelper::instance().isVBAConstantType( aCompleteName ) ) )
+ else if( rEnumArray->Find( aCompleteName, SbxClassType::Object ) || ( IsVBASupportOn() && VBAConstantHelper::instance().isVBAConstantType( aCompleteName ) ) )
{
eType = SbxLONG;
break;
@@ -406,7 +406,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
if( !bCompatible && !pDef->IsNew() )
{
OUString aTypeName( aGblStrings.Find( pDef->GetTypeId() ) );
- if( rTypeArray->Find( aTypeName, SbxCLASS_OBJECT ) == nullptr )
+ if( rTypeArray->Find( aTypeName, SbxClassType::Object ) == nullptr )
{
if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
{
@@ -581,7 +581,7 @@ void SbiParser::DefType( bool bPrivate )
if (!TestSymbol())
return;
- if (rTypeArray->Find(aSym,SbxCLASS_OBJECT))
+ if (rTypeArray->Find(aSym,SbxClassType::Object))
{
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
return;
@@ -616,7 +616,7 @@ void SbiParser::DefType( bool bPrivate )
{
SbxArray *pTypeMembers = pType->GetProperties();
OUString aElemName = pElem->GetName();
- if( pTypeMembers->Find( aElemName, SbxCLASS_DONTCARE) )
+ if( pTypeMembers->Find( aElemName, SbxClassType::DontCare) )
{
Error (ERRCODE_BASIC_VAR_DEFINED);
}
@@ -666,7 +666,7 @@ void SbiParser::DefType( bool bPrivate )
if( nElemTypeId != 0 )
{
OUString aTypeName( aGblStrings.Find( nElemTypeId ) );
- SbxObject* pTypeObj = static_cast< SbxObject* >( rTypeArray->Find( aTypeName, SbxCLASS_OBJECT ) );
+ SbxObject* pTypeObj = static_cast< SbxObject* >( rTypeArray->Find( aTypeName, SbxClassType::Object ) );
if( pTypeObj != nullptr )
{
SbxObject* pCloneObj = cloneTypeObjectImpl( *pTypeObj );
@@ -679,8 +679,8 @@ void SbiParser::DefType( bool bPrivate )
}
}
- pType->Remove( "Name", SbxCLASS_DONTCARE );
- pType->Remove( "Parent", SbxCLASS_DONTCARE );
+ pType->Remove( "Name", SbxClassType::DontCare );
+ pType->Remove( "Parent", SbxClassType::DontCare );
rTypeArray->Insert (pType,rTypeArray->Count());
}
@@ -700,7 +700,7 @@ void SbiParser::DefEnum( bool bPrivate )
return;
OUString aEnumName = aSym;
- if( rEnumArray->Find(aEnumName,SbxCLASS_OBJECT) )
+ if( rEnumArray->Find(aEnumName,SbxClassType::Object) )
{
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
return;
@@ -811,8 +811,8 @@ void SbiParser::DefEnum( bool bPrivate )
}
}
- pEnum->Remove( "Name", SbxCLASS_DONTCARE );
- pEnum->Remove( "Parent", SbxCLASS_DONTCARE );
+ pEnum->Remove( "Name", SbxClassType::DontCare );
+ pEnum->Remove( "Parent", SbxClassType::DontCare );
rEnumArray->Insert( pEnum, rEnumArray->Count() );
}
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index bd509ad31726..f39bb7686948 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -270,7 +270,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
// #i109184: Check if symbol is or later will be defined inside module
SbModule& rMod = pParser->aGen.GetModule();
SbxArray* pModMethods = rMod.GetMethods();
- if( pModMethods->Find( aSym, SbxCLASS_DONTCARE ) )
+ if( pModMethods->Find( aSym, SbxClassType::DontCare ) )
{
pDef = nullptr;
}
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 4e62d3c28f2f..e413c11bfd39 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -153,7 +153,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
// part of the runtime-library?
SbiSymDef* SbiParser::CheckRTLForSym(const OUString& rSym, SbxDataType eType)
{
- SbxVariable* pVar = GetBasic()->GetRtl()->Find(rSym, SbxCLASS_DONTCARE);
+ SbxVariable* pVar = GetBasic()->GetRtl()->Find(rSym, SbxClassType::DontCare);
if (!pVar)
return nullptr;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 49f277f46318..296af1514bcd 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4414,7 +4414,7 @@ RTLFUNC(Load)
}
else if (SbxObject* pSbxObj = dynamic_cast<SbxObject*>(pObj))
{
- SbxVariable* pVar = pSbxObj->Find("Load", SbxCLASS_METHOD);
+ SbxVariable* pVar = pSbxObj->Find("Load", SbxClassType::Method);
if( pVar )
{
pVar->GetInteger();
@@ -4445,7 +4445,7 @@ RTLFUNC(Unload)
}
else if (SbxObject *pSbxObj = dynamic_cast<SbxObject*>(pObj))
{
- SbxVariable* pVar = pSbxObj->Find("Unload", SbxCLASS_METHOD);
+ SbxVariable* pVar = pSbxObj->Find("Unload", SbxClassType::Method);
if( pVar )
{
pVar->GetInteger();
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 689aa0d10bf3..df3d8d9bec20 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -143,7 +143,7 @@ RTLFUNC(CallByName)
sal_Int16 nCallType = rPar.Get(3)->GetInteger();
//SbxObject* pFindObj = NULL;
- SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_DONTCARE );
+ SbxVariable* pFindVar = pObj->Find( aNameStr, SbxClassType::DontCare );
if( pFindVar == nullptr )
{
StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED );
@@ -971,7 +971,7 @@ RTLFUNC(FindPropertyObject)
SbxObject* pFindObj = nullptr;
if( pObj )
{
- SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_OBJECT );
+ SbxVariable* pFindVar = pObj->Find( aNameStr, SbxClassType::Object );
pFindObj = dynamic_cast<SbxObject*>( pFindVar );
}
else
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index c643df737884..2c0bdbe03da8 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3178,7 +3178,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const OUString& aClass )
SbClassData* pClassData;
if( pClassMod && (pClassData=pClassMod->pClassData) != nullptr )
{
- SbxVariable* pClassVar = pClassData->mxIfaces->Find( aClass, SbxCLASS_DONTCARE );
+ SbxVariable* pClassVar = pClassData->mxIfaces->Find( aClass, SbxClassType::DontCare );
bRet = (pClassVar != nullptr);
}
}
@@ -3357,20 +3357,20 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
{
if ( pMeth )
{
- pElem = pMeth->GetStatics()->Find( aName, SbxCLASS_DONTCARE );
+ pElem = pMeth->GetStatics()->Find( aName, SbxClassType::DontCare );
}
}
if ( !pElem )
{
- pElem = refLocals->Find( aName, SbxCLASS_DONTCARE );
+ pElem = refLocals->Find( aName, SbxClassType::DontCare );
}
}
if( !pElem )
{
bool bSave = rBasic.bNoRtl;
rBasic.bNoRtl = true;
- pElem = pObj->Find( aName, SbxCLASS_DONTCARE );
+ pElem = pObj->Find( aName, SbxClassType::DontCare );
// #110004, #112015: Make private really private
if( bLocal && pElem ) // Local as flag for global search
@@ -3397,7 +3397,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
if ( bVBAEnabled )
{
// Try Find in VBA symbols space
- pElem = rBasic.VBAFind( aName, SbxCLASS_DONTCARE );
+ pElem = rBasic.VBAFind( aName, SbxClassType::DontCare );
if ( pElem )
{
bSetName = false; // don't overwrite uno name
@@ -3571,7 +3571,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
}
if( refLocals )
{
- pElem = refLocals->Find( rName, SbxCLASS_DONTCARE );
+ pElem = refLocals->Find( rName, SbxClassType::DontCare );
}
if ( !pElem && pMeth )
{
@@ -3579,7 +3579,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
OUString aMethName = pMeth->GetName();
aMethName += ":";
aMethName += rName;
- pElem = pMod->Find(aMethName, SbxCLASS_DONTCARE);
+ pElem = pMod->Find(aMethName, SbxClassType::DontCare);
}
// search in parameter list
@@ -3617,7 +3617,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
{
bool bSave = rBasic.bNoRtl;
rBasic.bNoRtl = true;
- pElem = pMod->Find( rName, SbxCLASS_DONTCARE );
+ pElem = pMod->Find( rName, SbxClassType::DontCare );
rBasic.bNoRtl = bSave;
}
return pElem;
@@ -3701,7 +3701,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
}
if ( !sDefaultMethod.isEmpty() )
{
- SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
+ SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxClassType::Method );
if( meth != nullptr )
{
pInfo = meth->GetInfo();
@@ -3909,7 +3909,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
}
if ( !sDefaultMethod.isEmpty() )
{
- SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
+ SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxClassType::Method );
SbxVariableRef refTemp = meth;
if ( refTemp )
{
@@ -4488,7 +4488,7 @@ void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
refLocals = new SbxArray;
}
OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
- if( refLocals->Find( aName, SbxCLASS_DONTCARE ) == nullptr )
+ if( refLocals->Find( aName, SbxClassType::DontCare ) == nullptr )
{
SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
SbxVariable* p = new SbxVariable( t );
@@ -4506,7 +4506,7 @@ void SbiRuntime::StepPUBLIC_Impl( sal_uInt32 nOp1, sal_uInt32 nOp2, bool bUsedFo
SbxDataType t = (SbxDataType)(SbxDataType)(nOp2 & 0xffff);
bool bFlag = pMod->IsSet( SbxFlagBits::NoModify );
pMod->SetFlag( SbxFlagBits::NoModify );
- SbxVariableRef p = pMod->Find( aName, SbxCLASS_PROPERTY );
+ SbxVariableRef p = pMod->Find( aName, SbxClassType::Property );
if( p.Is() )
{
pMod->Remove (p);
@@ -4569,12 +4569,12 @@ void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
bool bFlag = pStorage->IsSet( SbxFlagBits::NoModify );
rBasic.SetFlag( SbxFlagBits::NoModify );
- SbxVariableRef p = pStorage->Find( aName, SbxCLASS_PROPERTY );
+ SbxVariableRef p = pStorage->Find( aName, SbxClassType::Property );
if( p.Is() )
{
pStorage->Remove (p);
}
- p = pStorage->Make( aName, SbxCLASS_PROPERTY, t );
+ p = pStorage->Make( aName, SbxClassType::Property, t );
if( !bFlag )
{
pStorage->ResetFlag( SbxFlagBits::NoModify );
@@ -4629,7 +4629,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl( OUString& aName, SbxDataType& t )
if ( pMeth )
{
SbxArray* pStatics = pMeth->GetStatics();
- if( pStatics && ( pStatics->Find( aName, SbxCLASS_DONTCARE ) == nullptr ) )
+ if( pStatics && ( pStatics->Find( aName, SbxClassType::DontCare ) == nullptr ) )
{
p = new SbxVariable( t );
if( t != SbxVARIANT )
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 9ded3874dcd0..cc2484b609ba 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -718,8 +718,8 @@ SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
}
// #i92642: Remove default properties
- Remove( "Name", SbxCLASS_DONTCARE );
- Remove( "Parent", SbxCLASS_DONTCARE );
+ Remove( "Name", SbxClassType::DontCare );
+ Remove( "Parent", SbxClassType::DontCare );
SetParent( pb );
@@ -757,9 +757,9 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
sal_uInt16 nSrchMask = TYPEMASK_;
switch( t )
{
- case SbxCLASS_METHOD: nSrchMask = METHOD_; break;
- case SbxCLASS_PROPERTY: nSrchMask = PROPERTY_; break;
- case SbxCLASS_OBJECT: nSrchMask = OBJECT_; break;
+ case SbxClassType::Method: nSrchMask = METHOD_; break;
+ case SbxClassType::Property: nSrchMask = PROPERTY_; break;
+ case SbxClassType::Object: nSrchMask = OBJECT_; break;
default: break;
}
while( p->nArgs != -1 )
@@ -789,14 +789,14 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
if( p->nArgs & CONST_ )
nAccess |= SbxFlagBits::Const;
OUString aName_ = OUString::createFromAscii( p->pName );
- SbxClassType eCT = SbxCLASS_OBJECT;
+ SbxClassType eCT = SbxClassType::Object;
if( nType & PROPERTY_ )
{
- eCT = SbxCLASS_PROPERTY;
+ eCT = SbxClassType::Property;
}
else if( nType & METHOD_ )
{
- eCT = SbxCLASS_METHOD;
+ eCT = SbxClassType::Method;
}
pVar = Make( aName_, eCT, p->eType, ( p->nArgs & FUNCTION_ ) == FUNCTION_ );
pVar->SetUserData( nIndex + 1 );
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index e5dfe17e1572..47e5dac88a7c 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -111,13 +111,13 @@ SbStdPicture::SbStdPicture() :
SbxObject( OUString("Picture"))
{
// Properties
- SbxVariable* p = Make( "Type", SbxCLASS_PROPERTY, SbxVARIANT );
+ SbxVariable* p = Make( "Type", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_TYPE );
- p = Make( "Width", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "Width", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_WIDTH );
- p = Make( "Height", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "Height", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_HEIGHT );
}
@@ -227,24 +227,24 @@ SbStdFont::SbStdFont()
, nSize(0)
{
// Properties
- SbxVariable* p = Make( "Bold", SbxCLASS_PROPERTY, SbxVARIANT );
+ SbxVariable* p = Make( "Bold", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_BOLD );
- p = Make( "Italic", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "Italic", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_ITALIC );
- p = Make( "StrikeThrough", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "StrikeThrough", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_STRIKETHROUGH );
- p = Make( "Underline", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "Underline", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_UNDERLINE );
- p = Make( "Size", SbxCLASS_PROPERTY, SbxVARIANT );
+ p = Make( "Size", SbxClassType::Property, SbxVARIANT );
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_SIZE );
// handle name property yourself
- p = Find( "Name", SbxCLASS_PROPERTY );
+ p = Find( "Name", SbxClassType::Property );
assert(p && "No Name Property");
p->SetUserData( ATTR_IMP_NAME );
}
@@ -384,27 +384,27 @@ void SbStdClipboard::MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool )
SbStdClipboard::SbStdClipboard() :
SbxObject( OUString("Clipboard") )
{
- SbxVariable* p = Find( "Name", SbxCLASS_PROPERTY );
+ SbxVariable* p = Find( "Name", SbxClassType::Property );
assert(p && "No Name Property");
p->SetUserData( ATTR_IMP_NAME );
// register methods
- p = Make( "Clear", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "Clear", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_CLEAR );
- p = Make( "GetData", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "GetData", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETDATA );
- p = Make( "GetFormat", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "GetFormat", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETFORMAT );
- p = Make( "GetText", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "GetText", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETTEXT );
- p = Make( "SetData", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "SetData", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_SETDATA );
- p = Make( "SetText", SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( "SetText", SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_SETTEXT );
}
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index d3b09ecccc9b..b1cce09ea3e6 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -69,7 +69,7 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
if( eType != SbxVARIANT )
{
// Convert no objects
- if( eType != SbxOBJECT || pSrc_->GetClass() != SbxCLASS_OBJECT )
+ if( eType != SbxOBJECT || pSrc_->GetClass() != SbxClassType::Object )
{
pSrc_->Convert(eType);
}
@@ -92,7 +92,7 @@ SbxDataType SbxArray::GetType() const
SbxClassType SbxArray::GetClass() const
{
- return SbxCLASS_ARRAY;
+ return SbxClassType::Array;
}
void SbxArray::Clear()
@@ -185,7 +185,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
if( pVar )
if( eType != SbxVARIANT )
// Convert no objects
- if( eType != SbxOBJECT || pVar->GetClass() != SbxCLASS_OBJECT )
+ if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
pVar->Convert( eType );
SbxVariableRef& rRef = GetRef32( nIdx );
if( static_cast<SbxVariable*>(rRef) != pVar )
@@ -205,7 +205,7 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx )
if( pVar )
if( eType != SbxVARIANT )
// Convert no objects
- if( eType != SbxOBJECT || pVar->GetClass() != SbxCLASS_OBJECT )
+ if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
pVar->Convert( eType );
SbxVariableRef& rRef = GetRef( nIdx );
if( static_cast<SbxVariable*>(rRef) != pVar )
@@ -379,7 +379,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
{
switch (rEntry.mpVar->GetClass())
{
- case SbxCLASS_OBJECT:
+ case SbxClassType::Object:
{
// Objects are not allowed to scan their parent.
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
@@ -388,7 +388,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
rEntry.mpVar->SetFlags(nOld);
}
break;
- case SbxCLASS_ARRAY:
+ case SbxClassType::Array:
// Casting SbxVariable to SbxArray? Really?
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).FindUserData(nData);
break;
@@ -424,7 +424,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
// The very secure search works as well, if there is no hashcode!
sal_uInt16 nVarHash = rEntry.mpVar->GetHashCode();
if ( (!nVarHash || nVarHash == nHash)
- && (t == SbxCLASS_DONTCARE || rEntry.mpVar->GetClass() == t)
+ && (t == SbxClassType::DontCare || rEntry.mpVar->GetClass() == t)
&& (rEntry.mpVar->GetName().equalsIgnoreAsciiCase(rName)))
{
p = &rEntry.mpVar;
@@ -437,7 +437,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
{
switch (rEntry.mpVar->GetClass())
{
- case SbxCLASS_OBJECT:
+ case SbxClassType::Object:
{
// Objects are not allowed to scan their parent.
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
@@ -446,7 +446,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
rEntry.mpVar->SetFlags(nOld);
}
break;
- case SbxCLASS_ARRAY:
+ case SbxClassType::Array:
// Casting SbxVariable to SbxArray? Really?
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).Find(rName, t);
break;
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index cc26051c7125..87696f8528bc 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -75,7 +75,7 @@ SbxDataType SbxBase::GetType() const
SbxClassType SbxBase::GetClass() const
{
- return SbxCLASS_DONTCARE;
+ return SbxClassType::DontCare;
}
void SbxBase::Clear()
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 58d7dec9a8a8..0f4e3125a003 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -75,14 +75,14 @@ void SbxCollection::Initialize()
SetFlag( SbxFlagBits::Fixed );
ResetFlag( SbxFlagBits::Write );
SbxVariable* p;
- p = Make( pCount , SbxCLASS_PROPERTY, SbxINTEGER );
+ p = Make( pCount , SbxClassType::Property, SbxINTEGER );
p->ResetFlag( SbxFlagBits::Write );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pAdd, SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( pAdd, SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pItem , SbxCLASS_METHOD, SbxOBJECT );
+ p = Make( pItem , SbxClassType::Method, SbxOBJECT );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pRemove, SbxCLASS_METHOD, SbxEMPTY );
+ p = Make( pRemove, SbxClassType::Method, SbxEMPTY );
p->SetFlag( SbxFlagBits::DontStore );
}
@@ -195,7 +195,7 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
SbxVariable* p = pPar_->Get( 1 );
if( p->GetType() == SbxSTRING )
{
- pRes = Find( p->GetOUString(), SbxCLASS_OBJECT );
+ pRes = Find( p->GetOUString(), SbxClassType::Object );
}
else
{
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index 99f4d9cbb4ca..2cd35bea412e 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -162,7 +162,7 @@ static SbxVariableRef Operand
}
else
{
- refVar = QualifiedName( pObj, pGbl, &p, SbxCLASS_DONTCARE );
+ refVar = QualifiedName( pObj, pGbl, &p, SbxClassType::DontCare );
}
*ppBuf = p;
return refVar;
@@ -241,7 +241,7 @@ static SbxVariableRef Assign( SbxObject* pObj, SbxObject* pGbl, const sal_Unicod
if( *p == '=' )
{
// Assign only onto properties!
- if( refVar->GetClass() != SbxCLASS_PROPERTY )
+ if( refVar->GetClass() != SbxClassType::Property )
{
SbxBase::SetError( ERRCODE_SBX_BAD_ACTION );
refVar.Clear();
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index ce7f866058e6..12b09277dec6 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -113,7 +113,7 @@ SbxDataType SbxObject::GetType() const
SbxClassType SbxObject::GetClass() const
{
- return SbxCLASS_OBJECT;
+ return SbxClassType::Object;
}
void SbxObject::Clear()
@@ -122,9 +122,9 @@ void SbxObject::Clear()
pProps = new SbxArray;
pObjs = new SbxArray( SbxOBJECT );
SbxVariable* p;
- p = Make( pNameProp, SbxCLASS_PROPERTY, SbxSTRING );
+ p = Make( pNameProp, SbxClassType::Property, SbxSTRING );
p->SetFlag( SbxFlagBits::DontStore );
- p = Make( pParentProp, SbxCLASS_PROPERTY, SbxOBJECT );
+ p = Make( pParentProp, SbxClassType::Property, SbxOBJECT );
p->ResetFlag( SbxFlagBits::Write );
p->SetFlag( SbxFlagBits::DontStore );
pDfltProp = nullptr;
@@ -213,20 +213,20 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
SAL_INFO(
"basic.sbx",
"search" << std::setw(nLvl) << " "
- << (t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT
- ? pCls[t - 1] : "Unknown class")
+ << (t >= SbxClassType::DontCare && t <= SbxClassType::Object
+ ? pCls[(int)t - 1] : "Unknown class")
<< " " << rName << " in " << SbxVariable::GetName());
++nLvl;
#endif
SbxVariable* pRes = nullptr;
pObjs->SetFlag( SbxFlagBits::ExtSearch );
- if( t == SbxCLASS_DONTCARE )
+ if( t == SbxClassType::DontCare )
{
- pRes = pMethods->Find( rName, SbxCLASS_METHOD );
+ pRes = pMethods->Find( rName, SbxClassType::Method );
if( !pRes )
{
- pRes = pProps->Find( rName, SbxCLASS_PROPERTY );
+ pRes = pProps->Find( rName, SbxClassType::Property );
}
if( !pRes )
{
@@ -238,10 +238,10 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
SbxArray* pArray = nullptr;
switch( t )
{
- case SbxCLASS_VARIABLE:
- case SbxCLASS_PROPERTY: pArray = pProps; break;
- case SbxCLASS_METHOD: pArray = pMethods; break;
- case SbxCLASS_OBJECT: pArray = pObjs; break;
+ case SbxClassType::Variable:
+ case SbxClassType::Property: pArray = pProps; break;
+ case SbxClassType::Method: pArray = pMethods; break;
+ case SbxClassType::Object: pArray = pObjs; break;
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
}
if( pArray )
@@ -251,7 +251,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
}
// Extended Search in the Object-Array?
// For objects and DontCare the array of objects has already been searched
- if( !pRes && ( t == SbxCLASS_METHOD || t == SbxCLASS_PROPERTY ) )
+ if( !pRes && ( t == SbxClassType::Method || t == SbxClassType::Property ) )
pRes = pObjs->Find( rName, t );
// Search in the parents?
if( !pRes && IsSet( SbxFlagBits::GlobalSearch ) )
@@ -287,7 +287,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
{
- SbxVariable* pMeth = FindQualified( rName, SbxCLASS_DONTCARE);
+ SbxVariable* pMeth = FindQualified( rName, SbxClassType::DontCare);
if( pMeth && nullptr != dynamic_cast<const SbxMethod*>( pMeth) )
{
// FindQualified() might have struck already!
@@ -307,10 +307,10 @@ SbxProperty* SbxObject::GetDfltProperty()
{
if ( !pDfltProp && !aDfltPropName.isEmpty() )
{
- pDfltProp = static_cast<SbxProperty*>( Find( aDfltPropName, SbxCLASS_PROPERTY ) );
+ pDfltProp = static_cast<SbxProperty*>( Find( aDfltPropName, SbxClassType::Property ) );
if( !pDfltProp )
{
- pDfltProp = static_cast<SbxProperty*>( Make( aDfltPropName, SbxCLASS_PROPERTY, SbxVARIANT ) );
+ pDfltProp = static_cast<SbxProperty*>( Make( aDfltPropName, SbxClassType::Property, SbxVARIANT ) );
}
}
return pDfltProp;
@@ -334,10 +334,10 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
SbxArray* pArray = nullptr;
if( pVar ) switch( pVar->GetClass() )
{
- case SbxCLASS_VARIABLE:
- case SbxCLASS_PROPERTY: pArray = pProps; break;
- case SbxCLASS_METHOD: pArray = pMethods; break;
- case SbxCLASS_OBJECT: pArray = pObjs; break;
+ case SbxClassType::Variable:
+ case SbxClassType::Property: pArray = pProps; break;
+ case SbxClassType::Method: pArray = pMethods; break;
+ case SbxClassType::Object: pArray = pObjs; break;
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
}
if( pArray )
@@ -370,10 +370,10 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
SbxArray* pArray = nullptr;
switch( ct )
{
- case SbxCLASS_VARIABLE:
- case SbxCLASS_PROPERTY: pArray = pProps; break;
- case SbxCLASS_METHOD: pArray = pMethods; break;
- case SbxCLASS_OBJECT: pArray = pObjs; break;
+ case SbxClassType::Variable:
+ case SbxClassType::Property: pArray = pProps; break;
+ case SbxClassType::Method: pArray = pMethods; break;
+ case SbxClassType::Object: pArray = pObjs; break;
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
}
if( !pArray )
@@ -381,7 +381,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
return nullptr;
}
// Collections may contain objects of the same name
- if( !( ct == SbxCLASS_OBJECT && nullptr != dynamic_cast<const SbxCollection*>( this ) ) )
+ if( !( ct == SbxClassType::Object && nullptr != dynamic_cast<const SbxCollection*>( this ) ) )
{
SbxVariable* pRes = pArray->Find( rName, ct );
if( pRes )
@@ -392,14 +392,14 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
SbxVariable* pVar = nullptr;
switch( ct )
{
- case SbxCLASS_VARIABLE:
- case SbxCLASS_PROPERTY:
+ case SbxClassType::Variable:
+ case SbxClassType::Property:
pVar = new SbxProperty( rName, dt );
break;
- case SbxCLASS_METHOD:
+ case SbxClassType::Method:
pVar = new SbxMethod( rName, dt, bIsRuntimeFunction );
break;
- case SbxCLASS_OBJECT:
+ case SbxClassType::Object:
pVar = CreateObject( rName );
break;
default:
@@ -438,7 +438,7 @@ void SbxObject::Insert( SbxVariable* pVar )
return;
}
EndListening( pOld->GetBroadcaster(), true );
- if( pVar->GetClass() == SbxCLASS_PROPERTY )
+ if( pVar->GetClass() == SbxClassType::Property )
{
if( pOld == pDfltProp )
{
@@ -466,9 +466,9 @@ void SbxObject::Insert( SbxVariable* pVar )
SAL_INFO(
"basic.sbx",
"insert "
- << ((pVar->GetClass() >= SbxCLASS_DONTCARE
- && pVar->GetClass() <= SbxCLASS_OBJECT)
- ? pCls[pVar->GetClass() - 1] : "Unknown class")
+ << ((pVar->GetClass() >= SbxClassType::DontCare
+ && pVar->GetClass() <= SbxClassType::Object)
+ ? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
<< " " << aVarName << " in " << SbxVariable::GetName());
#endif
}
@@ -483,10 +483,10 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
{
switch( pVar->GetClass() )
{
- case SbxCLASS_VARIABLE:
- case SbxCLASS_PROPERTY: pArray = pProps; break;
- case SbxCLASS_METHOD: pArray = pMethods; break;
- case SbxCLASS_OBJECT: pArray = pObjs; break;
+ case SbxClassType::Variable:
+ case SbxClassType::Property: pArray = pProps; break;
+ case SbxClassType::Method: pArray = pMethods; break;
+ case SbxClassType::Object: pArray = pObjs; break;
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
}
}
@@ -510,9 +510,9 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
SAL_INFO(
"basic.sbx",
"insert "
- << ((pVar->GetClass() >= SbxCLASS_DONTCARE
- && pVar->GetClass() <= SbxCLASS_OBJECT)
- ? pCls[pVar->GetClass() - 1] : "Unknown class")
+ << ((pVar->GetClass() >= SbxClassType::DontCare
+ && pVar->GetClass() <= SbxClassType::Object)
+ ? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
<< " " << aVarName << " in " << SbxVariable::GetName());
#endif
}
@@ -621,7 +621,7 @@ bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// Set properties
if( !aDfltProp.isEmpty() )
{
- pDfltProp = static_cast<SbxProperty*>( pProps->Find( aDfltProp, SbxCLASS_PROPERTY ) );
+ pDfltProp = static_cast<SbxProperty*>( pProps->Find( aDfltProp, SbxClassType::Property ) );
}
SetModified( false );
return true;
@@ -881,7 +881,7 @@ SbxMethod::~SbxMethod()
SbxClassType SbxMethod::GetClass() const
{
- return SbxCLASS_METHOD;
+ return SbxClassType::Method;
}
SbxProperty::SbxProperty( const OUString& r, SbxDataType t )
@@ -896,7 +896,7 @@ SbxProperty::~SbxProperty()
SbxClassType SbxProperty::GetClass() const
{
- return SbxCLASS_PROPERTY;
+ return SbxClassType::Property;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index c58e0b910ca2..7bf87723a353 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -754,7 +754,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
SbxClassType SbxValue::GetClass() const
{
- return SbxCLASS_VALUE;
+ return SbxClassType::Value;
}
SbxDataType SbxValue::GetType() const
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index bc5c8f2668f9..18d50540478a 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -227,7 +227,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
// Request parameter-information (not for objects)
const_cast<SbxVariable*>(this)->GetInfo();
// Append nothing, if it is a simple property (no empty brackets)
- if (!pInfo || (pInfo->m_Params.empty() && GetClass() == SbxCLASS_PROPERTY))
+ if (!pInfo || (pInfo->m_Params.empty() && GetClass() == SbxClassType::Property))
{
return maName;
}
@@ -387,7 +387,7 @@ SbxDataType SbxVariable::GetType() const
SbxClassType SbxVariable::GetClass() const
{
- return SbxCLASS_VARIABLE;
+ return SbxClassType::Variable;
}
void SbxVariable::SetModified( bool b )
@@ -497,7 +497,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
rStrm.ReadUInt32( nTemp );
nUserData = nTemp;
// correction: old methods have instead of SbxNULL now SbxEMPTY
- if( nType == SbxNULL && GetClass() == SbxCLASS_METHOD )
+ if( nType == SbxNULL && GetClass() == SbxClassType::Method )
{
nType = SbxEMPTY;
}