LibreOffice Module basic (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
SbxVariable Class Reference

#include <sbxvar.hxx>

Inheritance diagram for SbxVariable:
[legend]
Collaboration diagram for SbxVariable:
[legend]

Public Member Functions

 SBX_DECL_PERSIST_NODATA (SBXID_VARIABLE, 2)
 
 SbxVariable ()
 
 SbxVariable (SbxDataType)
 
 SbxVariable (const SbxVariable &)
 
SbxVariableoperator= (const SbxVariable &)
 
void Dump (SvStream &, bool bDumpAll)
 
void SetName (const OUString &)
 
const OUString & GetName (SbxNameType=SbxNameType::NONE) const
 
sal_uInt16 GetHashCode () const
 
virtual void SetModified (bool) override
 
sal_uInt32 GetUserData () const
 
void SetUserData (sal_uInt32 n)
 
virtual SbxDataType GetType () const override
 
virtual SbxClassType GetClass () const
 
virtual SbxInfo * GetInfo ()
 
void SetInfo (SbxInfo *p)
 
void SetParameters (SbxArray *p)
 
SbxArrayGetParameters () const
 
SfxBroadcasterGetBroadcaster ()
 
bool IsBroadcaster () const
 
virtual void Broadcast (SfxHintId nHintId) override
 
const SbxObjectGetParent () const
 
SbxObjectGetParent ()
 
virtual void SetParent (SbxObject *)
 
const OUString & GetDeclareClassName () const
 
void SetDeclareClassName (const OUString &)
 
void SetComListener (const css::uno::Reference< css::uno::XInterface > &xComListener, StarBASIC *pParentBasic)
 
void ClearComListener ()
 
- Public Member Functions inherited from SbxValue
 SBX_DECL_PERSIST_NODATA (SBXID_VALUE, 1)
 
 SbxValue ()
 
 SbxValue (SbxDataType)
 
 SbxValue (const SbxValue &)
 
SbxValueoperator= (const SbxValue &)
 
virtual void Clear () override
 
virtual bool IsFixed () const override
 
bool IsInteger () const
 
bool IsLong () const
 
bool IsDouble () const
 
bool IsString () const
 
bool IsCurrency () const
 
bool IsObject () const
 
bool IsBool () const
 
bool IsErr () const
 
bool IsEmpty () const
 
bool IsNull () const
 
bool IsNumeric () const
 
bool IsNumericRTL () const
 
bool ImpIsNumeric (bool bOnlyIntntl) const
 
virtual SbxDataType GetType () const override
 
SbxDataType GetFullType () const
 
bool SetType (SbxDataType)
 
bool Get (SbxValues &) const
 
const SbxValuesGetValues_Impl () const
 
bool Put (const SbxValues &)
 
SbxValuesdata ()
 
sal_Unicode GetChar () const
 
sal_Int16 GetInteger () const
 
sal_Int32 GetLong () const
 
sal_Int64 GetInt64 () const
 
sal_uInt64 GetUInt64 () const
 
sal_Int64 GetCurrency () const
 
SbxDecimalGetDecimal () const
 
float GetSingle () const
 
double GetDouble () const
 
double GetDate () const
 
bool GetBool () const
 
const OUString & GetCoreString () const
 
OUString GetOUString () const
 
SbxBaseGetObject () const
 
sal_uInt8 GetByte () const
 
sal_uInt16 GetUShort () const
 
sal_uInt32 GetULong () const
 
bool PutInteger (sal_Int16)
 
bool PutLong (sal_Int32)
 
bool PutSingle (float)
 
bool PutDouble (double)
 
void PutDate (double)
 
bool PutBool (bool)
 
void PutErr (sal_uInt16)
 
void PutStringExt (const OUString &)
 
bool PutInt64 (sal_Int64)
 
bool PutUInt64 (sal_uInt64)
 
bool PutString (const OUString &)
 
bool PutChar (sal_Unicode)
 
bool PutByte (sal_uInt8)
 
bool PutUShort (sal_uInt16)
 
bool PutULong (sal_uInt32)
 
bool PutEmpty ()
 
void PutNull ()
 
void PutDecimal (css::bridge::oleautomation::Decimal const &rAutomationDec)
 
bool PutDecimal (SbxDecimal *pDecimal)
 
void fillAutomationDecimal (css::bridge::oleautomation::Decimal &rAutomationDec) const
 
bool PutCurrency (sal_Int64)
 
bool PutObject (SbxBase *)
 
bool Convert (SbxDataType)
 
bool Compute (SbxOperator, const SbxValue &)
 
bool Compare (SbxOperator, const SbxValue &) const
 
bool Scan (const OUString &, sal_uInt16 *)
 
void Format (OUString &, const OUString *=nullptr) const
 
bool operator<= (const SbxValue &) const
 
bool operator>= (const SbxValue &) const
 
SbxValueoperator*= (const SbxValue &)
 
SbxValueoperator/= (const SbxValue &)
 
SbxValueoperator+= (const SbxValue &)
 
SbxValueoperator-= (const SbxValue &)
 
- Public Member Functions inherited from SbxBase
void SetFlags (SbxFlagBits n)
 
SbxFlagBits GetFlags () const
 
void SetFlag (SbxFlagBits n)
 
void ResetFlag (SbxFlagBits n)
 
bool IsSet (SbxFlagBits n) const
 
bool IsReset (SbxFlagBits n) const
 
bool CanRead () const
 
bool CanWrite () const
 
bool IsModified () const
 
bool IsHidden () const
 
bool IsVisible () const
 
virtual bool IsFixed () const
 
virtual void SetModified (bool)
 
virtual SbxDataType GetType () const
 
virtual void Clear ()=0
 
std::pair< bool, sal_uInt32 > Store (SvStream &)
 
virtual bool LoadCompleted ()
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 

Static Public Member Functions

static OUString NameToCaseInsensitiveName (const OUString &rName)
 
static constexpr sal_uInt16 MakeHashCode (std::u16string_view aName)
 
- Static Public Member Functions inherited from SbxValue
static ErrCode ScanNumIntnl (const OUString &rSrc, double &nVal, bool bSingle=false)
 
- Static Public Member Functions inherited from SbxBase
static SbxBaseRef Load (SvStream &)
 
static ErrCode const & GetError ()
 
static OUString const & GetErrorMsg ()
 
static void SetError (ErrCode)
 
static void SetError (ErrCode, const OUString &)
 
static bool IsError ()
 
static void ResetError ()
 
static void AddFactory (SbxFactory *)
 
static void RemoveFactory (SbxFactory const *)
 
static SbxBaseRef Create (sal_uInt16, sal_uInt32)
 
static SbxObjectRef CreateObject (const OUString &)
 

Protected Member Functions

virtual ~SbxVariable () override
 
virtual bool LoadData (SvStream &, sal_uInt16) override
 
virtual std::pair< bool, sal_uInt32 > StoreData (SvStream &) const override
 
- Protected Member Functions inherited from SbxValue
virtual void Broadcast (SfxHintId)
 
virtual ~SbxValue () override
 
virtual bool LoadData (SvStream &, sal_uInt16) override
 
virtual std::pair< bool, sal_uInt32 > StoreData (SvStream &) const override
 
- Protected Member Functions inherited from SbxBase
 SbxBase ()
 
 SbxBase (const SbxBase &)
 
SbxBaseoperator= (const SbxBase &)
 
virtual ~SbxBase () override
 
virtual sal_uInt16 GetVersion () const =0
 
virtual sal_uInt16 GetSbxId () const =0
 
- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Protected Attributes

SbxInfoRef pInfo
 
sal_uInt32 nUserData = 0
 
SbxObjectpParent = nullptr
 
- Protected Attributes inherited from SbxValue
SbxValues aData
 
OUString aPic
 
OUString aToolString
 
- Protected Attributes inherited from SbxBase
SbxFlagBits nFlags
 

Private Attributes

OUString m_aDeclareClassName
 
css::uno::Reference< css::uno::XInterface > m_xComListener
 
StarBASICm_pComListenerParentBasic = nullptr
 
std::unique_ptr< SfxBroadcastermpBroadcaster
 
OUString maName
 
OUString maNameCI
 
SbxArrayRef mpPar
 
sal_uInt16 nHash = 0
 

Friends

class SbMethod
 

Detailed Description

Definition at line 242 of file sbxvar.hxx.

Constructor & Destructor Documentation

◆ ~SbxVariable()

SbxVariable::~SbxVariable ( )
overrideprotectedvirtual

Definition at line 89 of file sbxvar.cxx.

References DimAsNew, SbxBase::IsSet(), mpBroadcaster, and removeDimAsNewRecoverItem().

◆ SbxVariable() [1/3]

SbxVariable::SbxVariable ( )

Definition at line 43 of file sbxvar.cxx.

Referenced by SbUnoObject::Find(), SbUnoClass::Find(), and SbModule::Find().

◆ SbxVariable() [2/3]

SbxVariable::SbxVariable ( SbxDataType  t)

Definition at line 85 of file sbxvar.cxx.

References t.

◆ SbxVariable() [3/3]

SbxVariable::SbxVariable ( const SbxVariable r)

Member Function Documentation

◆ Broadcast()

void SbxVariable::Broadcast ( SfxHintId  nHintId)
overridevirtual

◆ ClearComListener()

void SbxVariable::ClearComListener ( )

Definition at line 401 of file sbxvar.cxx.

References m_xComListener.

Referenced by disposeComVariablesForBasic().

◆ Dump()

void SbxVariable::Dump ( SvStream rStrm,
bool  bDumpAll 
)

◆ GetBroadcaster()

SfxBroadcaster & SbxVariable::GetBroadcaster ( )

◆ GetClass()

SbxClassType SbxVariable::GetClass ( ) const
virtual

Reimplemented in SbxProperty, SbxMethod, and SbxObject.

Definition at line 337 of file sbxvar.cxx.

References Variable.

Referenced by SbxObject::FindVar(), GetName(), SbxObject::Insert(), LoadData(), and SbxObject::QuickInsert().

◆ GetDeclareClassName()

const OUString & SbxVariable::GetDeclareClassName ( ) const

Definition at line 381 of file sbxvar.cxx.

References m_aDeclareClassName.

◆ GetHashCode()

sal_uInt16 SbxVariable::GetHashCode ( ) const
inline

◆ GetInfo()

SbxInfo * SbxVariable::GetInfo ( )
virtual

◆ GetName()

const OUString & SbxVariable::GetName ( SbxNameType  t = SbxNameType::NONE) const

Definition at line 199 of file sbxvar.cxx.

References Any, As, ByRef, CaseInsensitive, GetClass(), GetInfo(), GetSbxRes(), GetType(), i, tools::SvRef< typename T >::is(), maName, maNameCI, NameToCaseInsensitiveName(), NONE, Optional, pInfo, Property, SbxARRAY, SbxBYREF, SbxSTRING, ShortTypes, t, and Types.

Referenced by checkUnoStructCopy(), copyToLibraryContainer(), SbModule::createCOMWrapperForIface(), SbUserFormModule::CreateInstance(), SbxObject::Dump(), Dump(), BasicManager::ExecuteMacro(), SbxObject::Find(), SbUnoClass::Find(), SbModule::Find(), StarBASIC::Find(), SbiRuntime::FindElementExtern(), StarBASIC::FindModule(), SbxObject::FindVar(), SbModule::GetUnoModule(), SbModule::handleProcedureProperties(), Impl_DumpMethods(), SbUnoStructRefObject::Impl_DumpProperties(), Impl_DumpProperties(), BasicCollection::implGetIndexForName(), StarBASIC::InitAllModules(), SbUserFormModule::InitObject(), SbxObject::Insert(), SbUserFormModuleInstance::IsClass(), SbUnoStructRefObject::Notify(), SbUnoObject::Notify(), SbUnoService::Notify(), SbUnoSingleton::Notify(), BasicCollection::Notify(), SbModule::Notify(), SbxCollection::Notify(), SbxObject::Notify(), SbxObject::QuickInsert(), SbxObject::Remove(), SbModule::Run(), SbiImage::Save(), SbModule::SbModule(), SbUnoObject::SbUnoObject(), SbiRuntime::SetIsMissing(), SetParent(), SbxValue::SetType(), SbObjModule::SetUnoObject(), SbiRuntime::StepSET_Impl(), SbModule::StoreBinaryData(), SbModule::StoreData(), SbxObject::StoreData(), and SbModule::~SbModule().

◆ GetParameters()

SbxArray * SbxVariable::GetParameters ( ) const

◆ GetParent() [1/2]

SbxObject * SbxVariable::GetParent ( )
inline

Definition at line 297 of file sbxvar.hxx.

References pParent.

◆ GetParent() [2/2]

const SbxObject * SbxVariable::GetParent ( ) const
inline

◆ GetType()

SbxDataType SbxVariable::GetType ( ) const
overridevirtual

◆ GetUserData()

sal_uInt32 SbxVariable::GetUserData ( ) const
inline

◆ IsBroadcaster()

bool SbxVariable::IsBroadcaster ( ) const
inline

Definition at line 293 of file sbxvar.hxx.

References mpBroadcaster.

Referenced by SbUnoClass::Find(), and SendHint_().

◆ LoadData()

bool SbxVariable::LoadData ( SvStream rStrm,
sal_uInt16  nVer 
)
overrideprotectedvirtual

◆ MakeHashCode()

static constexpr sal_uInt16 SbxVariable::MakeHashCode ( std::u16string_view  aName)
inlinestaticconstexpr

◆ NameToCaseInsensitiveName()

OUString SbxVariable::NameToCaseInsensitiveName ( const OUString &  rName)
static

◆ operator=()

SbxVariable & SbxVariable::operator= ( const SbxVariable r)

◆ SBX_DECL_PERSIST_NODATA()

SbxVariable::SBX_DECL_PERSIST_NODATA ( SBXID_VARIABLE  ,
 
)

◆ SetComListener()

void SbxVariable::SetComListener ( const css::uno::Reference< css::uno::XInterface > &  xComListener,
StarBASIC pParentBasic 
)

◆ SetDeclareClassName()

void SbxVariable::SetDeclareClassName ( const OUString &  rDeclareClassName)

Definition at line 386 of file sbxvar.cxx.

References m_aDeclareClassName.

◆ SetInfo()

void SbxVariable::SetInfo ( SbxInfo *  p)

Definition at line 173 of file sbxvar.cxx.

References p, and pInfo.

Referenced by BasicCollection::Notify(), SbiStdObject::Notify(), SbiCodeGen::Save(), and SbiRuntime::SetIsMissing().

◆ SetModified()

void SbxVariable::SetModified ( bool  b)
overridevirtual

◆ SetName()

void SbxVariable::SetName ( const OUString &  rName)

◆ SetParameters()

void SbxVariable::SetParameters ( SbxArray p)

◆ SetParent()

void SbxVariable::SetParent ( SbxObject p)
virtual

◆ SetUserData()

void SbxVariable::SetUserData ( sal_uInt32  n)
inline

Definition at line 279 of file sbxvar.hxx.

References n, and nUserData.

Referenced by SbiStdObject::Find().

◆ StoreData()

std::pair< bool, sal_uInt32 > SbxVariable::StoreData ( SvStream rStrm) const
overrideprotectedvirtual

Friends And Related Function Documentation

◆ SbMethod

friend class SbMethod
friend

Definition at line 244 of file sbxvar.hxx.

Referenced by SbMethod::Broadcast().

Member Data Documentation

◆ m_aDeclareClassName

OUString SbxVariable::m_aDeclareClassName
private

Definition at line 246 of file sbxvar.hxx.

Referenced by GetDeclareClassName(), operator=(), and SetDeclareClassName().

◆ m_pComListenerParentBasic

StarBASIC* SbxVariable::m_pComListenerParentBasic = nullptr
private

Definition at line 248 of file sbxvar.hxx.

Referenced by operator=(), SbxVariable(), and SetComListener().

◆ m_xComListener

css::uno::Reference< css::uno::XInterface > SbxVariable::m_xComListener
private

Definition at line 247 of file sbxvar.hxx.

Referenced by ClearComListener(), operator=(), SbxVariable(), and SetComListener().

◆ maName

OUString SbxVariable::maName
private

Definition at line 250 of file sbxvar.hxx.

Referenced by GetName(), LoadData(), SbxVariable(), SetName(), and StoreData().

◆ maNameCI

OUString SbxVariable::maNameCI
mutableprivate

Definition at line 251 of file sbxvar.hxx.

Referenced by GetName(), and SetName().

◆ mpBroadcaster

std::unique_ptr<SfxBroadcaster> SbxVariable::mpBroadcaster
private

◆ mpPar

SbxArrayRef SbxVariable::mpPar
private

Definition at line 252 of file sbxvar.hxx.

Referenced by SbMethod::Broadcast(), Broadcast(), GetParameters(), and SetParameters().

◆ nHash

sal_uInt16 SbxVariable::nHash = 0
private

Definition at line 253 of file sbxvar.hxx.

Referenced by GetHashCode(), LoadData(), SbxVariable(), and SetName().

◆ nUserData

sal_uInt32 SbxVariable::nUserData = 0
protected

Definition at line 257 of file sbxvar.hxx.

Referenced by GetUserData(), LoadData(), SbxVariable(), SetUserData(), and StoreData().

◆ pInfo

SbxInfoRef SbxVariable::pInfo
protected

◆ pParent

SbxObject* SbxVariable::pParent = nullptr
protected

The documentation for this class was generated from the following files: