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>
This commit is contained in:
parent
833088b180
commit
f107d45381
@ -705,7 +705,7 @@ void ModulWindow::EditMacro( const OUString& rMacroName )
|
|||||||
if ( !m_aStatus.bError )
|
if ( !m_aStatus.bError )
|
||||||
{
|
{
|
||||||
sal_uInt16 nStart, nEnd;
|
sal_uInt16 nStart, nEnd;
|
||||||
SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->Find( rMacroName, SbxCLASS_METHOD ));
|
SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->Find( rMacroName, SbxClassType::Method ));
|
||||||
if ( pMethod )
|
if ( pMethod )
|
||||||
{
|
{
|
||||||
pMethod->GetLineRange( nStart, nEnd );
|
pMethod->GetLineRange( nStart, nEnd );
|
||||||
|
@ -2240,7 +2240,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb
|
|||||||
SbxDimArray* pArray;
|
SbxDimArray* pArray;
|
||||||
if( pObj )
|
if( pObj )
|
||||||
{
|
{
|
||||||
pSBX = pObj->Find( aVName, SbxCLASS_DONTCARE );
|
pSBX = pObj->Find( aVName, SbxClassType::DontCare );
|
||||||
if (SbxVariable const* pVar = IsSbxVariable(pSBX))
|
if (SbxVariable const* pVar = IsSbxVariable(pSBX))
|
||||||
{
|
{
|
||||||
// Force getting value
|
// Force getting value
|
||||||
|
@ -314,7 +314,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
pModule = pBasic->GetModules().front();
|
pModule = pBasic->GetModules().front();
|
||||||
}
|
}
|
||||||
DBG_ASSERT( pModule, "Kein Modul!" );
|
DBG_ASSERT( pModule, "Kein Modul!" );
|
||||||
if ( pModule && !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxCLASS_METHOD ) )
|
if ( pModule && !pModule->GetMethods()->Find( rInfo.GetMethod(), SbxClassType::Method ) )
|
||||||
CreateMacro( pModule, rInfo.GetMethod() );
|
CreateMacro( pModule, rInfo.GetMethod() );
|
||||||
}
|
}
|
||||||
SfxViewFrame* pViewFrame = GetViewFrame();
|
SfxViewFrame* pViewFrame = GetViewFrame();
|
||||||
|
@ -439,7 +439,7 @@ bool HasMethod (
|
|||||||
SbxArray* pMethods = pMod->GetMethods();
|
SbxArray* pMethods = pMod->GetMethods();
|
||||||
if ( pMethods )
|
if ( pMethods )
|
||||||
{
|
{
|
||||||
SbMethod* pMethod = static_cast<SbMethod*>(pMethods->Find( rMethName, SbxCLASS_METHOD ));
|
SbMethod* pMethod = static_cast<SbMethod*>(pMethods->Find( rMethName, SbxClassType::Method ));
|
||||||
if ( pMethod && !pMethod->IsHidden() )
|
if ( pMethod && !pMethod->IsHidden() )
|
||||||
bHasMethod = true;
|
bHasMethod = true;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
|
|||||||
pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES );
|
pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pModule->GetMethods()->Find( rMacroName, SbxCLASS_METHOD ) )
|
if ( pModule->GetMethods()->Find( rMacroName, SbxClassType::Method ) )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
OUString aMacroName( rMacroName );
|
OUString aMacroName( rMacroName );
|
||||||
@ -75,7 +75,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
|
|||||||
aMacroName = "Macro";
|
aMacroName = "Macro";
|
||||||
aMacroName += OUString::number( nMacro );
|
aMacroName += OUString::number( nMacro );
|
||||||
// test whether existing...
|
// test whether existing...
|
||||||
bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) == nullptr;
|
bValid = pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ) == nullptr;
|
||||||
nMacro++;
|
nMacro++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ));
|
SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ));
|
||||||
|
|
||||||
if( pDispatcher )
|
if( pDispatcher )
|
||||||
{
|
{
|
||||||
|
@ -226,7 +226,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pVar = static_cast<SbxObject*>(pVar)->GetMethods()->Find(aName, SbxCLASS_METHOD);
|
pVar = static_cast<SbxObject*>(pVar)->GetMethods()->Find(aName, SbxClassType::Method);
|
||||||
break;
|
break;
|
||||||
case OBJ_TYPE_DIALOG:
|
case OBJ_TYPE_DIALOG:
|
||||||
// sbx dialogs removed
|
// sbx dialogs removed
|
||||||
|
@ -269,7 +269,7 @@ SbMethod* MacroChooser::GetMacro()
|
|||||||
if ( pEntry )
|
if ( pEntry )
|
||||||
{
|
{
|
||||||
OUString aMacroName( m_pMacroBox->GetEntryText( pEntry ) );
|
OUString aMacroName( m_pMacroBox->GetEntryText( pEntry ) );
|
||||||
pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ));
|
pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pMethod;
|
return pMethod;
|
||||||
@ -370,7 +370,7 @@ SbMethod* MacroChooser::CreateMacro()
|
|||||||
}
|
}
|
||||||
|
|
||||||
OUString aSubName = m_pMacroNameEdit->GetText();
|
OUString aSubName = m_pMacroNameEdit->GetText();
|
||||||
DBG_ASSERT( !pModule || !pModule->GetMethods()->Find( aSubName, SbxCLASS_METHOD ), "Macro existiert schon!" );
|
DBG_ASSERT( !pModule || !pModule->GetMethods()->Find( aSubName, SbxClassType::Method ), "Macro existiert schon!" );
|
||||||
pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : nullptr;
|
pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ SbxVariableRef MacroSnippet::Run( const css::uno::Sequence< css::uno::Any >& rAr
|
|||||||
SbxVariableRef pReturn = nullptr;
|
SbxVariableRef pReturn = nullptr;
|
||||||
if ( !Compile() )
|
if ( !Compile() )
|
||||||
return pReturn;
|
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 ( pMeth )
|
||||||
{
|
{
|
||||||
if ( rArgs.getLength() )
|
if ( rArgs.getLength() )
|
||||||
|
@ -1474,7 +1474,7 @@ uno::Any BasicManager::SetGlobalUNOConstant( const OUString& rName, const uno::A
|
|||||||
return aOldValue;
|
return aOldValue;
|
||||||
|
|
||||||
// obtain the old value
|
// obtain the old value
|
||||||
SbxVariable* pVariable = pStandardLib->Find( rName, SbxCLASS_OBJECT );
|
SbxVariable* pVariable = pStandardLib->Find( rName, SbxClassType::Object );
|
||||||
if ( pVariable )
|
if ( pVariable )
|
||||||
aOldValue = sbxToUnoValue( pVariable );
|
aOldValue = sbxToUnoValue( pVariable );
|
||||||
|
|
||||||
@ -1574,7 +1574,7 @@ namespace
|
|||||||
{
|
{
|
||||||
if ( rTransliteration.isEqual( pMod->GetName(), sModule ) )
|
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 )
|
if( pMethod )
|
||||||
{
|
{
|
||||||
return pMethod;
|
return pMethod;
|
||||||
@ -1951,7 +1951,7 @@ sal_Bool DialogContainer_Impl::hasElements()
|
|||||||
uno::Any DialogContainer_Impl::getByName( const OUString& aName )
|
uno::Any DialogContainer_Impl::getByName( const OUString& aName )
|
||||||
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
|
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);
|
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
|
||||||
if( !( pObj && pObj->GetSbxId() == SBXID_DIALOG ) )
|
if( !( pObj && pObj->GetSbxId() == SBXID_DIALOG ) )
|
||||||
{
|
{
|
||||||
@ -1992,7 +1992,7 @@ sal_Bool DialogContainer_Impl::hasByName( const OUString& aName )
|
|||||||
throw(uno::RuntimeException, std::exception)
|
throw(uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
bool bRet = false;
|
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);
|
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
|
||||||
if( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) )
|
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)
|
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
(void)Name;
|
(void)Name;
|
||||||
SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxCLASS_DONTCARE );
|
SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxClassType::DontCare );
|
||||||
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
|
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
|
||||||
if( !( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) ) )
|
if( !( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) ) )
|
||||||
{
|
{
|
||||||
|
@ -275,7 +275,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
|
|||||||
// Search only in the lib, not automatically in application basic
|
// Search only in the lib, not automatically in application basic
|
||||||
SbxFlagBits nFlags = pBasic->GetFlags();
|
SbxFlagBits nFlags = pBasic->GetFlags();
|
||||||
pBasic->ResetFlag( SbxFlagBits::GlobalSearch );
|
pBasic->ResetFlag( SbxFlagBits::GlobalSearch );
|
||||||
pMethVar = pBasic->Find( aMacro, SbxCLASS_DONTCARE );
|
pMethVar = pBasic->Find( aMacro, SbxClassType::DontCare );
|
||||||
pBasic->SetFlags( nFlags );
|
pBasic->SetFlags( nFlags );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
|
|||||||
// Default: Be tolerant and search everywhere
|
// Default: Be tolerant and search everywhere
|
||||||
if( (!pMethVar || nullptr == dynamic_cast<const SbMethod*>( pMethVar)) && maBasicRef.Is() )
|
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 );
|
SbMethod* pMeth = dynamic_cast<SbMethod*>( pMethVar );
|
||||||
if( !pMeth )
|
if( !pMeth )
|
||||||
@ -332,7 +332,7 @@ css::uno::Reference< css::container::XNameContainer > implFindDialogLibForDialog
|
|||||||
{
|
{
|
||||||
css::uno::Reference< css::container::XNameContainer > aRetDlgLib;
|
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) )
|
if( pDlgLibContVar && nullptr != dynamic_cast<const SbUnoObject*>( pDlgLibContVar) )
|
||||||
{
|
{
|
||||||
SbUnoObject* pDlgLibContUnoObj = static_cast<SbUnoObject*>(static_cast<SbxBase*>(pDlgLibContVar));
|
SbUnoObject* pDlgLibContUnoObj = static_cast<SbUnoObject*>(static_cast<SbxBase*>(pDlgLibContVar));
|
||||||
|
@ -299,7 +299,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
|
|||||||
// nested user defined types
|
// nested user defined types
|
||||||
// declared before use, so it is ok to reference it by name on load
|
// declared before use, so it is ok to reference it by name on load
|
||||||
OUString aNestedTypeName = r.ReadUniOrByteString(eCharSet);
|
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)
|
if (pNestedTypeObj)
|
||||||
{
|
{
|
||||||
SbxObject* pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj );
|
SbxObject* pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj );
|
||||||
@ -334,8 +334,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pType->Remove( "Name", SbxCLASS_DONTCARE );
|
pType->Remove( "Name", SbxClassType::DontCare );
|
||||||
pType->Remove( "Parent", SbxCLASS_DONTCARE );
|
pType->Remove( "Parent", SbxClassType::DontCare );
|
||||||
|
|
||||||
AddType(pType);
|
AddType(pType);
|
||||||
}
|
}
|
||||||
@ -674,7 +674,7 @@ OUString SbiImage::GetString( short nId ) const
|
|||||||
|
|
||||||
const SbxObject* SbiImage::FindType (const OUString& aTypeName) 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 )
|
sal_uInt16 SbiImage::CalcLegacyOffset( sal_Int32 nOffset )
|
||||||
|
@ -251,7 +251,7 @@ SbxObject* StarBASIC::getVBAGlobals( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const OUString aVBAHook("VBAGlobals");
|
const OUString aVBAHook("VBAGlobals");
|
||||||
pVBAGlobals = static_cast<SbUnoObject*>(Find( aVBAHook , SbxCLASS_DONTCARE ));
|
pVBAGlobals = static_cast<SbUnoObject*>(Find( aVBAHook , SbxClassType::DontCare ));
|
||||||
}
|
}
|
||||||
return pVBAGlobals;
|
return pVBAGlobals;
|
||||||
}
|
}
|
||||||
@ -504,7 +504,7 @@ SbxObject* SbFormFactory::CreateObject( const OUString& rClassName )
|
|||||||
{
|
{
|
||||||
if( SbModule* pMod = GetSbData()->pMod )
|
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() ) )
|
if( SbUserFormModule* pFormModule = dynamic_cast<SbUserFormModule*>( pVar->GetObject() ) )
|
||||||
{
|
{
|
||||||
@ -685,7 +685,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search for own copy of ImplMethod
|
// 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;
|
SbMethod* pImplMethodCopy = p ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
if( !pImplMethodCopy )
|
if( !pImplMethodCopy )
|
||||||
{
|
{
|
||||||
@ -815,7 +815,7 @@ void SbClassModuleObject::triggerInitializeEvent()
|
|||||||
mbInitializeEventDone = true;
|
mbInitializeEventDone = true;
|
||||||
|
|
||||||
// Search method
|
// Search method
|
||||||
SbxVariable* pMeth = SbxObject::Find("Class_Initialize", SbxCLASS_METHOD);
|
SbxVariable* pMeth = SbxObject::Find("Class_Initialize", SbxClassType::Method);
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
{
|
{
|
||||||
SbxValues aVals;
|
SbxValues aVals;
|
||||||
@ -830,7 +830,7 @@ void SbClassModuleObject::triggerTerminateEvent()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Search method
|
// Search method
|
||||||
SbxVariable* pMeth = SbxObject::Find("Class_Terminate", SbxCLASS_METHOD );
|
SbxVariable* pMeth = SbxObject::Find("Class_Terminate", SbxClassType::Method );
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
{
|
{
|
||||||
SbxValues aVals;
|
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;
|
SbxObject* pRet = nullptr;
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
@ -909,7 +909,7 @@ SbxObject* SbClassFactory::CreateObject( const OUString& rClassName )
|
|||||||
|
|
||||||
SbModule* SbClassFactory::FindClass( 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;
|
SbModule* pMod = pVar ? static_cast<SbModule*>(pVar) : nullptr;
|
||||||
return pMod;
|
return pMod;
|
||||||
}
|
}
|
||||||
@ -1286,7 +1286,7 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
|
|||||||
// but only if SbiRuntime has not set the flag
|
// but only if SbiRuntime has not set the flag
|
||||||
if( !bNoRtl )
|
if( !bNoRtl )
|
||||||
{
|
{
|
||||||
if( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT )
|
if( t == SbxClassType::DontCare || t == SbxClassType::Object )
|
||||||
{
|
{
|
||||||
if( rName.equalsIgnoreAsciiCase( RTLNAME ) )
|
if( rName.equalsIgnoreAsciiCase( RTLNAME ) )
|
||||||
{
|
{
|
||||||
@ -1313,7 +1313,7 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
|
|||||||
// or is the name equal?!?
|
// or is the name equal?!?
|
||||||
if( pModule->GetName().equalsIgnoreAsciiCase( rName ) )
|
if( pModule->GetName().equalsIgnoreAsciiCase( rName ) )
|
||||||
{
|
{
|
||||||
if( t == SbxCLASS_OBJECT || t == SbxCLASS_DONTCARE )
|
if( t == SbxClassType::Object || t == SbxClassType::DontCare )
|
||||||
{
|
{
|
||||||
pRes = pModule.get(); break;
|
pRes = pModule.get(); break;
|
||||||
}
|
}
|
||||||
@ -1340,10 +1340,10 @@ SbxVariable* StarBASIC::Find( const OUString& rName, SbxClassType t )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
OUString aMainStr("Main");
|
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 ) )
|
!pNamed->GetName().equalsIgnoreAsciiCase( aMainStr ) )
|
||||||
{
|
{
|
||||||
pRes = pNamed->Find( aMainStr, SbxCLASS_METHOD );
|
pRes = pNamed->Find( aMainStr, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
if( !pRes )
|
if( !pRes )
|
||||||
{
|
{
|
||||||
@ -1890,12 +1890,12 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// HACK for SFX-Bullshit!
|
// HACK for SFX-Bullshit!
|
||||||
SbxVariable* p = Find( "FALSE", SbxCLASS_PROPERTY );
|
SbxVariable* p = Find( "FALSE", SbxClassType::Property );
|
||||||
if( p )
|
if( p )
|
||||||
{
|
{
|
||||||
Remove( p );
|
Remove( p );
|
||||||
}
|
}
|
||||||
p = Find( "TRUE", SbxCLASS_PROPERTY );
|
p = Find( "TRUE", SbxClassType::Property );
|
||||||
if( p )
|
if( p )
|
||||||
{
|
{
|
||||||
Remove( p );
|
Remove( p );
|
||||||
@ -1928,7 +1928,7 @@ bool StarBASIC::StoreData( SvStream& r ) const
|
|||||||
bool StarBASIC::GetUNOConstant( const OUString& rName, css::uno::Any& aOut )
|
bool StarBASIC::GetUNOConstant( const OUString& rName, css::uno::Any& aOut )
|
||||||
{
|
{
|
||||||
bool bRes = false;
|
bool bRes = false;
|
||||||
SbUnoObject* pGlobs = dynamic_cast<SbUnoObject*>( Find( rName, SbxCLASS_DONTCARE ) );
|
SbUnoObject* pGlobs = dynamic_cast<SbUnoObject*>( Find( rName, SbxClassType::DontCare ) );
|
||||||
if ( pGlobs )
|
if ( pGlobs )
|
||||||
{
|
{
|
||||||
aOut = pGlobs->getUnoAny();
|
aOut = pGlobs->getUnoAny();
|
||||||
@ -1953,7 +1953,7 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic )
|
|||||||
SbxObject* pLookup = pBasic->GetParent();
|
SbxObject* pLookup = pBasic->GetParent();
|
||||||
while ( pLookup && !pThisComponent )
|
while ( pLookup && !pThisComponent )
|
||||||
{
|
{
|
||||||
pThisComponent = pLookup->Find( sThisComponent, SbxCLASS_OBJECT );
|
pThisComponent = pLookup->Find( sThisComponent, SbxClassType::Object );
|
||||||
pLookup = pLookup->GetParent();
|
pLookup = pLookup->GetParent();
|
||||||
}
|
}
|
||||||
if ( !pThisComponent )
|
if ( !pThisComponent )
|
||||||
@ -2040,14 +2040,14 @@ void BasicCollection::Initialize()
|
|||||||
SetFlag( SbxFlagBits::Fixed );
|
SetFlag( SbxFlagBits::Fixed );
|
||||||
ResetFlag( SbxFlagBits::Write );
|
ResetFlag( SbxFlagBits::Write );
|
||||||
SbxVariable* p;
|
SbxVariable* p;
|
||||||
p = Make( pCountStr, SbxCLASS_PROPERTY, SbxINTEGER );
|
p = Make( pCountStr, SbxClassType::Property, SbxINTEGER );
|
||||||
p->ResetFlag( SbxFlagBits::Write );
|
p->ResetFlag( SbxFlagBits::Write );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pAddStr, SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( pAddStr, SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pItemStr, SbxCLASS_METHOD, SbxVARIANT );
|
p = Make( pItemStr, SbxClassType::Method, SbxVARIANT );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pRemoveStr, SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( pRemoveStr, SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
if ( !xAddInfo.Is() )
|
if ( !xAddInfo.Is() )
|
||||||
{
|
{
|
||||||
|
@ -2313,8 +2313,8 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ )
|
|||||||
static Reference< XIntrospection > xIntrospection;
|
static Reference< XIntrospection > xIntrospection;
|
||||||
|
|
||||||
// beat out again the default properties of Sbx
|
// beat out again the default properties of Sbx
|
||||||
Remove( "Name", SbxCLASS_DONTCARE );
|
Remove( "Name", SbxClassType::DontCare );
|
||||||
Remove( "Parent", SbxCLASS_DONTCARE );
|
Remove( "Parent", SbxClassType::DontCare );
|
||||||
|
|
||||||
// check the type of the objects
|
// check the type of the objects
|
||||||
TypeClass eType = aUnoObj_.getValueType().getTypeClass();
|
TypeClass eType = aUnoObj_.getValueType().getTypeClass();
|
||||||
@ -2760,7 +2760,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
implCreateDbgProperties();
|
implCreateDbgProperties();
|
||||||
|
|
||||||
// Now they have to be found regular
|
// Now they have to be found regular
|
||||||
pRes = SbxObject::Find( rName, SbxCLASS_DONTCARE );
|
pRes = SbxObject::Find( rName, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pRes;
|
return pRes;
|
||||||
@ -3375,7 +3375,7 @@ SbUnoClass* findUnoClass( const OUString& rName )
|
|||||||
|
|
||||||
SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType )
|
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 nothing were located the submodule isn't known yet
|
||||||
if( !pRes )
|
if( !pRes )
|
||||||
@ -3529,7 +3529,7 @@ SbUnoService* findUnoService( const OUString& rName )
|
|||||||
|
|
||||||
SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
|
SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
|
||||||
{
|
{
|
||||||
SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_METHOD );
|
SbxVariable* pRes = SbxObject::Find( rName, SbxClassType::Method );
|
||||||
|
|
||||||
if( !pRes )
|
if( !pRes )
|
||||||
{
|
{
|
||||||
@ -3561,7 +3561,7 @@ SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType )
|
|||||||
QuickInsert( static_cast<SbxVariable*>(xSbCtorRef) );
|
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 += m_aPrefix;
|
||||||
aPropertyFunctionName += rProperty;
|
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;
|
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
if( pMeth == nullptr )
|
if( pMeth == nullptr )
|
||||||
{
|
{
|
||||||
@ -4361,7 +4361,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty)
|
|||||||
aPropertyFunctionName += m_aPrefix;
|
aPropertyFunctionName += m_aPrefix;
|
||||||
aPropertyFunctionName += rProperty;
|
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;
|
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
if( pMeth == 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;
|
SbMethod* pMeth = p != nullptr ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
if( pMeth == nullptr )
|
if( pMeth == nullptr )
|
||||||
{
|
{
|
||||||
@ -4696,7 +4696,7 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal )
|
|||||||
// Only for native COM objects
|
// Only for native COM objects
|
||||||
if( pUnoObj->isNativeCOMObject() )
|
if( pUnoObj->isNativeCOMObject() )
|
||||||
{
|
{
|
||||||
SbxVariableRef pMeth = pObj->Find( "toString", SbxCLASS_METHOD );
|
SbxVariableRef pMeth = pObj->Find( "toString", SbxClassType::Method );
|
||||||
if ( pMeth.Is() )
|
if ( pMeth.Is() )
|
||||||
{
|
{
|
||||||
SbxValues aRes;
|
SbxValues aRes;
|
||||||
@ -4821,7 +4821,7 @@ SbxVariable* SbUnoStructRefObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
implCreateDbgProperties();
|
implCreateDbgProperties();
|
||||||
|
|
||||||
// Now they have to be found regular
|
// Now they have to be found regular
|
||||||
pRes = SbxObject::Find( rName, SbxCLASS_DONTCARE );
|
pRes = SbxObject::Find( rName, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ SbMethodRef DocObjectWrapper::getMethod( const OUString& aName ) throw (RuntimeE
|
|||||||
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
|
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
|
||||||
// Limit search to this module
|
// Limit search to this module
|
||||||
m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
|
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 );
|
m_pMod->SetFlags( nSaveFlgs );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const OUString& aName ) throw (Runt
|
|||||||
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
|
SbxFlagBits nSaveFlgs = m_pMod->GetFlags();
|
||||||
// Limit search to this module.
|
// Limit search to this module.
|
||||||
m_pMod->ResetFlag( SbxFlagBits::GlobalSearch );
|
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 );
|
m_pMod->SetFlag( nSaveFlgs );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ SbModule::SbModule( const OUString& rName, bool bVBACompat )
|
|||||||
SetModuleType( script::ModuleType::NORMAL );
|
SetModuleType( script::ModuleType::NORMAL );
|
||||||
|
|
||||||
// #i92642: Set name property to intitial name
|
// #i92642: Set name property to intitial name
|
||||||
SbxVariable* pNameProp = pProps->Find( "Name", SbxCLASS_PROPERTY );
|
SbxVariable* pNameProp = pProps->Find( "Name", SbxClassType::Property );
|
||||||
if( pNameProp != nullptr )
|
if( pNameProp != nullptr )
|
||||||
{
|
{
|
||||||
pNameProp->PutString( GetName() );
|
pNameProp->PutString( GetName() );
|
||||||
@ -551,7 +551,7 @@ void SbModule::StartDefinitions()
|
|||||||
|
|
||||||
SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
|
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;
|
SbMethod* pMeth = p ? dynamic_cast<SbMethod*>( p ) : nullptr;
|
||||||
if( p && !pMeth )
|
if( p && !pMeth )
|
||||||
{
|
{
|
||||||
@ -583,7 +583,7 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
|
|||||||
|
|
||||||
SbProperty* SbModule::GetProperty( 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;
|
SbProperty* pProp = p ? dynamic_cast<SbProperty*>( p ) : nullptr;
|
||||||
if( p && !pProp )
|
if( p && !pProp )
|
||||||
{
|
{
|
||||||
@ -602,7 +602,7 @@ SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
|
|||||||
|
|
||||||
void SbModule::GetProcedureProperty( 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;
|
SbProcedureProperty* pProp = p ? dynamic_cast<SbProcedureProperty*>( p ) : nullptr;
|
||||||
if( p && !pProp )
|
if( p && !pProp )
|
||||||
{
|
{
|
||||||
@ -620,7 +620,7 @@ void SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
|
|||||||
|
|
||||||
void SbModule::GetIfaceMapperMethod( const OUString& rName, SbMethod* pImplMeth )
|
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;
|
SbIfaceMapperMethod* pMapperMethod = p ? dynamic_cast<SbIfaceMapperMethod*>( p ) : nullptr;
|
||||||
if( p && !pMapperMethod )
|
if( p && !pMapperMethod )
|
||||||
{
|
{
|
||||||
@ -693,7 +693,7 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
|
|||||||
SbxArrayRef xArray = pImage->GetEnums();
|
SbxArrayRef xArray = pImage->GetEnums();
|
||||||
if( xArray.Is() )
|
if( xArray.Is() )
|
||||||
{
|
{
|
||||||
SbxVariable* pEnumVar = xArray->Find( rName, SbxCLASS_DONTCARE );
|
SbxVariable* pEnumVar = xArray->Find( rName, SbxClassType::DontCare );
|
||||||
SbxObject* pEnumObject = dynamic_cast<SbxObject*>( pEnumVar );
|
SbxObject* pEnumObject = dynamic_cast<SbxObject*>( pEnumVar );
|
||||||
if( pEnumObject )
|
if( pEnumObject )
|
||||||
{
|
{
|
||||||
@ -746,7 +746,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||||||
OUString aProcName("Property Get ");
|
OUString aProcName("Property Get ");
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
|
|
||||||
SbxVariable* pMethVar = Find( aProcName, SbxCLASS_METHOD );
|
SbxVariable* pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
if( pMethVar )
|
if( pMethVar )
|
||||||
{
|
{
|
||||||
SbxValues aVals;
|
SbxValues aVals;
|
||||||
@ -787,13 +787,13 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
|
|||||||
|
|
||||||
OUString aProcName("Property Set ");
|
OUString aProcName("Property Set ");
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
pMethVar = Find( aProcName, SbxCLASS_METHOD );
|
pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
if( !pMethVar ) // Let
|
if( !pMethVar ) // Let
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Let " );
|
OUString aProcName("Property Let " );
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
pMethVar = Find( aProcName, SbxCLASS_METHOD );
|
pMethVar = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pMethVar )
|
if( pMethVar )
|
||||||
@ -979,25 +979,25 @@ static void SendHint( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
|
|||||||
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
|
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
|
||||||
{
|
{
|
||||||
// delete the return value of CreateUnoService
|
// delete the return value of CreateUnoService
|
||||||
SbxVariable* pVar = pBasic->GetRtl()->Find( "CreateUnoService", SbxCLASS_METHOD );
|
SbxVariable* pVar = pBasic->GetRtl()->Find( "CreateUnoService", SbxClassType::Method );
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->SbxValue::Clear();
|
pVar->SbxValue::Clear();
|
||||||
}
|
}
|
||||||
// delete the return value of CreateUnoDialog
|
// delete the return value of CreateUnoDialog
|
||||||
pVar = pBasic->GetRtl()->Find( "CreateUnoDialog", SbxCLASS_METHOD );
|
pVar = pBasic->GetRtl()->Find( "CreateUnoDialog", SbxClassType::Method );
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->SbxValue::Clear();
|
pVar->SbxValue::Clear();
|
||||||
}
|
}
|
||||||
// delete the return value of CDec
|
// delete the return value of CDec
|
||||||
pVar = pBasic->GetRtl()->Find( "CDec", SbxCLASS_METHOD );
|
pVar = pBasic->GetRtl()->Find( "CDec", SbxClassType::Method );
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->SbxValue::Clear();
|
pVar->SbxValue::Clear();
|
||||||
}
|
}
|
||||||
// delete return value of CreateObject
|
// delete return value of CreateObject
|
||||||
pVar = pBasic->GetRtl()->Find( "CreateObject", SbxCLASS_METHOD );
|
pVar = pBasic->GetRtl()->Find( "CreateObject", SbxClassType::Method );
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->SbxValue::Clear();
|
pVar->SbxValue::Clear();
|
||||||
@ -1090,7 +1090,7 @@ void SbModule::Run( SbMethod* pMeth )
|
|||||||
// Launcher problem
|
// Launcher problem
|
||||||
// i80726 The Find below will generate an error in Testtool so we reset it unless there was one before already
|
// 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;
|
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) )
|
if ( !bWasError && (SbxBase::GetError() == ERRCODE_SBX_PROC_UNDEFINED) )
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
if( pMSOMacroRuntimeLibVar )
|
if( pMSOMacroRuntimeLibVar )
|
||||||
@ -1100,7 +1100,7 @@ void SbModule::Run( SbMethod* pMeth )
|
|||||||
{
|
{
|
||||||
SbxFlagBits nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SbxFlagBits::GlobalSearch;
|
SbxFlagBits nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SbxFlagBits::GlobalSearch;
|
||||||
pMSOMacroRuntimeLib->ResetFlag( SbxFlagBits::GlobalSearch );
|
pMSOMacroRuntimeLib->ResetFlag( SbxFlagBits::GlobalSearch );
|
||||||
SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxCLASS_METHOD );
|
SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxClassType::Method );
|
||||||
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
|
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
|
||||||
if( pAppSymbol )
|
if( pAppSymbol )
|
||||||
{
|
{
|
||||||
@ -1308,7 +1308,7 @@ void SbModule::RemoveVars()
|
|||||||
// We don't want a Find being called in a derived class ( e.g.
|
// We don't want a Find being called in a derived class ( e.g.
|
||||||
// SbUserform because it could trigger say an initialise event
|
// 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 )
|
// 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() )
|
if( p.Is() )
|
||||||
Remove (p);
|
Remove (p);
|
||||||
}
|
}
|
||||||
@ -1875,7 +1875,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
|
|||||||
OUString aProcName("Property Get ");
|
OUString aProcName("Property Get ");
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
|
|
||||||
SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD );
|
SbxVariable* pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
{
|
{
|
||||||
SbxValues aVals;
|
SbxValues aVals;
|
||||||
@ -1916,13 +1916,13 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
|
|||||||
|
|
||||||
OUString aProcName("Property Set " );
|
OUString aProcName("Property Set " );
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
pMeth = Find( aProcName, SbxCLASS_METHOD );
|
pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
if( !pMeth ) // Let
|
if( !pMeth ) // Let
|
||||||
{
|
{
|
||||||
OUString aProcName("Property Let " );
|
OUString aProcName("Property Let " );
|
||||||
aProcName += pProcProperty->GetName();
|
aProcName += pProcProperty->GetName();
|
||||||
pMeth = Find( aProcName, SbxCLASS_METHOD );
|
pMeth = Find( aProcName, SbxClassType::Method );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
@ -2479,7 +2479,7 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
|
|||||||
{
|
{
|
||||||
SAL_INFO("basic", "*** trigger " << OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() << " ***");
|
SAL_INFO("basic", "*** trigger " << OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() << " ***");
|
||||||
// Search method
|
// Search method
|
||||||
SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
|
SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxClassType::Method );
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
{
|
{
|
||||||
if ( aArguments.getLength() > 0 ) // Setup parameters
|
if ( aArguments.getLength() > 0 ) // Setup parameters
|
||||||
@ -2619,7 +2619,7 @@ void SbUserFormModule::Unload()
|
|||||||
triggerTerminateEvent();
|
triggerTerminateEvent();
|
||||||
}
|
}
|
||||||
// Search method
|
// Search method
|
||||||
SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxCLASS_METHOD );
|
SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxClassType::Method );
|
||||||
if( pMeth )
|
if( pMeth )
|
||||||
{
|
{
|
||||||
SAL_INFO("basic", "Attempting too run the UnloadObjectMethod");
|
SAL_INFO("basic", "Attempting too run the UnloadObjectMethod");
|
||||||
@ -2647,7 +2647,7 @@ void SbUserFormModule::InitObject()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
OUString aHook("VBAGlobals");
|
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 )
|
if ( m_xModel.is() && pGlobs )
|
||||||
{
|
{
|
||||||
// broadcast INITIALIZE_USERFORM script event before the dialog is created
|
// broadcast INITIALIZE_USERFORM script event before the dialog is created
|
||||||
|
@ -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;
|
eType = SbxLONG;
|
||||||
break;
|
break;
|
||||||
@ -406,7 +406,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
|
|||||||
if( !bCompatible && !pDef->IsNew() )
|
if( !bCompatible && !pDef->IsNew() )
|
||||||
{
|
{
|
||||||
OUString aTypeName( aGblStrings.Find( pDef->GetTypeId() ) );
|
OUString aTypeName( aGblStrings.Find( pDef->GetTypeId() ) );
|
||||||
if( rTypeArray->Find( aTypeName, SbxCLASS_OBJECT ) == nullptr )
|
if( rTypeArray->Find( aTypeName, SbxClassType::Object ) == nullptr )
|
||||||
{
|
{
|
||||||
if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
|
if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
|
||||||
{
|
{
|
||||||
@ -581,7 +581,7 @@ void SbiParser::DefType( bool bPrivate )
|
|||||||
if (!TestSymbol())
|
if (!TestSymbol())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rTypeArray->Find(aSym,SbxCLASS_OBJECT))
|
if (rTypeArray->Find(aSym,SbxClassType::Object))
|
||||||
{
|
{
|
||||||
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
|
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
|
||||||
return;
|
return;
|
||||||
@ -616,7 +616,7 @@ void SbiParser::DefType( bool bPrivate )
|
|||||||
{
|
{
|
||||||
SbxArray *pTypeMembers = pType->GetProperties();
|
SbxArray *pTypeMembers = pType->GetProperties();
|
||||||
OUString aElemName = pElem->GetName();
|
OUString aElemName = pElem->GetName();
|
||||||
if( pTypeMembers->Find( aElemName, SbxCLASS_DONTCARE) )
|
if( pTypeMembers->Find( aElemName, SbxClassType::DontCare) )
|
||||||
{
|
{
|
||||||
Error (ERRCODE_BASIC_VAR_DEFINED);
|
Error (ERRCODE_BASIC_VAR_DEFINED);
|
||||||
}
|
}
|
||||||
@ -666,7 +666,7 @@ void SbiParser::DefType( bool bPrivate )
|
|||||||
if( nElemTypeId != 0 )
|
if( nElemTypeId != 0 )
|
||||||
{
|
{
|
||||||
OUString aTypeName( aGblStrings.Find( nElemTypeId ) );
|
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 )
|
if( pTypeObj != nullptr )
|
||||||
{
|
{
|
||||||
SbxObject* pCloneObj = cloneTypeObjectImpl( *pTypeObj );
|
SbxObject* pCloneObj = cloneTypeObjectImpl( *pTypeObj );
|
||||||
@ -679,8 +679,8 @@ void SbiParser::DefType( bool bPrivate )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pType->Remove( "Name", SbxCLASS_DONTCARE );
|
pType->Remove( "Name", SbxClassType::DontCare );
|
||||||
pType->Remove( "Parent", SbxCLASS_DONTCARE );
|
pType->Remove( "Parent", SbxClassType::DontCare );
|
||||||
|
|
||||||
rTypeArray->Insert (pType,rTypeArray->Count());
|
rTypeArray->Insert (pType,rTypeArray->Count());
|
||||||
}
|
}
|
||||||
@ -700,7 +700,7 @@ void SbiParser::DefEnum( bool bPrivate )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
OUString aEnumName = aSym;
|
OUString aEnumName = aSym;
|
||||||
if( rEnumArray->Find(aEnumName,SbxCLASS_OBJECT) )
|
if( rEnumArray->Find(aEnumName,SbxClassType::Object) )
|
||||||
{
|
{
|
||||||
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
|
Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
|
||||||
return;
|
return;
|
||||||
@ -811,8 +811,8 @@ void SbiParser::DefEnum( bool bPrivate )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pEnum->Remove( "Name", SbxCLASS_DONTCARE );
|
pEnum->Remove( "Name", SbxClassType::DontCare );
|
||||||
pEnum->Remove( "Parent", SbxCLASS_DONTCARE );
|
pEnum->Remove( "Parent", SbxClassType::DontCare );
|
||||||
|
|
||||||
rEnumArray->Insert( pEnum, rEnumArray->Count() );
|
rEnumArray->Insert( pEnum, rEnumArray->Count() );
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
|||||||
// #i109184: Check if symbol is or later will be defined inside module
|
// #i109184: Check if symbol is or later will be defined inside module
|
||||||
SbModule& rMod = pParser->aGen.GetModule();
|
SbModule& rMod = pParser->aGen.GetModule();
|
||||||
SbxArray* pModMethods = rMod.GetMethods();
|
SbxArray* pModMethods = rMod.GetMethods();
|
||||||
if( pModMethods->Find( aSym, SbxCLASS_DONTCARE ) )
|
if( pModMethods->Find( aSym, SbxClassType::DontCare ) )
|
||||||
{
|
{
|
||||||
pDef = nullptr;
|
pDef = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
|
|||||||
// part of the runtime-library?
|
// part of the runtime-library?
|
||||||
SbiSymDef* SbiParser::CheckRTLForSym(const OUString& rSym, SbxDataType eType)
|
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)
|
if (!pVar)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -4414,7 +4414,7 @@ RTLFUNC(Load)
|
|||||||
}
|
}
|
||||||
else if (SbxObject* pSbxObj = dynamic_cast<SbxObject*>(pObj))
|
else if (SbxObject* pSbxObj = dynamic_cast<SbxObject*>(pObj))
|
||||||
{
|
{
|
||||||
SbxVariable* pVar = pSbxObj->Find("Load", SbxCLASS_METHOD);
|
SbxVariable* pVar = pSbxObj->Find("Load", SbxClassType::Method);
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->GetInteger();
|
pVar->GetInteger();
|
||||||
@ -4445,7 +4445,7 @@ RTLFUNC(Unload)
|
|||||||
}
|
}
|
||||||
else if (SbxObject *pSbxObj = dynamic_cast<SbxObject*>(pObj))
|
else if (SbxObject *pSbxObj = dynamic_cast<SbxObject*>(pObj))
|
||||||
{
|
{
|
||||||
SbxVariable* pVar = pSbxObj->Find("Unload", SbxCLASS_METHOD);
|
SbxVariable* pVar = pSbxObj->Find("Unload", SbxClassType::Method);
|
||||||
if( pVar )
|
if( pVar )
|
||||||
{
|
{
|
||||||
pVar->GetInteger();
|
pVar->GetInteger();
|
||||||
|
@ -143,7 +143,7 @@ RTLFUNC(CallByName)
|
|||||||
sal_Int16 nCallType = rPar.Get(3)->GetInteger();
|
sal_Int16 nCallType = rPar.Get(3)->GetInteger();
|
||||||
|
|
||||||
//SbxObject* pFindObj = NULL;
|
//SbxObject* pFindObj = NULL;
|
||||||
SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_DONTCARE );
|
SbxVariable* pFindVar = pObj->Find( aNameStr, SbxClassType::DontCare );
|
||||||
if( pFindVar == nullptr )
|
if( pFindVar == nullptr )
|
||||||
{
|
{
|
||||||
StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED );
|
StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED );
|
||||||
@ -971,7 +971,7 @@ RTLFUNC(FindPropertyObject)
|
|||||||
SbxObject* pFindObj = nullptr;
|
SbxObject* pFindObj = nullptr;
|
||||||
if( pObj )
|
if( pObj )
|
||||||
{
|
{
|
||||||
SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_OBJECT );
|
SbxVariable* pFindVar = pObj->Find( aNameStr, SbxClassType::Object );
|
||||||
pFindObj = dynamic_cast<SbxObject*>( pFindVar );
|
pFindObj = dynamic_cast<SbxObject*>( pFindVar );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3178,7 +3178,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const OUString& aClass )
|
|||||||
SbClassData* pClassData;
|
SbClassData* pClassData;
|
||||||
if( pClassMod && (pClassData=pClassMod->pClassData) != nullptr )
|
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);
|
bRet = (pClassVar != nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3357,20 +3357,20 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
|
|||||||
{
|
{
|
||||||
if ( pMeth )
|
if ( pMeth )
|
||||||
{
|
{
|
||||||
pElem = pMeth->GetStatics()->Find( aName, SbxCLASS_DONTCARE );
|
pElem = pMeth->GetStatics()->Find( aName, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !pElem )
|
if ( !pElem )
|
||||||
{
|
{
|
||||||
pElem = refLocals->Find( aName, SbxCLASS_DONTCARE );
|
pElem = refLocals->Find( aName, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !pElem )
|
if( !pElem )
|
||||||
{
|
{
|
||||||
bool bSave = rBasic.bNoRtl;
|
bool bSave = rBasic.bNoRtl;
|
||||||
rBasic.bNoRtl = true;
|
rBasic.bNoRtl = true;
|
||||||
pElem = pObj->Find( aName, SbxCLASS_DONTCARE );
|
pElem = pObj->Find( aName, SbxClassType::DontCare );
|
||||||
|
|
||||||
// #110004, #112015: Make private really private
|
// #110004, #112015: Make private really private
|
||||||
if( bLocal && pElem ) // Local as flag for global search
|
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 )
|
if ( bVBAEnabled )
|
||||||
{
|
{
|
||||||
// Try Find in VBA symbols space
|
// Try Find in VBA symbols space
|
||||||
pElem = rBasic.VBAFind( aName, SbxCLASS_DONTCARE );
|
pElem = rBasic.VBAFind( aName, SbxClassType::DontCare );
|
||||||
if ( pElem )
|
if ( pElem )
|
||||||
{
|
{
|
||||||
bSetName = false; // don't overwrite uno name
|
bSetName = false; // don't overwrite uno name
|
||||||
@ -3571,7 +3571,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
|
|||||||
}
|
}
|
||||||
if( refLocals )
|
if( refLocals )
|
||||||
{
|
{
|
||||||
pElem = refLocals->Find( rName, SbxCLASS_DONTCARE );
|
pElem = refLocals->Find( rName, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
if ( !pElem && pMeth )
|
if ( !pElem && pMeth )
|
||||||
{
|
{
|
||||||
@ -3579,7 +3579,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
|
|||||||
OUString aMethName = pMeth->GetName();
|
OUString aMethName = pMeth->GetName();
|
||||||
aMethName += ":";
|
aMethName += ":";
|
||||||
aMethName += rName;
|
aMethName += rName;
|
||||||
pElem = pMod->Find(aMethName, SbxCLASS_DONTCARE);
|
pElem = pMod->Find(aMethName, SbxClassType::DontCare);
|
||||||
}
|
}
|
||||||
|
|
||||||
// search in parameter list
|
// search in parameter list
|
||||||
@ -3617,7 +3617,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
|
|||||||
{
|
{
|
||||||
bool bSave = rBasic.bNoRtl;
|
bool bSave = rBasic.bNoRtl;
|
||||||
rBasic.bNoRtl = true;
|
rBasic.bNoRtl = true;
|
||||||
pElem = pMod->Find( rName, SbxCLASS_DONTCARE );
|
pElem = pMod->Find( rName, SbxClassType::DontCare );
|
||||||
rBasic.bNoRtl = bSave;
|
rBasic.bNoRtl = bSave;
|
||||||
}
|
}
|
||||||
return pElem;
|
return pElem;
|
||||||
@ -3701,7 +3701,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
|
|||||||
}
|
}
|
||||||
if ( !sDefaultMethod.isEmpty() )
|
if ( !sDefaultMethod.isEmpty() )
|
||||||
{
|
{
|
||||||
SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
|
SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxClassType::Method );
|
||||||
if( meth != nullptr )
|
if( meth != nullptr )
|
||||||
{
|
{
|
||||||
pInfo = meth->GetInfo();
|
pInfo = meth->GetInfo();
|
||||||
@ -3909,7 +3909,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
|
|||||||
}
|
}
|
||||||
if ( !sDefaultMethod.isEmpty() )
|
if ( !sDefaultMethod.isEmpty() )
|
||||||
{
|
{
|
||||||
SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD );
|
SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxClassType::Method );
|
||||||
SbxVariableRef refTemp = meth;
|
SbxVariableRef refTemp = meth;
|
||||||
if ( refTemp )
|
if ( refTemp )
|
||||||
{
|
{
|
||||||
@ -4488,7 +4488,7 @@ void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
|
|||||||
refLocals = new SbxArray;
|
refLocals = new SbxArray;
|
||||||
}
|
}
|
||||||
OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
|
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);
|
SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
|
||||||
SbxVariable* p = new SbxVariable( t );
|
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);
|
SbxDataType t = (SbxDataType)(SbxDataType)(nOp2 & 0xffff);
|
||||||
bool bFlag = pMod->IsSet( SbxFlagBits::NoModify );
|
bool bFlag = pMod->IsSet( SbxFlagBits::NoModify );
|
||||||
pMod->SetFlag( SbxFlagBits::NoModify );
|
pMod->SetFlag( SbxFlagBits::NoModify );
|
||||||
SbxVariableRef p = pMod->Find( aName, SbxCLASS_PROPERTY );
|
SbxVariableRef p = pMod->Find( aName, SbxClassType::Property );
|
||||||
if( p.Is() )
|
if( p.Is() )
|
||||||
{
|
{
|
||||||
pMod->Remove (p);
|
pMod->Remove (p);
|
||||||
@ -4569,12 +4569,12 @@ void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
|
|||||||
|
|
||||||
bool bFlag = pStorage->IsSet( SbxFlagBits::NoModify );
|
bool bFlag = pStorage->IsSet( SbxFlagBits::NoModify );
|
||||||
rBasic.SetFlag( SbxFlagBits::NoModify );
|
rBasic.SetFlag( SbxFlagBits::NoModify );
|
||||||
SbxVariableRef p = pStorage->Find( aName, SbxCLASS_PROPERTY );
|
SbxVariableRef p = pStorage->Find( aName, SbxClassType::Property );
|
||||||
if( p.Is() )
|
if( p.Is() )
|
||||||
{
|
{
|
||||||
pStorage->Remove (p);
|
pStorage->Remove (p);
|
||||||
}
|
}
|
||||||
p = pStorage->Make( aName, SbxCLASS_PROPERTY, t );
|
p = pStorage->Make( aName, SbxClassType::Property, t );
|
||||||
if( !bFlag )
|
if( !bFlag )
|
||||||
{
|
{
|
||||||
pStorage->ResetFlag( SbxFlagBits::NoModify );
|
pStorage->ResetFlag( SbxFlagBits::NoModify );
|
||||||
@ -4629,7 +4629,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl( OUString& aName, SbxDataType& t )
|
|||||||
if ( pMeth )
|
if ( pMeth )
|
||||||
{
|
{
|
||||||
SbxArray* pStatics = pMeth->GetStatics();
|
SbxArray* pStatics = pMeth->GetStatics();
|
||||||
if( pStatics && ( pStatics->Find( aName, SbxCLASS_DONTCARE ) == nullptr ) )
|
if( pStatics && ( pStatics->Find( aName, SbxClassType::DontCare ) == nullptr ) )
|
||||||
{
|
{
|
||||||
p = new SbxVariable( t );
|
p = new SbxVariable( t );
|
||||||
if( t != SbxVARIANT )
|
if( t != SbxVARIANT )
|
||||||
|
@ -718,8 +718,8 @@ SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// #i92642: Remove default properties
|
// #i92642: Remove default properties
|
||||||
Remove( "Name", SbxCLASS_DONTCARE );
|
Remove( "Name", SbxClassType::DontCare );
|
||||||
Remove( "Parent", SbxCLASS_DONTCARE );
|
Remove( "Parent", SbxClassType::DontCare );
|
||||||
|
|
||||||
SetParent( pb );
|
SetParent( pb );
|
||||||
|
|
||||||
@ -757,9 +757,9 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
sal_uInt16 nSrchMask = TYPEMASK_;
|
sal_uInt16 nSrchMask = TYPEMASK_;
|
||||||
switch( t )
|
switch( t )
|
||||||
{
|
{
|
||||||
case SbxCLASS_METHOD: nSrchMask = METHOD_; break;
|
case SbxClassType::Method: nSrchMask = METHOD_; break;
|
||||||
case SbxCLASS_PROPERTY: nSrchMask = PROPERTY_; break;
|
case SbxClassType::Property: nSrchMask = PROPERTY_; break;
|
||||||
case SbxCLASS_OBJECT: nSrchMask = OBJECT_; break;
|
case SbxClassType::Object: nSrchMask = OBJECT_; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
while( p->nArgs != -1 )
|
while( p->nArgs != -1 )
|
||||||
@ -789,14 +789,14 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
if( p->nArgs & CONST_ )
|
if( p->nArgs & CONST_ )
|
||||||
nAccess |= SbxFlagBits::Const;
|
nAccess |= SbxFlagBits::Const;
|
||||||
OUString aName_ = OUString::createFromAscii( p->pName );
|
OUString aName_ = OUString::createFromAscii( p->pName );
|
||||||
SbxClassType eCT = SbxCLASS_OBJECT;
|
SbxClassType eCT = SbxClassType::Object;
|
||||||
if( nType & PROPERTY_ )
|
if( nType & PROPERTY_ )
|
||||||
{
|
{
|
||||||
eCT = SbxCLASS_PROPERTY;
|
eCT = SbxClassType::Property;
|
||||||
}
|
}
|
||||||
else if( nType & METHOD_ )
|
else if( nType & METHOD_ )
|
||||||
{
|
{
|
||||||
eCT = SbxCLASS_METHOD;
|
eCT = SbxClassType::Method;
|
||||||
}
|
}
|
||||||
pVar = Make( aName_, eCT, p->eType, ( p->nArgs & FUNCTION_ ) == FUNCTION_ );
|
pVar = Make( aName_, eCT, p->eType, ( p->nArgs & FUNCTION_ ) == FUNCTION_ );
|
||||||
pVar->SetUserData( nIndex + 1 );
|
pVar->SetUserData( nIndex + 1 );
|
||||||
|
@ -111,13 +111,13 @@ SbStdPicture::SbStdPicture() :
|
|||||||
SbxObject( OUString("Picture"))
|
SbxObject( OUString("Picture"))
|
||||||
{
|
{
|
||||||
// Properties
|
// Properties
|
||||||
SbxVariable* p = Make( "Type", SbxCLASS_PROPERTY, SbxVARIANT );
|
SbxVariable* p = Make( "Type", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_TYPE );
|
p->SetUserData( ATTR_IMP_TYPE );
|
||||||
p = Make( "Width", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "Width", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_WIDTH );
|
p->SetUserData( ATTR_IMP_WIDTH );
|
||||||
p = Make( "Height", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "Height", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_HEIGHT );
|
p->SetUserData( ATTR_IMP_HEIGHT );
|
||||||
}
|
}
|
||||||
@ -227,24 +227,24 @@ SbStdFont::SbStdFont()
|
|||||||
, nSize(0)
|
, nSize(0)
|
||||||
{
|
{
|
||||||
// Properties
|
// Properties
|
||||||
SbxVariable* p = Make( "Bold", SbxCLASS_PROPERTY, SbxVARIANT );
|
SbxVariable* p = Make( "Bold", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_BOLD );
|
p->SetUserData( ATTR_IMP_BOLD );
|
||||||
p = Make( "Italic", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "Italic", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_ITALIC );
|
p->SetUserData( ATTR_IMP_ITALIC );
|
||||||
p = Make( "StrikeThrough", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "StrikeThrough", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_STRIKETHROUGH );
|
p->SetUserData( ATTR_IMP_STRIKETHROUGH );
|
||||||
p = Make( "Underline", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "Underline", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_UNDERLINE );
|
p->SetUserData( ATTR_IMP_UNDERLINE );
|
||||||
p = Make( "Size", SbxCLASS_PROPERTY, SbxVARIANT );
|
p = Make( "Size", SbxClassType::Property, SbxVARIANT );
|
||||||
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore );
|
||||||
p->SetUserData( ATTR_IMP_SIZE );
|
p->SetUserData( ATTR_IMP_SIZE );
|
||||||
|
|
||||||
// handle name property yourself
|
// handle name property yourself
|
||||||
p = Find( "Name", SbxCLASS_PROPERTY );
|
p = Find( "Name", SbxClassType::Property );
|
||||||
assert(p && "No Name Property");
|
assert(p && "No Name Property");
|
||||||
p->SetUserData( ATTR_IMP_NAME );
|
p->SetUserData( ATTR_IMP_NAME );
|
||||||
}
|
}
|
||||||
@ -384,27 +384,27 @@ void SbStdClipboard::MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool )
|
|||||||
SbStdClipboard::SbStdClipboard() :
|
SbStdClipboard::SbStdClipboard() :
|
||||||
SbxObject( OUString("Clipboard") )
|
SbxObject( OUString("Clipboard") )
|
||||||
{
|
{
|
||||||
SbxVariable* p = Find( "Name", SbxCLASS_PROPERTY );
|
SbxVariable* p = Find( "Name", SbxClassType::Property );
|
||||||
assert(p && "No Name Property");
|
assert(p && "No Name Property");
|
||||||
p->SetUserData( ATTR_IMP_NAME );
|
p->SetUserData( ATTR_IMP_NAME );
|
||||||
|
|
||||||
// register methods
|
// register methods
|
||||||
p = Make( "Clear", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "Clear", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_CLEAR );
|
p->SetUserData( METH_CLEAR );
|
||||||
p = Make( "GetData", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "GetData", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_GETDATA );
|
p->SetUserData( METH_GETDATA );
|
||||||
p = Make( "GetFormat", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "GetFormat", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_GETFORMAT );
|
p->SetUserData( METH_GETFORMAT );
|
||||||
p = Make( "GetText", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "GetText", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_GETTEXT );
|
p->SetUserData( METH_GETTEXT );
|
||||||
p = Make( "SetData", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "SetData", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_SETDATA );
|
p->SetUserData( METH_SETDATA );
|
||||||
p = Make( "SetText", SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( "SetText", SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p->SetUserData( METH_SETTEXT );
|
p->SetUserData( METH_SETTEXT );
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
|
|||||||
if( eType != SbxVARIANT )
|
if( eType != SbxVARIANT )
|
||||||
{
|
{
|
||||||
// Convert no objects
|
// Convert no objects
|
||||||
if( eType != SbxOBJECT || pSrc_->GetClass() != SbxCLASS_OBJECT )
|
if( eType != SbxOBJECT || pSrc_->GetClass() != SbxClassType::Object )
|
||||||
{
|
{
|
||||||
pSrc_->Convert(eType);
|
pSrc_->Convert(eType);
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ SbxDataType SbxArray::GetType() const
|
|||||||
|
|
||||||
SbxClassType SbxArray::GetClass() const
|
SbxClassType SbxArray::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_ARRAY;
|
return SbxClassType::Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxArray::Clear()
|
void SbxArray::Clear()
|
||||||
@ -185,7 +185,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
|
|||||||
if( pVar )
|
if( pVar )
|
||||||
if( eType != SbxVARIANT )
|
if( eType != SbxVARIANT )
|
||||||
// Convert no objects
|
// Convert no objects
|
||||||
if( eType != SbxOBJECT || pVar->GetClass() != SbxCLASS_OBJECT )
|
if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
|
||||||
pVar->Convert( eType );
|
pVar->Convert( eType );
|
||||||
SbxVariableRef& rRef = GetRef32( nIdx );
|
SbxVariableRef& rRef = GetRef32( nIdx );
|
||||||
if( static_cast<SbxVariable*>(rRef) != pVar )
|
if( static_cast<SbxVariable*>(rRef) != pVar )
|
||||||
@ -205,7 +205,7 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx )
|
|||||||
if( pVar )
|
if( pVar )
|
||||||
if( eType != SbxVARIANT )
|
if( eType != SbxVARIANT )
|
||||||
// Convert no objects
|
// Convert no objects
|
||||||
if( eType != SbxOBJECT || pVar->GetClass() != SbxCLASS_OBJECT )
|
if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
|
||||||
pVar->Convert( eType );
|
pVar->Convert( eType );
|
||||||
SbxVariableRef& rRef = GetRef( nIdx );
|
SbxVariableRef& rRef = GetRef( nIdx );
|
||||||
if( static_cast<SbxVariable*>(rRef) != pVar )
|
if( static_cast<SbxVariable*>(rRef) != pVar )
|
||||||
@ -379,7 +379,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
|
|||||||
{
|
{
|
||||||
switch (rEntry.mpVar->GetClass())
|
switch (rEntry.mpVar->GetClass())
|
||||||
{
|
{
|
||||||
case SbxCLASS_OBJECT:
|
case SbxClassType::Object:
|
||||||
{
|
{
|
||||||
// Objects are not allowed to scan their parent.
|
// Objects are not allowed to scan their parent.
|
||||||
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
|
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
|
||||||
@ -388,7 +388,7 @@ SbxVariable* SbxArray::FindUserData( sal_uInt32 nData )
|
|||||||
rEntry.mpVar->SetFlags(nOld);
|
rEntry.mpVar->SetFlags(nOld);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SbxCLASS_ARRAY:
|
case SbxClassType::Array:
|
||||||
// Casting SbxVariable to SbxArray? Really?
|
// Casting SbxVariable to SbxArray? Really?
|
||||||
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).FindUserData(nData);
|
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).FindUserData(nData);
|
||||||
break;
|
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!
|
// The very secure search works as well, if there is no hashcode!
|
||||||
sal_uInt16 nVarHash = rEntry.mpVar->GetHashCode();
|
sal_uInt16 nVarHash = rEntry.mpVar->GetHashCode();
|
||||||
if ( (!nVarHash || nVarHash == nHash)
|
if ( (!nVarHash || nVarHash == nHash)
|
||||||
&& (t == SbxCLASS_DONTCARE || rEntry.mpVar->GetClass() == t)
|
&& (t == SbxClassType::DontCare || rEntry.mpVar->GetClass() == t)
|
||||||
&& (rEntry.mpVar->GetName().equalsIgnoreAsciiCase(rName)))
|
&& (rEntry.mpVar->GetName().equalsIgnoreAsciiCase(rName)))
|
||||||
{
|
{
|
||||||
p = &rEntry.mpVar;
|
p = &rEntry.mpVar;
|
||||||
@ -437,7 +437,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
|
|||||||
{
|
{
|
||||||
switch (rEntry.mpVar->GetClass())
|
switch (rEntry.mpVar->GetClass())
|
||||||
{
|
{
|
||||||
case SbxCLASS_OBJECT:
|
case SbxClassType::Object:
|
||||||
{
|
{
|
||||||
// Objects are not allowed to scan their parent.
|
// Objects are not allowed to scan their parent.
|
||||||
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
|
SbxFlagBits nOld = rEntry.mpVar->GetFlags();
|
||||||
@ -446,7 +446,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
|
|||||||
rEntry.mpVar->SetFlags(nOld);
|
rEntry.mpVar->SetFlags(nOld);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SbxCLASS_ARRAY:
|
case SbxClassType::Array:
|
||||||
// Casting SbxVariable to SbxArray? Really?
|
// Casting SbxVariable to SbxArray? Really?
|
||||||
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).Find(rName, t);
|
p = reinterpret_cast<SbxArray&>(*rEntry.mpVar).Find(rName, t);
|
||||||
break;
|
break;
|
||||||
|
@ -75,7 +75,7 @@ SbxDataType SbxBase::GetType() const
|
|||||||
|
|
||||||
SbxClassType SbxBase::GetClass() const
|
SbxClassType SbxBase::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_DONTCARE;
|
return SbxClassType::DontCare;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxBase::Clear()
|
void SbxBase::Clear()
|
||||||
|
@ -75,14 +75,14 @@ void SbxCollection::Initialize()
|
|||||||
SetFlag( SbxFlagBits::Fixed );
|
SetFlag( SbxFlagBits::Fixed );
|
||||||
ResetFlag( SbxFlagBits::Write );
|
ResetFlag( SbxFlagBits::Write );
|
||||||
SbxVariable* p;
|
SbxVariable* p;
|
||||||
p = Make( pCount , SbxCLASS_PROPERTY, SbxINTEGER );
|
p = Make( pCount , SbxClassType::Property, SbxINTEGER );
|
||||||
p->ResetFlag( SbxFlagBits::Write );
|
p->ResetFlag( SbxFlagBits::Write );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pAdd, SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( pAdd, SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pItem , SbxCLASS_METHOD, SbxOBJECT );
|
p = Make( pItem , SbxClassType::Method, SbxOBJECT );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pRemove, SbxCLASS_METHOD, SbxEMPTY );
|
p = Make( pRemove, SbxClassType::Method, SbxEMPTY );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
|
|||||||
SbxVariable* p = pPar_->Get( 1 );
|
SbxVariable* p = pPar_->Get( 1 );
|
||||||
if( p->GetType() == SbxSTRING )
|
if( p->GetType() == SbxSTRING )
|
||||||
{
|
{
|
||||||
pRes = Find( p->GetOUString(), SbxCLASS_OBJECT );
|
pRes = Find( p->GetOUString(), SbxClassType::Object );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -162,7 +162,7 @@ static SbxVariableRef Operand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
refVar = QualifiedName( pObj, pGbl, &p, SbxCLASS_DONTCARE );
|
refVar = QualifiedName( pObj, pGbl, &p, SbxClassType::DontCare );
|
||||||
}
|
}
|
||||||
*ppBuf = p;
|
*ppBuf = p;
|
||||||
return refVar;
|
return refVar;
|
||||||
@ -241,7 +241,7 @@ static SbxVariableRef Assign( SbxObject* pObj, SbxObject* pGbl, const sal_Unicod
|
|||||||
if( *p == '=' )
|
if( *p == '=' )
|
||||||
{
|
{
|
||||||
// Assign only onto properties!
|
// Assign only onto properties!
|
||||||
if( refVar->GetClass() != SbxCLASS_PROPERTY )
|
if( refVar->GetClass() != SbxClassType::Property )
|
||||||
{
|
{
|
||||||
SbxBase::SetError( ERRCODE_SBX_BAD_ACTION );
|
SbxBase::SetError( ERRCODE_SBX_BAD_ACTION );
|
||||||
refVar.Clear();
|
refVar.Clear();
|
||||||
|
@ -113,7 +113,7 @@ SbxDataType SbxObject::GetType() const
|
|||||||
|
|
||||||
SbxClassType SbxObject::GetClass() const
|
SbxClassType SbxObject::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_OBJECT;
|
return SbxClassType::Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxObject::Clear()
|
void SbxObject::Clear()
|
||||||
@ -122,9 +122,9 @@ void SbxObject::Clear()
|
|||||||
pProps = new SbxArray;
|
pProps = new SbxArray;
|
||||||
pObjs = new SbxArray( SbxOBJECT );
|
pObjs = new SbxArray( SbxOBJECT );
|
||||||
SbxVariable* p;
|
SbxVariable* p;
|
||||||
p = Make( pNameProp, SbxCLASS_PROPERTY, SbxSTRING );
|
p = Make( pNameProp, SbxClassType::Property, SbxSTRING );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
p = Make( pParentProp, SbxCLASS_PROPERTY, SbxOBJECT );
|
p = Make( pParentProp, SbxClassType::Property, SbxOBJECT );
|
||||||
p->ResetFlag( SbxFlagBits::Write );
|
p->ResetFlag( SbxFlagBits::Write );
|
||||||
p->SetFlag( SbxFlagBits::DontStore );
|
p->SetFlag( SbxFlagBits::DontStore );
|
||||||
pDfltProp = nullptr;
|
pDfltProp = nullptr;
|
||||||
@ -213,20 +213,20 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
SAL_INFO(
|
SAL_INFO(
|
||||||
"basic.sbx",
|
"basic.sbx",
|
||||||
"search" << std::setw(nLvl) << " "
|
"search" << std::setw(nLvl) << " "
|
||||||
<< (t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT
|
<< (t >= SbxClassType::DontCare && t <= SbxClassType::Object
|
||||||
? pCls[t - 1] : "Unknown class")
|
? pCls[(int)t - 1] : "Unknown class")
|
||||||
<< " " << rName << " in " << SbxVariable::GetName());
|
<< " " << rName << " in " << SbxVariable::GetName());
|
||||||
++nLvl;
|
++nLvl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SbxVariable* pRes = nullptr;
|
SbxVariable* pRes = nullptr;
|
||||||
pObjs->SetFlag( SbxFlagBits::ExtSearch );
|
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 )
|
if( !pRes )
|
||||||
{
|
{
|
||||||
pRes = pProps->Find( rName, SbxCLASS_PROPERTY );
|
pRes = pProps->Find( rName, SbxClassType::Property );
|
||||||
}
|
}
|
||||||
if( !pRes )
|
if( !pRes )
|
||||||
{
|
{
|
||||||
@ -238,10 +238,10 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
SbxArray* pArray = nullptr;
|
SbxArray* pArray = nullptr;
|
||||||
switch( t )
|
switch( t )
|
||||||
{
|
{
|
||||||
case SbxCLASS_VARIABLE:
|
case SbxClassType::Variable:
|
||||||
case SbxCLASS_PROPERTY: pArray = pProps; break;
|
case SbxClassType::Property: pArray = pProps; break;
|
||||||
case SbxCLASS_METHOD: pArray = pMethods; break;
|
case SbxClassType::Method: pArray = pMethods; break;
|
||||||
case SbxCLASS_OBJECT: pArray = pObjs; break;
|
case SbxClassType::Object: pArray = pObjs; break;
|
||||||
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
||||||
}
|
}
|
||||||
if( pArray )
|
if( pArray )
|
||||||
@ -251,7 +251,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
|
|||||||
}
|
}
|
||||||
// Extended Search in the Object-Array?
|
// Extended Search in the Object-Array?
|
||||||
// For objects and DontCare the array of objects has already been searched
|
// 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 );
|
pRes = pObjs->Find( rName, t );
|
||||||
// Search in the parents?
|
// Search in the parents?
|
||||||
if( !pRes && IsSet( SbxFlagBits::GlobalSearch ) )
|
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 )
|
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) )
|
if( pMeth && nullptr != dynamic_cast<const SbxMethod*>( pMeth) )
|
||||||
{
|
{
|
||||||
// FindQualified() might have struck already!
|
// FindQualified() might have struck already!
|
||||||
@ -307,10 +307,10 @@ SbxProperty* SbxObject::GetDfltProperty()
|
|||||||
{
|
{
|
||||||
if ( !pDfltProp && !aDfltPropName.isEmpty() )
|
if ( !pDfltProp && !aDfltPropName.isEmpty() )
|
||||||
{
|
{
|
||||||
pDfltProp = static_cast<SbxProperty*>( Find( aDfltPropName, SbxCLASS_PROPERTY ) );
|
pDfltProp = static_cast<SbxProperty*>( Find( aDfltPropName, SbxClassType::Property ) );
|
||||||
if( !pDfltProp )
|
if( !pDfltProp )
|
||||||
{
|
{
|
||||||
pDfltProp = static_cast<SbxProperty*>( Make( aDfltPropName, SbxCLASS_PROPERTY, SbxVARIANT ) );
|
pDfltProp = static_cast<SbxProperty*>( Make( aDfltPropName, SbxClassType::Property, SbxVARIANT ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pDfltProp;
|
return pDfltProp;
|
||||||
@ -334,10 +334,10 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
|
|||||||
SbxArray* pArray = nullptr;
|
SbxArray* pArray = nullptr;
|
||||||
if( pVar ) switch( pVar->GetClass() )
|
if( pVar ) switch( pVar->GetClass() )
|
||||||
{
|
{
|
||||||
case SbxCLASS_VARIABLE:
|
case SbxClassType::Variable:
|
||||||
case SbxCLASS_PROPERTY: pArray = pProps; break;
|
case SbxClassType::Property: pArray = pProps; break;
|
||||||
case SbxCLASS_METHOD: pArray = pMethods; break;
|
case SbxClassType::Method: pArray = pMethods; break;
|
||||||
case SbxCLASS_OBJECT: pArray = pObjs; break;
|
case SbxClassType::Object: pArray = pObjs; break;
|
||||||
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
||||||
}
|
}
|
||||||
if( pArray )
|
if( pArray )
|
||||||
@ -370,10 +370,10 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
|
|||||||
SbxArray* pArray = nullptr;
|
SbxArray* pArray = nullptr;
|
||||||
switch( ct )
|
switch( ct )
|
||||||
{
|
{
|
||||||
case SbxCLASS_VARIABLE:
|
case SbxClassType::Variable:
|
||||||
case SbxCLASS_PROPERTY: pArray = pProps; break;
|
case SbxClassType::Property: pArray = pProps; break;
|
||||||
case SbxCLASS_METHOD: pArray = pMethods; break;
|
case SbxClassType::Method: pArray = pMethods; break;
|
||||||
case SbxCLASS_OBJECT: pArray = pObjs; break;
|
case SbxClassType::Object: pArray = pObjs; break;
|
||||||
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
||||||
}
|
}
|
||||||
if( !pArray )
|
if( !pArray )
|
||||||
@ -381,7 +381,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
// Collections may contain objects of the same name
|
// 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 );
|
SbxVariable* pRes = pArray->Find( rName, ct );
|
||||||
if( pRes )
|
if( pRes )
|
||||||
@ -392,14 +392,14 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
|
|||||||
SbxVariable* pVar = nullptr;
|
SbxVariable* pVar = nullptr;
|
||||||
switch( ct )
|
switch( ct )
|
||||||
{
|
{
|
||||||
case SbxCLASS_VARIABLE:
|
case SbxClassType::Variable:
|
||||||
case SbxCLASS_PROPERTY:
|
case SbxClassType::Property:
|
||||||
pVar = new SbxProperty( rName, dt );
|
pVar = new SbxProperty( rName, dt );
|
||||||
break;
|
break;
|
||||||
case SbxCLASS_METHOD:
|
case SbxClassType::Method:
|
||||||
pVar = new SbxMethod( rName, dt, bIsRuntimeFunction );
|
pVar = new SbxMethod( rName, dt, bIsRuntimeFunction );
|
||||||
break;
|
break;
|
||||||
case SbxCLASS_OBJECT:
|
case SbxClassType::Object:
|
||||||
pVar = CreateObject( rName );
|
pVar = CreateObject( rName );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -438,7 +438,7 @@ void SbxObject::Insert( SbxVariable* pVar )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EndListening( pOld->GetBroadcaster(), true );
|
EndListening( pOld->GetBroadcaster(), true );
|
||||||
if( pVar->GetClass() == SbxCLASS_PROPERTY )
|
if( pVar->GetClass() == SbxClassType::Property )
|
||||||
{
|
{
|
||||||
if( pOld == pDfltProp )
|
if( pOld == pDfltProp )
|
||||||
{
|
{
|
||||||
@ -466,9 +466,9 @@ void SbxObject::Insert( SbxVariable* pVar )
|
|||||||
SAL_INFO(
|
SAL_INFO(
|
||||||
"basic.sbx",
|
"basic.sbx",
|
||||||
"insert "
|
"insert "
|
||||||
<< ((pVar->GetClass() >= SbxCLASS_DONTCARE
|
<< ((pVar->GetClass() >= SbxClassType::DontCare
|
||||||
&& pVar->GetClass() <= SbxCLASS_OBJECT)
|
&& pVar->GetClass() <= SbxClassType::Object)
|
||||||
? pCls[pVar->GetClass() - 1] : "Unknown class")
|
? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
|
||||||
<< " " << aVarName << " in " << SbxVariable::GetName());
|
<< " " << aVarName << " in " << SbxVariable::GetName());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -483,10 +483,10 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
|
|||||||
{
|
{
|
||||||
switch( pVar->GetClass() )
|
switch( pVar->GetClass() )
|
||||||
{
|
{
|
||||||
case SbxCLASS_VARIABLE:
|
case SbxClassType::Variable:
|
||||||
case SbxCLASS_PROPERTY: pArray = pProps; break;
|
case SbxClassType::Property: pArray = pProps; break;
|
||||||
case SbxCLASS_METHOD: pArray = pMethods; break;
|
case SbxClassType::Method: pArray = pMethods; break;
|
||||||
case SbxCLASS_OBJECT: pArray = pObjs; break;
|
case SbxClassType::Object: pArray = pObjs; break;
|
||||||
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
default: DBG_ASSERT( false, "Invalid SBX-Class" ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,9 +510,9 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
|
|||||||
SAL_INFO(
|
SAL_INFO(
|
||||||
"basic.sbx",
|
"basic.sbx",
|
||||||
"insert "
|
"insert "
|
||||||
<< ((pVar->GetClass() >= SbxCLASS_DONTCARE
|
<< ((pVar->GetClass() >= SbxClassType::DontCare
|
||||||
&& pVar->GetClass() <= SbxCLASS_OBJECT)
|
&& pVar->GetClass() <= SbxClassType::Object)
|
||||||
? pCls[pVar->GetClass() - 1] : "Unknown class")
|
? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
|
||||||
<< " " << aVarName << " in " << SbxVariable::GetName());
|
<< " " << aVarName << " in " << SbxVariable::GetName());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -621,7 +621,7 @@ bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
|||||||
// Set properties
|
// Set properties
|
||||||
if( !aDfltProp.isEmpty() )
|
if( !aDfltProp.isEmpty() )
|
||||||
{
|
{
|
||||||
pDfltProp = static_cast<SbxProperty*>( pProps->Find( aDfltProp, SbxCLASS_PROPERTY ) );
|
pDfltProp = static_cast<SbxProperty*>( pProps->Find( aDfltProp, SbxClassType::Property ) );
|
||||||
}
|
}
|
||||||
SetModified( false );
|
SetModified( false );
|
||||||
return true;
|
return true;
|
||||||
@ -881,7 +881,7 @@ SbxMethod::~SbxMethod()
|
|||||||
|
|
||||||
SbxClassType SbxMethod::GetClass() const
|
SbxClassType SbxMethod::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_METHOD;
|
return SbxClassType::Method;
|
||||||
}
|
}
|
||||||
|
|
||||||
SbxProperty::SbxProperty( const OUString& r, SbxDataType t )
|
SbxProperty::SbxProperty( const OUString& r, SbxDataType t )
|
||||||
@ -896,7 +896,7 @@ SbxProperty::~SbxProperty()
|
|||||||
|
|
||||||
SbxClassType SbxProperty::GetClass() const
|
SbxClassType SbxProperty::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_PROPERTY;
|
return SbxClassType::Property;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -754,7 +754,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
|
|||||||
|
|
||||||
SbxClassType SbxValue::GetClass() const
|
SbxClassType SbxValue::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_VALUE;
|
return SbxClassType::Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
SbxDataType SbxValue::GetType() const
|
SbxDataType SbxValue::GetType() const
|
||||||
|
@ -227,7 +227,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
|
|||||||
// Request parameter-information (not for objects)
|
// Request parameter-information (not for objects)
|
||||||
const_cast<SbxVariable*>(this)->GetInfo();
|
const_cast<SbxVariable*>(this)->GetInfo();
|
||||||
// Append nothing, if it is a simple property (no empty brackets)
|
// 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;
|
return maName;
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ SbxDataType SbxVariable::GetType() const
|
|||||||
|
|
||||||
SbxClassType SbxVariable::GetClass() const
|
SbxClassType SbxVariable::GetClass() const
|
||||||
{
|
{
|
||||||
return SbxCLASS_VARIABLE;
|
return SbxClassType::Variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxVariable::SetModified( bool b )
|
void SbxVariable::SetModified( bool b )
|
||||||
@ -497,7 +497,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
|||||||
rStrm.ReadUInt32( nTemp );
|
rStrm.ReadUInt32( nTemp );
|
||||||
nUserData = nTemp;
|
nUserData = nTemp;
|
||||||
// correction: old methods have instead of SbxNULL now SbxEMPTY
|
// correction: old methods have instead of SbxNULL now SbxEMPTY
|
||||||
if( nType == SbxNULL && GetClass() == SbxCLASS_METHOD )
|
if( nType == SbxNULL && GetClass() == SbxClassType::Method )
|
||||||
{
|
{
|
||||||
nType = SbxEMPTY;
|
nType = SbxEMPTY;
|
||||||
}
|
}
|
||||||
|
@ -206,13 +206,13 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod,
|
|||||||
SbxArray* pMethods = pModule->GetMethods();
|
SbxArray* pMethods = pModule->GetMethods();
|
||||||
if ( pMethods )
|
if ( pMethods )
|
||||||
{
|
{
|
||||||
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxCLASS_METHOD ) );
|
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxClassType::Method ) );
|
||||||
if ( pMethod )
|
if ( pMethod )
|
||||||
bFound = true;
|
bFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) )
|
else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxClassType::Method ) ) )
|
||||||
{
|
{
|
||||||
if( SbModule* pModule = pMethod->GetModule() )
|
if( SbModule* pModule = pMethod->GetModule() )
|
||||||
{
|
{
|
||||||
|
@ -26,14 +26,14 @@
|
|||||||
#include <tools/errcode.hxx>
|
#include <tools/errcode.hxx>
|
||||||
#include <o3tl/typed_flags_set.hxx>
|
#include <o3tl/typed_flags_set.hxx>
|
||||||
|
|
||||||
enum SbxClassType { // SBX-class-IDs (order is important!)
|
enum class SbxClassType { // SBX-class-IDs (order is important!)
|
||||||
SbxCLASS_DONTCARE = 1, // don't care (search, not 0 due to StarBASIC)
|
DontCare = 1, // don't care (search, not 0 due to StarBASIC)
|
||||||
SbxCLASS_ARRAY, // Array of SbxVariables
|
Array, // Array of SbxVariables
|
||||||
SbxCLASS_VALUE, // simple value
|
Value, // simple value
|
||||||
SbxCLASS_VARIABLE, // Variable (from here there is Broadcaster)
|
Variable, // Variable (from here there is Broadcaster)
|
||||||
SbxCLASS_METHOD, // Method (Function or Sub)
|
Method, // Method (Function or Sub)
|
||||||
SbxCLASS_PROPERTY, // Property
|
Property, // Property
|
||||||
SbxCLASS_OBJECT // Object
|
Object // Object
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SbxDataType {
|
enum SbxDataType {
|
||||||
|
@ -288,7 +288,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
|
|||||||
// then assemble aBasicStr, aMacroStr for SfxObjectShell::CallBasic
|
// then assemble aBasicStr, aMacroStr for SfxObjectShell::CallBasic
|
||||||
|
|
||||||
StarBASIC* pRoot = pDocSh->GetBasic();
|
StarBASIC* pRoot = pDocSh->GetBasic();
|
||||||
SbxVariable* pVar = pRoot->Find( aErrorTitle, SbxCLASS_METHOD );
|
SbxVariable* pVar = pRoot->Find( aErrorTitle, SbxClassType::Method );
|
||||||
if (SbMethod* pMethod = dynamic_cast<SbMethod*>(pVar))
|
if (SbMethod* pMethod = dynamic_cast<SbMethod*>(pVar))
|
||||||
{
|
{
|
||||||
SbModule* pModule = pMethod->GetModule();
|
SbModule* pModule = pMethod->GetModule();
|
||||||
|
@ -3202,7 +3202,7 @@ bool ScCompiler::IsMacro( const OUString& rName )
|
|||||||
if (FormulaGrammar::isODFF( GetGrammar()) && aName.startsWithIgnoreAsciiCase("USER."))
|
if (FormulaGrammar::isODFF( GetGrammar()) && aName.startsWithIgnoreAsciiCase("USER."))
|
||||||
aName = aName.copy(5);
|
aName = aName.copy(5);
|
||||||
|
|
||||||
SbxMethod* pMeth = static_cast<SbxMethod*>(pObj->Find( aName, SbxCLASS_METHOD ));
|
SbxMethod* pMeth = static_cast<SbxMethod*>(pObj->Find( aName, SbxClassType::Method ));
|
||||||
if( !pMeth )
|
if( !pMeth )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -2934,7 +2934,7 @@ void ScInterpreter::ScMacro()
|
|||||||
pRoot = nullptr;
|
pRoot = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SbxVariable* pVar = pRoot ? pRoot->Find(aMacro, SbxCLASS_METHOD) : nullptr;
|
SbxVariable* pVar = pRoot ? pRoot->Find(aMacro, SbxClassType::Method) : nullptr;
|
||||||
if( !pVar || pVar->GetType() == SbxVOID || dynamic_cast<const SbMethod*>( pVar) == nullptr )
|
if( !pVar || pVar->GetType() == SbxVOID || dynamic_cast<const SbMethod*>( pVar) == nullptr )
|
||||||
{
|
{
|
||||||
PushError( errNoMacro );
|
PushError( errNoMacro );
|
||||||
|
@ -459,7 +459,7 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::excepti
|
|||||||
SbxVariableRef aRef = new SbxVariable;
|
SbxVariableRef aRef = new SbxVariable;
|
||||||
aRef->PutDouble( time );
|
aRef->PutDouble( time );
|
||||||
aArgs->Put( aRef, 1 );
|
aArgs->Put( aRef, 1 );
|
||||||
SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "WaitUntil", SbxCLASS_METHOD ));
|
SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "WaitUntil", SbxClassType::Method ));
|
||||||
|
|
||||||
if ( pMeth )
|
if ( pMeth )
|
||||||
{
|
{
|
||||||
@ -1258,7 +1258,7 @@ uno::Any SAL_CALL
|
|||||||
ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception )
|
ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception )
|
||||||
{
|
{
|
||||||
StarBASIC* pBasic = SfxApplication::GetBasic();
|
StarBASIC* pBasic = SfxApplication::GetBasic();
|
||||||
SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "FuncCaller", SbxCLASS_METHOD ));
|
SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "FuncCaller", SbxClassType::Method ));
|
||||||
uno::Any aRet;
|
uno::Any aRet;
|
||||||
if ( pMeth )
|
if ( pMeth )
|
||||||
{
|
{
|
||||||
|
@ -253,7 +253,7 @@ getCurrentDocument() throw (uno::RuntimeException)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uno::Any aModel;
|
uno::Any aModel;
|
||||||
SbxVariable *pCompVar = basicChosen->Find( "ThisComponent", SbxCLASS_OBJECT );
|
SbxVariable *pCompVar = basicChosen->Find( "ThisComponent", SbxClassType::Object );
|
||||||
|
|
||||||
if ( pCompVar )
|
if ( pCompVar )
|
||||||
{
|
{
|
||||||
|
@ -364,7 +364,7 @@ namespace basprov
|
|||||||
SbxArray* pMethods = pModule->GetMethods();
|
SbxArray* pMethods = pModule->GetMethods();
|
||||||
if ( pMethods )
|
if ( pMethods )
|
||||||
{
|
{
|
||||||
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( aMethod, SbxCLASS_METHOD ) );
|
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( aMethod, SbxClassType::Method ) );
|
||||||
if ( pMethod && !pMethod->IsHidden() )
|
if ( pMethod && !pMethod->IsHidden() )
|
||||||
{
|
{
|
||||||
if ( m_pDocBasicManager == pBasicMgr )
|
if ( m_pDocBasicManager == pBasicMgr )
|
||||||
|
@ -2553,7 +2553,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
|
|||||||
if ( pBasic )
|
if ( pBasic )
|
||||||
{
|
{
|
||||||
SbModule* pModule = pBasic->FindModule( aModuleName );
|
SbModule* pModule = pBasic->FindModule( aModuleName );
|
||||||
SbMethod* pMethod = pModule ? static_cast<SbMethod*>(pModule->GetMethods()->Find(aMacroName, SbxCLASS_METHOD)) : nullptr;
|
SbMethod* pMethod = pModule ? static_cast<SbMethod*>(pModule->GetMethods()->Find(aMacroName, SbxClassType::Method)) : nullptr;
|
||||||
if (pMethod)
|
if (pMethod)
|
||||||
{
|
{
|
||||||
aOUSource = pModule->GetSource32();
|
aOUSource = pModule->GetSource32();
|
||||||
|
@ -209,7 +209,7 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
|
|||||||
|
|
||||||
|
|
||||||
uno::Any aModel;
|
uno::Any aModel;
|
||||||
SbxVariable *pCompVar = basicChosen->Find( sKey, SbxCLASS_OBJECT );
|
SbxVariable *pCompVar = basicChosen->Find( sKey, SbxClassType::Object );
|
||||||
|
|
||||||
if ( pCompVar )
|
if ( pCompVar )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user