30 namespace text {
class XText; }
33 namespace oox {
class SequenceInputStream; }
44 void setText(
const OUString& rText );
60 const css::uno::Reference< css::text::XText >& rxText,
65 const css::uno::Reference< css::text::XText >& rxText )
const;
100 bool empty()
const {
return mvModels.empty(); }
107 void insert(::std::vector< FontPortionModel >::iterator it,
109 { mvModels.insert(it, rModel); }
111 ::std::vector< FontPortionModel >::iterator
begin() {
return mvModels.begin(); }
155 void setText(
const OUString& rText );
159 void setBaseRange( sal_Int32 nBasePos, sal_Int32 nBaseEnd );
179 mnPos( nPos ), mnBasePos( nBasePos ), mnBaseLen( nBaseLen ) {}
196 ::std::vector< PhoneticPortionModel >::const_iterator
begin()
const {
return mvModels.begin(); }
237 void convert(
const css::uno::Reference< css::text::XText >& rxText )
const;
Helper class to provide access to global workbook data.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the rPhoneticPr element.
void setText(const OUString &rText)
Sets text data for this portion.
Represents a position in a rich-string containing current font identifier.
sal_Int32 mnAlignment
Phonetic text type.
PhoneticPortionModel()
Number of characters in base text.
Contains text data and font attributes for a part of a rich formatted string.
void push_back(const PhoneticPortionModel &rModel)
void importPortions(SequenceInputStream &rStrm)
Reads all phonetic portions from the passed stream.
void setBaseRange(sal_Int32 nBasePos, sal_Int32 nBaseEnd)
Sets the associated range in base text for this phonetic portion.
RichStringPortion(const WorkbookHelper &rHelper)
std::shared_ptr< RichStringPortion > RichStringPortionRef
RefVector< RichStringPortion > PortionVector
::std::vector< FontPortionModel >::iterator begin()
Contains string data and a list of formatting runs for a rich formatted string.
RichStringPortionRef importRun()
Appends and returns a portion object for a new formatting run (r element).
PhoneticVector maPhonPortions
Phonetic settings for this string.
sal_Int32 mnBaseEnd
Start position in base text.
void convert(const css::uno::Reference< css::text::XText > &rxText, bool bReplace)
Converts the portion and replaces or appends to the passed XText.
void insert(::std::vector< FontPortionModel >::iterator it, const FontPortionModel &rModel)
const FontPortionModel & front() const
PhoneticPortionModel(sal_Int32 nPos, sal_Int32 nBasePos, sal_Int32 nBaseLen)
void importPortions(SequenceInputStream &rStrm)
Reads count and font identifiers from the passed stream.
void read(SequenceInputStream &rStrm)
void setFontId(sal_Int32 nFontId)
Links this portion to a font object from the global font list.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
void createPhoneticPortions(const OUString &rText, PhoneticPortionModelList &rPortions, sal_Int32 nBaseLen)
Create phonetic text portions from the passed string and portion data.
void finalizeImport()
Final processing after import of all strings.
Contains text data and positioning information for a phonetic text portion.
FontRef mxFont
Portion text.
sal_Int32 mnBaseLen
First character in base text.
std::shared_ptr< RichString > RichStringRef
::std::vector< FontPortionModel > mvModels
void importString(SequenceInputStream &rStrm, bool bRich)
Imports a Unicode rich-string from the passed record stream.
PhoneticSettings(const WorkbookHelper &rHelper)
PhoneticDataModel maModel
PhoneticPortionModelList()
void appendPortion(const PhoneticPortionModel &rPortion)
Appends a rich-string phonetic portion.
A vector with all font portions in a rich-string.
RichStringPhonetic(const WorkbookHelper &rHelper)
const OUString & getText() const
Returns the text data of this portion.
void push_back(const FontPortionModel &rModel)
void writeFontProperties(const css::uno::Reference< css::text::XText > &rxText) const
void setText(const OUString &rText)
Sets text data for this phonetic portion.
void importStringData(SequenceInputStream &rStrm)
Imports phonetic settings from a rich string.
exports com.sun.star. text
RichStringPhoneticRef importPhoneticRun(const AttributeList &rAttribs)
Appends and returns a phonetic text object for a new phonetic run (rPh element).
void read(SequenceInputStream &rStrm)
sal_Int32 mnBasePos
Portion text.
PhoneticSettings maPhonSettings
String portions with font data.
void importPhoneticRun(const AttributeList &rAttribs)
Imports attributes of a phonetic run (rPh element).
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...
bool mbConverted
Link to global font list.
const PhoneticPortionModel & back() const
PortionVector maTextPortions
::std::vector< PhoneticPortionModel > mvModels
RichStringPortionRef createPortion()
Creates, appends, and returns a new empty string portion.
std::shared_ptr< Font > FontRef
void createTextPortions(const OUString &rText, FontPortionModelList &rPortions)
Create base text portions from the passed string and character formatting.
bool hasFont() const
Returns true, if the portion contains font formatting.
Represents a phonetic text portion in a rich-string with phonetic text.
RichStringPortionRef importText()
Appends and returns a portion object for a plain string (t element).
void appendPortion(const FontPortionModel &rPortion)
Appends a rich-string font identifier.
void setBiffData(sal_Int32 nType, sal_Int32 nAlignment)
Sets the passed data from binary import.
sal_Int32 mnBasePos
First character in phonetic text.
A vector with all phonetic portions in a rich-string.
FontPortionModel(sal_Int32 nPos)
void finalizeImport()
Final processing after import of all strings.
FontPortionModel()
Font identifier for the next characters.
RefVector< RichStringPhonetic > PhoneticVector
sal_Int32 mnFontId
First character in the string.
sal_Int32 mnType
Font identifier for text formatting.
FontRef const & createFont()
Creates and returns a new font formatting object.
sal_Int32 mnFontId
Embedded portion font, may be empty.
::std::vector< PhoneticPortionModel >::const_iterator begin() const
RichString(const WorkbookHelper &rHelper)
std::shared_ptr< RichStringPhonetic > RichStringPhoneticRef
bool extractPlainString(OUString &orString, const oox::xls::Font *pFirstPortionFont) const
Tries to extract a plain string from this object.
RichStringPhoneticRef createPhonetic()
Creates, appends, and returns a new empty phonetic text portion.
PhoneticDataModel()
Phonetic portion alignment.
const FontPortionModel & back() const