LibreOffice Module oox (master) 1
Functions
oox::ole::VbaHelper Namespace Reference

Static helper functions for the VBA filters. More...

Functions

bool readDirRecord (sal_uInt16 &rnRecId, StreamDataSequence &rRecData, BinaryInputStream &rInStrm)
 Reads the next record from the VBA directory stream 'dir'. More...
 
bool extractKeyValue (OUString &rKey, OUString &rValue, std::u16string_view rKeyValue)
 Extracts a key/value pair from a string separated by an equality sign. More...
 

Detailed Description

Static helper functions for the VBA filters.

Function Documentation

◆ extractKeyValue()

bool oox::ole::VbaHelper::extractKeyValue ( OUString &  rKey,
OUString &  rValue,
std::u16string_view  rKeyValue 
)

Extracts a key/value pair from a string separated by an equality sign.

Parameters
rKey(out parameter) The key before the separator.
rValue(out parameter) The value following the separator.
rCodeLineThe source key/value pair.
Returns
True = Equality sign separator found, and the returned key and value are not empty. False otherwise.

Definition at line 45 of file vbahelper.cxx.

References o3tl::trim().

Referenced by oox::ole::VbaUserForm::importForm(), and oox::ole::VbaProject::readVbaModules().

◆ readDirRecord()

bool oox::ole::VbaHelper::readDirRecord ( sal_uInt16 &  rnRecId,
StreamDataSequence rRecData,
BinaryInputStream rInStrm 
)

Reads the next record from the VBA directory stream 'dir'.

Parameters
rnRecId(out parameter) The record identifier of the new record.
rRecData(out parameter) The contents of the new record.
rInStrmThe 'dir' stream.
Returns
True = next record successfully read. False on any error, or if the stream is EOF.

Definition at line 29 of file vbahelper.cxx.

References oox::BinaryStreamBase::isEof(), oox::BinaryInputStream::readData(), oox::BinaryInputStream::readInt32(), oox::BinaryInputStream::readuInt16(), and oox::ole::VBA_ID_PROJECTVERSION.

Referenced by oox::ole::VbaModule::importDirRecords(), and oox::ole::VbaProject::readVbaModules().