summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-26 22:35:57 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-26 22:41:42 +0100
commitc91b8d3251e3a8ad14e1b143af182c937bf6e5cb (patch)
tree8f2c16213e1399fbd38142a73e54fd9b24faa45f /xmloff
parent40421ffc4ea119943fca8acbc1760c280e1140c5 (diff)
one more fix for error bar import, fdo#60083
This makes it finally possible to import the original test document. Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index d28392d6d032..a587fde28ad7 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -980,8 +980,6 @@ static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocume
else
aRoleBuffer.append( sal_Unicode( 'x' ));
- rtl::OUString aPlainRole = aRoleBuffer.makeStringAndClear();
- aRoleBuffer.append( aPlainRole );
aRoleBuffer.append( sal_Unicode( '-' ));
if( bPositiveValue )
@@ -1040,7 +1038,7 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext()
namespace {
void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Reference< beans::XPropertySet> xBarProp,
- SchXMLImportHelper& rImportHelper)
+ SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange)
{
const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext();
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(rImportHelper.GetChartFamilyID(),
@@ -1098,6 +1096,20 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Refere
xBarProp->setPropertyValue("NegativeError", aAny);
}
+ aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangePositive",
+ pSeriesStyleContext, pStylesCtxt);
+ if( aAny.hasValue() )
+ {
+ aAny >>= aPosRange;
+ }
+
+ aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangeNegative",
+ pSeriesStyleContext, pStylesCtxt);
+ if( aAny.hasValue() )
+ {
+ aAny >>= aNegRange;
+ }
+
switch(aBarStyle)
{
case com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN:
@@ -1183,8 +1195,8 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
// first import defaults from parent style
- SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper );
- SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper );
+ SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
+ SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
uno::Reference< chart2::XChartDocument > xDoc(GetImport().GetModel(),uno::UNO_QUERY);