summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2007-07-25 07:06:32 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2007-07-25 07:06:32 +0000
commit2ac9076a354eca0cf8369e5f9be1015e8483a474 (patch)
tree25f23ac24b60e63279112c964a64312dd4fa3560
parentc48156d973038558119bb8de827db7cf4f70a223 (diff)
INTEGRATION: CWS chart07 (1.88.6); FILE MERGED
2007/07/13 12:08:46 bm 1.88.6.1: #i79009# For Writer we have to export a broken version of the complete cell-range, where every row number is noe too large, so that older version can correctly read those files. Argument BrokenCellRangeForExport is used for that.
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx33
1 files changed, 20 insertions, 13 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index ca94d1e58937..13ddf9feda2d 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: SchXMLExport.cxx,v $
*
- * $Revision: 1.88 $
+ * $Revision: 1.89 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 14:47:51 $
+ * last change: $Author: rt $ $Date: 2007-07-25 08:06:32 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -3298,21 +3298,16 @@ void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart
{
Reference< chart2::data::XDataSource > xDataSource( lcl_pressUsedDataIntoRectangularFormat( xChartDoc, mbHasCategoryLabels ));
Sequence< beans::PropertyValue > aArgs( xDataProvider->detectArguments( xDataSource ));
+ ::rtl::OUString sCellRange, sBrokenRange;
+ bool bBrokenRangeAvailable = false;
for( sal_Int32 i=0; i<aArgs.getLength(); ++i )
{
if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation")))
+ aArgs[i].Value >>= sCellRange;
+ else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("BrokenCellRangeForExport")))
{
- ::rtl::OUString sAddressFromDataProvider;
- aArgs[i].Value >>= sAddressFromDataProvider;
- // convert format to XML-conform one
- if( sAddressFromDataProvider.getLength() > 0 )
- {
- Reference< chart2::data::XRangeXMLConversion > xConversion( xDataProvider, uno::UNO_QUERY );
- if( xConversion.is())
- msChartAddress = xConversion->convertRangeToXML( sAddressFromDataProvider );
- else
- msChartAddress = sAddressFromDataProvider;
- }
+ if( aArgs[i].Value >>= sBrokenRange )
+ bBrokenRangeAvailable = true;
}
else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DataRowSource")))
{
@@ -3327,6 +3322,18 @@ void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart
else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TableNumberList")))
aArgs[i].Value >>= msTableNumberList;
}
+
+ // #i79009# For Writer we have to export a broken version of the
+ // range, where every row number is noe too large, so that older
+ // version can correctly read those files.
+ msChartAddress = (bBrokenRangeAvailable ? sBrokenRange : sCellRange);
+ if( msChartAddress.getLength() > 0 )
+ {
+ // convert format to XML-conform one
+ Reference< chart2::data::XRangeXMLConversion > xConversion( xDataProvider, uno::UNO_QUERY );
+ if( xConversion.is())
+ msChartAddress = xConversion->convertRangeToXML( msChartAddress );
+ }
}
}
catch( uno::Exception & ex )