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

This class represents an unformatted or formatted string and provides importing from stream. More...

#include <xistring.hxx>

Public Member Functions

 XclImpString ()
 Constructs an empty string. More...
 
 XclImpString (OUString aString)
 Constructs an unformatted string. More...
 
void Read (XclImpStream &rStrm, XclStrFlags nFlags=XclStrFlags::NONE)
 Reads a complete string from the passed stream. More...
 
void SetText (const OUString &rText)
 Sets the passed string data. More...
 
void SetFormats (XclFormatRunVec &&rFormats)
 Sets the passed formatting buffer. More...
 
void ReadFormats (XclImpStream &rStrm)
 Reads and appends the formatting information (run count and runs) from stream. More...
 
void ReadObjFormats (XclImpStream &rStrm, sal_uInt16 nFormatSize)
 Reads and appends formatting runs from an OBJ or TXO record. More...
 
bool IsEmpty () const
 Returns true, if the string is empty. More...
 
const OUString & GetText () const
 Returns the pure text data of the string. More...
 
bool IsRich () const
 Returns true, if the string contains formatting information. More...
 
const XclFormatRunVecGetFormats () const
 Returns the formatting run vector. More...
 

Static Public Member Functions

static void AppendFormat (XclFormatRunVec &rFormats, sal_uInt16 nChar, sal_uInt16 nFontIdx)
 Insert a formatting run to the passed format buffer. More...
 
static void ReadFormats (XclImpStream &rStrm, XclFormatRunVec &rFormats)
 Reads and appends the formatting information (run count and runs) from stream. More...
 
static void ReadFormats (XclImpStream &rStrm, XclFormatRunVec &rFormats, sal_uInt16 nRunCount)
 Reads and appends nRunCount formatting runs from stream. More...
 
static void ReadObjFormats (XclImpStream &rStrm, XclFormatRunVec &rFormats, sal_uInt16 nFormatSize)
 Reads and appends formatting runs from an OBJ or TXO record. More...
 

Private Attributes

OUString maString
 
XclFormatRunVec maFormats
 The text data of the string. More...
 

Detailed Description

This class represents an unformatted or formatted string and provides importing from stream.

Definition at line 30 of file xistring.hxx.

Constructor & Destructor Documentation

◆ XclImpString() [1/2]

XclImpString::XclImpString ( )
explicit

Constructs an empty string.

Definition at line 33 of file xistring.cxx.

◆ XclImpString() [2/2]

XclImpString::XclImpString ( OUString  aString)
explicit

Constructs an unformatted string.

Definition at line 37 of file xistring.cxx.

References maString.

Member Function Documentation

◆ AppendFormat()

void XclImpString::AppendFormat ( XclFormatRunVec rFormats,
sal_uInt16  nChar,
sal_uInt16  nFontIdx 
)
static

Insert a formatting run to the passed format buffer.

Definition at line 93 of file xistring.cxx.

Referenced by ReadFormats(), and ReadObjFormats().

◆ GetFormats()

const XclFormatRunVec & XclImpString::GetFormats ( ) const
inline

Returns the formatting run vector.

Definition at line 58 of file xistring.hxx.

References maFormats.

◆ GetText()

const OUString & XclImpString::GetText ( ) const
inline

Returns the pure text data of the string.

Definition at line 53 of file xistring.hxx.

References maString.

Referenced by XclImpStringHelper::SetToDocument().

◆ IsEmpty()

bool XclImpString::IsEmpty ( ) const
inline

Returns true, if the string is empty.

Definition at line 51 of file xistring.hxx.

References maString.

◆ IsRich()

bool XclImpString::IsRich ( ) const
inline

Returns true, if the string contains formatting information.

Definition at line 56 of file xistring.hxx.

References maFormats.

Referenced by ImportExcel::Rstring().

◆ Read()

void XclImpString::Read ( XclImpStream rStrm,
XclStrFlags  nFlags = XclStrFlags::NONE 
)

◆ ReadFormats() [1/3]

void XclImpString::ReadFormats ( XclImpStream rStrm)
inline

Reads and appends the formatting information (run count and runs) from stream.

Definition at line 46 of file xistring.hxx.

References maFormats, ReadFormats(), and rStrm.

Referenced by Read(), ReadFormats(), XclImpChText::ReadSubRecord(), and ImportExcel::Rstring().

◆ ReadFormats() [2/3]

void XclImpString::ReadFormats ( XclImpStream rStrm,
XclFormatRunVec rFormats 
)
static

Reads and appends the formatting information (run count and runs) from stream.

Definition at line 103 of file xistring.cxx.

References EXC_BIFF8, ReadFormats(), and rStrm.

◆ ReadFormats() [3/3]

void XclImpString::ReadFormats ( XclImpStream rStrm,
XclFormatRunVec rFormats,
sal_uInt16  nRunCount 
)
static

Reads and appends nRunCount formatting runs from stream.

Definition at line 110 of file xistring.cxx.

References AppendFormat(), EXC_BIFF8, rStrm, SAL_WARN, and SVSTREAM_FILEFORMAT_ERROR.

◆ ReadObjFormats() [1/2]

void XclImpString::ReadObjFormats ( XclImpStream rStrm,
sal_uInt16  nFormatSize 
)
inline

Reads and appends formatting runs from an OBJ or TXO record.

Definition at line 48 of file xistring.hxx.

References maFormats, ReadObjFormats(), and rStrm.

Referenced by ReadObjFormats().

◆ ReadObjFormats() [2/2]

void XclImpString::ReadObjFormats ( XclImpStream rStrm,
XclFormatRunVec rFormats,
sal_uInt16  nFormatSize 
)
static

Reads and appends formatting runs from an OBJ or TXO record.

Definition at line 147 of file xistring.cxx.

References AppendFormat(), and rStrm.

◆ SetFormats()

void XclImpString::SetFormats ( XclFormatRunVec &&  rFormats)
inline

Sets the passed formatting buffer.

Definition at line 44 of file xistring.hxx.

References maFormats.

◆ SetText()

void XclImpString::SetText ( const OUString &  rText)
inline

Sets the passed string data.

Definition at line 42 of file xistring.hxx.

References maString.

Member Data Documentation

◆ maFormats

XclFormatRunVec XclImpString::maFormats
private

The text data of the string.

Definition at line 71 of file xistring.hxx.

Referenced by GetFormats(), IsRich(), Read(), ReadFormats(), ReadObjFormats(), and SetFormats().

◆ maString

OUString XclImpString::maString
private

Definition at line 70 of file xistring.hxx.

Referenced by GetText(), IsEmpty(), Read(), and SetText().


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