summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2013-02-17 14:29:51 +0100
committerKatarina Behrens <bubli@bubli.org>2013-02-17 14:33:52 +0100
commit1aadb8789bc9a58e1798c0905214833a0cd6d40e (patch)
treefc3ceba55c38ab2ec43cff7542721a58de609b71 /oox
parent0e6fdbd79f196aaa06bf3de31123f6a39fe0ec6e (diff)
fdo#58789: export field separators, fix series name display
Change-Id: I1edae1c2ec845a46d7a9a4ab2517784d2d68d51d
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ebeafc249784..2d2471776b8f 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2293,12 +2293,13 @@ void ChartExport::exportDataLabels(
{
// TODO: export field separators, missing flag vs. showing series name or not
uno::Reference< chart2::XDataSeries > xSeries( xSeriesProperties, uno::UNO_QUERY );
- Sequence< sal_Int32 > aDataPointSeq;
+
if( xSeriesProperties.is())
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_dLbls ),
FSEND );
+
sal_Int32 nElem;
for( nElem = 0; nElem < nSeriesLength; ++nElem)
{
@@ -2327,6 +2328,7 @@ void ChartExport::exportDataLabels(
namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
sal_Int32 nPlacement(csscd::AVOID_OVERLAP);
const char *aPlacement = NULL;
+ OUString aSep;
if (GetProperty( xPropSet, "LabelPlacement"))
mAny >>= nPlacement;
@@ -2347,6 +2349,13 @@ void ChartExport::exportDataLabels(
pFS->startElement( FSNS( XML_c, XML_dLbl ), FSEND);
pFS->singleElement( FSNS( XML_c, XML_idx), XML_val, I32S(nElem), FSEND);
pFS->singleElement( FSNS( XML_c, XML_dLblPos), XML_val, aPlacement, FSEND);
+
+ if (GetProperty( xPropSet, "LabelSeparator"))
+ {
+ mAny >>= aSep;
+ pFS->singleElement( FSNS( XML_c, XML_separator), XML_val, USS(aSep), FSEND);
+ }
+
pFS->singleElement( FSNS( XML_c, XML_showLegendKey), XML_val,
aLabel.ShowLegendSymbol ? "1" : "0", FSEND);
pFS->singleElement( FSNS( XML_c, XML_showVal), XML_val,
@@ -2355,6 +2364,10 @@ void ChartExport::exportDataLabels(
aLabel.ShowCategoryName ? "1" : "0", FSEND);
pFS->singleElement( FSNS( XML_c, XML_showPercent), XML_val,
aLabel.ShowNumberInPercent ? "1" : "0", FSEND);
+ // MSO somehow assumes series name to be on (=displayed) by default.
+ // Let's put false here and switch it off then, since we have no UI means
+ // in LibO to toggle it on anyway
+ pFS->singleElement( FSNS( XML_c, XML_showSerName), XML_val, "0", FSEND);
pFS->endElement( FSNS( XML_c, XML_dLbl ));
}
}