diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/axisconverter.cxx | 8 | ||||
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 8 | ||||
-rw-r--r-- | oox/source/token/properties.txt | 1 |
3 files changed, 5 insertions, 12 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 6767c3ee9f45..a15c23ef01d6 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -307,13 +307,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo // number format ------------------------------------------------------ if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == cssc2::AxisType::PERCENT) ) - { - bool bPercent = false; - if( mrModel.maNumberFormat.maFormatCode.indexOf('%') >= 0) - bPercent = true; - mrModel.maNumberFormat.mbSourceLinked = false; - getFormatter().convertNumberFormat( aAxisProp, mrModel.maNumberFormat, bPercent ); - } + getFormatter().convertNumberFormat(aAxisProp, mrModel.maNumberFormat, false); // position of crossing axis ------------------------------------------ diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 54ef18a7f0cd..d406ce924621 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1133,11 +1133,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo if( mxData->mxNumFmts.is() ) { sal_Int32 nPropId = bPercentFormat ? PROP_PercentageNumberFormat : PROP_NumberFormat; - if( rNumberFormat.mbSourceLinked || rNumberFormat.maFormatCode.isEmpty() ) - { - rPropSet.setAnyProperty( nPropId, Any() ); - } - else try + try { sal_Int32 nIndex = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general") ? mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) : @@ -1150,6 +1146,8 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo OSL_FAIL( OStringBuffer( "ObjectFormatter::convertNumberFormat - cannot create number format '" ). append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() ); } + + rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked)); } } diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 0ad6d7a1a4c1..44c759715975 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -298,6 +298,7 @@ LineStartWidth LineStyle LineTransparence LineWidth +LinkNumberFormatToSource LinkURL LoadReadonly LookUpLabels |