summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-08-20 07:12:19 +0000
committerRüdiger Timm <rt@openoffice.org>2004-08-20 07:12:19 +0000
commite6e70a1340edc8addd6d80caba74e8bbbd1dac70 (patch)
tree1fbfd7edb5c4df577d2209efe51cc7eb2708e952 /xmloff
parent0f5d53835620397de60cb4370b445cf8e89cf206 (diff)
INTEGRATION: CWS oasis2 (1.72.6); FILE MERGED
2004/08/04 16:11:59 bm 1.72.6.1: #i32368# export bar/line charts with line chart-type at series
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx36
1 files changed, 34 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 2d095ccb2644..54470c1bf9bc 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: SchXMLExport.cxx,v $
*
- * $Revision: 1.72 $
+ * $Revision: 1.73 $
*
- * last change: $Author: rt $ $Date: 2004-07-13 08:03:00 $
+ * last change: $Author: rt $ $Date: 2004-08-20 08:12:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1112,6 +1112,29 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
sal_Bool bWrite = sal_False;
sal_Int32 nAttachedAxis;
+ // #32368# determine the number of lines in a combi-chart
+ // note: bIsBar
+ sal_Int32 nNumberOfLinesInBarChart = 0;
+ if( bExportContent )
+ {
+ if( 0 == xDiagram->getDiagramType().reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.BarDiagram" )))
+ {
+ try
+ {
+ uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
+ xDiaProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NumberOfLines" )))
+ >>= nNumberOfLinesInBarChart;
+ }
+ catch( uno::Exception & aEx )
+ {
+ String aStr( aEx.Message );
+ ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
+ DBG_ERROR1( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ }
+ }
+ }
+
uno::Sequence< uno::Sequence< sal_Int32 > > aDataPointSeq;
if( xPropSet.is())
{
@@ -1225,6 +1248,15 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
maAutoStyleNameQueue.pop();
}
+ // chart-type for mixed types
+ if( nNumberOfLinesInBarChart > 0 &&
+ nSeries >= (mnSeriesCount - mnDomainAxes - nNumberOfLinesInBarChart))
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS,
+ mrExport.GetNamespaceMap().GetQNameByKey(
+ XML_NAMESPACE_CHART, GetXMLToken( XML_LINE )));
+ }
+
// open series element until end of for loop
pSeries = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_SERIES, sal_True, sal_True );
}