diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-26 22:35:57 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-02-27 10:33:33 +0000 |
commit | e220bc9850e5afd7d622c0adc6665af88dd25dcb (patch) | |
tree | ed8d8891bb0ee832d917d1dbfc354dd02fff8e79 | |
parent | 38c2da62f8992133109507664a48459467a290da (diff) |
one more fix for error bar import, fdo#60083
This makes it finally possible to import the original test document.
Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913
Reviewed-on: https://gerrit.libreoffice.org/2434
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index e5b16fd321ec..4463ebf4d999 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); |