LibreOffice Module sc (master) 1
richstring.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <richstring.hxx>
21#include <biffhelper.hxx>
22
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/text/XText.hpp>
25#include <rtl/ustrbuf.hxx>
26#include <editeng/editobj.hxx>
27#include <osl/diagnose.h>
31#include <oox/token/namespaces.hxx>
32#include <oox/token/tokens.hxx>
33#include <editutil.hxx>
34
35#include <vcl/svapp.hxx>
36
37namespace oox::xls {
38
39using namespace ::com::sun::star::text;
40using namespace ::com::sun::star::uno;
41
42namespace {
43
44const sal_uInt8 BIFF12_STRINGFLAG_FONTS = 0x01;
45const sal_uInt8 BIFF12_STRINGFLAG_PHONETICS = 0x02;
46
47bool lclNeedsRichTextFormat( const oox::xls::Font* pFont )
48{
49 return pFont && pFont->needsRichTextFormat();
50}
51
52} // namespace
53
55 mnFontId( -1 ),
56 mbConverted( false )
57{
58}
59
60void RichStringPortion::setText( const OUString& rText )
61{
63}
64
66{
67 mxFont = std::make_shared<Font>( rHelper, false );
68 return mxFont;
69}
70
71void RichStringPortion::setFontId( sal_Int32 nFontId )
72{
73 mnFontId = nFontId;
74}
75
77{
78 if( mxFont )
79 mxFont->finalizeImport();
80 else if( mnFontId >= 0 )
81 mxFont = rHelper.getStyles().getFont( mnFontId );
82}
83
84void RichStringPortion::convert( const Reference< XText >& rxText, bool bReplace )
85{
86 if ( mbConverted )
87 return;
88
89 Reference< XTextRange > xRange;
90 if( bReplace )
91 xRange = rxText;
92 else
93 xRange = rxText->getEnd();
94 OSL_ENSURE( xRange.is(), "RichStringPortion::convert - cannot get text range interface" );
95
96 if( xRange.is() )
97 {
98 xRange->setString( maText );
99 if( mxFont )
100 {
101 PropertySet aPropSet( xRange );
102 mxFont->writeToPropertySet( aPropSet );
103 }
104 }
105
106 mbConverted = true;
107}
108
110{
111 rSelection.nStartPos = rSelection.nEndPos;
112 rSelection.nStartPara = rSelection.nEndPara;
113 SfxItemSet aItemSet( rEE.GetEmptyItemSet() );
114
115 const Font* pFontToUse = mxFont ? mxFont.get() : lclNeedsRichTextFormat( pFont ) ? pFont : nullptr;
116
117 if ( pFontToUse )
118 pFontToUse->fillToItemSet( aItemSet, true );
119
120 // #TODO need to manually adjust nEndPos ( and nEndPara ) to cater for any paragraphs
121 sal_Int32 nLastParaLoc = -1;
122 sal_Int32 nSearchIndex = maText.indexOf( '\n' );
123 sal_Int32 nParaOccurrence = 0;
124 while ( nSearchIndex != -1 )
125 {
126 nLastParaLoc = nSearchIndex;
127 ++nParaOccurrence;
128 rSelection.nEndPos = 0;
129 nSearchIndex = maText.indexOf( '\n', nSearchIndex + 1);
130 }
131
132 rSelection.nEndPara += nParaOccurrence;
133 if ( nLastParaLoc != -1 )
134 {
135 rSelection.nEndPos = maText.getLength() - 1 - nLastParaLoc;
136 }
137 else
138 {
139 rSelection.nEndPos = rSelection.nStartPos + maText.getLength();
140 }
141 rEE.QuickSetAttribs( aItemSet, rSelection );
142}
143
144void RichStringPortion::writeFontProperties( const Reference<XText>& rxText ) const
145{
146 PropertySet aPropSet(rxText);
147
148 if (mxFont)
149 mxFont->writeToPropertySet(aPropSet);
150}
151
153{
154 mnPos = rStrm.readuInt16();
155 mnFontId = rStrm.readuInt16();
156}
157
159{
160 // #i33341# real life -- same character index may occur several times
161 OSL_ENSURE( mvModels.empty() || (mvModels.back().mnPos <= rPortion.mnPos), "FontPortionModelList::appendPortion - wrong char order" );
162 if( mvModels.empty() || (mvModels.back().mnPos < rPortion.mnPos) )
163 mvModels.push_back( rPortion );
164 else
165 mvModels.back().mnFontId = rPortion.mnFontId;
166}
167
169{
170 sal_Int32 nCount = rStrm.readInt32();
171 mvModels.clear();
172 if( nCount > 0 )
173 {
174 mvModels.reserve( getLimitedValue< size_t, sal_Int64 >( nCount, 0, rStrm.getRemaining() / 4 ) );
175 /* #i33341# real life -- same character index may occur several times
176 -> use appendPortion() to validate string position. */
177 FontPortionModel aPortion;
178 for( sal_Int32 nIndex = 0; !rStrm.isEof() && (nIndex < nCount); ++nIndex )
179 {
180 aPortion.read( rStrm );
181 appendPortion( aPortion );
182 }
183 }
184}
185
187 mnFontId( -1 ),
188 mnType( XML_fullwidthKatakana ),
189 mnAlignment( XML_left )
190{
191}
192
193void PhoneticDataModel::setBiffData( sal_Int32 nType, sal_Int32 nAlignment )
194{
195 static const sal_Int32 spnTypeIds[] = { XML_halfwidthKatakana, XML_fullwidthKatakana, XML_hiragana, XML_noConversion };
196 mnType = STATIC_ARRAY_SELECT( spnTypeIds, nType, XML_fullwidthKatakana );
197
198 static const sal_Int32 spnAlignments[] = { XML_noControl, XML_left, XML_center, XML_distributed };
199 mnAlignment = STATIC_ARRAY_SELECT( spnAlignments, nAlignment, XML_left );
200}
201
203 WorkbookHelper( rHelper )
204{
205}
206
208{
209 maModel.mnFontId = rAttribs.getInteger( XML_fontId, -1 );
210 maModel.mnType = rAttribs.getToken( XML_type, XML_fullwidthKatakana );
211 maModel.mnAlignment = rAttribs.getToken( XML_alignment, XML_left );
212}
213
215{
216 sal_uInt16 nFontId;
217 sal_Int32 nType, nAlignment;
218 nFontId = rStrm.readuInt16();
219 nType = rStrm.readInt32();
220 nAlignment = rStrm.readInt32();
221 maModel.mnFontId = nFontId;
222 maModel.setBiffData( nType, nAlignment );
223}
224
226{
227 sal_uInt16 nFontId, nFlags;
228 nFontId = rStrm.readuInt16();
229 nFlags = rStrm.readuInt16();
230 maModel.mnFontId = nFontId;
231 maModel.setBiffData( extractValue< sal_Int32 >( nFlags, 0, 2 ), extractValue< sal_Int32 >( nFlags, 2, 2 ) );
232}
233
235 mnBasePos( -1 ),
236 mnBaseEnd( -1 )
237{
238}
239
240void RichStringPhonetic::setText( const OUString& rText )
241{
242 maText = rText;
243}
244
246{
247 mnBasePos = rAttribs.getInteger( XML_sb, -1 );
248 mnBaseEnd = rAttribs.getInteger( XML_eb, -1 );
249}
250
251void RichStringPhonetic::setBaseRange( sal_Int32 nBasePos, sal_Int32 nBaseEnd )
252{
253 mnBasePos = nBasePos;
254 mnBaseEnd = nBaseEnd;
255}
256
258{
259 mnPos = rStrm.readuInt16();
260 mnBasePos = rStrm.readuInt16();
261 mnBaseLen = rStrm.readuInt16();
262}
263
265{
266 // same character index may occur several times
267 OSL_ENSURE( mvModels.empty() || ((mvModels.back().mnPos <= rPortion.mnPos) &&
268 (mvModels.back().mnBasePos + mvModels.back().mnBaseLen <= rPortion.mnBasePos)),
269 "PhoneticPortionModelList::appendPortion - wrong char order" );
270 if( mvModels.empty() || (mvModels.back().mnPos < rPortion.mnPos) )
271 {
272 mvModels.push_back( rPortion );
273 }
274 else if( mvModels.back().mnPos == rPortion.mnPos )
275 {
276 mvModels.back().mnBasePos = rPortion.mnBasePos;
277 mvModels.back().mnBaseLen = rPortion.mnBaseLen;
278 }
279}
280
282{
283 sal_Int32 nCount = rStrm.readInt32();
284 mvModels.clear();
285 if( nCount > 0 )
286 {
287 mvModels.reserve( getLimitedValue< size_t, sal_Int64 >( nCount, 0, rStrm.getRemaining() / 6 ) );
288 PhoneticPortionModel aPortion;
289 for( sal_Int32 nIndex = 0; !rStrm.isEof() && (nIndex < nCount); ++nIndex )
290 {
291 aPortion.read( rStrm );
292 appendPortion( aPortion );
293 }
294 }
295}
296
297sal_Int32 RichString::importText(const AttributeList& rAttribs)
298{
299 setAttributes(rAttribs);
300
301 return createPortion();
302}
303
305{
306 return createPortion();
307}
308
310{
311 auto aAttrSpace = rAttribs.getString(oox::NMSP_xml | oox::XML_space);
312 if (aAttrSpace && *aAttrSpace == "preserve")
313 mbPreserveSpace = true;
314}
315
317{
319 xPhonetic->importPhoneticRun( rAttribs );
320 return xPhonetic;
321}
322
323void RichString::importPhoneticPr( const AttributeList& rAttribs, const WorkbookHelper& rHelper )
324{
325 if (!mxPhonSettings)
326 mxPhonSettings.reset(new PhoneticSettings(rHelper));
327 mxPhonSettings->importPhoneticPr( rAttribs );
328}
329
330void RichString::importString( SequenceInputStream& rStrm, bool bRich, const WorkbookHelper& rHelper )
331{
332 sal_uInt8 nFlags = bRich ? rStrm.readuInt8() : 0;
333 OUString aBaseText = BiffHelper::readString( rStrm );
334
335 if( !rStrm.isEof() && getFlag( nFlags, BIFF12_STRINGFLAG_FONTS ) )
336 {
337 FontPortionModelList aPortions;
338 aPortions.importPortions( rStrm );
339 createTextPortions( aBaseText, aPortions );
340 }
341 else
342 {
343 getPortion(createPortion()).setText( aBaseText );
344 }
345
346 if( !rStrm.isEof() && getFlag( nFlags, BIFF12_STRINGFLAG_PHONETICS ) )
347 {
348 OUString aPhoneticText = BiffHelper::readString( rStrm );
349 PhoneticPortionModelList aPortions;
350 aPortions.importPortions( rStrm );
351 if (!mxPhonSettings)
352 mxPhonSettings.reset(new PhoneticSettings(rHelper));
353 mxPhonSettings->importStringData( rStrm );
354 createPhoneticPortions( aPhoneticText, aPortions, aBaseText.getLength() );
355 }
356}
357
359{
360 for (RichStringPortion& rPortion : maTextPortions)
361 rPortion.finalizeImport( rHelper );
362}
363
364bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* pFirstPortionFont ) const
365{
366 if( !maPhonPortions.empty() )
367 return false;
368 if( maTextPortions.empty() )
369 {
370 orString.clear();
371 return true;
372 }
373 if( (maTextPortions.size() == 1) && !maTextPortions.front().hasFont() && !lclNeedsRichTextFormat( pFirstPortionFont ) )
374 {
375 orString = maTextPortions.front().getText();
376 return orString.indexOf( '\x0A' ) < 0;
377 }
378 return false;
379}
380
381void RichString::convert( const Reference< XText >& rxText )
382{
383 if (maTextPortions.size() == 1)
384 {
385 // Set text directly to the cell when the string has only one portion.
386 // It's much faster this way.
387 const RichStringPortion& rPtn = maTextPortions.front();
388 rxText->setString(rPtn.getText());
389 rPtn.writeFontProperties(rxText);
390 return;
391 }
392
393 bool bReplaceOld = true;
394 for( auto& rTextPortion : maTextPortions )
395 {
396 rTextPortion.convert( rxText, bReplaceOld );
397 bReplaceOld = false; // do not replace first portion text with following portions
398 }
399}
400
401std::unique_ptr<EditTextObject> RichString::convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFirstPortionFont )
402{
403 ESelection aSelection;
404
405 OUStringBuffer sString;
406 for( auto& rTextPortion : maTextPortions )
407 sString.append(rTextPortion.getText());
408
409 // fdo#84370 - diving into editeng is not thread safe.
410 SolarMutexGuard aGuard;
411
412 rEE.SetTextCurrentDefaults( sString.makeStringAndClear() );
413
414 for( auto& rTextPortion : maTextPortions )
415 {
416 rTextPortion.convert( rEE, aSelection, pFirstPortionFont );
417 pFirstPortionFont = nullptr;
418 }
419
420 return rEE.CreateTextObject();
421}
422
423// private --------------------------------------------------------------------
424
426{
427 maTextPortions.emplace_back();
428 return maTextPortions.size() - 1;
429}
430
432{
433 RichStringPhoneticRef xPhonetic = std::make_shared<RichStringPhonetic>();
434 maPhonPortions.push_back( xPhonetic );
435 return xPhonetic;
436}
437
438void RichString::createTextPortions( std::u16string_view aText, FontPortionModelList& rPortions )
439{
440 maTextPortions.clear();
441 if( aText.empty() )
442 return;
443
444 sal_Int32 nStrLen = aText.size();
445 // add leading and trailing string position to ease the following loop
446 if( rPortions.empty() || (rPortions.front().mnPos > 0) )
447 rPortions.insert( rPortions.begin(), FontPortionModel( 0 ) );
448 if( rPortions.back().mnPos < nStrLen )
449 rPortions.push_back( FontPortionModel( nStrLen ) );
450
451 // create all string portions according to the font id vector
452 for( ::std::vector< FontPortionModel >::const_iterator aIt = rPortions.begin(); aIt->mnPos < nStrLen; ++aIt )
453 {
454 sal_Int32 nPortionLen = (aIt + 1)->mnPos - aIt->mnPos;
455 if( (0 < nPortionLen) && (aIt->mnPos + nPortionLen <= nStrLen) )
456 {
458 rPortion.setText( OUString(aText.substr( aIt->mnPos, nPortionLen )) );
459 rPortion.setFontId( aIt->mnFontId );
460 }
461 }
462}
463
464void RichString::createPhoneticPortions( std::u16string_view aText, PhoneticPortionModelList& rPortions, sal_Int32 nBaseLen )
465{
466 maPhonPortions.clear();
467 if( aText.empty())
468 return;
469
470 sal_Int32 nStrLen = aText.size();
471 // no portions - assign phonetic text to entire base text
472 if( rPortions.empty() )
473 rPortions.push_back( PhoneticPortionModel( 0, 0, nBaseLen ) );
474 // add trailing string position to ease the following loop
475 if( rPortions.back().mnPos < nStrLen )
476 rPortions.push_back( PhoneticPortionModel( nStrLen, nBaseLen, 0 ) );
477
478 // create all phonetic portions according to the portions vector
479 for( ::std::vector< PhoneticPortionModel >::const_iterator aIt = rPortions.begin(); aIt->mnPos < nStrLen; ++aIt )
480 {
481 sal_Int32 nPortionLen = (aIt + 1)->mnPos - aIt->mnPos;
482 if( (0 < nPortionLen) && (aIt->mnPos + nPortionLen <= nStrLen) )
483 {
485 xPhonetic->setText( OUString(aText.substr( aIt->mnPos, nPortionLen )) );
486 xPhonetic->setBaseRange( aIt->mnBasePos, aIt->mnBasePos + aIt->mnBaseLen );
487 }
488 }
489}
490
491} // namespace oox::xls
492
493/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< EditTextObject > CreateTextObject()
const SfxItemSet & GetEmptyItemSet() const
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
Definition: editutil.cxx:619
static OUString decodeXString(const OUString &rValue)
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::optional< OUString > getString(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
static OUString readString(SequenceInputStream &rStrm, bool b32BitLen=true)
Reads a BIFF12 string with leading 16-bit or 32-bit length field.
Definition: biffhelper.cxx:79
A vector with all font portions in a rich-string.
Definition: richstring.hxx:92
void push_back(const FontPortionModel &rModel)
Definition: richstring.hxx:103
::std::vector< FontPortionModel > mvModels
Definition: richstring.hxx:93
void insert(::std::vector< FontPortionModel >::iterator it, const FontPortionModel &rModel)
Definition: richstring.hxx:105
::std::vector< FontPortionModel >::iterator begin()
Definition: richstring.hxx:109
void importPortions(SequenceInputStream &rStrm)
Reads count and font identifiers from the passed stream.
Definition: richstring.cxx:168
const FontPortionModel & front() const
Definition: richstring.hxx:101
const FontPortionModel & back() const
Definition: richstring.hxx:100
void appendPortion(const FontPortionModel &rPortion)
Appends a rich-string font identifier.
Definition: richstring.cxx:158
void fillToItemSet(SfxItemSet &rItemSet, bool bEditEngineText, bool bSkipPoolDefs=false) const
bool needsRichTextFormat() const
Returns true, if the font requires rich text formatting in Calc.
A vector with all phonetic portions in a rich-string.
Definition: richstring.hxx:184
::std::vector< PhoneticPortionModel > mvModels
Definition: richstring.hxx:202
void importPortions(SequenceInputStream &rStrm)
Reads all phonetic portions from the passed stream.
Definition: richstring.cxx:281
void push_back(const PhoneticPortionModel &rModel)
Definition: richstring.hxx:192
::std::vector< PhoneticPortionModel >::const_iterator begin() const
Definition: richstring.hxx:194
const PhoneticPortionModel & back() const
Definition: richstring.hxx:190
void appendPortion(const PhoneticPortionModel &rPortion)
Appends a rich-string phonetic portion.
Definition: richstring.cxx:264
void importStringData(SequenceInputStream &rStrm)
Imports phonetic settings from a rich string.
Definition: richstring.cxx:225
PhoneticSettings(const WorkbookHelper &rHelper)
Definition: richstring.cxx:202
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
Definition: richstring.cxx:207
PhoneticDataModel maModel
Definition: richstring.hxx:143
void setBaseRange(sal_Int32 nBasePos, sal_Int32 nBaseEnd)
Sets the associated range in base text for this phonetic portion.
Definition: richstring.cxx:251
void importPhoneticRun(const AttributeList &rAttribs)
Imports attributes of a phonetic run (rPh element).
Definition: richstring.cxx:245
void setText(const OUString &rText)
Sets text data for this phonetic portion.
Definition: richstring.cxx:240
sal_Int32 mnBaseEnd
Start position in base text.
Definition: richstring.hxx:162
sal_Int32 mnBasePos
Portion text.
Definition: richstring.hxx:161
Contains text data and font attributes for a part of a rich formatted string.
Definition: richstring.hxx:39
FontRef mxFont
Portion text.
Definition: richstring.hxx:69
void convert(const css::uno::Reference< css::text::XText > &rxText, bool bReplace)
Converts the portion and replaces or appends to the passed XText.
void writeFontProperties(const css::uno::Reference< css::text::XText > &rxText) const
Definition: richstring.cxx:144
bool mbConverted
Link to global font list.
Definition: richstring.hxx:71
FontRef const & createFont(const WorkbookHelper &rHelper)
Creates and returns a new font formatting object.
Definition: richstring.cxx:65
const OUString & getText() const
Returns the text data of this portion.
Definition: richstring.hxx:54
void setFontId(sal_Int32 nFontId)
Links this portion to a font object from the global font list.
Definition: richstring.cxx:71
void finalizeImport(const WorkbookHelper &rHelper)
Final processing after import of all strings.
Definition: richstring.cxx:76
sal_Int32 mnFontId
Embedded portion font, may be empty.
Definition: richstring.hxx:70
void setText(const OUString &rText)
Sets text data for this portion.
Definition: richstring.cxx:60
void finalizeImport(const WorkbookHelper &rHelper)
Final processing after import of all strings.
Definition: richstring.cxx:358
void createPhoneticPortions(std::u16string_view aText, PhoneticPortionModelList &rPortions, sal_Int32 nBaseLen)
Create phonetic text portions from the passed string and portion data.
Definition: richstring.cxx:464
void importString(SequenceInputStream &rStrm, bool bRich, const WorkbookHelper &rHelper)
Imports a Unicode rich-string from the passed record stream.
Definition: richstring.cxx:330
void importPhoneticPr(const AttributeList &rAttribs, const WorkbookHelper &rHelper)
Imports phonetic settings from the rPhoneticPr element.
Definition: richstring.cxx:323
std::unique_ptr< PhoneticSettings > mxPhonSettings
String portions with font data.
Definition: richstring.hxx:258
std::vector< RichStringPortion > maTextPortions
Definition: richstring.hxx:257
PhoneticVector maPhonPortions
Phonetic settings for this string.
Definition: richstring.hxx:259
bool extractPlainString(OUString &orString, const oox::xls::Font *pFirstPortionFont) const
Tries to extract a plain string from this object.
Definition: richstring.cxx:364
bool mbPreserveSpace
Phonetic text portions.
Definition: richstring.hxx:260
sal_Int32 createPortion()
Creates, appends, and returns a new empty string portion.
Definition: richstring.cxx:425
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,...
void setAttributes(const AttributeList &rAttribs)
Definition: richstring.cxx:309
RichStringPhoneticRef importPhoneticRun(const AttributeList &rAttribs)
Appends and returns a phonetic text object for a new phonetic run (rPh element).
Definition: richstring.cxx:316
RichStringPortion & getPortion(sal_Int32 nPortionIdx)
Definition: richstring.hxx:237
sal_Int32 importText(const AttributeList &rAttribs)
Appends and returns an index of a portion object for a plain string (t element).
Definition: richstring.cxx:297
RichStringPhoneticRef createPhonetic()
Creates, appends, and returns a new empty phonetic text portion.
Definition: richstring.cxx:431
sal_Int32 importRun()
Appends and returns an index of a portion object for a new formatting run (r element).
Definition: richstring.cxx:304
void createTextPortions(std::u16string_view aText, FontPortionModelList &rPortions)
Create base text portions from the passed string and character formatting.
Definition: richstring.cxx:438
FontRef getFont(sal_Int32 nFontId) const
Returns the specified font object.
Helper class to provide access to global workbook data.
StylesBuffer & getStyles() const
Returns all cell formatting objects read from the styles substream.
int nCount
#define STATIC_ARRAY_SELECT(array, index, def)
sal_Int32 nIndex
void SvStream & rStrm
std::shared_ptr< RichStringPhonetic > RichStringPhoneticRef
Definition: richstring.hxx:165
std::shared_ptr< Font > FontRef
bool getFlag(Type nBitField, Type nMask)
XML_type
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
sal_Int32 mnType
sal_Int32 nStartPara
sal_Int32 nEndPos
sal_Int32 nStartPos
sal_Int32 nEndPara
Represents a position in a rich-string containing current font identifier.
Definition: richstring.hxx:81
sal_Int32 mnFontId
First character in the string.
Definition: richstring.hxx:83
void read(SequenceInputStream &rStrm)
Definition: richstring.cxx:152
sal_Int32 mnType
Font identifier for text formatting.
Definition: richstring.hxx:120
sal_Int32 mnAlignment
Phonetic text type.
Definition: richstring.hxx:121
PhoneticDataModel()
Phonetic portion alignment.
Definition: richstring.cxx:186
void setBiffData(sal_Int32 nType, sal_Int32 nAlignment)
Sets the passed data from binary import.
Definition: richstring.cxx:193
Represents a phonetic text portion in a rich-string with phonetic text.
Definition: richstring.hxx:170
void read(SequenceInputStream &rStrm)
Definition: richstring.cxx:257
sal_Int32 mnBasePos
First character in phonetic text.
Definition: richstring.hxx:172
sal_Int32 mnBaseLen
First character in base text.
Definition: richstring.hxx:173
unsigned char sal_uInt8