LibreOffice Module sc (master)
1
|
Contains string data and a list of formatting runs for a rich formatted string. More...
#include <richstring.hxx>
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< EditTextObject > | convert (ScEditEngineDefaulter &rEE, const oox::xls::Font *pFont) const |
![]() | |
WorkbookHelper (WorkbookGlobals &rBookGlob) | |
virtual | ~WorkbookHelper () |
WorkbookHelper (WorkbookHelper const &)=default | |
WorkbookHelper (WorkbookHelper &&)=default | |
WorkbookHelper & | operator= (WorkbookHelper const &)=delete |
WorkbookHelper & | operator= (WorkbookHelper &&)=delete |
::oox::core::FilterBase & | getBaseFilter () const |
Returns the base filter object (base class of all filters). More... | |
SegmentProgressBar & | getProgressBar () 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) |
ScDocument & | getScDocument () |
const ScDocument & | getScDocument () const |
ScDocumentImport & | getDocImport () |
const ScDocumentImport & | getDocImport () const |
ScEditEngineDefaulter & | getEditEngine () 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... | |
RangeDataRet | createNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden) const |
Creates and returns a defined name on-the-fly in the Calc document. More... | |
RangeDataRet | createLocalNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden) 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... | |
ScDBData * | findDatabaseRangeByIndex (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... | |
FormulaBuffer & | getFormulaBuffer () const |
WorkbookSettings & | getWorkbookSettings () const |
Returns the global workbook settings object. More... | |
ViewSettings & | getViewSettings () const |
Returns the workbook and sheet view settings object. More... | |
WorksheetBuffer & | getWorksheets () const |
Returns the worksheet buffer containing sheet names and properties. More... | |
ThemeBuffer & | getTheme () const |
Returns the office theme object read from the theme substorage. More... | |
StylesBuffer & | getStyles () const |
Returns all cell formatting objects read from the styles substream. More... | |
SharedStringsBuffer & | getSharedStrings () const |
Returns the shared strings read from the shared strings substream. More... | |
ExternalLinkBuffer & | getExternalLinks () const |
Returns the external links read from the external links substream. More... | |
DefinedNamesBuffer & | getDefinedNames () const |
Returns the defined names read from the workbook globals. More... | |
TableBuffer & | getTables () const |
Returns the tables collection (equivalent to Calc's database ranges). More... | |
ScenarioBuffer & | getScenarios () const |
Returns the scenarios collection. More... | |
ConnectionsBuffer & | getConnections () const |
Returns the collection of external data connections. More... | |
PivotCacheBuffer & | getPivotCaches () const |
Returns the collection of pivot caches. More... | |
PivotTableBuffer & | getPivotTables () const |
Returns the collection of pivot tables. More... | |
FormulaParser & | getFormulaParser () const |
Returns a shared import formula parser (import filter only!). More... | |
FormulaParser * | createFormulaParser () const |
Returns an unshared import formula parser (import filter only!). More... | |
UnitConverter & | getUnitConverter () const |
Returns the measurement unit converter. More... | |
AddressConverter & | getAddressConverter () const |
Returns the converter for string to cell address/range conversion. More... | |
oox::drawingml::chart::ChartConverter * | getChartConverter () const |
Returns the chart object converter. More... | |
PageSettingsConverter & | getPageSettingsConverter () const |
Returns the page and print settings converter. More... | |
::oox::core::XmlFilterBase & | getOoxFilter () 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< RichStringPortion > | PortionVector |
typedef RefVector< RichStringPhonetic > | PhoneticVector |
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 | |
![]() | |
typedef std::pair< ScRangeData *, bool > | RangeDataRet |
![]() | |
static WorkbookGlobalsRef | constructGlobals (ExcelFilter &rFilter) |
Contains string data and a list of formatting runs for a rich formatted string.
Definition at line 208 of file richstring.hxx.
|
private |
Definition at line 253 of file richstring.hxx.
|
private |
Definition at line 252 of file richstring.hxx.
|
explicit |
Definition at line 408 of file richstring.cxx.
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,.
rxText | The 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 |
Definition at line 504 of file richstring.cxx.
References EditEngine::CreateTextObject(), and ScEditEngineDefaulter::SetTextCurrentDefaults().
|
private |
Creates, appends, and returns a new empty phonetic text portion.
Definition at line 535 of file richstring.cxx.
References maPhonPortions.
Referenced by createPhoneticPortions(), and importPhoneticRun().
|
private |
Create phonetic text portions from the passed string and portion data.
Definition at line 568 of file richstring.cxx.
References oox::xls::PhoneticPortionModelList::back(), oox::xls::PhoneticPortionModelList::begin(), createPhonetic(), oox::xls::PhoneticPortionModelList::empty(), maPhonPortions, oox::xls::PhoneticPortionModel::mnPos, and oox::xls::PhoneticPortionModelList::push_back().
Referenced by importString().
|
private |
Creates, appends, and returns a new empty string portion.
Definition at line 528 of file richstring.cxx.
Referenced by createTextPortions(), importRun(), importString(), and importText().
|
private |
Create base text portions from the passed string and character formatting.
Definition at line 542 of file richstring.cxx.
References oox::xls::FontPortionModelList::back(), oox::xls::FontPortionModelList::begin(), createPortion(), oox::xls::FontPortionModelList::empty(), oox::xls::FontPortionModelList::front(), oox::xls::FontPortionModelList::insert(), oox::xls::FontPortionModel::mnPos, and oox::xls::FontPortionModelList::push_back().
Referenced by importString().
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 467 of file richstring.cxx.
References maPhonPortions, and maTextPortions.
void oox::xls::RichString::finalizeImport | ( | ) |
Final processing after import of all strings.
Definition at line 462 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 431 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 424 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 419 of file richstring.cxx.
References createPortion().
void oox::xls::RichString::importString | ( | SequenceInputStream & | rStrm, |
bool | bRich | ||
) |
Imports a Unicode rich-string from the passed record stream.
Definition at line 436 of file richstring.cxx.
References createPhoneticPortions(), createPortion(), createTextPortions(), oox::getFlag(), oox::xls::FontPortionModelList::importPortions(), oox::xls::PhoneticPortionModelList::importPortions(), oox::xls::PhoneticSettings::importStringData(), oox::BinaryStreamBase::isEof(), maPhonSettings, oox::xls::BiffHelper::readString(), and oox::BinaryInputStream::readuInt8().
RichStringPortionRef oox::xls::RichString::importText | ( | ) |
Appends and returns a portion object for a plain string (t element).
Definition at line 414 of file richstring.cxx.
References createPortion().
|
private |
Phonetic settings for this string.
Definition at line 257 of file richstring.hxx.
Referenced by createPhonetic(), createPhoneticPortions(), and extractPlainString().
|
private |
String portions with font data.
Definition at line 256 of file richstring.hxx.
Referenced by importPhoneticPr(), and importString().
|
private |
Definition at line 255 of file richstring.hxx.
Referenced by extractPlainString(), and finalizeImport().