summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-30 01:20:36 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-01 20:48:34 +0200
commit66c2360491614597ba1e8b05dff33e6b142e382d (patch)
tree2d933969dd3b05b8d1a5be84f1e551a452163c58
parenta9a1f801ba44ae2779863a0f6fab11e27aa45ead (diff)
set graphic properties for error bars during import, fdo#78041
Change-Id: I43138745b074dcacdafa090d97eeb9aa2ccecf78
-rw-r--r--chart2/source/tools/ErrorBar.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx15
2 files changed, 16 insertions, 1 deletions
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 805b4e6e0ac7..00fe6ed2f7ba 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -165,7 +165,7 @@ void ErrorBar::setPropertyValue( const OUString& rPropName, const uno::Any& rAny
else if(rPropName == "ShowNegativeError")
rAny >>= mbShowNegativeError;
else if(rPropName == "ErrorBarRangePositive" || rPropName == "ErrorBarRangeNegative")
- throw uno::RuntimeException("read-only property", static_cast< uno::XWeak*>(this));
+ throw beans::UnknownPropertyException("read-only property", static_cast< uno::XWeak*>(this));
else
LineProperties::setPropertyValue(rPropName, rAny);
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index d8b56b2cb44b..b34e2af4f099 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -1025,6 +1025,19 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext()
namespace {
+void SetErrorBarStyleProperties( const OUString& rStyleName, uno::Reference< beans::XPropertySet > xBarProp,
+ SchXMLImportHelper& rImportHelper )
+{
+ const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext();
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(rImportHelper.GetChartFamilyID(),
+ rStyleName);
+
+ XMLPropStyleContext * pSeriesStyleContext =
+ const_cast< XMLPropStyleContext * >( dynamic_cast< const XMLPropStyleContext * >( pStyle ));
+
+ pSeriesStyleContext->FillPropertySet( xBarProp );
+}
+
void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Reference< beans::XPropertySet> xBarProp,
SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange)
{
@@ -1198,6 +1211,8 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
// first import defaults from parent style
+ SetErrorBarStyleProperties( maSeriesStyleName, xBarProp, mrImportHelper );
+ SetErrorBarStyleProperties( sAutoStyleName, xBarProp, mrImportHelper );
SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );