summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-06 23:30:42 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-06 23:34:18 -0500
commit4ec7c5e494a09863bdd3f347a205323859ee7bae (patch)
tree79faf58b9bfb5b22b65efec6b1572efe95ca3a98 /oox
parent6cf3d295d8955058dc1128ecf46b09d88926a0db (diff)
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
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/titlecontext.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx
index ea42cb863b0b..7067ef5d7443 100644
--- a/oox/source/drawingml/chart/titlecontext.cxx
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -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;
}
}