LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XclExpString Class Reference

This class stores an unformatted or formatted string for Excel export. More...

#include <xestring.hxx>

Public Member Functions

 XclExpString (XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Constructs an empty BIFF8 Unicode string. More...
 
 XclExpString (const OUString &rString, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Constructs an unformatted BIFF8 Unicode string. More...
 
void Assign (const OUString &rString, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Assigns an unformatted string, converts this object to a BIFF8 Unicode string. More...
 
void Assign (sal_Unicode cChar)
 Assigns a Unicode character, converts this object to a BIFF8 Unicode string. More...
 
void AssignByte (std::u16string_view rString, rtl_TextEncoding eTextEnc, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Assigns an unformatted string, converts this object to a BIFF2-BIFF7 byte string. More...
 
void Append (std::u16string_view rString)
 Appends a string. More...
 
void AppendByte (std::u16string_view rString, rtl_TextEncoding eTextEnc)
 Appends a string. More...
 
void AppendByte (sal_Unicode cChar, rtl_TextEncoding eTextEnc)
 Appends a character. More...
 
void AppendFormat (sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDropDuplicate=true)
 Appends a formatting run. More...
 
void AppendTrailingFormat (sal_uInt16 nFontIdx)
 Appends a trailing formatting run with the passed font index. More...
 
void LimitFormatCount (sal_uInt16 nMaxCount)
 Removes formatting runs at the end, if the string contains too much. More...
 
sal_uInt16 GetLeadingFont ()
 Returns the font index of the first char in the formatting run, or EXC_FONT_NOTFOUND. More...
 
sal_uInt16 RemoveLeadingFont ()
 The same as above + additionally remove the given font from the formatting run. More...
 
sal_uInt16 Len () const
 Returns the character count of the string. More...
 
bool IsEmpty () const
 Returns true, if the string is empty. More...
 
bool IsWrapped () const
 Returns true, if the string contains line breaks. More...
 
bool IsEqual (const XclExpString &rCmp) const
 Returns true, if this string is equal to the passed string. More...
 
bool IsLessThan (const XclExpString &rCmp) const
 Returns true, if this string is less than the passed string. More...
 
bool IsRich () const
 Returns true, if the string contains formatting information. More...
 
sal_uInt16 GetFormatsCount () const
 Returns the current count of formatting runs for rich strings. More...
 
const XclFormatRunVecGetFormats () const
 Returns the vector with all formatting runs. More...
 
sal_uInt8 GetFlagField () const
 Returns the current string flags field to export. More...
 
sal_uInt16 GetHeaderSize () const
 Returns the byte count the header will take on export. More...
 
std::size_t GetBufferSize () const
 Returns the byte count the character buffer will take on export. More...
 
std::size_t GetSize () const
 Returns the byte count the whole string will take on export. More...
 
sal_uInt16 GetChar (sal_uInt16 nCharIdx) const
 Returns the specified character from the (already encoded) string. More...
 
sal_uInt16 GetHash () const
 Returns a hash value for the string. More...
 
const ScfUInt16VecGetUnicodeBuffer () const
 
void WriteLenField (XclExpStream &rStrm) const
 Writes the string length field (1 byte or 2 bytes). More...
 
void WriteFlagField (XclExpStream &rStrm) const
 Writes the string flags field (1 byte). More...
 
void WriteHeader (XclExpStream &rStrm) const
 Writes 8-bit or 16-bit length field and string flags field. More...
 
void WriteBuffer (XclExpStream &rStrm) const
 Writes the raw character buffer. More...
 
void WriteFormats (XclExpStream &rStrm, bool bWriteSize=false) const
 Writes the raw formatting run buffer. More...
 
void Write (XclExpStream &rStrm) const
 Writes the complete Unicode string. More...
 
void WriteHeaderToMem (sal_uInt8 *pnMem) const
 Writes the string header to memory. More...
 
void WriteBufferToMem (sal_uInt8 *pnMem) const
 Writes the raw character buffer to memory (8-bit or 16-bit little-endian). More...
 
void WriteToMem (sal_uInt8 *pnMem) const
 Writes the entire string to memory. More...
 
void WriteXml (XclExpXmlStream &rStrm) const
 

Private Member Functions

bool IsWriteFlags () const
 Returns true, if the flag field should be written. More...
 
bool IsWriteFormats () const
 Returns true, if the formatting run vector should be written. More...
 
void SetStrLen (sal_Int32 nNewLen)
 Sets the string length but regards the limit given in mnMaxLen. More...
 
void CharsToBuffer (const sal_Unicode *pcSource, sal_Int32 nBegin, sal_Int32 nLen)
 Inserts the passed character array into the internal character buffer. More...
 
void CharsToBuffer (const char *pcSource, sal_Int32 nBegin, sal_Int32 nLen)
 Inserts the passed character array into the internal character buffer. More...
 
void Init (sal_Int32 nCurrLen, XclStrFlags nFlags, sal_uInt16 nMaxLen, bool bBiff8)
 Initializes flags, string length, and resizes character buffer. More...
 
void Build (const sal_Unicode *pcSource, sal_Int32 nCurrLen, XclStrFlags nFlags, sal_uInt16 nMaxLen)
 Creates the character buffer from the given Unicode array. More...
 
void Build (const char *pcSource, sal_Int32 nCurrLen, XclStrFlags nFlags, sal_uInt16 nMaxLen)
 Creates the character buffer from the given character array. More...
 
void InitAppend (sal_Int32 nAddLen)
 Initializes string length and resizes character buffers for appending operation. More...
 
void BuildAppend (std::u16string_view)
 Appends the given Unicode array to the character buffer. More...
 
void BuildAppend (std::string_view)
 Appends the given character array to the character buffer. More...
 
void PrepareWrite (XclExpStream &rStrm, sal_uInt16 nBytes) const
 Initializes write process on stream. More...
 

Private Attributes

ScfUInt16Vec maUniBuffer
 
ScfUInt8Vec maCharBuffer
 The Unicode character buffer. More...
 
XclFormatRunVec maFormats
 The byte character buffer. More...
 
sal_uInt16 mnLen
 All formatting runs. More...
 
sal_uInt16 mnMaxLen
 Character count to export. More...
 
bool mbIsBiff8
 Maximum allowed number of characters. More...
 
bool mbIsUnicode
 true = BIFF8 Unicode string, false = BIFF2-7 bytestring. More...
 
bool mb8BitLen
 true, if at least one character is >0xFF. More...
 
bool mbSmartFlags
 true = write 8-bit string length; false = 16-bit. More...
 
bool mbSkipFormats
 true = omit flags on empty string; false = always write flags. More...
 
bool mbWrapped
 true = skip formats on export; false = write complete formatted string. More...
 
bool mbSkipHeader
 true = text contains several paragraphs. More...
 

Detailed Description

This class stores an unformatted or formatted string for Excel export.

The class supports two completely different types of Excel strings: 1) BIFF2-BIFF7 byte strings: The text is encoded as a 8-bit character array. The strings cannot contain any character formatting. 2) BIFF8 Unicode strings: The text may be stored as UCS-2 character array, or compressed to an 8-bit array, if all characters are less than U+0100. Unicode strings may contain a formatting array, that specifies the used FONT record for different ranges of characters.

The class provides full support for NUL characters in strings. On construction or assignment the passed flags specify the behaviour of the string while it is written to a stream (the 'Write' functions and 'operator<<').

Definition at line 47 of file xestring.hxx.

Constructor & Destructor Documentation

◆ XclExpString() [1/2]

XclExpString::XclExpString ( XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
explicit

Constructs an empty BIFF8 Unicode string.

Parameters
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.

Definition at line 99 of file xestring.cxx.

References Init().

◆ XclExpString() [2/2]

XclExpString::XclExpString ( const OUString &  rString,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
explicit

Constructs an unformatted BIFF8 Unicode string.

Parameters
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.

Definition at line 104 of file xestring.cxx.

References Assign().

Member Function Documentation

◆ Append()

void XclExpString::Append ( std::u16string_view  rString)

Appends a string.

Uses the string flags used in constructor or last Assign(). @descr This object must be a BIFF8 Unicode string.

Definition at line 132 of file xestring.cxx.

References BuildAppend().

Referenced by XclExpStringHelper::AppendChar(), and XclExpStringHelper::AppendString().

◆ AppendByte() [1/2]

void XclExpString::AppendByte ( sal_Unicode  cChar,
rtl_TextEncoding  eTextEnc 
)

Appends a character.

Uses the string flags used in constructor or last Assign(). @descr This object must be a BIFF2-BIFF7 byte string.

Definition at line 147 of file xestring.cxx.

References BuildAppend().

◆ AppendByte() [2/2]

void XclExpString::AppendByte ( std::u16string_view  rString,
rtl_TextEncoding  eTextEnc 
)

Appends a string.

Uses the string flags used in constructor or last Assign(). @descr This object must be a BIFF2-BIFF7 byte string.

Definition at line 137 of file xestring.cxx.

References BuildAppend(), and OUStringToOString().

Referenced by XclExpStringHelper::AppendChar(), and XclExpStringHelper::AppendString().

◆ AppendFormat()

void XclExpString::AppendFormat ( sal_uInt16  nChar,
sal_uInt16  nFontIdx,
bool  bDropDuplicate = true 
)

Appends a formatting run.

nChar must be greater than last contained character index.

Definition at line 163 of file xestring.cxx.

References EXC_STR_MAXLEN, EXC_STR_MAXLEN_8BIT, maFormats, and mbIsBiff8.

Referenced by AppendTrailingFormat().

◆ AppendTrailingFormat()

void XclExpString::AppendTrailingFormat ( sal_uInt16  nFontIdx)

Appends a trailing formatting run with the passed font index.

Definition at line 171 of file xestring.cxx.

References AppendFormat(), and mnLen.

◆ Assign() [1/2]

void XclExpString::Assign ( const OUString &  rString,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)

Assigns an unformatted string, converts this object to a BIFF8 Unicode string.

Parameters
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.

Definition at line 111 of file xestring.cxx.

References Build().

Referenced by ExcEScenario::ExcEScenario(), XclExpHeaderFooter::WriteBody(), XclExpFont::WriteBody(), XclExpStyle::WriteBody(), XclExpNumFmtBuffer::WriteFormatRecord(), XclExpDV::XclExpDV(), XclExpFileSharing::XclExpFileSharing(), and XclExpString().

◆ Assign() [2/2]

void XclExpString::Assign ( sal_Unicode  cChar)

Assigns a Unicode character, converts this object to a BIFF8 Unicode string.

Definition at line 116 of file xestring.cxx.

References Build(), EXC_STR_MAXLEN, and NONE.

◆ AssignByte()

void XclExpString::AssignByte ( std::u16string_view  rString,
rtl_TextEncoding  eTextEnc,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)

Assigns an unformatted string, converts this object to a BIFF2-BIFF7 byte string.

Parameters
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.

Definition at line 121 of file xestring.cxx.

References Build(), and OUStringToOString().

Referenced by XclExpHeaderFooter::WriteBody(), XclExpFont::WriteBody(), XclExpStyle::WriteBody(), XclExpNumFmtBuffer::WriteFormatRecord(), and XclExpFileSharing::XclExpFileSharing().

◆ Build() [1/2]

void XclExpString::Build ( const char *  pcSource,
sal_Int32  nCurrLen,
XclStrFlags  nFlags,
sal_uInt16  nMaxLen 
)
private

Creates the character buffer from the given character array.

Parameters
pcSourceThe source character buffer. Trailing NUL character is not necessary.
nFlagsModifiers for string export.
nCurrLenThe real count of characters contained in the passed buffer.
nMaxLenThe maximum length allowed of the resulting string.

Definition at line 523 of file xestring.cxx.

References CharsToBuffer(), Init(), and mnLen.

◆ Build() [2/2]

void XclExpString::Build ( const sal_Unicode pcSource,
sal_Int32  nCurrLen,
XclStrFlags  nFlags,
sal_uInt16  nMaxLen 
)
private

Creates the character buffer from the given Unicode array.

Parameters
pcSourceThe source character buffer. Trailing NUL character is not necessary.
nFlagsModifiers for string export.
nCurrLenThe real count of characters contained in the passed buffer.
nMaxLenThe maximum length allowed of the resulting string.

Definition at line 517 of file xestring.cxx.

References CharsToBuffer(), Init(), and mnLen.

Referenced by Assign(), and AssignByte().

◆ BuildAppend() [1/2]

void XclExpString::BuildAppend ( std::string_view  rSource)
private

Appends the given character array to the character buffer.

Parameters
pcSourceThe source character buffer. Trailing NUL character is not necessary.

Definition at line 549 of file xestring.cxx.

References CharsToBuffer(), InitAppend(), mbIsBiff8, and mnLen.

◆ BuildAppend() [2/2]

void XclExpString::BuildAppend ( std::u16string_view  rSource)
private

Appends the given Unicode array to the character buffer.

Parameters
pcSourceThe source character buffer. Trailing NUL character is not necessary.

Definition at line 538 of file xestring.cxx.

References CharsToBuffer(), InitAppend(), mbIsBiff8, and mnLen.

Referenced by Append(), and AppendByte().

◆ CharsToBuffer() [1/2]

void XclExpString::CharsToBuffer ( const char *  pcSource,
sal_Int32  nBegin,
sal_Int32  nLen 
)
private

Inserts the passed character array into the internal character buffer.

Parameters
nBeginFirst index in internal buffer to fill.
nLenNumber of characters to insert.

Definition at line 478 of file xestring.cxx.

References EXC_LF_C, maCharBuffer, o3tl::make_unsigned(), mbIsUnicode, and mbWrapped.

◆ CharsToBuffer() [2/2]

void XclExpString::CharsToBuffer ( const sal_Unicode pcSource,
sal_Int32  nBegin,
sal_Int32  nLen 
)
private

Inserts the passed character array into the internal character buffer.

Parameters
nBeginFirst index in internal buffer to fill.
nLenNumber of characters to insert.

Definition at line 461 of file xestring.cxx.

References EXC_LF, o3tl::make_unsigned(), maUniBuffer, mbIsUnicode, and mbWrapped.

Referenced by Build(), and BuildAppend().

◆ GetBufferSize()

std::size_t XclExpString::GetBufferSize ( ) const

Returns the byte count the character buffer will take on export.

Definition at line 244 of file xestring.cxx.

References mbIsUnicode, and mnLen.

Referenced by ExcEScenario::ExcEScenario(), ExcBundlesheet8::GetLen(), GetSize(), lcl_WriteFixedString(), and XclExpHyperlink::XclExpHyperlink().

◆ GetChar()

sal_uInt16 XclExpString::GetChar ( sal_uInt16  nCharIdx) const

Returns the specified character from the (already encoded) string.

Definition at line 257 of file xestring.cxx.

References Len(), maCharBuffer, maUniBuffer, and mbIsBiff8.

◆ GetFlagField()

sal_uInt8 XclExpString::GetFlagField ( ) const

Returns the current string flags field to export.

Definition at line 231 of file xestring.cxx.

References EXC_STRF_16BIT, EXC_STRF_RICH, IsWriteFormats(), and mbIsUnicode.

Referenced by WriteBuffer(), WriteFlagField(), WriteHeader(), and WriteHeaderToMem().

◆ GetFormats()

const XclFormatRunVec & XclExpString::GetFormats ( ) const
inline

Returns the vector with all formatting runs.

Definition at line 133 of file xestring.hxx.

References maFormats.

◆ GetFormatsCount()

sal_uInt16 XclExpString::GetFormatsCount ( ) const

Returns the current count of formatting runs for rich strings.

Definition at line 226 of file xestring.cxx.

References maFormats.

Referenced by GetSize(), WriteFormats(), and WriteHeader().

◆ GetHash()

sal_uInt16 XclExpString::GetHash ( ) const

Returns a hash value for the string.

Definition at line 263 of file xestring.cxx.

References maCharBuffer, maFormats, maUniBuffer, and mbIsBiff8.

◆ GetHeaderSize()

sal_uInt16 XclExpString::GetHeaderSize ( ) const

Returns the byte count the header will take on export.

Definition at line 236 of file xestring.cxx.

References IsWriteFlags(), IsWriteFormats(), and mb8BitLen.

Referenced by GetSize(), WriteHeader(), and WriteToMem().

◆ GetLeadingFont()

sal_uInt16 XclExpString::GetLeadingFont ( )

Returns the font index of the first char in the formatting run, or EXC_FONT_NOTFOUND.

Definition at line 182 of file xestring.cxx.

References EXC_FONT_NOTFOUND, and maFormats.

Referenced by RemoveLeadingFont().

◆ GetSize()

std::size_t XclExpString::GetSize ( ) const

◆ GetUnicodeBuffer()

const ScfUInt16Vec & XclExpString::GetUnicodeBuffer ( ) const
inline

Definition at line 149 of file xestring.hxx.

References maUniBuffer.

Referenced by XclXmlUtils::ToOString(), XclXmlUtils::ToOUString(), and WriteXml().

◆ Init()

void XclExpString::Init ( sal_Int32  nCurrLen,
XclStrFlags  nFlags,
sal_uInt16  nMaxLen,
bool  bBiff8 
)
private

Initializes flags, string length, and resizes character buffer.

Parameters
nFlagsModifiers for string export.
nCurrLenThe requested number of characters for the string.
nMaxLenThe maximum length allowed of the resulting string.
bBiff8true = BIFF8 Unicode string; false = BIFF2-BIFF7 byte string.

Definition at line 492 of file xestring.cxx.

References EightBitLength, ForceUnicode, maCharBuffer, maFormats, maUniBuffer, mb8BitLen, mbIsBiff8, mbIsUnicode, mbSkipFormats, mbSkipHeader, mbSmartFlags, mbWrapped, mnLen, mnMaxLen, NoHeader, SeparateFormats, SetStrLen(), and SmartFlags.

Referenced by Build(), and XclExpString().

◆ InitAppend()

void XclExpString::InitAppend ( sal_Int32  nAddLen)
private

Initializes string length and resizes character buffers for appending operation.

Parameters
nAddLenThe number of characters to be appended.

Definition at line 529 of file xestring.cxx.

References maCharBuffer, maUniBuffer, mbIsBiff8, mnLen, and SetStrLen().

Referenced by BuildAppend().

◆ IsEmpty()

bool XclExpString::IsEmpty ( ) const
inline

Returns true, if the string is empty.

Definition at line 120 of file xestring.hxx.

References mnLen.

Referenced by IsWriteFlags(), and WriteBufferToMem().

◆ IsEqual()

bool XclExpString::IsEqual ( const XclExpString rCmp) const

Returns true, if this string is equal to the passed string.

Definition at line 202 of file xestring.cxx.

References maCharBuffer, maFormats, maUniBuffer, mbIsBiff8, mbIsUnicode, mbWrapped, and mnLen.

Referenced by operator==().

◆ IsLessThan()

bool XclExpString::IsLessThan ( const XclExpString rCmp) const

Returns true, if this string is less than the passed string.

Definition at line 216 of file xestring.cxx.

References maCharBuffer, maFormats, maUniBuffer, and mbIsBiff8.

Referenced by operator<().

◆ IsRich()

bool XclExpString::IsRich ( ) const
inline

Returns true, if the string contains formatting information.

Definition at line 129 of file xestring.hxx.

References maFormats.

Referenced by IsWriteFormats(), XclXmlUtils::ToOString(), XclXmlUtils::ToOUString(), and WriteFormats().

◆ IsWrapped()

bool XclExpString::IsWrapped ( ) const
inline

Returns true, if the string contains line breaks.

Definition at line 122 of file xestring.hxx.

References mbWrapped.

◆ IsWriteFlags()

bool XclExpString::IsWriteFlags ( ) const
private

Returns true, if the flag field should be written.

Definition at line 445 of file xestring.cxx.

References IsEmpty(), mbIsBiff8, and mbSmartFlags.

Referenced by GetHeaderSize(), WriteHeader(), and WriteHeaderToMem().

◆ IsWriteFormats()

bool XclExpString::IsWriteFormats ( ) const
private

Returns true, if the formatting run vector should be written.

Definition at line 450 of file xestring.cxx.

References IsRich(), mbIsBiff8, and mbSkipFormats.

Referenced by GetFlagField(), GetHeaderSize(), GetSize(), Write(), WriteHeader(), WriteHeaderToMem(), and WriteXml().

◆ Len()

sal_uInt16 XclExpString::Len ( ) const
inline

◆ LimitFormatCount()

void XclExpString::LimitFormatCount ( sal_uInt16  nMaxCount)

Removes formatting runs at the end, if the string contains too much.

Definition at line 176 of file xestring.cxx.

References maFormats.

◆ PrepareWrite()

void XclExpString::PrepareWrite ( XclExpStream rStrm,
sal_uInt16  nBytes 
) const
private

Initializes write process on stream.

Definition at line 560 of file xestring.cxx.

References mbIsUnicode, and rStrm.

Referenced by WriteFlagField(), and WriteHeader().

◆ RemoveLeadingFont()

sal_uInt16 XclExpString::RemoveLeadingFont ( )

The same as above + additionally remove the given font from the formatting run.

Definition at line 192 of file xestring.cxx.

References EXC_FONT_NOTFOUND, GetLeadingFont(), and maFormats.

◆ SetStrLen()

void XclExpString::SetStrLen ( sal_Int32  nNewLen)
private

Sets the string length but regards the limit given in mnMaxLen.

Definition at line 455 of file xestring.cxx.

References mb8BitLen, mnLen, and mnMaxLen.

Referenced by Init(), and InitAppend().

◆ Write()

void XclExpString::Write ( XclExpStream rStrm) const

Writes the complete Unicode string.

Definition at line 337 of file xestring.cxx.

References IsWriteFormats(), mbSkipHeader, rStrm, WriteBuffer(), WriteFormats(), and WriteHeader().

Referenced by operator<<().

◆ WriteBuffer()

void XclExpString::WriteBuffer ( XclExpStream rStrm) const

Writes the raw character buffer.

Definition at line 305 of file xestring.cxx.

References GetFlagField(), maCharBuffer, maUniBuffer, mbIsBiff8, and rStrm.

Referenced by operator<<(), ExcEScenario::SaveCont(), Write(), and XclExpHyperlink::XclExpHyperlink().

◆ WriteBufferToMem()

void XclExpString::WriteBufferToMem ( sal_uInt8 pnMem) const

Writes the raw character buffer to memory (8-bit or 16-bit little-endian).

Definition at line 367 of file xestring.cxx.

References IsEmpty(), maCharBuffer, maUniBuffer, mbIsBiff8, mbIsUnicode, and mnLen.

Referenced by WriteToMem().

◆ WriteFlagField()

void XclExpString::WriteFlagField ( XclExpStream rStrm) const

Writes the string flags field (1 byte).

Definition at line 280 of file xestring.cxx.

References GetFlagField(), mbIsBiff8, PrepareWrite(), and rStrm.

Referenced by operator<<(), and ExcEScenario::SaveCont().

◆ WriteFormats()

void XclExpString::WriteFormats ( XclExpStream rStrm,
bool  bWriteSize = false 
) const

Writes the raw formatting run buffer.

Definition at line 313 of file xestring.cxx.

References GetFormatsCount(), IsRich(), maFormats, mbIsBiff8, and rStrm.

Referenced by Write().

◆ WriteHeader()

void XclExpString::WriteHeader ( XclExpStream rStrm) const

Writes 8-bit or 16-bit length field and string flags field.

Definition at line 290 of file xestring.cxx.

References GetFlagField(), GetFormatsCount(), GetHeaderSize(), IsWriteFlags(), IsWriteFormats(), mb8BitLen, mnLen, PrepareWrite(), rStrm, and WriteLenField().

Referenced by Write().

◆ WriteHeaderToMem()

void XclExpString::WriteHeaderToMem ( sal_uInt8 pnMem) const

Writes the string header to memory.

Definition at line 346 of file xestring.cxx.

References GetFlagField(), IsWriteFlags(), IsWriteFormats(), mb8BitLen, and mnLen.

Referenced by WriteToMem().

◆ WriteLenField()

void XclExpString::WriteLenField ( XclExpStream rStrm) const

Writes the string length field (1 byte or 2 bytes).

Definition at line 272 of file xestring.cxx.

References mb8BitLen, mnLen, and rStrm.

Referenced by WriteHeader().

◆ WriteToMem()

void XclExpString::WriteToMem ( sal_uInt8 pnMem) const

Writes the entire string to memory.

Definition at line 390 of file xestring.cxx.

References GetHeaderSize(), WriteBufferToMem(), and WriteHeaderToMem().

◆ WriteXml()

void XclExpString::WriteXml ( XclExpXmlStream rStrm) const

Member Data Documentation

◆ maCharBuffer

ScfUInt8Vec XclExpString::maCharBuffer
private

The Unicode character buffer.

Definition at line 230 of file xestring.hxx.

Referenced by CharsToBuffer(), GetChar(), GetHash(), Init(), InitAppend(), IsEqual(), IsLessThan(), WriteBuffer(), and WriteBufferToMem().

◆ maFormats

XclFormatRunVec XclExpString::maFormats
private

◆ maUniBuffer

ScfUInt16Vec XclExpString::maUniBuffer
private

◆ mb8BitLen

bool XclExpString::mb8BitLen
private

true, if at least one character is >0xFF.

Definition at line 236 of file xestring.hxx.

Referenced by GetHeaderSize(), Init(), SetStrLen(), WriteHeader(), WriteHeaderToMem(), and WriteLenField().

◆ mbIsBiff8

bool XclExpString::mbIsBiff8
private

◆ mbIsUnicode

bool XclExpString::mbIsUnicode
private

true = BIFF8 Unicode string, false = BIFF2-7 bytestring.

Definition at line 235 of file xestring.hxx.

Referenced by CharsToBuffer(), GetBufferSize(), GetFlagField(), Init(), IsEqual(), PrepareWrite(), and WriteBufferToMem().

◆ mbSkipFormats

bool XclExpString::mbSkipFormats
private

true = omit flags on empty string; false = always write flags.

Definition at line 238 of file xestring.hxx.

Referenced by Init(), and IsWriteFormats().

◆ mbSkipHeader

bool XclExpString::mbSkipHeader
private

true = text contains several paragraphs.

Definition at line 240 of file xestring.hxx.

Referenced by Init(), and Write().

◆ mbSmartFlags

bool XclExpString::mbSmartFlags
private

true = write 8-bit string length; false = 16-bit.

Definition at line 237 of file xestring.hxx.

Referenced by Init(), and IsWriteFlags().

◆ mbWrapped

bool XclExpString::mbWrapped
private

true = skip formats on export; false = write complete formatted string.

Definition at line 239 of file xestring.hxx.

Referenced by CharsToBuffer(), Init(), IsEqual(), and IsWrapped().

◆ mnLen

sal_uInt16 XclExpString::mnLen
private

◆ mnMaxLen

sal_uInt16 XclExpString::mnMaxLen
private

Character count to export.

Definition at line 233 of file xestring.hxx.

Referenced by Init(), and SetStrLen().


The documentation for this class was generated from the following files: