22#include <rtl/ustring.hxx>
This class is used to import record oriented streams.
Iterates over formatted string portions.
XclImpStringIterator & operator++()
Moves iterator to next text portion.
XclImpStringIterator(const XclImpString &rString)
size_t mnFormatsBeg
First character of next portion.
sal_Int32 mnTextBeg
Current text portion.
sal_uInt16 GetPortionFont() const
Returns the font index of the current text portion.
const XclFormatRunVec & mrFormats
The processed string.
size_t GetPortionIndex() const
Returns the index of the current text portion.
size_t mnFormatsEnd
Formatting run index for current portion.
size_t mnPortion
The vector of formatting runs.
OUString GetPortionText() const
Returns the string of the current text portion.
sal_Int32 mnTextEnd
First character of current portion.
bool Is() const
Returns true, if the iterator references a valid text portion.
This class represents an unformatted or formatted string and provides importing from stream.
void SetFormats(XclFormatRunVec &&rFormats)
Sets the passed formatting buffer.
void ReadObjFormats(XclImpStream &rStrm, sal_uInt16 nFormatSize)
Reads and appends formatting runs from an OBJ or TXO record.
bool IsEmpty() const
Returns true, if the string is empty.
bool IsRich() const
Returns true, if the string contains formatting information.
XclFormatRunVec maFormats
The text data of the string.
XclImpString()
Constructs an empty string.
void Read(XclImpStream &rStrm, XclStrFlags nFlags=XclStrFlags::NONE)
Reads a complete string from the passed stream.
const XclFormatRunVec & GetFormats() const
Returns the formatting run vector.
static void AppendFormat(XclFormatRunVec &rFormats, sal_uInt16 nChar, sal_uInt16 nFontIdx)
Insert a formatting run to the passed format buffer.
void ReadFormats(XclImpStream &rStrm)
Reads and appends the formatting information (run count and runs) from stream.
void SetText(const OUString &rText)
Sets the passed string data.
const OUString & GetText() const
Returns the pure text data of the string.
::std::vector< XclFormatRun > XclFormatRunVec
A vector with all formatting runs for a rich-string.
XclStrFlags
Flags used to specify import/export mode of strings.