|
|
f085be |
From 74a22d42753350039ee8fcdb5e6df1e0807c0cca Mon Sep 17 00:00:00 2001
|
|
|
f085be |
From: Kohei Yoshida <kohei.yoshida@collabora.com>
|
|
|
f085be |
Date: Mon, 7 Jul 2014 13:26:23 -0400
|
|
|
f085be |
Subject: [PATCH 004/137] Adjust for the splitting of number format properties
|
|
|
f085be |
in chart.
|
|
|
f085be |
|
|
|
f085be |
Since 1d38cb365543924f9c50014e6b2227e77de1d0c9, "number format" and
|
|
|
f085be |
"link number format to source" properties are 2 separate properties. Adjust
|
|
|
f085be |
OOXML import code for that split.
|
|
|
f085be |
|
|
|
f085be |
Also, always set axis' number format via NumberFormat property even when it's
|
|
|
f085be |
a percent format. The axis object doesn't keep a non-percent and percent
|
|
|
f085be |
number formats separately.
|
|
|
f085be |
|
|
|
f085be |
Change-Id: I8667b6f1a78d88cc37d059518919ad1b37f154e1
|
|
|
f085be |
(cherry picked from commit af5a6615dfdbe5c2cacdcacb00fc6f418b925c06)
|
|
|
f085be |
(cherry picked from commit 29d5f3db525e275c62cd2eafb18899fe68198ea3)
|
|
|
f085be |
Signed-off-by: Andras Timar <andras.timar@collabora.com>
|
|
|
f085be |
---
|
|
|
f085be |
oox/source/drawingml/chart/axisconverter.cxx | 8 +-------
|
|
|
f085be |
oox/source/drawingml/chart/objectformatter.cxx | 8 +++-----
|
|
|
f085be |
oox/source/token/properties.txt | 1 +
|
|
|
f085be |
3 files changed, 5 insertions(+), 12 deletions(-)
|
|
|
f085be |
|
|
|
f085be |
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
|
|
|
f085be |
index da1a732..f290992 100644
|
|
|
f085be |
--- a/oox/source/drawingml/chart/axisconverter.cxx
|
|
|
f085be |
+++ b/oox/source/drawingml/chart/axisconverter.cxx
|
|
|
f085be |
@@ -307,13 +307,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
|
|
|
f085be |
// number format ------------------------------------------------------
|
|
|
f085be |
|
|
|
f085be |
if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == cssc2::AxisType::PERCENT) )
|
|
|
f085be |
- {
|
|
|
f085be |
- bool bPercent = false;
|
|
|
f085be |
- if( mrModel.maNumberFormat.maFormatCode.indexOf('%') >= 0)
|
|
|
f085be |
- bPercent = true;
|
|
|
f085be |
- mrModel.maNumberFormat.mbSourceLinked = false;
|
|
|
f085be |
- getFormatter().convertNumberFormat( aAxisProp, mrModel.maNumberFormat, bPercent );
|
|
|
f085be |
- }
|
|
|
f085be |
+ getFormatter().convertNumberFormat(aAxisProp, mrModel.maNumberFormat, false);
|
|
|
f085be |
|
|
|
f085be |
// position of crossing axis ------------------------------------------
|
|
|
f085be |
|
|
|
f085be |
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
index a69dae0..b5b0a5b 100644
|
|
|
f085be |
--- a/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
+++ b/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
@@ -1111,11 +1111,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
|
|
|
f085be |
if( mxData->mxNumFmts.is() )
|
|
|
f085be |
{
|
|
|
f085be |
sal_Int32 nPropId = bPercentFormat ? PROP_PercentageNumberFormat : PROP_NumberFormat;
|
|
|
f085be |
- if( rNumberFormat.mbSourceLinked || rNumberFormat.maFormatCode.isEmpty() )
|
|
|
f085be |
- {
|
|
|
f085be |
- rPropSet.setAnyProperty( nPropId, Any() );
|
|
|
f085be |
- }
|
|
|
f085be |
- else try
|
|
|
f085be |
+ try
|
|
|
f085be |
{
|
|
|
f085be |
sal_Int32 nIndex = rNumberFormat.maFormatCode.equalsIgnoreAsciiCase("general") ?
|
|
|
f085be |
mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) :
|
|
|
f085be |
@@ -1128,6 +1124,8 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
|
|
|
f085be |
OSL_FAIL( OStringBuffer( "ObjectFormatter::convertNumberFormat - cannot create number format '" ).
|
|
|
f085be |
append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() );
|
|
|
f085be |
}
|
|
|
f085be |
+
|
|
|
f085be |
+ rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked));
|
|
|
f085be |
}
|
|
|
f085be |
}
|
|
|
f085be |
|
|
|
f085be |
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
|
|
|
f085be |
index b0001e3..6d384b8 100644
|
|
|
f085be |
--- a/oox/source/token/properties.txt
|
|
|
f085be |
+++ b/oox/source/token/properties.txt
|
|
|
f085be |
@@ -291,6 +291,7 @@ LineStartWidth
|
|
|
f085be |
LineStyle
|
|
|
f085be |
LineTransparence
|
|
|
f085be |
LineWidth
|
|
|
f085be |
+LinkNumberFormatToSource
|
|
|
f085be |
LinkURL
|
|
|
f085be |
LoadReadonly
|
|
|
f085be |
LookUpLabels
|
|
|
f085be |
--
|
|
|
f085be |
1.9.3
|
|
|
f085be |
|