[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 6 20:32:49 PST 2012
oox/source/drawingml/chart/titlecontext.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit efee17ce9ce538cffac38651a290ead1a832dbe0
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Dec 6 23:30:42 2012 -0500
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
diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx
index 4b921da..1fcb3cc 100644
--- a/oox/source/drawingml/chart/titlecontext.cxx
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -79,10 +79,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;
}
}
More information about the Libreoffice-commits
mailing list