20#ifndef INCLUDED_BASIC_SBMOD_HXX
21#define INCLUDED_BASIC_SBMOD_HXX
23#include <config_options.h>
28#include <rtl/ustring.hxx>
32#include <com/sun/star/uno/Reference.hxx>
40class SbClassModuleObject;
41class CodeCompleteDataCache;
54 friend class SbClassModuleObject;
63 css::uno::Reference< css::script::XInvocation >
mxWrapper;
76 SAL_DLLPRIVATE
void StartDefinitions();
79 SAL_DLLPRIVATE
void GetProcedureProperty(
const OUString&,
SbxDataType );
80 SAL_DLLPRIVATE
void GetIfaceMapperMethod(
const OUString&,
SbMethod* );
81 SAL_DLLPRIVATE
void EndDefinitions(
bool=
false );
82 SAL_DLLPRIVATE
void Run(
SbMethod* );
83 SAL_DLLPRIVATE
void RunInit();
84 SAL_DLLPRIVATE
void ClearPrivateVars();
85 SAL_DLLPRIVATE
void ClearVarsDependingOnDeletedBasic(
StarBASIC* pDeletedBasic );
86 SAL_DLLPRIVATE
void GlobalRunInit(
bool bBasicStart );
87 SAL_DLLPRIVATE
void GlobalRunDeInit();
88 SAL_DLLPRIVATE
const sal_uInt8* FindNextStmnt(
const sal_uInt8*, sal_uInt16&, sal_uInt16& )
const;
89 SAL_DLLPRIVATE
const sal_uInt8* FindNextStmnt(
const sal_uInt8*, sal_uInt16&, sal_uInt16&,
90 bool bFollowJumps,
const SbiImage* pImg=
nullptr )
const;
92 SAL_DLLPRIVATE
virtual std::pair<bool, sal_uInt32>
StoreData(
SvStream& )
const override;
101 SbModule(
const OUString&,
bool bVBASupport =
false );
103 SAL_DLLPRIVATE
virtual void Clear()
override;
108 void SetSource32(
const OUString& r );
111 bool IsCompiled()
const;
112 SAL_DLLPRIVATE
const SbxObject* FindType(
const OUString& aTypeName )
const;
114 SAL_DLLPRIVATE
bool IsBreakable( sal_uInt16 nLine )
const;
115 SAL_DLLPRIVATE
bool IsBP( sal_uInt16 nLine )
const;
116 bool SetBP( sal_uInt16 nLine );
117 bool ClearBP( sal_uInt16 nLine );
121 SAL_DLLPRIVATE
void StoreBinaryData(
SvStream& );
122 SAL_DLLPRIVATE
void LoadBinaryData(
SvStream& );
123 SAL_DLLPRIVATE
bool ExceedsImgVersion12ModuleSize();
124 SAL_DLLPRIVATE
void fixUpMethodStart(
bool bCvtToLegacy,
SbiImage* pImg =
nullptr )
const;
125 SAL_DLLPRIVATE
bool HasExeCode();
127 SAL_DLLPRIVATE
void SetVBASupport(
bool bSupport );
131 SAL_DLLPRIVATE
void AddVarName(
const OUString& aName );
132 SAL_DLLPRIVATE
void RemoveVars();
133 css::uno::Reference< css::script::XInvocation >
const & GetUnoModule();
134 bool createCOMWrapperForIface( css::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject );
135 void GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache);
138 static OUString GetKeywordCase( std::u16string_view sKeyword );
145class UNLESS_MERGELIBS(BASIC_DLLPUBLIC) SbClassModuleObject final :
public SbModule
148 bool mbInitializeEventDone;
152 virtual ~SbClassModuleObject()
override;
160 {
return mpClassModule; }
162 void triggerInitializeEvent();
163 void triggerTerminateEvent();
friend class SbClassModuleObject
const SbxArrayRef & GetMethods() const
virtual SAL_DLLPRIVATE SbxVariable * Find(const OUString &, SbxClassType) override
sal_Int32 GetModuleType() const
virtual SAL_DLLPRIVATE void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
std::unique_ptr< SbiImage > pImage
SbModule & operator=(const SbModule &)=delete
bool IsOptionCompatible() const override
SbModule(const SbModule &)=delete
std::vector< OUString > mModuleVariableNames
void SetModuleType(sal_Int32 nType)
css::uno::Reference< css::script::XInvocation > mxWrapper
std::unique_ptr< SbClassData > pClassData
bool isProxyModule() const
const OUString & GetSource32() const
SBX_DECL_PERSIST_NODATA(SBXID_BASICMOD, 2)
bool IsVBASupport() const
virtual bool LoadCompleted()
virtual void Clear() override
virtual SbxVariable * Find(const OUString &, SbxClassType)
virtual bool LoadData(SvStream &, sal_uInt16) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual std::pair< bool, sal_uInt32 > StoreData(SvStream &) const override
virtual void SetParent(SbxObject *)
UNOTOOLS_DLLPUBLIC css::uno::Any GetProperty(OUString const &url, OUString const &property)
tools::SvRef< SbModule > SbModuleRef
std::vector< SbModuleRef > SbModules
std::deque< sal_uInt16 > SbiBreakpoints