bnc#792528: Play it safe for non-Excel documents.

Excel is not the only one that use charts. Let's also store the static
label value to maData in case it is used for non-Excel documents.

Change-Id: I1faed76e2ff396873039bccb3e1b7dcf27aba8c6
This commit is contained in:
Kohei Yoshida
2012-12-06 23:30:42 -05:00
parent 3a5c3dc392
commit f0b22ccfdd

View File

@@ -69,10 +69,13 @@ void TextContext::onCharacters( const OUString& rChars )
{
if( isCurrentElement( C_TOKEN( v ) ) )
{
// Static text is stored as a single string formula token.
// Static text is stored as a single string formula token for Excel document.
OUStringBuffer aBuf;
aBuf.append('"').append(rChars).append('"');
mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear();
// Also store it as a single element type for non-Excel document.
mrModel.mxDataSeq->maData[0] <<= rChars;
}
}