Kaydet (Commit) ed39df13 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Doughnut charts don't support label placement option. Don't export it.

Change-Id: I6d0e2c099869120bdf594813468a3c5ba4bb46fd
üst 96f890c6
...@@ -2615,9 +2615,24 @@ void ChartExport::exportDataLabels( ...@@ -2615,9 +2615,24 @@ void ChartExport::exportDataLabels(
uno::Sequence<sal_Int32> aAttrLabelIndices; uno::Sequence<sal_Int32> aAttrLabelIndices;
xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices; xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices;
// We must not export label placement property when the chart type doesn't
// support this option in MS Office, else MS Office would think the file
// is corrupt & refuse to open it.
bool bLabelPlacement = !mbIs3DChart; bool bLabelPlacement = !mbIs3DChart;
if (eChartType == chart::TYPEID_PIE) eChartType = getChartType();
bLabelPlacement = true; switch (eChartType)
{
case chart::TYPEID_PIE:
// All pie charts support label placement.
bLabelPlacement = true;
break;
case chart::TYPEID_DOUGHNUT:
// Doughnut charts don't support label placement.
bLabelPlacement = false;
break;
default:
;
}
const sal_Int32* p = aAttrLabelIndices.getConstArray(); const sal_Int32* p = aAttrLabelIndices.getConstArray();
const sal_Int32* pEnd = p + aAttrLabelIndices.getLength(); const sal_Int32* pEnd = p + aAttrLabelIndices.getLength();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment