summaryrefslogtreecommitdiff
path: root/xmloff/source/chart/PropertyMaps.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/chart/PropertyMaps.cxx')
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index b6590c072c89..9962a09d0f5d 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -52,6 +52,8 @@
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
// header for any2enum
#include <comphelper/extract.hxx>
@@ -344,6 +346,22 @@ void XMLChartExportPropertyMapper::handleElementItem(
}
}
+namespace {
+
+OUString convertRange( const OUString & rRange, const uno::Reference< chart2::XChartDocument > & xDoc )
+{
+ OUString aResult = rRange;
+ if( !xDoc.is() )
+ return aResult;
+ uno::Reference< chart2::data::XRangeXMLConversion > xConversion(
+ xDoc->getDataProvider(), uno::UNO_QUERY );
+ if( xConversion.is())
+ aResult = xConversion->convertRangeToXML( rRange );
+ return aResult;
+}
+
+}
+
void XMLChartExportPropertyMapper::handleSpecialItem(
SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
const SvXMLUnitConverter& rUnitConverter,
@@ -440,6 +458,14 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
break;
}
+ case XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE:
+ {
+ OUString aRangeStr;
+ rProperty.maValue >>= aRangeStr;
+ sValueBuffer.append(convertRange(aRangeStr, mxChartDoc));
+ }
+ break;
+
default:
bHandled = sal_False;
break;
@@ -460,6 +486,11 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
}
}
+void XMLChartExportPropertyMapper::setChartDoc( uno::Reference< chart2::XChartDocument > xChartDoc )
+{
+ mxChartDoc = xChartDoc;
+}
+
// ----------------------------------------
XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
@@ -582,6 +613,12 @@ bool XMLChartImportPropertyMapper::handleSpecialItem(
}
break;
+ case XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE:
+ {
+ rProperty.maValue <<= rValue;
+ }
+ break;
+
// deprecated from 6.0 beta on
case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME:
rProperty.maValue <<= mrImport.ResolveGraphicObjectURL( rValue, sal_False );