set graphic properties for error bars during import, fdo#78041
Change-Id: I43138745b074dcacdafa090d97eeb9aa2ccecf78
This commit is contained in:
@@ -167,7 +167,7 @@ void ErrorBar::setPropertyValue( const OUString& rPropName, const uno::Any& rAny
|
|||||||
else if(rPropName == "ShowNegativeError")
|
else if(rPropName == "ShowNegativeError")
|
||||||
rAny >>= mbShowNegativeError;
|
rAny >>= mbShowNegativeError;
|
||||||
else if(rPropName == "ErrorBarRangePositive" || rPropName == "ErrorBarRangeNegative")
|
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
|
else
|
||||||
LineProperties::setPropertyValue(rPropName, rAny);
|
LineProperties::setPropertyValue(rPropName, rAny);
|
||||||
|
|
||||||
|
@@ -1011,6 +1011,19 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext()
|
|||||||
|
|
||||||
namespace {
|
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,
|
void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Reference< beans::XPropertySet> xBarProp,
|
||||||
SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange)
|
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));
|
xBarProp->setPropertyValue("ShowNegativeError",uno::makeAny(sal_True));
|
||||||
|
|
||||||
// first import defaults from parent style
|
// first import defaults from parent style
|
||||||
|
SetErrorBarStyleProperties( maSeriesStyleName, xBarProp, mrImportHelper );
|
||||||
|
SetErrorBarStyleProperties( sAutoStyleName, xBarProp, mrImportHelper );
|
||||||
SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
|
SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
|
||||||
SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
|
SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user