summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-27 11:31:24 +0200
committerNoel Grandin <noel@peralex.com>2015-07-28 08:35:34 +0200
commit9072c5c8551c0bc512865ab15b1054c78706f1f3 (patch)
treef3e800f6b4f74306ae1bef5ae2b574568e69b690 /basic/source
parent95548d827dff41156ae46f391d73f358dad1b32f (diff)
convert SbxFlagsBits to scoped enum
Change-Id: I3dd699ca675be2ff4a8bfb7938bd5d43719b304c
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx22
-rw-r--r--basic/source/classes/eventatt.cxx2
-rw-r--r--basic/source/classes/sb.cxx58
-rw-r--r--basic/source/classes/sbunoobj.cxx8
-rw-r--r--basic/source/classes/sbxmod.cxx52
-rw-r--r--basic/source/comp/codegen.cxx8
-rw-r--r--basic/source/comp/dim.cxx8
-rw-r--r--basic/source/runtime/dllmgr-x64.cxx4
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx4
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--basic/source/runtime/methods1.cxx8
-rw-r--r--basic/source/runtime/runtime.cxx104
-rw-r--r--basic/source/runtime/stdobj.cxx4
-rw-r--r--basic/source/runtime/stdobj1.cxx28
-rw-r--r--basic/source/sbx/sbxarray.cxx38
-rw-r--r--basic/source/sbx/sbxbase.cxx20
-rw-r--r--basic/source/sbx/sbxcoll.cxx14
-rw-r--r--basic/source/sbx/sbxexec.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx30
-rw-r--r--basic/source/sbx/sbxstr.cxx2
-rw-r--r--basic/source/sbx/sbxvalue.cxx14
-rw-r--r--basic/source/sbx/sbxvar.cxx16
23 files changed, 226 insertions, 226 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 5952941fd8c6..9faa5ef17e3e 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -447,7 +447,7 @@ namespace basic
{
// create new BASIC-manager
StarBASIC* pBasic = new StarBASIC( pAppBasic );
- pBasic->SetFlag( SBX_EXTSEARCH );
+ pBasic->SetFlag( SbxFlagBits::ExtSearch );
_out_rpBasicManager = new BasicManager( pBasic, NULL, true );
}
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index b4f57d19f80f..d9e8a5cad1c0 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -518,7 +518,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
StarBASICRef xStdLib = rStdLibInfo.GetLib();
xStdLib->SetName( OUString(szStdLibName) );
rStdLibInfo.SetLibName( OUString(szStdLibName) );
- xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
+ xStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch );
xStdLib->SetModified( false );
}
else
@@ -532,7 +532,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
if ( pBasic )
{
pStdLib->Insert( pBasic );
- pBasic->SetFlag( SBX_EXTSEARCH );
+ pBasic->SetFlag( SbxFlagBits::ExtSearch );
}
}
// Modified through insert
@@ -692,7 +692,7 @@ BasicManager::BasicManager( StarBASIC* pSLib, OUString* pLibPath, bool bDocMgr )
StarBASICRef xStdLib = pStdLibInfo->GetLib();
xStdLib->SetName(OUString(szStdLibName));
pStdLibInfo->SetLibName(OUString(szStdLibName) );
- pSLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
+ pSLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch );
// Save is only necessary if basic has changed
xStdLib->SetModified( false );
@@ -711,7 +711,7 @@ void BasicManager::ImpMgrNotLoaded( const OUString& rStorageName )
StarBASICRef xStdLib = pStdLibInfo->GetLib();
xStdLib->SetName( OUString(szStdLibName) );
pStdLibInfo->SetLibName( OUString(szStdLibName) );
- xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
+ xStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch );
xStdLib->SetModified( false );
}
@@ -723,7 +723,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
pStdLibInfo->SetLib( pStdLib );
pStdLib->SetName( OUString(szStdLibName) );
pStdLibInfo->SetLibName( OUString(szStdLibName) );
- pStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
+ pStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch );
}
void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadLibs )
@@ -1012,7 +1012,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
StarBASICRef xStdLib = pLibInfo->GetLib();
xStdLib->SetName( pLibInfo->GetLibName() );
xStdLib->SetModified( false );
- xStdLib->SetFlag( SBX_DONTSTORE );
+ xStdLib->SetFlag( SbxFlagBits::DontStore );
}
else
{
@@ -1091,7 +1091,7 @@ bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
{
pNew->GetParent()->Insert( pNew );
}
- pNew->SetFlag( SBX_EXTSEARCH );
+ pNew->SetFlag( SbxFlagBits::ExtSearch );
}
rOldBasic = pNew;
@@ -1376,7 +1376,7 @@ bool BasicManager::LoadLib( sal_uInt16 nLib )
if ( pLib )
{
GetStdLib()->Insert( pLib );
- pLib->SetFlag( SBX_EXTSEARCH );
+ pLib->SetFlag( SbxFlagBits::ExtSearch );
}
}
}
@@ -1397,7 +1397,7 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName )
BasicLibInfo* pLibInfo = CreateLibInfo();
StarBASIC* pNew = new StarBASIC( GetStdLib(), mbDocMgr );
GetStdLib()->Insert( pNew );
- pNew->SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE );
+ pNew->SetFlag( SbxFlagBits::ExtSearch | SbxFlagBits::DontStore );
pLibInfo->SetLib( pNew );
pLibInfo->SetLibName( rLibName );
pLibInfo->GetLib()->SetName( rLibName );
@@ -1452,7 +1452,7 @@ StarBASIC* BasicManager::CreateLibForLibContainer( const OUString& rLibName,
BasicLibInfo* pLibInfo = CreateLibInfo();
StarBASIC* pNew = new StarBASIC( GetStdLib(), mbDocMgr );
GetStdLib()->Insert( pNew );
- pNew->SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE );
+ pNew->SetFlag( SbxFlagBits::ExtSearch | SbxFlagBits::DontStore );
pLibInfo->SetLib( pNew );
pLibInfo->SetLibName( rLibName );
pLibInfo->GetLib()->SetName( rLibName );
@@ -1514,7 +1514,7 @@ uno::Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const
aOldValue = sbxToUnoValue( pVariable );
SbxObjectRef xUnoObj = GetSbUnoObject( sVarName, _rValue );
- xUnoObj->SetFlag( SBX_DONTSTORE );
+ xUnoObj->SetFlag( SbxFlagBits::DontStore );
pStandardLib->Insert( xUnoObj );
return aOldValue;
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index bbf1b9b0053a..9f53f8991aa8 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -274,7 +274,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( SBX_GBLSEARCH );
+ pBasic->ResetFlag( SbxFlagBits::GlobalSearch );
pMethVar = pBasic->Find( aMacro, SbxCLASS_DONTCARE );
pBasic->SetFlags( nFlags );
break;
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index dd3cd4215d10..2e2efa6d546d 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -572,7 +572,7 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
pDest->unoAddDim( 0, -1 ); // variant array
}
SbxFlagBits nSavFlags = pVar->GetFlags();
- pNewProp->ResetFlag( SBX_FIXED );
+ pNewProp->ResetFlag( SbxFlagBits::Fixed );
// need to reset the FIXED flag
// when calling PutObject ( because the type will not match Object )
pNewProp->PutObject( pDest );
@@ -644,7 +644,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
SetClassName( pClassModule->GetName() );
// Allow search only internally
- ResetFlag( SBX_GBLSEARCH );
+ ResetFlag( SbxFlagBits::GlobalSearch );
// Copy the methods from original class module
SbxArray* pClassMethods = pClassModule->GetMethods();
@@ -662,9 +662,9 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
if( pMethod )
{
SbxFlagBits nFlags_ = pMethod->GetFlags();
- pMethod->SetFlag( SBX_NO_BROADCAST );
+ pMethod->SetFlag( SbxFlagBits::NoBroadcast );
SbMethod* pNewMethod = new SbMethod( *pMethod );
- pNewMethod->ResetFlag( SBX_NO_BROADCAST );
+ pNewMethod->ResetFlag( SbxFlagBits::NoBroadcast );
pMethod->SetFlags( nFlags_ );
pNewMethod->pMod = this;
pNewMethod->SetParent( this );
@@ -714,11 +714,11 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
if( pProcedureProp )
{
SbxFlagBits nFlags_ = pProcedureProp->GetFlags();
- pProcedureProp->SetFlag( SBX_NO_BROADCAST );
+ pProcedureProp->SetFlag( SbxFlagBits::NoBroadcast );
SbProcedureProperty* pNewProp = new SbProcedureProperty
( pProcedureProp->GetName(), pProcedureProp->GetType() );
pNewProp->SetFlags( nFlags_ ); // Copy flags
- pNewProp->ResetFlag( SBX_NO_BROADCAST ); // except the Broadcast if it was set
+ pNewProp->ResetFlag( SbxFlagBits::NoBroadcast ); // except the Broadcast if it was set
pProcedureProp->SetFlags( nFlags_ );
pProps->PutDirect( pNewProp, i );
StartListening( pNewProp->GetBroadcaster(), true );
@@ -729,7 +729,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
if( pProp )
{
SbxFlagBits nFlags_ = pProp->GetFlags();
- pProp->SetFlag( SBX_NO_BROADCAST );
+ pProp->SetFlag( SbxFlagBits::NoBroadcast );
SbxProperty* pNewProp = new SbxProperty( *pProp );
// Special handling for modules instances and collections, they need
@@ -763,7 +763,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
}
}
- pNewProp->ResetFlag( SBX_NO_BROADCAST );
+ pNewProp->ResetFlag( SbxFlagBits::NoBroadcast );
pNewProp->SetParent( this );
pProps->PutDirect( pNewProp, i );
pProp->SetFlags( nFlags_ );
@@ -805,7 +805,7 @@ SbxVariable* SbClassModuleObject::Find( const OUString& rName, SbxClassType t )
if( pIfaceMapperMethod )
{
pRes = pIfaceMapperMethod->getImplMethod();
- pRes->SetFlag( SBX_EXTFOUND );
+ pRes->SetFlag( SbxFlagBits::ExtFound );
}
}
return pRes;
@@ -946,7 +946,7 @@ StarBASIC::StarBASIC( StarBASIC* p, bool bIsDocBasic )
}
pRtl = new SbiStdObject(OUString(RTLNAME), this );
// Search via StarBasic is always global
- SetFlag( SBX_GBLSEARCH );
+ SetFlag( SbxFlagBits::GlobalSearch );
pVBAGlobals = NULL;
bQuit = false;
@@ -1117,7 +1117,7 @@ void StarBASIC::Insert( SbxVariable* pVar )
{
bool bWasModified = IsModified();
SbxObject::Insert( pVar );
- if( !bWasModified && pVar->IsSet( SBX_DONTSTORE ) )
+ if( !bWasModified && pVar->IsSet( SbxFlagBits::DontStore ) )
{
SetModified( false );
}
@@ -1345,7 +1345,7 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
}
if( pRes )
{
- pRes->SetFlag( SBX_EXTFOUND );
+ pRes->SetFlag( SbxFlagBits::ExtFound );
}
}
// Search module
@@ -1375,8 +1375,8 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
}
// otherwise check if the element is available
// unset GBLSEARCH-Flag (due to Rekursion)
- SbxFlagBits nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
- p->ResetFlag( SBX_GBLSEARCH );
+ SbxFlagBits nGblFlag = p->GetFlags() & SbxFlagBits::GlobalSearch;
+ p->ResetFlag( SbxFlagBits::GlobalSearch );
pRes = p->Find( rName, t );
p->SetFlag( nGblFlag );
if( pRes )
@@ -1949,8 +1949,8 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
}
// End of the hacks!
// Search via StarBASIC is at all times global
- DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic loaded without GBLSEARCH" );
- SetFlag( SBX_GBLSEARCH );
+ DBG_ASSERT( IsSet( SbxFlagBits::GlobalSearch ), "Basic loaded without GBLSEARCH" );
+ SetFlag( SbxFlagBits::GlobalSearch );
return true;
}
@@ -2086,30 +2086,30 @@ void BasicCollection::Initialize()
{
xItemArray = new SbxArray();
SetType( SbxOBJECT );
- SetFlag( SBX_FIXED );
- ResetFlag( SBX_WRITE );
+ SetFlag( SbxFlagBits::Fixed );
+ ResetFlag( SbxFlagBits::Write );
SbxVariable* p;
p = Make( pCountStr, SbxCLASS_PROPERTY, SbxINTEGER );
- p->ResetFlag( SBX_WRITE );
- p->SetFlag( SBX_DONTSTORE );
+ p->ResetFlag( SbxFlagBits::Write );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pAddStr, SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pItemStr, SbxCLASS_METHOD, SbxVARIANT );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pRemoveStr, SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
if ( !xAddInfo.Is() )
{
xAddInfo = new SbxInfo;
- xAddInfo->AddParam( OUString( "Item" ), SbxVARIANT, SBX_READ );
- xAddInfo->AddParam( OUString( "Key" ), SbxVARIANT, SBX_READ | SBX_OPTIONAL );
- xAddInfo->AddParam( OUString( "Before" ), SbxVARIANT, SBX_READ | SBX_OPTIONAL );
- xAddInfo->AddParam( OUString( "After" ), SbxVARIANT, SBX_READ | SBX_OPTIONAL );
+ xAddInfo->AddParam( OUString( "Item" ), SbxVARIANT, SbxFlagBits::Read );
+ xAddInfo->AddParam( OUString( "Key" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional );
+ xAddInfo->AddParam( OUString( "Before" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional );
+ xAddInfo->AddParam( OUString( "After" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional );
}
if ( !xItemInfo.Is() )
{
xItemInfo = new SbxInfo;
- xItemInfo->AddParam( OUString( "Index" ), SbxVARIANT, SBX_READ | SBX_OPTIONAL);
+ xItemInfo->AddParam( OUString( "Index" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional);
}
}
@@ -2276,7 +2276,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
pNewItem->SetName( aKey );
}
}
- pNewItem->SetFlag( SBX_READWRITE );
+ pNewItem->SetFlag( SbxFlagBits::ReadWrite );
xItemArray->Insert32( pNewItem, nNextIndex );
}
else
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 5d484a2ca448..1812ac49af7b 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -669,7 +669,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
{
SbxDimArrayRef xArray = pArray;
SbxFlagBits nFlags = pVar->GetFlags();
- pVar->ResetFlag( SBX_FIXED );
+ pVar->ResetFlag( SbxFlagBits::Fixed );
pVar->PutObject( static_cast<SbxDimArray*>(xArray) );
pVar->SetFlags( nFlags );
}
@@ -799,7 +799,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
// return the Array
SbxFlagBits nFlags = pVar->GetFlags();
- pVar->ResetFlag( SBX_FIXED );
+ pVar->ResetFlag( SbxFlagBits::Fixed );
pVar->PutObject( static_cast<SbxDimArray*>(xArray) );
pVar->SetFlags( nFlags );
@@ -2584,7 +2584,7 @@ SbxInfo* SbUnoMethod::GetInfo()
OUString aParamName = rInfo.aName;
SbxDataType t = SbxVARIANT;
- SbxFlagBits nFlags_ = SBX_READ;
+ SbxFlagBits nFlags_ = SbxFlagBits::Read;
pInfo->AddParam( aParamName, t, nFlags_ );
}
}
@@ -3953,7 +3953,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet
{
// #95792 Avoid a second call
SbxFlagBits nFlags = pVar->GetFlags();
- pVar->SetFlag( SBX_NO_BROADCAST );
+ pVar->SetFlag( SbxFlagBits::NoBroadcast );
*pRet = sbxToUnoValueImpl( pVar );
pVar->SetFlags( nFlags );
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index c584619b1bf4..06ddaddcc92f 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -246,7 +246,7 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >&
sal_uInt16 n = 1;
for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) )
{
- if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != SBX_NONE )
+ if ( pParamInfo->nFlags & SbxFlagBits::Optional )
++nSbxOptional;
else
nSbxOptional = 0;
@@ -271,7 +271,7 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >&
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
- xSbxVar->SetFlag( SBX_FIXED );
+ xSbxVar->SetFlag( SbxFlagBits::Fixed );
}
}
if ( xSbxParams.Is() )
@@ -389,7 +389,7 @@ SbMethodRef DocObjectWrapper::getMethod( const OUString& aName ) throw (RuntimeE
{
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module
- m_pMod->ResetFlag( SBX_GBLSEARCH );
+ m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
pMethod = dynamic_cast<SbMethod*>(m_pMod->SbModule::Find(aName, SbxCLASS_METHOD));
m_pMod->SetFlags( nSaveFlgs );
}
@@ -404,7 +404,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const OUString& aName ) throw (Runt
{
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module.
- m_pMod->ResetFlag( SBX_GBLSEARCH );
+ m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
pProperty = dynamic_cast<SbProperty*>(m_pMod->SbModule::Find(aName, SbxCLASS_PROPERTY));
m_pMod->SetFlag( nSaveFlgs );
}
@@ -486,7 +486,7 @@ SbModule::SbModule( const OUString& rName, bool bVBACompat )
pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false )
{
SetName( rName );
- SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
+ SetFlag( SbxFlagBits::ExtSearch | SbxFlagBits::GlobalSearch );
SetModuleType( script::ModuleType::NORMAL );
// #i92642: Set name property to intitial name
@@ -568,20 +568,20 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
{
pMeth = new SbMethod( rName, t, this );
pMeth->SetParent( this );
- pMeth->SetFlags( SBX_READ );
+ pMeth->SetFlags( SbxFlagBits::Read );
pMethods->Put( pMeth, pMethods->Count() );
StartListening( pMeth->GetBroadcaster(), true );
}
// The method is per default valid, because it could be
// created from the compiler (code generator) as well.
pMeth->bInvalid = false;
- pMeth->ResetFlag( SBX_FIXED );
- pMeth->SetFlag( SBX_WRITE );
+ pMeth->ResetFlag( SbxFlagBits::Fixed );
+ pMeth->SetFlag( SbxFlagBits::Write );
pMeth->SetType( t );
- pMeth->ResetFlag( SBX_WRITE );
+ pMeth->ResetFlag( SbxFlagBits::Write );
if( t != SbxVARIANT )
{
- pMeth->SetFlag( SBX_FIXED );
+ pMeth->SetFlag( SbxFlagBits::Fixed );
}
return pMeth;
}
@@ -599,7 +599,7 @@ SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
if( !pProp )
{
pProp = new SbProperty( rName, t, this );
- pProp->SetFlag( SBX_READWRITE );
+ pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
StartListening( pProp->GetBroadcaster(), true );
@@ -618,7 +618,7 @@ SbProcedureProperty* SbModule::GetProcedureProperty( const OUString& rName, SbxD
if( !pProp )
{
pProp = new SbProcedureProperty( rName, t );
- pProp->SetFlag( SBX_READWRITE );
+ pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
StartListening( pProp->GetBroadcaster(), true );
@@ -638,7 +638,7 @@ SbIfaceMapperMethod* SbModule::GetIfaceMapperMethod( const OUString& rName, SbMe
{
pMapperMethod = new SbIfaceMapperMethod( rName, pImplMeth );
pMapperMethod->SetParent( this );
- pMapperMethod->SetFlags( SBX_READ );
+ pMapperMethod->SetFlags( SbxFlagBits::Read );
pMethods->Put( pMapperMethod, pMethods->Count() );
}
pMapperMethod->bInvalid = false;
@@ -708,16 +708,16 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
SbxObject* pEnumObject = PTR_CAST( SbxObject, pEnumVar );
if( pEnumObject )
{
- bool bPrivate = pEnumObject->IsSet( SBX_PRIVATE );
+ bool bPrivate = pEnumObject->IsSet( SbxFlagBits::Private );
OUString aEnumName = pEnumObject->GetName();
pRes = new SbxVariable( SbxOBJECT );
pRes->SetName( aEnumName );
pRes->SetParent( this );
- pRes->SetFlag( SBX_READ );
+ pRes->SetFlag( SbxFlagBits::Read );
if( bPrivate )
{
- pRes->SetFlag( SBX_PRIVATE );
+ pRes->SetFlag( SbxFlagBits::Private );
}
pRes->PutObject( pEnumObject );
}
@@ -1108,13 +1108,13 @@ void SbModule::Run( SbMethod* pMeth )
StarBASIC* pMSOMacroRuntimeLib = PTR_CAST(StarBASIC,pMSOMacroRuntimeLibVar);
if( pMSOMacroRuntimeLib )
{
- SbxFlagBits nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
- pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH );
+ SbxFlagBits nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SbxFlagBits::GlobalSearch;
+ pMSOMacroRuntimeLib->ResetFlag( SbxFlagBits::GlobalSearch );
SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxCLASS_METHOD );
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
if( pAppSymbol )
{
- pMSOMacroRuntimeLib->SetFlag( SBX_EXTSEARCH ); // Could have been disabled before
+ pMSOMacroRuntimeLib->SetFlag( SbxFlagBits::ExtSearch ); // Could have been disabled before
GetSbData()->pMSOMacroRuntimLib = pMSOMacroRuntimeLib;
}
}
@@ -1633,7 +1633,7 @@ bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( !SbxObject::LoadData( rStrm, 1 ) )
return false;
// As a precaution...
- SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
+ SetFlag( SbxFlagBits::ExtSearch | SbxFlagBits::GlobalSearch );
sal_uInt8 bImage;
rStrm.ReadUChar( bImage );
if( bImage )
@@ -2003,7 +2003,7 @@ SbMethod::SbMethod( const OUString& r, SbxDataType t, SbModule* p )
refStatics = new SbxArray;
mCaller = 0;
// HACK due to 'Referenz could not be saved'
- SetFlag( SBX_NO_MODIFY );
+ SetFlag( SbxFlagBits::NoModify );
}
SbMethod::SbMethod( const SbMethod& r )
@@ -2017,7 +2017,7 @@ SbMethod::SbMethod( const SbMethod& r )
nLine2 = r.nLine2;
refStatics = r.refStatics;
mCaller = r.mCaller;
- SetFlag( SBX_NO_MODIFY );
+ SetFlag( SbxFlagBits::NoModify );
}
SbMethod::~SbMethod()
@@ -2044,7 +2044,7 @@ bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( nVer == 2 )
rStrm.ReadUInt16( nLine1 ).ReadUInt16( nLine2 ).ReadInt16( nTempStart ).ReadCharAsBool( bInvalid );
// HACK ue to 'Referenz could not be saved'
- SetFlag( SBX_NO_MODIFY );
+ SetFlag( SbxFlagBits::NoModify );
nStart = nTempStart;
return true;
}
@@ -2118,7 +2118,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
// #100883 Own Broadcast for SbMethod
void SbMethod::Broadcast( sal_uInt32 nHintId )
{
- if( pCst && !IsSet( SBX_NO_BROADCAST ) )
+ if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{
// Because the method could be called from outside, test here once again
// the authorisation
@@ -2155,7 +2155,7 @@ void SbMethod::Broadcast( sal_uInt32 nHintId )
pSave->Broadcast( SbxHint( nHintId, pThisCopy ) );
SbxFlagBits nSaveFlags = GetFlags();
- SetFlag( SBX_READWRITE );
+ SetFlag( SbxFlagBits::ReadWrite );
pCst = NULL;
Put( pThisCopy->GetValues_Impl() );
pCst = pSave;
@@ -2490,7 +2490,7 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
- xSbxVar->SetFlag( SBX_FIXED );
+ xSbxVar->SetFlag( SbxFlagBits::Fixed );
}
pMeth->SetParameters( xArray );
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index d6d481d78419..7a9dc0223a8f 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -276,12 +276,12 @@ void SbiCodeGen::Save()
if( !pProc->IsPublic() )
{
- pMeth->SetFlag( SBX_PRIVATE );
+ pMeth->SetFlag( SbxFlagBits::Private );
}
// Declare? -> Hidden
if( !pProc->GetLib().isEmpty())
{
- pMeth->SetFlag( SBX_HIDDEN );
+ pMeth->SetFlag( SbxFlagBits::Hidden );
}
pMeth->nStart = pProc->GetAddr();
pMeth->nLine1 = pProc->GetLine1();
@@ -315,10 +315,10 @@ void SbiCodeGen::Save()
t = (SbxDataType) ( t | SbxARRAY );
}
// #33677 hand-over an Optional-Info
- SbxFlagBits nFlags = SBX_READ;
+ SbxFlagBits nFlags = SbxFlagBits::Read;
if( pPar->IsOptional() )
{
- nFlags |= SBX_OPTIONAL;
+ nFlags |= SbxFlagBits::Optional;
}
pInfo->AddParam( pPar->GetName(), t, nFlags );
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 47e878282ec8..b9f7aefe87c5 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -654,7 +654,7 @@ void SbiParser::DefType( bool bPrivate )
SbxFlagBits nSavFlags = pTypeElem->GetFlags();
// need to reset the FIXED flag
// when calling PutObject ( because the type will not match Object )
- pTypeElem->ResetFlag( SBX_FIXED );
+ pTypeElem->ResetFlag( SbxFlagBits::Fixed );
pTypeElem->PutObject( pArray );
pTypeElem->SetFlags( nSavFlags );
}
@@ -710,7 +710,7 @@ void SbiParser::DefEnum( bool bPrivate )
SbxObject *pEnum = new SbxObject( aEnumName );
if( bPrivate )
{
- pEnum->SetFlag( SBX_PRIVATE );
+ pEnum->SetFlag( SbxFlagBits::Private );
}
SbiSymDef* pElem;
SbiDimList* pDim;
@@ -809,8 +809,8 @@ void SbiParser::DefEnum( bool bPrivate )
SbxArray *pEnumMembers = pEnum->GetProperties();
SbxProperty *pEnumElem = new SbxProperty( pElem->GetName(), SbxLONG );
pEnumElem->PutLong( nCurrentEnumValue );
- pEnumElem->ResetFlag( SBX_WRITE );
- pEnumElem->SetFlag( SBX_CONST );
+ pEnumElem->ResetFlag( SbxFlagBits::Write );
+ pEnumElem->SetFlag( SbxFlagBits::Const );
pEnumMembers->Insert( pEnumElem, pEnumMembers->Count() );
}
}
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index d71d9d8524f2..2a3889035547 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -252,7 +252,7 @@ SbError marshal(
std::vector< char > & blob, std::size_t offset, MarshalData & data)
{
OSL_ASSERT(variable != 0);
- if ((variable->GetFlags() & SBX_REFERENCE) == 0) {
+ if (!(variable->GetFlags() & SbxFlagBits::Reference)) {
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
case SbxINTEGER:
@@ -596,7 +596,7 @@ SbError call(
break;
}
for (int i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
- arguments->Get(i)->ResetFlag(SBX_REFERENCE);
+ arguments->Get(i)->ResetFlag(SbxFlagBits::Reference);
//TODO: skipped for errors?!?
}
for (std::vector< UnmarshalData >::iterator i(data.unmarshal.begin());
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 02730189a261..ac73fe47b8de 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -263,7 +263,7 @@ SbError marshal(
OSL_ASSERT(variable != 0);
SbxDataType eVarType = variable->GetType();
- bool bByVal = (variable->GetFlags() & SBX_REFERENCE) == 0;
+ bool bByVal = !(variable->GetFlags() & SbxFlagBits::Reference);
if( !bByVal && !SbiRuntime::isVBAEnabled() && eVarType == SbxSTRING )
bByVal = true;
@@ -550,7 +550,7 @@ SbError call(
break;
}
for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
- arguments->Get(i)->ResetFlag(SBX_REFERENCE);
+ arguments->Get(i)->ResetFlag(SbxFlagBits::Reference);
//TODO: skipped for errors?!?
}
for (std::vector< UnmarshalData >::iterator i(data.unmarshal.begin());
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 6ed4d1cdaadd..f497f715eefe 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4408,7 +4408,7 @@ RTLFUNC(StrConv)
SbxVariable* pNew = new SbxVariable( SbxBYTE );
pNew->PutByte(*pChar);
pChar++;
- pNew->SetFlag( SBX_WRITE );
+ pNew->SetFlag( SbxFlagBits::Write );
short index = i;
if( bIncIndex )
{
@@ -4420,7 +4420,7 @@ RTLFUNC(StrConv)
SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
refVar->SetFlags( nFlags );
refVar->SetParameters( NULL );
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index bb43aa038bc4..4edffe011349 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -834,7 +834,7 @@ RTLFUNC(Array)
{
SbxVariable* pVar = rPar.Get(i+1);
SbxVariable* pNew = new SbxVariable( *pVar );
- pNew->SetFlag( SBX_WRITE );
+ pNew->SetFlag( SbxFlagBits::Write );
short index = static_cast< short >(i);
if ( bIncIndex )
{
@@ -847,7 +847,7 @@ RTLFUNC(Array)
// return array
SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
refVar->SetFlags( nFlags );
refVar->SetParameters( NULL );
@@ -887,7 +887,7 @@ RTLFUNC(DimArray)
}
SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
refVar->SetFlags( nFlags );
refVar->SetParameters( NULL );
@@ -1838,7 +1838,7 @@ RTLFUNC(Split)
// return array
SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
refVar->SetFlags( nFlags );
refVar->SetParameters( NULL );
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 70436709280c..f77bcbc49c89 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -662,7 +662,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
pArray->Put( v, &nDimIndex );
}
SbxVariable* pArrayVar = new SbxVariable( SbxVARIANT );
- pArrayVar->SetFlag( SBX_READWRITE );
+ pArrayVar->SetFlag( SbxFlagBits::ReadWrite );
pArrayVar->PutObject( pArray );
refParams->Put( pArrayVar, i );
@@ -696,7 +696,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
t = SbxOBJECT;
}
SbxVariable* v2 = new SbxVariable( t );
- v2->SetFlag( SBX_READWRITE );
+ v2->SetFlag( SbxFlagBits::ReadWrite );
*v2 = *v;
refParams->Put( v2, i );
}
@@ -732,7 +732,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
SbxDimArray* pArray = new SbxDimArray( SbxVARIANT );
pArray->unoAddDim( 0, -1 );
SbxVariable* pArrayVar = new SbxVariable( SbxVARIANT );
- pArrayVar->SetFlag( SBX_READWRITE );
+ pArrayVar->SetFlag( SbxFlagBits::ReadWrite );
pArrayVar->PutObject( pArray );
refParams->Put( pArrayVar, nParamCount );
}
@@ -1048,13 +1048,13 @@ void SbiRuntime::TOSMakeTemp()
// so set it to NULL now
pDflt->SetParent( NULL );
p = new SbxVariable( *pDflt );
- p->SetFlag( SBX_READWRITE );
+ p->SetFlag( SbxFlagBits::ReadWrite );
refExprStk->Put( p, nExprLvl - 1 );
}
else if( p->GetRefCount() != 1 )
{
SbxVariable* pNew = new SbxVariable( *p );
- pNew->SetFlag( SBX_READWRITE );
+ pNew->SetFlag( SbxFlagBits::ReadWrite );
refExprStk->Put( pNew, nExprLvl - 1 );
}
}
@@ -1328,7 +1328,7 @@ void SbiRuntime::StepArith( SbxOperator eOp )
TOSMakeTemp();
SbxVariable* p2 = GetTOS();
- p2->ResetFlag( SBX_FIXED );
+ p2->ResetFlag( SbxFlagBits::Fixed );
p2->Compute( eOp, *p1 );
checkArithmeticOverflow( p2 );
@@ -1702,12 +1702,12 @@ void SbiRuntime::StepPUT()
SbxVariableRef refVar = PopVar();
// store on its own method (inside a function)?
bool bFlagsChanged = false;
- SbxFlagBits n = SBX_NONE;
+ SbxFlagBits n = SbxFlagBits::NONE;
if( refVar.get() == pMeth )
{
bFlagsChanged = true;
n = refVar->GetFlags();
- refVar->SetFlag( SBX_WRITE );
+ refVar->SetFlag( SbxFlagBits::Write );
}
// if left side arg is an object or variant and right handside isn't
@@ -1854,12 +1854,12 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
else
{
bool bFlagsChanged = false;
- SbxFlagBits n = SBX_NONE;
+ SbxFlagBits n = SbxFlagBits::NONE;
if( refVar.get() == pMeth )
{
bFlagsChanged = true;
n = refVar->GetFlags();
- refVar->SetFlag( SBX_WRITE );
+ refVar->SetFlag( SbxFlagBits::Write );
}
SbProcedureProperty* pProcProperty = PTR_CAST(SbProcedureProperty, refVar.get());
if( pProcProperty )
@@ -1920,14 +1920,14 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
}
// Handle Dim As New
- bool bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW );
+ bool bDimAsNew = bVBAEnabled && refVar->IsSet( SbxFlagBits::DimAsNew );
SbxBaseRef xPrevVarObj;
if( bDimAsNew )
{
xPrevVarObj = refVar->GetObject();
}
// Handle withevents
- bool bWithEvents = refVar->IsSet( SBX_WITH_EVENTS );
+ bool bWithEvents = refVar->IsSet( SbxFlagBits::WithEvents );
if ( bWithEvents )
{
Reference< XInterface > xComListener;
@@ -2058,7 +2058,7 @@ void SbiRuntime::StepLSET()
SbxFlagBits n = refVar->GetFlags();
if( refVar.get() == pMeth )
{
- refVar->SetFlag( SBX_WRITE );
+ refVar->SetFlag( SbxFlagBits::Write );
}
OUString aRefVarString = refVar->GetOUString();
OUString aRefValString = refVal->GetOUString();
@@ -2094,7 +2094,7 @@ void SbiRuntime::StepRSET()
SbxFlagBits n = refVar->GetFlags();
if( refVar.get() == pMeth )
{
- refVar->SetFlag( SBX_WRITE );
+ refVar->SetFlag( SbxFlagBits::Write );
}
OUString aRefVarString = refVar->GetOUString();
OUString aRefValString = refVal->GetOUString();
@@ -2123,10 +2123,10 @@ void SbiRuntime::StepPUTC()
{
SbxVariableRef refVal = PopVar();
SbxVariableRef refVar = PopVar();
- refVar->SetFlag( SBX_WRITE );
+ refVar->SetFlag( SbxFlagBits::Write );
*refVar = *refVal;
- refVar->ResetFlag( SBX_WRITE );
- refVar->SetFlag( SBX_CONST );
+ refVar->ResetFlag( SbxFlagBits::Write );
+ refVar->SetFlag( SbxFlagBits::Const );
}
// DIM
@@ -2168,7 +2168,7 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar )
// allow arrays without dimension information, too (VB-compatible)
if( pDims )
{
- refVar->ResetFlag( SBX_VAR_TO_DIM );
+ refVar->ResetFlag( SbxFlagBits::VarToDim );
for( sal_uInt16 i = 1; i < pDims->Count(); )
{
@@ -2192,7 +2192,7 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar )
pArray->unoAddDim( 0, -1 );
}
SbxFlagBits nSavFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
refVar->SetFlags( nSavFlags );
refVar->SetParameters( NULL );
@@ -2325,7 +2325,7 @@ void SbiRuntime::StepREDIMP_ERASE()
static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
{
SbxFlagBits nSavFlags = refVar->GetFlags();
- refVar->ResetFlag( SBX_FIXED );
+ refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->SetType( SbxDataType(eType & 0x0FFF) );
refVar->SetFlags( nSavFlags );
refVar->Clear();
@@ -2416,7 +2416,7 @@ void SbiRuntime::StepBYVAL()
SbxDataType t = pVar->GetType();
SbxVariable* pCopyVar = new SbxVariable( t );
- pCopyVar->SetFlag( SBX_READWRITE );
+ pCopyVar->SetFlag( SbxFlagBits::ReadWrite );
*pCopyVar = *pVar;
PushVar( pCopyVar );
@@ -2886,17 +2886,17 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 )
{
// Call by Value is requested -> create a copy
pVar = new SbxVariable( *pVar );
- pVar->SetFlag( SBX_READWRITE );
+ pVar->SetFlag( SbxFlagBits::ReadWrite );
refExprStk->Put( pVar, refArgv->Count() - 1 );
}
else
- pVar->SetFlag( SBX_REFERENCE ); // Ref-Flag for DllMgr
+ pVar->SetFlag( SbxFlagBits::Reference ); // Ref-Flag for DllMgr
}
else
{
// parameter is NO reference
if( bByVal )
- pVar->ResetFlag( SBX_REFERENCE ); // no reference -> OK
+ pVar->ResetFlag( SbxFlagBits::Reference ); // no reference -> OK
else
Error( SbERR_BAD_PARAMETERS ); // reference needed
}
@@ -3359,7 +3359,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
StarBASIC* pMSOMacroRuntimeLib = GetSbData()->pMSOMacroRuntimLib;
if( pMSOMacroRuntimeLib != NULL )
{
- pMSOMacroRuntimeLib->ResetFlag( SBX_EXTSEARCH );
+ pMSOMacroRuntimeLib->ResetFlag( SbxFlagBits::ExtSearch );
}
}
@@ -3413,14 +3413,14 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
// #110004, #112015: Make private really private
if( bLocal && pElem ) // Local as flag for global search
{
- if( pElem->IsSet( SBX_PRIVATE ) )
+ if( pElem->IsSet( SbxFlagBits::Private ) )
{
SbiInstance* pInst_ = GetSbData()->pInst;
if( pInst_ && pInst_->IsCompatibility() && pObj != pElem->GetParent() )
{
pElem = NULL; // Found but in wrong module!
}
- // Interfaces: Use SBX_EXTFOUND
+ // Interfaces: Use SbxFlagBits::ExtFound
}
}
rBasic.bNoRtl = bSave;
@@ -3467,8 +3467,8 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
if( pElem )
{
// #63774 May not be saved too!!!
- pElem->SetFlag( SBX_DONTSTORE );
- pElem->SetFlag( SBX_NO_MODIFY);
+ pElem->SetFlag( SbxFlagBits::DontStore );
+ pElem->SetFlag( SbxFlagBits::NoModify);
// #72382 save locally, all variables that have been declared
// implicit would become global automatically otherwise!
@@ -3525,7 +3525,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
pElem = new SbxVariable( t );
if( t != SbxVARIANT )
{
- pElem->SetFlag( SBX_FIXED );
+ pElem->SetFlag( SbxFlagBits::Fixed );
}
pElem->SetName( aName );
refLocals->Put( pElem, refLocals->Count() );
@@ -3544,7 +3544,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
// shall the type be converted?
SbxDataType t2 = pElem->GetType();
bool bSet = false;
- if( (pElem->GetFlags() & SBX_FIXED) == SBX_NONE )
+ if( (pElem->GetFlags() & SbxFlagBits::Fixed) == SbxFlagBits::NONE )
{
if( t != SbxVARIANT && t != t2 &&
t >= SbxINTEGER && t <= SbxSTRING )
@@ -3558,7 +3558,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
// remove potential rests of the last call of the SbxMethod
// free Write before, so that there's no error
SbxFlagBits nSavFlags = pElem->GetFlags();
- pElem->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST );
+ pElem->SetFlag( SbxFlagBits::ReadWrite | SbxFlagBits::NoBroadcast );
pElem->SbxValue::Clear();
pElem->SetFlags( nSavFlags );
@@ -3570,7 +3570,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
//OLD: SbxVariable* pNew = new SbxVariable( *pElem );
pElem->SetParameters(0);
- pNew->SetFlag( SBX_READWRITE );
+ pNew->SetFlag( SbxFlagBits::ReadWrite );
if( bSet )
{
@@ -3973,7 +3973,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
else if( bVBAEnabled ) // !pObj
{
SbxArray* pParam = pElem->GetParameters();
- if( pParam != NULL && !pElem->IsSet( SBX_VAR_TO_DIM ) )
+ if( pParam != NULL && !pElem->IsSet( SbxFlagBits::VarToDim ) )
{
Error( SbERR_NO_OBJECT );
}
@@ -4014,13 +4014,13 @@ void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
SbClassModuleObject* pClassModuleObject = PTR_CAST(SbClassModuleObject,pMod);
if( pClassModuleObject )
{
- pMod->SetFlag( SBX_GBLSEARCH );
+ pMod->SetFlag( SbxFlagBits::GlobalSearch );
}
StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true );
if( pClassModuleObject )
{
- pMod->ResetFlag( SBX_GBLSEARCH );
+ pMod->ResetFlag( SbxFlagBits::GlobalSearch );
}
}
@@ -4106,7 +4106,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
if ( pInfo )
{
const SbxParamInfo* pParam = pInfo->GetParam( i );
- if( pParam && ( (pParam->nFlags & SBX_OPTIONAL) != SBX_NONE ) )
+ if( pParam && ( pParam->nFlags & SbxFlagBits::Optional ) )
{
// Default value?
sal_uInt16 nDefaultId = (sal_uInt16)(pParam->nUserData & 0x0ffff);
@@ -4498,12 +4498,12 @@ void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt3
bool bWithEvents = ((t & 0xff) == SbxOBJECT && (nOp2 & SBX_TYPE_WITH_EVENTS_FLAG) != 0);
if( bWithEvents )
{
- pVar->SetFlag( SBX_WITH_EVENTS );
+ pVar->SetFlag( SbxFlagBits::WithEvents );
}
bool bDimAsNew = ((nOp2 & SBX_TYPE_DIM_AS_NEW_FLAG) != 0);
if( bDimAsNew )
{
- pVar->SetFlag( SBX_DIM_AS_NEW );
+ pVar->SetFlag( SbxFlagBits::DimAsNew );
}
bool bFixedString = ((t & 0xff) == SbxSTRING && (nOp2 & SBX_FIXED_LEN_STRING_FLAG) != 0);
if( bFixedString )
@@ -4517,7 +4517,7 @@ void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt3
bool bVarToDim = ((nOp2 & SBX_TYPE_VAR_TO_DIM_FLAG) != 0);
if( bVarToDim )
{
- pVar->SetFlag( SBX_VAR_TO_DIM );
+ pVar->SetFlag( SbxFlagBits::VarToDim );
}
}
@@ -4546,8 +4546,8 @@ void SbiRuntime::StepPUBLIC_Impl( sal_uInt32 nOp1, sal_uInt32 nOp2, bool bUsedFo
{
OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
SbxDataType t = (SbxDataType)(SbxDataType)(nOp2 & 0xffff);;
- bool bFlag = pMod->IsSet( SBX_NO_MODIFY );
- pMod->SetFlag( SBX_NO_MODIFY );
+ bool bFlag = pMod->IsSet( SbxFlagBits::NoModify );
+ pMod->SetFlag( SbxFlagBits::NoModify );
SbxVariableRef p = pMod->Find( aName, SbxCLASS_PROPERTY );
if( p.Is() )
{
@@ -4556,17 +4556,17 @@ void SbiRuntime::StepPUBLIC_Impl( sal_uInt32 nOp1, sal_uInt32 nOp2, bool bUsedFo
SbProperty* pProp = pMod->GetProperty( aName, t );
if( !bUsedForClassModule )
{
- pProp->SetFlag( SBX_PRIVATE );
+ pProp->SetFlag( SbxFlagBits::Private );
}
if( !bFlag )
{
- pMod->ResetFlag( SBX_NO_MODIFY );
+ pMod->ResetFlag( SbxFlagBits::NoModify );
}
if( pProp )
{
- pProp->SetFlag( SBX_DONTSTORE );
+ pProp->SetFlag( SbxFlagBits::DontStore );
// from 2.7.1996: HACK because of 'reference can't be saved'
- pProp->SetFlag( SBX_NO_MODIFY);
+ pProp->SetFlag( SbxFlagBits::NoModify);
implHandleSbxFlags( pProp, t, nOp2 );
}
@@ -4609,8 +4609,8 @@ void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
pMod->AddVarName( aName );
}
- bool bFlag = pStorage->IsSet( SBX_NO_MODIFY );
- rBasic.SetFlag( SBX_NO_MODIFY );
+ bool bFlag = pStorage->IsSet( SbxFlagBits::NoModify );
+ rBasic.SetFlag( SbxFlagBits::NoModify );
SbxVariableRef p = pStorage->Find( aName, SbxCLASS_PROPERTY );
if( p.Is() )
{
@@ -4619,13 +4619,13 @@ void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
p = pStorage->Make( aName, SbxCLASS_PROPERTY, t );
if( !bFlag )
{
- pStorage->ResetFlag( SBX_NO_MODIFY );
+ pStorage->ResetFlag( SbxFlagBits::NoModify );
}
if( p )
{
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
// from 2.7.1996: HACK because of 'reference can't be saved'
- p->SetFlag( SBX_NO_MODIFY);
+ p->SetFlag( SbxFlagBits::NoModify);
}
}
@@ -4676,7 +4676,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl( OUString& aName, SbxDataType& t )
p = new SbxVariable( t );
if( t != SbxVARIANT )
{
- p->SetFlag( SBX_FIXED );
+ p->SetFlag( SbxFlagBits::Fixed );
}
p->SetName( aName );
pStatics->Put( p, pStatics->Count() );
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index b8deec8a3f69..23d1766ccc91 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -791,7 +791,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
SbxFlagBits nAccess = static_cast<SbxFlagBits>(( p->nArgs & _RWMASK ) >> 8);
short nType = ( p->nArgs & _TYPEMASK );
if( p->nArgs & _CONST )
- nAccess |= SBX_CONST;
+ nAccess |= SbxFlagBits::Const;
OUString aName_ = OUString::createFromAscii( p->pName );
SbxClassType eCT = SbxCLASS_OBJECT;
if( nType & _PROPERTY )
@@ -870,7 +870,7 @@ SbxInfo* SbiStdObject::GetInfo( short nIdx )
SbxFlagBits nFlags_ = static_cast<SbxFlagBits>(( p->nArgs >> 8 ) & 0x03);
if( p->nArgs & _OPT )
{
- nFlags_ |= SBX_OPTIONAL;
+ nFlags_ |= SbxFlagBits::Optional;
}
pInfo_->AddParam( aName_, p->eType, nFlags_ );
}
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index e82db36d1be2..18efe8328c57 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -117,13 +117,13 @@ SbStdPicture::SbStdPicture() :
{
// Properties
SbxVariable* p = Make( OUString("Type"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READ | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_TYPE );
p = Make( OUString("Width"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READ | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_WIDTH );
p = Make( OUString("Height"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READ | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_HEIGHT );
}
@@ -236,19 +236,19 @@ SbStdFont::SbStdFont()
{
// Properties
SbxVariable* p = Make( OUString("Bold"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READWRITE | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_BOLD );
p = Make( OUString("Italic"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READWRITE | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_ITALIC );
p = Make( OUString("StrikeThrough"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READWRITE | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_STRIKETHROUGH );
p = Make( OUString("Underline"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READWRITE | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_UNDERLINE );
p = Make( OUString("Size"), SbxCLASS_PROPERTY, SbxVARIANT );
- p->SetFlags( SBX_READWRITE | SBX_DONTSTORE );
+ p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
p->SetUserData( ATTR_IMP_SIZE );
// handle name property yourself
@@ -403,22 +403,22 @@ SbStdClipboard::SbStdClipboard() :
// register methods
p = Make( OUString("Clear"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_CLEAR );
p = Make( OUString("GetData"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETDATA );
p = Make( OUString("GetFormat"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETFORMAT );
p = Make( OUString("GetText"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_GETTEXT );
p = Make( OUString("SetData"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_SETDATA );
p = Make( OUString("SetText"), SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p->SetUserData( METH_SETTEXT );
}
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 8f2e5e25a86a..37f11e6b2e31 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -44,7 +44,7 @@ SbxArray::SbxArray( SbxDataType t ) : SbxBase()
mpVarEntries = new VarEntriesType;
eType = t;
if( t != SbxVARIANT )
- SetFlag( SBX_FIXED );
+ SetFlag( SbxFlagBits::Fixed );
}
SbxArray::SbxArray( const SbxArray& rArray ) :
@@ -52,7 +52,7 @@ SbxArray::SbxArray( const SbxArray& rArray ) :
{
mpVarEntries = new VarEntriesType;
if( rArray.eType != SbxVARIANT )
- SetFlag( SBX_FIXED );
+ SetFlag( SbxFlagBits::Fixed );
*this = rArray;
}
@@ -207,7 +207,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
if( static_cast<SbxVariable*>(rRef) != pVar )
{
rRef = pVar;
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
}
}
}
@@ -227,7 +227,7 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx )
if( static_cast<SbxVariable*>(rRef) != pVar )
{
rRef = pVar;
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
}
}
}
@@ -286,7 +286,7 @@ void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
{
mpVarEntries->insert( mpVarEntries->begin() + nIdx, p );
}
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
}
void SbxArray::Insert( SbxVariable* pVar, sal_uInt16 nIdx )
@@ -306,7 +306,7 @@ void SbxArray::Remove32( sal_uInt32 nIdx )
SbxVarEntry* pRef = (*mpVarEntries)[nIdx];
mpVarEntries->erase( mpVarEntries->begin() + nIdx );
delete pRef;
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
}
}
@@ -317,7 +317,7 @@ void SbxArray::Remove( sal_uInt16 nIdx )
SbxVarEntry* pRef = (*mpVarEntries)[nIdx];
mpVarEntries->erase( mpVarEntries->begin() + nIdx );
delete pRef;
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
}
}
@@ -398,12 +398,12 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
if (pEntry->mpVar->IsVisible() && pEntry->mpVar->GetUserData() == nData)
{
p = &pEntry->mpVar;
- p->ResetFlag( SBX_EXTFOUND );
+ p->ResetFlag( SbxFlagBits::ExtFound );
break; // JSM 1995-10-06
}
// Did we have an array/object with extended search?
- if (pEntry->mpVar->IsSet(SBX_EXTSEARCH))
+ if (pEntry->mpVar->IsSet(SbxFlagBits::ExtSearch))
{
switch (pEntry->mpVar->GetClass())
{
@@ -411,7 +411,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
{
// Objects are not allowed to scan their parent.
SbxFlagBits nOld = pEntry->mpVar->GetFlags();
- pEntry->mpVar->ResetFlag(SBX_GBLSEARCH);
+ pEntry->mpVar->ResetFlag(SbxFlagBits::GlobalSearch);
p = static_cast<SbxObject&>(*pEntry->mpVar).FindUserData(nData);
pEntry->mpVar->SetFlags(nOld);
}
@@ -426,7 +426,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
if (p)
{
- p->SetFlag(SBX_EXTFOUND);
+ p->SetFlag(SbxFlagBits::ExtFound);
break;
}
}
@@ -443,7 +443,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
sal_uInt32 nCount = mpVarEntries->size();
if( !nCount )
return NULL;
- bool bExtSearch = IsSet( SBX_EXTSEARCH );
+ bool bExtSearch = IsSet( SbxFlagBits::ExtSearch );
sal_uInt16 nHash = SbxVariable::MakeHashCode( rName );
for( sal_uInt32 i = 0; i < nCount; i++ )
{
@@ -458,12 +458,12 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
&& (pEntry->mpVar->GetName().equalsIgnoreAsciiCase(rName)))
{
p = &pEntry->mpVar;
- p->ResetFlag(SBX_EXTFOUND);
+ p->ResetFlag(SbxFlagBits::ExtFound);
break;
}
// Did we have an array/object with extended search?
- if (bExtSearch && pEntry->mpVar->IsSet(SBX_EXTSEARCH))
+ if (bExtSearch && pEntry->mpVar->IsSet(SbxFlagBits::ExtSearch))
{
switch (pEntry->mpVar->GetClass())
{
@@ -471,7 +471,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
{
// Objects are not allowed to scan their parent.
SbxFlagBits nOld = pEntry->mpVar->GetFlags();
- pEntry->mpVar->ResetFlag(SBX_GBLSEARCH);
+ pEntry->mpVar->ResetFlag(SbxFlagBits::GlobalSearch);
p = static_cast<SbxObject&>(*pEntry->mpVar).Find(rName, t);
pEntry->mpVar->SetFlags(nOld);
}
@@ -486,7 +486,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
if (p)
{
- p->SetFlag(SBX_EXTFOUND);
+ p->SetFlag(SbxFlagBits::ExtFound);
break;
}
}
@@ -500,7 +500,7 @@ bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
Clear();
bool bRes = true;
SbxFlagBits f = nFlags;
- nFlags |= SBX_WRITE;
+ nFlags |= SbxFlagBits::Write;
rStrm.ReadUInt16( nElem );
nElem &= 0x7FFF;
for( sal_uInt32 n = 0; n < nElem; n++ )
@@ -533,14 +533,14 @@ bool SbxArray::StoreData( SvStream& rStrm ) const
for( n = 0; n < mpVarEntries->size(); n++ )
{
SbxVarEntry* pEntry = (*mpVarEntries)[n];
- if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
+ if (pEntry->mpVar && !(pEntry->mpVar->GetFlags() & SbxFlagBits::DontStore))
nElem++;
}
rStrm.WriteUInt16( nElem );
for( n = 0; n < mpVarEntries->size(); n++ )
{
SbxVarEntry* pEntry = (*mpVarEntries)[n];
- if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
+ if (pEntry->mpVar && !(pEntry->mpVar->GetFlags() & SbxFlagBits::DontStore))
{
rStrm.WriteUInt16( n );
if (!pEntry->mpVar->Store(rStrm))
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index a1c9149a9c6d..d763e972d680 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -49,7 +49,7 @@ SbxAppData::~SbxAppData()
SbxBase::SbxBase()
{
- nFlags = SBX_READWRITE;
+ nFlags = SbxFlagBits::ReadWrite;
}
SbxBase::SbxBase( const SbxBase& r )
@@ -84,17 +84,17 @@ void SbxBase::Clear()
bool SbxBase::IsFixed() const
{
- return IsSet( SBX_FIXED );
+ return IsSet( SbxFlagBits::Fixed );
}
void SbxBase::SetModified( bool b )
{
- if( IsSet( SBX_NO_MODIFY ) )
+ if( IsSet( SbxFlagBits::NoModify ) )
return;
if( b )
- SetFlag( SBX_MODIFIED );
+ SetFlag( SbxFlagBits::Modified );
else
- ResetFlag( SBX_MODIFIED );
+ ResetFlag( SbxFlagBits::Modified );
}
SbxError SbxBase::GetError()
@@ -206,8 +206,8 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
SbxFlagBits nFlags = static_cast<SbxFlagBits>(nFlagsTmp);
// Correcting a foolishness of mine:
- if( (nFlags & SBX_RESERVED) != SBX_NONE )
- nFlags = ( nFlags & ~SBX_RESERVED ) | SBX_GBLSEARCH;
+ if( nFlags & SbxFlagBits::Reserved )
+ nFlags = ( nFlags & ~SbxFlagBits::Reserved ) | SbxFlagBits::GlobalSearch;
sal_Size nOldPos = rStrm.Tell();
rStrm.ReadUInt32( nSize );
@@ -257,11 +257,11 @@ void SbxBase::Skip( SvStream& rStrm )
bool SbxBase::Store( SvStream& rStrm )
{
- if( ( nFlags & SBX_DONTSTORE ) == SBX_NONE )
+ if( ( nFlags & SbxFlagBits::DontStore ) == SbxFlagBits::NONE )
{
rStrm.WriteUInt32( GetCreator() )
.WriteUInt16( GetSbxId() )
- .WriteUInt16( GetFlags() )
+ .WriteUInt16( static_cast<sal_uInt16>(GetFlags()) )
.WriteUInt16( GetVersion() );
sal_Size nOldPos = rStrm.Tell();
rStrm.WriteUInt32( 0L );
@@ -377,7 +377,7 @@ bool SbxInfo::StoreData( SvStream& rStrm ) const
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, i->aName,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUInt16( i->eType )
- .WriteUInt16( i->nFlags )
+ .WriteUInt16( static_cast<sal_uInt16>(i->nFlags) )
.WriteUInt32( i->nUserData );
}
return true;
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 5b856ee36e7e..8d98977e3ea0 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -74,18 +74,18 @@ void SbxCollection::Clear()
void SbxCollection::Initialize()
{
SetType( SbxOBJECT );
- SetFlag( SBX_FIXED );
- ResetFlag( SBX_WRITE );
+ SetFlag( SbxFlagBits::Fixed );
+ ResetFlag( SbxFlagBits::Write );
SbxVariable* p;
p = Make( pCount , SbxCLASS_PROPERTY, SbxINTEGER );
- p->ResetFlag( SBX_WRITE );
- p->SetFlag( SBX_DONTSTORE );
+ p->ResetFlag( SbxFlagBits::Write );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pAdd, SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pItem , SbxCLASS_METHOD, SbxOBJECT );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pRemove, SbxCLASS_METHOD, SbxEMPTY );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
}
SbxVariable* SbxCollection::FindUserData( sal_uInt32 nData )
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index 4ece552bdf3b..ea843ade22a9 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -291,7 +291,7 @@ static SbxVariable* Element
SbxFlagBits nOld = pObj->GetFlags();
if( pObj == pGbl )
{
- pObj->SetFlag( SBX_GBLSEARCH );
+ pObj->SetFlag( SbxFlagBits::GlobalSearch );
}
refVar = pObj->Find( aSym, t );
pObj->SetFlags( nOld );
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 68be53e1c3f0..64f9557f8f5a 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -106,8 +106,8 @@ SbxObject::~SbxObject()
CheckParentsOnDelete( this, pMethods );
CheckParentsOnDelete( this, pObjs );
- // avoid handling in ~SbxVariable as SBX_DIM_AS_NEW == SBX_GBLSEARCH
- ResetFlag( SBX_DIM_AS_NEW );
+ // avoid handling in ~SbxVariable as SbxFlagBits::DimAsNew == SbxFlagBits::GlobalSearch
+ ResetFlag( SbxFlagBits::DimAsNew );
}
SbxDataType SbxObject::GetType() const
@@ -127,10 +127,10 @@ void SbxObject::Clear()
pObjs = new SbxArray( SbxOBJECT );
SbxVariable* p;
p = Make( pNameProp, SbxCLASS_PROPERTY, SbxSTRING );
- p->SetFlag( SBX_DONTSTORE );
+ p->SetFlag( SbxFlagBits::DontStore );
p = Make( pParentProp, SbxCLASS_PROPERTY, SbxOBJECT );
- p->ResetFlag( SBX_WRITE );
- p->SetFlag( SBX_DONTSTORE );
+ p->ResetFlag( SbxFlagBits::Write );
+ p->SetFlag( SbxFlagBits::DontStore );
pDfltProp = NULL;
SetModified( false );
}
@@ -189,17 +189,17 @@ SbxVariable* SbxObject::FindUserData( sal_uInt32 nData )
pRes = pObjs->FindUserData( nData );
}
// Search in the parents?
- if( !pRes && IsSet( SBX_GBLSEARCH ) )
+ if( !pRes && IsSet( SbxFlagBits::GlobalSearch ) )
{
SbxObject* pCur = this;
while( !pRes && pCur->pParent )
{
// I myself was already searched!
SbxFlagBits nOwn = pCur->GetFlags();
- pCur->ResetFlag( SBX_EXTSEARCH );
+ pCur->ResetFlag( SbxFlagBits::ExtSearch );
// I search already global!
SbxFlagBits nPar = pCur->pParent->GetFlags();
- pCur->pParent->ResetFlag( SBX_GBLSEARCH );
+ pCur->pParent->ResetFlag( SbxFlagBits::GlobalSearch );
pRes = pCur->pParent->FindUserData( nData );
pCur->SetFlags( nOwn );
pCur->pParent->SetFlags( nPar );
@@ -224,7 +224,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
#endif
SbxVariable* pRes = NULL;
- pObjs->SetFlag( SBX_EXTSEARCH );
+ pObjs->SetFlag( SbxFlagBits::ExtSearch );
if( t == SbxCLASS_DONTCARE )
{
pRes = pMethods->Find( rName, SbxCLASS_METHOD );
@@ -258,17 +258,17 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
if( !pRes && ( t == SbxCLASS_METHOD || t == SbxCLASS_PROPERTY ) )
pRes = pObjs->Find( rName, t );
// Search in the parents?
- if( !pRes && IsSet( SBX_GBLSEARCH ) )
+ if( !pRes && IsSet( SbxFlagBits::GlobalSearch ) )
{
SbxObject* pCur = this;
while( !pRes && pCur->pParent )
{
// I myself was already searched!
SbxFlagBits nOwn = pCur->GetFlags();
- pCur->ResetFlag( SBX_EXTSEARCH );
+ pCur->ResetFlag( SbxFlagBits::ExtSearch );
// I search already global!
SbxFlagBits nPar = pCur->pParent->GetFlags();
- pCur->pParent->ResetFlag( SBX_GBLSEARCH );
+ pCur->pParent->ResetFlag( SbxFlagBits::GlobalSearch );
pRes = pCur->pParent->Find( rName, t );
pCur->SetFlags( nOwn );
pCur->pParent->SetFlags( nPar );
@@ -348,7 +348,7 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
{
nArrayIdx = pArray->Count();
// Is the variable per name available?
- pArray->ResetFlag( SBX_EXTSEARCH );
+ pArray->ResetFlag( SbxFlagBits::ExtSearch );
SbxVariable* pOld = pArray->Find( pVar->GetName(), pVar->GetClass() );
if( pOld )
{
@@ -681,7 +681,7 @@ static bool CollectAttrs( const SbxBase* p, OUString& rRes )
{
aAttrs = "Hidden";
}
- if( p->IsSet( SBX_EXTSEARCH ) )
+ if( p->IsSet( SbxFlagBits::ExtSearch ) )
{
if( !aAttrs.isEmpty() )
{
@@ -697,7 +697,7 @@ static bool CollectAttrs( const SbxBase* p, OUString& rRes )
}
aAttrs += "Invisible";
}
- if( p->IsSet( SBX_DONTSTORE ) )
+ if( p->IsSet( SbxFlagBits::DontStore ) )
{
if( !aAttrs.isEmpty() )
{
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index de1c4858239f..b59b6c7a3461 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -284,7 +284,7 @@ SbxArray* StringToByteArray(const OUString& rStr)
SbxVariable* pNew = new SbxVariable( SbxBYTE );
sal_uInt8 aByte = static_cast< sal_uInt8 >( (i%2) ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
pNew->PutByte( aByte );
- pNew->SetFlag( SBX_WRITE );
+ pNew->SetFlag( SbxFlagBits::Write );
pArray->Put( pNew, i );
if( i%2 )
pSrc++;
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 8aff91e2f144..ec52b6d022b7 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -45,7 +45,7 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase()
if( n == SbxVARIANT )
n = SbxEMPTY;
else
- SetFlag( SBX_FIXED );
+ SetFlag( SbxFlagBits::Fixed );
if( p )
{
switch( t & 0x0FFF )
@@ -172,7 +172,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
SbxValue::~SbxValue()
{
Broadcast( SBX_HINT_DYING );
- SetFlag( SBX_WRITE );
+ SetFlag( SbxFlagBits::Write );
SbxValue::Clear();
}
@@ -610,7 +610,7 @@ bool SbxValue::PutStringExt( const OUString& r )
SbxValue aVal;
aVal.Put( aRes );
if( aVal.IsNumeric() )
- SetFlag( SBX_FIXED );
+ SetFlag( SbxFlagBits::Fixed );
}
Put( aRes );
@@ -707,7 +707,7 @@ PUT( PutDecimal, SbxDECIMAL, SbxDecimal*, pDecimal )
bool SbxValue::IsFixed() const
{
- return ((GetFlags() & SBX_FIXED) != SBX_NONE) || ((aData.eType & SbxBYREF) != 0);
+ return (GetFlags() & SbxFlagBits::Fixed) || ((aData.eType & SbxBYREF) != 0);
}
// A variable is numeric, if it is EMPTY or really numeric
@@ -775,7 +775,7 @@ bool SbxValue::SetType( SbxDataType t )
if( ( t & 0x0FFF ) == SbxVARIANT )
{
// Try to set the data type to Variant
- ResetFlag( SBX_FIXED );
+ ResetFlag( SbxFlagBits::Fixed );
if( IsFixed() )
{
SetError( SbxERR_CONVERSION );
@@ -833,7 +833,7 @@ bool SbxValue::Convert( SbxDataType eTo )
if( eTo == SbxVARIANT )
{
// Trial to set the data type to Variant
- ResetFlag( SBX_FIXED );
+ ResetFlag( SbxFlagBits::Fixed );
if( IsFixed() )
{
SetError( SbxERR_CONVERSION );
@@ -1545,7 +1545,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
break;
default:
memset (&aData,0,sizeof(aData));
- ResetFlag(SBX_FIXED);
+ ResetFlag(SbxFlagBits::Fixed);
aData.eType = SbxNULL;
DBG_ASSERT( false, "Loaded a non-supported data type" );
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index bc12ce000fc6..f49a0685406e 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -115,7 +115,7 @@ SbxVariable::SbxVariable( SbxDataType t, void* p ) : SbxValue( t, p )
SbxVariable::~SbxVariable()
{
#if HAVE_FEATURE_SCRIPTING
- if( IsSet( SBX_DIM_AS_NEW ))
+ if( IsSet( SbxFlagBits::DimAsNew ))
{
removeDimAsNewRecoverItem( this );
}
@@ -146,7 +146,7 @@ SbxArray* SbxVariable::GetParameters() const
void SbxVariable::Broadcast( sal_uInt32 nHintId )
{
- if( pCst && !IsSet( SBX_NO_BROADCAST ) )
+ if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{
// Because the method could be called from outside, check the
// rights here again
@@ -173,7 +173,7 @@ void SbxVariable::Broadcast( sal_uInt32 nHintId )
SfxBroadcaster* pSave = pCst;
pCst = NULL;
SbxFlagBits nSaveFlags = GetFlags();
- SetFlag( SBX_READWRITE );
+ SetFlag( SbxFlagBits::ReadWrite );
if( mpPar.Is() )
{
// Register this as element 0, but don't change over the parent!
@@ -257,7 +257,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
{
aTmp += ",";
}
- if( (i->nFlags & SBX_OPTIONAL) != SBX_NONE )
+ if( i->nFlags & SbxFlagBits::Optional )
{
aTmp += OUString( SbxRes( STRING_OPTIONAL ) );
}
@@ -393,7 +393,7 @@ SbxClassType SbxVariable::GetClass() const
void SbxVariable::SetModified( bool b )
{
- if( IsSet( SBX_NO_MODIFY ) )
+ if( IsSet( SbxFlagBits::NoModify ) )
{
return;
}
@@ -596,15 +596,15 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const
// as return-value are saved in the method as a value were saved
SbxVariable* pThis = const_cast<SbxVariable*>(this);
SbxFlagBits nSaveFlags = GetFlags();
- pThis->SetFlag( SBX_WRITE );
+ pThis->SetFlag( SbxFlagBits::Write );
pThis->SbxValue::Clear();
pThis->SetFlags( nSaveFlags );
// So that the method will not be executed in any case!
// CAST, to avoid const!
- pThis->SetFlag( SBX_NO_BROADCAST );
+ pThis->SetFlag( SbxFlagBits::NoBroadcast );
bValStore = SbxValue::StoreData( rStrm );
- pThis->ResetFlag( SBX_NO_BROADCAST );
+ pThis->ResetFlag( SbxFlagBits::NoBroadcast );
}
else
{