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>

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

Public Member Functions

 RichString (const WorkbookHelper &rHelper)
 
RichStringPortionRef importText ()
 Appends and returns a portion object for a plain string (t element). More...
 
RichStringPortionRef importRun ()
 Appends and returns 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)
 Imports phonetic settings from the rPhoneticPr element. More...
 
void importString (SequenceInputStream &rStrm, bool bRich)
 Imports a Unicode rich-string from the passed record stream. More...
 
void finalizeImport ()
 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) const
 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) const
 
- Public Member Functions inherited from oox::xls::WorkbookHelper
 WorkbookHelper (WorkbookGlobals &rBookGlob)
 
virtual ~WorkbookHelper ()
 
 WorkbookHelper (WorkbookHelper const &)=default
 
 WorkbookHelper (WorkbookHelper &&)=default
 
WorkbookHelperoperator= (WorkbookHelper const &)=delete
 
WorkbookHelperoperator= (WorkbookHelper &&)=delete
 
::oox::core::FilterBasegetBaseFilter () const
 Returns the base filter object (base class of all filters). More...
 
SegmentProgressBargetProgressBar () const
 Returns the filter progress bar. More...
 
sal_Int16 getCurrentSheetIndex () const
 Returns the index of the current Calc sheet, if filter currently processes a sheet. More...
 
bool isGeneratorKnownGood () const
 Returns true when reading a file generated by a known good generator. More...
 
void setVbaProjectStorage (const StorageRef &rxVbaPrjStrg)
 Sets the VBA project storage used to import VBA source code and forms. More...
 
void setCurrentSheetIndex (SCTAB nSheet)
 Sets the index of the current Calc sheet, if filter currently processes a sheet. More...
 
void finalizeWorkbookImport ()
 Final conversion after importing the workbook. More...
 
void useInternalChartDataTable (bool bInternal)
 
ScDocumentgetScDocument ()
 
const ScDocumentgetScDocument () const
 
ScDocumentImportgetDocImport ()
 
const ScDocumentImportgetDocImport () const
 
ScEditEngineDefaultergetEditEngine () const
 
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & getDocument () const
 Returns a reference to the source/target spreadsheet document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (sal_Int32 nSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (const OUString &rSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::table::XCellRange > getCellRangeFromDoc (const ScRange &rRange) const
 Returns the XCellRange interface for the passed cell range address. More...
 
css::uno::Reference< css::container::XNameContainer > getCellStyleFamily () const
 Returns the cell styles container from the Calc document. More...
 
css::uno::Reference< css::style::XStyle > getStyleObject (const OUString &rStyleName, bool bPageStyle) const
 Returns the specified cell or page style from the Calc document. More...
 
ScRangeDatacreateNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags) const
 Creates and returns a defined name on-the-fly in the Calc document. More...
 
ScRangeDatacreateLocalNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab) const
 Creates and returns a defined name on-the-fly in the sheet. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createDatabaseRangeObject (OUString &orName, const ScRange &rRangeAddr) const
 Creates and returns a database range on-the-fly in the Calc document. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createUnnamedDatabaseRangeObject (const ScRange &rRangeAddr) const
 Creates and returns an unnamed database range on-the-fly in the Calc document. More...
 
ScDBDatafindDatabaseRangeByIndex (sal_uInt16 nIndex) const
 Finds the (already existing) database range of the given formula token index. More...
 
css::uno::Reference< css::style::XStyle > createStyleObject (OUString &orStyleName, bool bPageStyle) const
 Creates and returns a com.sun.star.style.Style object for cells or pages. More...
 
FormulaBuffergetFormulaBuffer () const
 
WorkbookSettingsgetWorkbookSettings () const
 Returns the global workbook settings object. More...
 
ViewSettingsgetViewSettings () const
 Returns the workbook and sheet view settings object. More...
 
WorksheetBuffergetWorksheets () const
 Returns the worksheet buffer containing sheet names and properties. More...
 
ThemeBuffergetTheme () const
 Returns the office theme object read from the theme substorage. More...
 
StylesBuffergetStyles () const
 Returns all cell formatting objects read from the styles substream. More...
 
SharedStringsBuffergetSharedStrings () const
 Returns the shared strings read from the shared strings substream. More...
 
ExternalLinkBuffergetExternalLinks () const
 Returns the external links read from the external links substream. More...
 
DefinedNamesBuffergetDefinedNames () const
 Returns the defined names read from the workbook globals. More...
 
TableBuffergetTables () const
 Returns the tables collection (equivalent to Calc's database ranges). More...
 
ScenarioBuffergetScenarios () const
 Returns the scenarios collection. More...
 
ConnectionsBuffergetConnections () const
 Returns the collection of external data connections. More...
 
PivotCacheBuffergetPivotCaches () const
 Returns the collection of pivot caches. More...
 
PivotTableBuffergetPivotTables () const
 Returns the collection of pivot tables. More...
 
FormulaParsergetFormulaParser () const
 Returns a shared import formula parser (import filter only!). More...
 
FormulaParsercreateFormulaParser () const
 Returns an unshared import formula parser (import filter only!). More...
 
UnitConvertergetUnitConverter () const
 Returns the measurement unit converter. More...
 
AddressConvertergetAddressConverter () const
 Returns the converter for string to cell address/range conversion. More...
 
oox::drawingml::chart::ChartConvertergetChartConverter () const
 Returns the chart object converter. More...
 
PageSettingsConvertergetPageSettingsConverter () const
 Returns the page and print settings converter. More...
 
::oox::core::XmlFilterBasegetOoxFilter () const
 Returns the base OOXML/BIFF12 filter object. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler)
 Imports a fragment using the passed fragment handler, which contains the full path to the fragment stream. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler, oox::core::FastParser &rParser)
 
rtl_TextEncoding getTextEncoding () const
 Returns the text encoding used to import/export byte strings. More...
 

Private Types

typedef RefVector< RichStringPortionPortionVector
 
typedef RefVector< RichStringPhoneticPhoneticVector
 

Private Member Functions

RichStringPortionRef 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

PortionVector maTextPortions
 
PhoneticSettings maPhonSettings
 String portions with font data. More...
 
PhoneticVector maPhonPortions
 Phonetic settings for this string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from oox::xls::WorkbookHelper
static WorkbookGlobalsRef constructGlobals (ExcelFilter &rFilter)
 

Detailed Description

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

Definition at line 209 of file richstring.hxx.

Member Typedef Documentation

Definition at line 254 of file richstring.hxx.

Definition at line 253 of file richstring.hxx.

Constructor & Destructor Documentation

oox::xls::RichString::RichString ( const WorkbookHelper rHelper)
explicit

Definition at line 298 of file richstring.cxx.

Member Function Documentation

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

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().

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

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

Definition at line 425 of file richstring.cxx.

References maPhonPortions.

Referenced by createPhoneticPortions(), and importPhoneticRun().

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

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

Definition at line 418 of file richstring.cxx.

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

void oox::xls::RichString::createTextPortions ( const OUString &  rText,
FontPortionModelList rPortions 
)
private
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 357 of file richstring.cxx.

References maPhonPortions, and maTextPortions.

void oox::xls::RichString::finalizeImport ( )

Final processing after import of all strings.

Definition at line 352 of file richstring.cxx.

References oox::xls::RichStringPortion::finalizeImport(), oox::RefVector< ObjType >::forEachMem(), and maTextPortions.

Referenced by oox::xls::SharedStringsBuffer::finalizeImport().

void oox::xls::RichString::importPhoneticPr ( const AttributeList rAttribs)

Imports phonetic settings from the rPhoneticPr element.

Definition at line 321 of file richstring.cxx.

References oox::xls::PhoneticSettings::importPhoneticPr(), and maPhonSettings.

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 314 of file richstring.cxx.

References createPhonetic().

RichStringPortionRef oox::xls::RichString::importRun ( )

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

Definition at line 309 of file richstring.cxx.

References createPortion().

void oox::xls::RichString::importString ( SequenceInputStream rStrm,
bool  bRich 
)
RichStringPortionRef oox::xls::RichString::importText ( )

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

Definition at line 304 of file richstring.cxx.

References createPortion().

Member Data Documentation

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

Phonetic settings for this string.

Definition at line 258 of file richstring.hxx.

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

PhoneticSettings oox::xls::RichString::maPhonSettings
private

String portions with font data.

Definition at line 257 of file richstring.hxx.

Referenced by importPhoneticPr(), and importString().

PortionVector oox::xls::RichString::maTextPortions
private

Definition at line 256 of file richstring.hxx.

Referenced by extractPlainString(), and finalizeImport().


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