Commits

Anonymous committed 80cdec5

koheichart02: Query Percent and Stacked properties from the ChartType instances during ODF export.

Comments (0)

Files changed (1)

xmloff/source/chart/SchXMLExport.cxx

                 continue;
             }
 
+            // mixed chart types may have different percent/stacked modes.
+            bool bCTPercent = false;
+            bool bCTStacked = false;
+            try
+            {
+                Reference<beans::XPropertySet> xPropSet(aCTSeq[nCTIdx], uno::UNO_QUERY_THROW);
+                sal_Bool b;
+                if (xPropSet->getPropertyValue(OUString::createFromAscii("Percent")) >>= b)
+                    bCTPercent = static_cast<bool>(b);
+                if (xPropSet->getPropertyValue(OUString::createFromAscii("Stacked")) >>= b)
+                    bCTStacked = static_cast<bool>(b);
+            }
+            catch (const uno::Exception&) {}
+
             // export dataseries for current chart-type
             Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries());
             for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeriesSeq.getLength(); ++nSeriesIdx )