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

Contains text data and font attributes for a part of a rich formatted string. More...

#include <richstring.hxx>

Public Member Functions

 RichStringPortion ()
 
void setText (const OUString &rText)
 Sets text data for this portion. More...
 
FontRef const & createFont (const WorkbookHelper &rHelper)
 Creates and returns a new font formatting object. More...
 
void setFontId (sal_Int32 nFontId)
 Links this portion to a font object from the global font list. More...
 
void finalizeImport (const WorkbookHelper &rHelper)
 Final processing after import of all strings. More...
 
const OUString & getText () const
 Returns the text data of this portion. More...
 
bool hasFont () const
 Returns true, if the portion contains font formatting. More...
 
void convert (const css::uno::Reference< css::text::XText > &rxText, bool bReplace)
 Converts the portion and replaces or appends to the passed XText. More...
 
void convert (ScEditEngineDefaulter &rEE, ESelection &rSelection, const oox::xls::Font *pFont)
 
void writeFontProperties (const css::uno::Reference< css::text::XText > &rxText) const
 

Private Attributes

OUString maText
 
FontRef mxFont
 Portion text. More...
 
sal_Int32 mnFontId
 Embedded portion font, may be empty. More...
 
bool mbConverted
 Link to global font list. More...
 

Detailed Description

Contains text data and font attributes for a part of a rich formatted string.

Definition at line 38 of file richstring.hxx.

Constructor & Destructor Documentation

◆ RichStringPortion()

oox::xls::RichStringPortion::RichStringPortion ( )

Definition at line 54 of file richstring.cxx.

Member Function Documentation

◆ convert() [1/2]

void oox::xls::RichStringPortion::convert ( const css::uno::Reference< css::text::XText > &  rxText,
bool  bReplace 
)

Converts the portion and replaces or appends to the passed XText.

◆ convert() [2/2]

void oox::xls::RichStringPortion::convert ( ScEditEngineDefaulter rEE,
ESelection rSelection,
const oox::xls::Font pFont 
)

◆ createFont()

FontRef const & oox::xls::RichStringPortion::createFont ( const WorkbookHelper rHelper)

Creates and returns a new font formatting object.

Definition at line 65 of file richstring.cxx.

References mxFont.

◆ finalizeImport()

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

Final processing after import of all strings.

Definition at line 76 of file richstring.cxx.

References oox::xls::StylesBuffer::getFont(), oox::xls::WorkbookHelper::getStyles(), mnFontId, and mxFont.

◆ getText()

const OUString & oox::xls::RichStringPortion::getText ( ) const
inline

Returns the text data of this portion.

Definition at line 54 of file richstring.hxx.

References maText.

◆ hasFont()

bool oox::xls::RichStringPortion::hasFont ( ) const
inline

Returns true, if the portion contains font formatting.

Definition at line 56 of file richstring.hxx.

References mxFont.

◆ setFontId()

void oox::xls::RichStringPortion::setFontId ( sal_Int32  nFontId)

Links this portion to a font object from the global font list.

Definition at line 71 of file richstring.cxx.

References mnFontId.

Referenced by oox::xls::RichString::createTextPortions().

◆ setText()

void oox::xls::RichStringPortion::setText ( const OUString &  rText)

Sets text data for this portion.

Definition at line 60 of file richstring.cxx.

References oox::AttributeConversion::decodeXString(), and maText.

Referenced by oox::xls::RichString::createTextPortions(), and oox::xls::RichString::importString().

◆ writeFontProperties()

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

Definition at line 144 of file richstring.cxx.

References mxFont.

Member Data Documentation

◆ maText

OUString oox::xls::RichStringPortion::maText
private

Definition at line 68 of file richstring.hxx.

Referenced by convert(), getText(), and setText().

◆ mbConverted

bool oox::xls::RichStringPortion::mbConverted
private

Link to global font list.

Definition at line 71 of file richstring.hxx.

◆ mnFontId

sal_Int32 oox::xls::RichStringPortion::mnFontId
private

Embedded portion font, may be empty.

Definition at line 70 of file richstring.hxx.

Referenced by finalizeImport(), and setFontId().

◆ mxFont

FontRef oox::xls::RichStringPortion::mxFont
private

Portion text.

Definition at line 69 of file richstring.hxx.

Referenced by convert(), createFont(), finalizeImport(), hasFont(), and writeFontProperties().


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