144#define LABEL_READ_BUFFER_SIZE 500
145#define MAX_SEARCH_AMOUNT 1024 * 1024
161 unsigned long BufferStartOffset =
Length;
172 unsigned long UsedBufferSize;
174 UsedBufferSize = CurrOffset;
183 BufferStartOffset = CurrOffset - UsedBufferSize;
270 if (
Length > nRemainingSize)
272 SAL_WARN(
"lwp",
"stream too short for claimed no of records");
276 #define STACK_BUFFER_SIZE 256
278 std::unique_ptr<char[]> sAllocBuffer;
282 sAllocBuffer.reset(
new char[
Length]);
283 sBuffer = sAllocBuffer.get();
287 sBuffer = sStackBuffer;
302 sName, &pPrevNamedObjectListElmt) !=
nullptr)
311 pPrevObject,
sName, pPrevNamedObjectListElmt);
314 pPrevObject,
sName, pPrevNamedObjectListElmt);
347 if (pProperty !=
nullptr)
355 pObject->GetProperties().GetLast());
391 bool Immediate =
false;
392 bool EightByteOffset =
false;
406 Length = 0; Immediate =
true;
410 Length = 1; Immediate =
true;
414 Length = 2; Immediate =
true;
418 Length = 3; Immediate =
true;
423 Length = 4; Immediate =
true;
428 EightByteOffset =
true;
436 if (Immediate &&
Length != 0)
445 if (pValue !=
nullptr)
498 assert(
cBlockSize &&
"cBlockSize of 0 should have already caused BenErr_UnknownBentoFormatVersion in CBenTOCReader::ReadLabel");
514 std::memcpy(pBuffer,
cpTOC.get() +
cCurr, Amt);
css::uno::Sequence< sal_Int8 > Buffer
#define BEN_MAGIC_BYTES_SIZE
#define BEN_CURR_MAJOR_VERSION
#define BEN_CONT_OFFSET4_LEN4
#define BEN_CONT_OFFSET8_LEN4
#define BEN_END_OF_BUFFER
#define BEN_REFERENCE_LIST_ID
#define BEN_READ_PAST_END_OF_TOC
#define BEN_PROPID_GLOBAL_PROPERTY_NAME
#define BEN_PROPID_OBJ_REFERENCES
#define BEN_SEGMENT_CODE_START
#define BEN_TYPEID_TOC_TYPE
#define BEN_PROPID_TOC_SEED
#define BEN_PROPID_GLOBAL_TYPE_NAME
#define BEN_TYPEID_7_BIT_ASCII
#define BEN_SEGMENT_CODE_END
#define BEN_CONT_IMMEDIATE4
std::unique_ptr< BenByte[]> cpTOC
BenError ReadLabelAndTOC()
LtcBenContainer * cpContainer
BenError ReadSegment(CBenValue *pValue, BenByte *pLookAhead)
BenError GetByte(BenByte *pByte)
BenError ReadLabel(tools::ULong *pTOCOffset, tools::ULong *pTOCSize)
bool CanGetData(tools::ULong Amt)
BenError SearchForLabel(BenByte *pLabel)
BenError ReadSegments(CBenValue *pValue, BenByte *pLookAhead)
BenError GetData(void *pBuffer, tools::ULong Amt)
BenError GetDWord(BenDWord *pDWord)
sal_uLong remainingSize() const
BenError ReadKnownSize(void *pBuffer, size_t Amt)
Read buffer from bento file with specified size.
sal_uLong GetSize() const
CUtList & GetNamedObjects()
void SeekToPosition(BenContainerPos Pos)
Seek to position from the beginning of the bento file.
void SetNextAvailObjectID(BenObjectID ID)
void SeekFromEnd(tools::Long Offset)
Seek to position compare to end of bento file.
EmbeddedObjectRef * pObject
#define SAL_WARN(area, stream)
const char gsBenMagicBytes[]
sal_uInt16 UtGetIntelWord(sal_uInt8 const *pData)
@ BenErr_NotBentoContainer
@ BenErr_64BitOffsetNotSupported
@ BenErr_PropertyWithMoreThanOneValue
@ BenErr_UnknownBentoFormatVersion
@ BenErr_NamedObjectError
@ BenErr_ReadPastEndOfTOC
sal_uInt8 UtGetIntelByte(sal_uInt8 const *pData)
CBenNamedObject * FindNamedObject(CUtList *pList, std::string_view rName, CUtListElmt **ppPrev)
sal_uInt32 BenContainerPos
sal_uInt32 UtGetIntelDWord(sal_uInt8 const *pData)
#define MAX_SEARCH_AMOUNT
#define STACK_BUFFER_SIZE
#define LABEL_READ_BUFFER_SIZE