48 "XclImpString::Read - unknown flag");
69 bool b16Bit, bRich, bFarEast;
95 OSL_ENSURE( rFormats.empty() || (rFormats.back().mnChar <= nChar),
"XclImpString::AppendFormat - wrong char order" );
96 if( rFormats.empty() || (rFormats.back().mnChar < nChar) )
97 rFormats.emplace_back( nChar, nFontIdx );
99 rFormats.back().mnFontIdx = nFontIdx;
115 size_t nMaxElements = nAvailableBytes / nElementSize;
116 if (nRunCount > nMaxElements)
118 SAL_WARN(
"sc.filter",
"XclImpString::ReadFormats - more formats claimed than stream could contain");
123 rFormats.reserve( nRunCount );
128 for( sal_uInt16 nIdx = 0; nIdx < nRunCount; ++nIdx )
137 for( sal_uInt16 nIdx = 0; nIdx < nRunCount; ++nIdx )
149 sal_uInt16 nRunCount = nFormatSize / 8;
151 rFormats.reserve( nRunCount );
152 for( sal_uInt16 nIdx = 0; nIdx < nRunCount; ++nIdx )
164 mrText( rString.GetText() ),
165 mrFormats( rString.GetFormats() ),
void ReadFormats(XclImpStream &rStrm)
Reads and appends the formatting information (run count and runs) from stream.
sal_Int32 mnTextEnd
First character of current portion.
XclStrFlags
Flags used to specify import/export mode of strings.
sal_uInt16 GetPortionFont() const
Returns the font index of the current text portion.
void Read(XclImpStream &rStrm, XclStrFlags nFlags=XclStrFlags::NONE)
Reads a complete string from the passed stream.
OUString GetPortionText() const
Returns the string of the current text portion.
const sal_uInt16 EXC_FONT_NOTFOUND
Application font index.
Omit flags on empty string (default: read/write always). BIFF8 only.
::std::vector< XclFormatRun > XclFormatRunVec
A vector with all formatting runs for a rich-string.
MS Excel 5.0, MS Excel 7.0 (95)
OUString ReadRawUniString(sal_uInt16 nChars, bool b16Bit)
Reads nChars characters and returns the string.
8-bit string length field (default: 16-bit).
void ReadObjFormats(XclImpStream &rStrm, sal_uInt16 nFormatSize)
Reads and appends formatting runs from an OBJ or TXO record.
bool Is() const
Returns true, if the iterator references a valid text portion.
size_t mnFormatsBeg
First character of next portion.
Iterates over formatted string portions.
const XclFormatRunVec & mrFormats
The processed string.
XclFormatRunVec maFormats
The text data of the string.
static void AppendFormat(XclFormatRunVec &rFormats, sal_uInt16 nChar, sal_uInt16 nFontIdx)
Insert a formatting run to the passed format buffer.
const XclImpRoot & GetRoot() const
Returns the filter root data.
std::size_t GetRecLeft()
Returns remaining data size of the whole record without record headers.
XclImpString()
Constructs an empty string.
XclImpStringIterator(const XclImpString &rString)
OUString ReadByteString(bool b16BitLen)
Reads 8/16 bit string length, character array and returns the string.
std::size_t ReadUniStringExtHeader(bool &rb16Bit, bool &rbRich, bool &rbFareast, sal_uInt16 &rnFormatRuns, sal_uInt32 &rnExtInf, sal_uInt8 nFlags)
Reads ext.
void SetSvStreamError(const ErrCode &rErrCode)
Set an SVSTREAM_..._ERROR.
#define SAL_WARN_IF(condition, area, stream)
void Ignore(std::size_t nBytes)
Seeks forward inside the current record.
XclImpStringIterator & operator++()
Moves iterator to next text portion.
sal_Int32 mnTextBeg
Current text portion.
Always use UCS-2 characters (default: try to compress). BIFF8 only.
#define SVSTREAM_FILEFORMAT_ERROR
const XclStrFlags nAllowedFlags
All allowed flags for import.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
#define SAL_WARN(area, stream)
size_t mnFormatsEnd
Formatting run index for current portion.
This class is used to import record oriented streams.
This class represents an unformatted or formatted string and provides importing from stream...
size_t mnPortion
The vector of formatting runs.