LibreOffice Module sc (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
oox::xls::RichString Class Reference

Contains string data and a list of formatting runs for a rich formatted string. More...

#include <richstring.hxx>

Collaboration diagram for oox::xls::RichString:
[legend]

Public Member Functions

sal_Int32 importText ()
 Appends and returns an index of a portion object for a plain string (t element). More...
 
sal_Int32 importRun ()
 Appends and returns an index of a portion object for a new formatting run (r element). More...
 
RichStringPhoneticRef importPhoneticRun (const AttributeList &rAttribs)
 Appends and returns a phonetic text object for a new phonetic run (rPh element). More...
 
void importPhoneticPr (const AttributeList &rAttribs, const WorkbookHelper &rHelper)
 Imports phonetic settings from the rPhoneticPr element. More...
 
void importString (SequenceInputStream &rStrm, bool bRich, const WorkbookHelper &rHelper)
 Imports a Unicode rich-string from the passed record stream. More...
 
void finalizeImport (const WorkbookHelper &rHelper)
 Final processing after import of all strings. More...
 
bool extractPlainString (OUString &orString, const oox::xls::Font *pFirstPortionFont) const
 Tries to extract a plain string from this object. More...
 
void convert (const css::uno::Reference< css::text::XText > &rxText)
 Converts the string and writes it into the passed XText, replace old contents of the text object,. More...
 
std::unique_ptr< EditTextObjectconvert (ScEditEngineDefaulter &rEE, const oox::xls::Font *pFont)
 
RichStringPortiongetPortion (sal_Int32 nPortionIdx)
 

Private Types

typedef RefVector< RichStringPhoneticPhoneticVector
 

Private Member Functions

sal_Int32 createPortion ()
 Creates, appends, and returns a new empty string portion. More...
 
RichStringPhoneticRef createPhonetic ()
 Creates, appends, and returns a new empty phonetic text portion. More...
 
void createTextPortions (const OUString &rText, FontPortionModelList &rPortions)
 Create base text portions from the passed string and character formatting. More...
 
void createPhoneticPortions (const OUString &rText, PhoneticPortionModelList &rPortions, sal_Int32 nBaseLen)
 Create phonetic text portions from the passed string and portion data. More...
 

Private Attributes

std::vector< RichStringPortionmaTextPortions
 
std::unique_ptr< PhoneticSettingsmxPhonSettings
 String portions with font data. More...
 
PhoneticVector maPhonPortions
 Phonetic settings for this string. More...
 

Detailed Description

Contains string data and a list of formatting runs for a rich formatted string.

Definition at line 206 of file richstring.hxx.

Member Typedef Documentation

◆ PhoneticVector

Definition at line 251 of file richstring.hxx.

Member Function Documentation

◆ convert() [1/2]

void oox::xls::RichString::convert ( const css::uno::Reference< css::text::XText > &  rxText)

Converts the string and writes it into the passed XText, replace old contents of the text object,.

Parameters
rxTextThe XText interface of the target object.

Referenced by oox::xls::WorksheetHelper::putRichString().

◆ convert() [2/2]

std::unique_ptr< EditTextObject > oox::xls::RichString::convert ( ScEditEngineDefaulter rEE,
const oox::xls::Font pFont 
)

◆ createPhonetic()

RichStringPhoneticRef oox::xls::RichString::createPhonetic ( )
private

Creates, appends, and returns a new empty phonetic text portion.

Definition at line 531 of file richstring.cxx.

References maPhonPortions.

Referenced by createPhoneticPortions(), and importPhoneticRun().

◆ createPhoneticPortions()

void oox::xls::RichString::createPhoneticPortions ( const OUString &  rText,
PhoneticPortionModelList rPortions,
sal_Int32  nBaseLen 
)
private

◆ createPortion()

sal_Int32 oox::xls::RichString::createPortion ( )
private

Creates, appends, and returns a new empty string portion.

Definition at line 525 of file richstring.cxx.

References maTextPortions.

Referenced by createTextPortions(), importRun(), importString(), and importText().

◆ createTextPortions()

void oox::xls::RichString::createTextPortions ( const OUString &  rText,
FontPortionModelList rPortions 
)
private

◆ extractPlainString()

bool oox::xls::RichString::extractPlainString ( OUString &  orString,
const oox::xls::Font pFirstPortionFont 
) const

Tries to extract a plain string from this object.

Returns the string, if there is only one unformatted portion.

Definition at line 464 of file richstring.cxx.

References maPhonPortions, and maTextPortions.

◆ finalizeImport()

void oox::xls::RichString::finalizeImport ( const WorkbookHelper rHelper)

Final processing after import of all strings.

Definition at line 458 of file richstring.cxx.

References maTextPortions.

◆ getPortion()

RichStringPortion & oox::xls::RichString::getPortion ( sal_Int32  nPortionIdx)
inline

Definition at line 237 of file richstring.hxx.

References maTextPortions.

Referenced by createTextPortions(), and importString().

◆ importPhoneticPr()

void oox::xls::RichString::importPhoneticPr ( const AttributeList rAttribs,
const WorkbookHelper rHelper 
)

Imports phonetic settings from the rPhoneticPr element.

Definition at line 423 of file richstring.cxx.

References mxPhonSettings.

◆ importPhoneticRun()

RichStringPhoneticRef oox::xls::RichString::importPhoneticRun ( const AttributeList rAttribs)

Appends and returns a phonetic text object for a new phonetic run (rPh element).

Definition at line 416 of file richstring.cxx.

References createPhonetic().

◆ importRun()

sal_Int32 oox::xls::RichString::importRun ( )

Appends and returns an index of a portion object for a new formatting run (r element).

Definition at line 411 of file richstring.cxx.

References createPortion().

◆ importString()

void oox::xls::RichString::importString ( SequenceInputStream rStrm,
bool  bRich,
const WorkbookHelper rHelper 
)

◆ importText()

sal_Int32 oox::xls::RichString::importText ( )

Appends and returns an index of a portion object for a plain string (t element).

Definition at line 406 of file richstring.cxx.

References createPortion().

Member Data Documentation

◆ maPhonPortions

PhoneticVector oox::xls::RichString::maPhonPortions
private

Phonetic settings for this string.

Definition at line 255 of file richstring.hxx.

Referenced by createPhonetic(), createPhoneticPortions(), and extractPlainString().

◆ maTextPortions

std::vector<RichStringPortion> oox::xls::RichString::maTextPortions
private

◆ mxPhonSettings

std::unique_ptr<PhoneticSettings> oox::xls::RichString::mxPhonSettings
private

String portions with font data.

Definition at line 254 of file richstring.hxx.

Referenced by importPhoneticPr(), and importString().


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