32#include <rtl/ustring.hxx>
41 , aErrorMsg(OUString())
177 pNew = rpFac->Create( nSbxId, nCreator );
181 SAL_WARN_IF(!pNew,
"basic",
"No factory for SBX ID " << nSbxId);
191 pNew = rpFac->CreateObject( rClass );
195 SAL_WARN_IF(!pNew,
"basic",
"No factory for object class " << rClass);
214 sal_uInt16 nSbxId(0), nFlagsTmp(0), nVer(0);
215 sal_uInt32 nCreator(0), nSize(0);
225 if(
p->LoadData(
rStrm, nVer ) )
229 DBG_ASSERT( nOldPos >= nNewPos,
"SBX: Too much data loaded" );
230 if( nOldPos != nNewPos )
232 if( !
p->LoadCompleted() )
305 m_Params.push_back(std::make_unique<SbxParamInfo>(rName, eType, nFlags));
308const SbxParamInfo* SbxInfo::GetParam( sal_uInt16 n )
const
310 if (n < 1 || n > m_Params.size())
313 return m_Params[
n - 1].get();
316void SbxInfo::LoadData(
SvStream& rStrm, sal_uInt16 nVer )
321 RTL_TEXTENCODING_ASCII_US);
323 RTL_TEXTENCODING_ASCII_US);
327 sal_uInt16
nType(0), nFlagsTmp(0);
328 sal_uInt32 nUserData = 0;
330 RTL_TEXTENCODING_ASCII_US);
335 AddParam( aName,
static_cast<SbxDataType>(nType), nFlags );
337 p.nUserData = nUserData;
341void SbxInfo::StoreData(
SvStream& rStrm )
const
344 RTL_TEXTENCODING_ASCII_US );
346 RTL_TEXTENCODING_ASCII_US);
348 for (
auto const& i : m_Params)
351 RTL_TEXTENCODING_ASCII_US);
bool IsSbxData_Impl()
returns true if the SbxAppData is still valid, used to check if we are in shutdown.
SbxAppData & GetSbxData_Impl()
virtual bool IsFixed() const
static OUString const & GetErrorMsg()
SbxBase & operator=(const SbxBase &)
virtual bool LoadCompleted()
static void SetError(ErrCode)
static void AddFactory(SbxFactory *)
static ErrCode const & GetError()
bool IsSet(SbxFlagBits n) const
void SetFlag(SbxFlagBits n)
virtual sal_uInt16 GetSbxId() const =0
SbxFlagBits GetFlags() const
static SbxObjectRef CreateObject(const OUString &)
static SbxBaseRef Create(sal_uInt16, sal_uInt32)
virtual ~SbxBase() override
virtual sal_uInt16 GetVersion() const =0
virtual void SetModified(bool)
virtual std::pair< bool, sal_uInt32 > StoreData(SvStream &) const =0
std::pair< bool, sal_uInt32 > Store(SvStream &)
static SbxBaseRef Load(SvStream &)
static void RemoveFactory(SbxFactory const *)
virtual SbxDataType GetType() const
void ResetFlag(SbxFlagBits n)
virtual SbxBaseRef Create(sal_uInt16 nSbxId, sal_uInt32)
virtual SbxObjectRef CreateObject(const OUString &)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
void SetError(ErrCode nErrorCode)
sal_uInt64 Seek(sal_uInt64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
#define DBG_ASSERT(sCon, aError)
#define SVSTREAM_FILEFORMAT_ERROR
#define LANGUAGE_DONTKNOW
#define SAL_WARN_IF(condition, area, stream)
constexpr auto SBXID_PROPERTY
constexpr auto SBXID_VARIABLE
constexpr auto SBXID_ARRAY
constexpr auto SBXID_METHOD
constexpr auto SBXID_VALUE
constexpr auto SBXID_FIXCOLLECTION
constexpr auto SBXID_COLLECTION
constexpr auto SBXID_OBJECT
constexpr auto SBXID_DIMARRAY
OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
std::unique_ptr< SbxBasicFormater > pBasicFormater
std::vector< SbxFactory * > m_Factories
tools::SvRef< SvRefBase > mrImplRepository