Kaydet (Commit) af5a6615 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Adjust for the splitting of number format properties in chart.

Since 1d38cb36, "number format" and
"link number format to source" properties are 2 separate properties.  Adjust
OOXML import code for that split.

Also, always set axis' number format via NumberFormat property even when it's
a percent format.  The axis object doesn't keep a non-percent and percent
number formats separately.

Change-Id: I8667b6f1a78d88cc37d059518919ad1b37f154e1
üst ff269767
......@@ -301,13 +301,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 ------------------------------------------
......
......@@ -1088,11 +1088,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 ) :
......@@ -1105,6 +1101,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));
}
}
......
......@@ -298,6 +298,7 @@ LineStartWidth
LineStyle
LineTransparence
LineWidth
LinkNumberFormatToSource
LinkURL
LoadReadonly
LookUpLabels
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment