summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-30 01:20:36 +0200
committerAndras Timar <andras.timar@collabora.com>2014-05-09 14:48:18 +0200
commitcf2ee3b5d644cfc859496abd4b2f0a6b1c49c86b (patch)
tree29d9baf4b5aab7d82df9981d0ec8bc6964ab19b3 /xmloff
parentbb51e9b44274d89c744e0923346dd497f585b751 (diff)
set graphic properties for error bars during import, fdo#78041
Change-Id: I43138745b074dcacdafa090d97eeb9aa2ccecf78 Reviewed-on: https://gerrit.libreoffice.org/9233 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index c72f1afab145..e55b77144c72 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -1011,6 +1011,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)
{
@@ -1177,6 +1190,8 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
xBarProp->setPropertyValue("ShowNegativeError",uno::makeAny(sal_True));
// 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 );