56#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_BENTO_HXX
57#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_BENTO_HXX
66#define BEN_CC __stdcall
68#define BEN_EXPORT __declspec(dllexport)
80#define BEN_CURR_MAJOR_VERSION 2
81#define BEN_CURR_MINOR_VERSION 0
82#define BEN_MAGIC_BYTES_SIZE 8
83#define BEN_LABEL_SIZE 24
85#define BEN_MAGIC_BYTES "\xA4""CM""\xA5""Hdr""\xD7"
122class LtcBenContainer;
126class CBenValueSegment;
127class CBenNamedObject;
128class CBenPropertyName;
181 virtual std::size_t
GetData(
void* pData, std::size_t nSize)
override;
182 virtual std::size_t
PutData(
const void* pData, std::size_t nSize)
override;
183 virtual sal_uInt64
SeekPos( sal_uInt64 nPos )
override;
184 virtual void SetSize( sal_uInt64 nSize )
override;
211 void Read(
void * pBuffer,
size_t MaxSize,
256 size_t Offset,
size_t MaxSize,
size_t* pAmtRead);
361 pPrevNamedObjectListElmt) { ; }
372 pPrevNamedObjectListElmt) { ; }
encapsulate XInputStream to provide SvStream like interfaces
BenObjectID GetID() const
CBenIDListElmt(BenObjectID ID, CUtListElmt *pPrev)
CBenIDListElmt(BenObjectID ID)
CBenNamedObjectListElmt(CUtListElmt *pPrev)
CBenNamedObject * GetNamedObject()
CBenNamedObject * cpNamedObject
void SetNamedObject(CBenNamedObject *pObj)
virtual bool IsPropertyName()
CBenNamedObject(LtcBenContainer *pContainer, BenObjectID ObjectID, CUtListElmt *pPrevObject, OString aName, CUtListElmt *pPrevNamedObjectListElmt)
const OString & GetName() const
CBenNamedObjectListElmt cNameListElmt
CBenObject(LtcBenContainer *pContainer, BenObjectID ObjectID, CUtListElmt *pPrev)
CBenProperty * UseProperty(BenObjectID PropertyID)
CUtOwningList cProperties
CUtList & GetProperties()
LtcBenContainer * cpContainer
CBenValue * UseValue(BenObjectID PropertyID)
LtcBenContainer * GetContainer()
CBenPropertyName(LtcBenContainer *pContainer, BenObjectID ObjectID, CUtListElmt *pPrevObject, const OString &rName, CUtListElmt *pPrevNamedObjectListElmt)
virtual bool IsPropertyName() override
CBenObject * GetBenObject()
CBenProperty(CBenObject *pObject, BenObjectID PropertyID, BenObjectID TypeID, CUtListElmt *pPrevProperty)
LtcBenContainer * GetContainer()
CBenTypeName(LtcBenContainer *pContainer, BenObjectID ObjectID, CUtListElmt *pPrevObject, const OString &rName, CUtListElmt *pPrevNamedObjectListElmt)
CBenValueSegment(CBenValue *pValue, BenContainerPos Pos, size_t Size)
BenByte * GetImmediateData()
BenContainerPos GetPosition() const
CBenValueSegment(CBenValue *pValue, const void *pImmData, unsigned short Size)
void SetProperty(CBenProperty *pProperty)
CBenProperty *BEN_EXPORT GetProperty()
CUtOwningList cValueSegments
CBenProperty * cpProperty
CBenValue(BenObjectID TypeID)
void ReadValueData(void *pBuffer, size_t Offset, size_t MaxSize, size_t *pAmtRead)
CUtList & GetValueSegments()
CBenValueSegment * GetNextValueSegment(CBenValueSegment const *pCurrValueSegment)
CUtListElmt * GetNextOrNULL(CUtListElmt const *pCurr)
std::vector< sal_uInt8 > GetGraphicData(const char *pObjectName)
Find hazily according to object ID.
sal_uLong remainingSize() const
BenError ReadKnownSize(void *pBuffer, size_t Amt)
Read buffer from bento file with specified size.
sal_uLong GetSize() const
LtcUtBenValueStream * FindNextValueStreamWithPropertyName(const char *sPropertyName)
Find the next value stream with property name.
BenObjectID cNextAvailObjectID
LtcBenContainer(LwpSvStream *pStream)
Construction.
CUtList & GetNamedObjects()
LtcUtBenValueStream * FindValueStreamWithPropertyName(const char *sPropertyName)
Find the unique value stream with property name.
CBenObject * GetNextObject(CBenObject const *pCurrObject)
void SeekToPosition(BenContainerPos Pos)
Seek to position from the beginning of the bento file.
CBenObject * FindNextObjectWithProperty(CBenObject *pCurrObject, BenObjectID PropertyID)
void RegisterPropertyName(const char *sPropertyName, CBenPropertyName **ppPropertyName)
void SetNextAvailObjectID(BenObjectID ID)
void Read(void *pBuffer, size_t MaxSize, size_t *pAmtRead)
Read buffer for bento file with specified buffer.
void SeekFromEnd(tools::Long Offset)
Seek to position compare to end of bento file.
virtual void FlushData() override
Flush data function, not supported now.
LtcUtBenValueStream(CBenValue *pValue)
Construction.
virtual sal_uInt64 SeekPos(sal_uInt64 nPos) override
Seek function of value stream.
virtual void SetSize(sal_uInt64 nSize) override
Set buffer size function.
sal_uLong m_ulValueLength
sal_uLong GetSize() const
virtual std::size_t PutData(const void *pData, std::size_t nSize) override
Value stream write function, not supported now.
virtual std::size_t GetData(void *pData, std::size_t nSize) override
Value stream read function.
virtual ~LtcUtBenValueStream() override
EmbeddedObjectRef * pObject
sal_uLong BenOpenContainer(LwpSvStream *pStream, std::unique_ptr< LtcBenContainer > *ppContainer)
New bento container from file stream.
@ BenErr_IllegalContinuedImmediate
@ BenErr_DuplicateObjectID
@ BenErr_IllegalInMemoryTOC
@ BenErr_NotBentoContainer
@ BenErr_64BitOffsetNotSupported
@ BenErr_PropertyAlreadyExists
@ BenErr_PropertyWithMoreThanOneValue
@ BenErr_UnknownBentoFormatVersion
@ BenErr_ContainerWithNoObjects
@ BenErr_InvalidWriteOffset
@ BenErr_UnexpectedEndOfFile
@ BenErr_InvalidImmediateWrite
@ BenErr_ObjectWithNoProperties
@ BenErr_NamedObjectError
@ BenErr_PropertyWithNoValues
@ BenErr_ReadPastEndOfTOC
@ BenErr_ReadPastEndOfContainer
@ BenErr_NamedObjectIllegalValue
@ BenErr_BadReferencedList
sal_uInt32 BenContainerPos