|
|
f085be |
From 2772bb0a1997c76be47d81d67678c907b28df650 Mon Sep 17 00:00:00 2001
|
|
|
f085be |
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@collabora.com>
|
|
|
f085be |
Date: Tue, 29 Jul 2014 21:10:22 +0200
|
|
|
f085be |
Subject: [PATCH 092/137] Fix some number format issues, bnc#862510
|
|
|
f085be |
|
|
|
f085be |
Set "LinkNumberFormatToSource" to false, so that format code is not
|
|
|
f085be |
ignored.
|
|
|
f085be |
Also, do not inherit format code common for all labels, if there is
|
|
|
f085be |
specific format code for a data label.
|
|
|
f085be |
|
|
|
f085be |
Change-Id: I505311d5df641d61e616e354734bd332609fa122
|
|
|
f085be |
(cherry picked from commit c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7)
|
|
|
f085be |
Reviewed-on: https://gerrit.libreoffice.org/10782
|
|
|
f085be |
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
|
f085be |
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
|
f085be |
---
|
|
|
f085be |
oox/source/drawingml/chart/modelbase.cxx | 3 +--
|
|
|
f085be |
oox/source/drawingml/chart/objectformatter.cxx | 4 +++-
|
|
|
f085be |
oox/source/drawingml/chart/seriesconverter.cxx | 5 ++---
|
|
|
f085be |
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
f085be |
|
|
|
f085be |
diff --git a/oox/source/drawingml/chart/modelbase.cxx b/oox/source/drawingml/chart/modelbase.cxx
|
|
|
f085be |
index b349945..eadde2b 100644
|
|
|
f085be |
--- a/oox/source/drawingml/chart/modelbase.cxx
|
|
|
f085be |
+++ b/oox/source/drawingml/chart/modelbase.cxx
|
|
|
f085be |
@@ -34,8 +34,7 @@ NumberFormat::NumberFormat() :
|
|
|
f085be |
void NumberFormat::setAttributes( const AttributeList& rAttribs )
|
|
|
f085be |
{
|
|
|
f085be |
maFormatCode = rAttribs.getString( XML_formatCode, OUString() );
|
|
|
f085be |
- // default is 'false', not 'true' as specified
|
|
|
f085be |
- mbSourceLinked = rAttribs.getBool( XML_sourceLinked, false );
|
|
|
f085be |
+ // TODO: if XML_sourceLinked is true, <c:formatCode> should be used instead.
|
|
|
f085be |
}
|
|
|
f085be |
|
|
|
f085be |
// ============================================================================
|
|
|
f085be |
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
index 8e91941..a9911e7 100644
|
|
|
f085be |
--- a/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
+++ b/oox/source/drawingml/chart/objectformatter.cxx
|
|
|
f085be |
@@ -1128,7 +1128,9 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
|
|
|
f085be |
append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() );
|
|
|
f085be |
}
|
|
|
f085be |
|
|
|
f085be |
- rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked));
|
|
|
f085be |
+ // Format code is ignored if "LinkNumberFormatToSource" is set to "true" :-/
|
|
|
f085be |
+ // See AxisHelper::getExplicitNumberFormatKeyForAxis()
|
|
|
f085be |
+ rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.maFormatCode.isEmpty()));
|
|
|
f085be |
}
|
|
|
f085be |
}
|
|
|
f085be |
|
|
|
f085be |
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
|
|
|
f085be |
index dbd3201..2cccd3a 100644
|
|
|
f085be |
--- a/oox/source/drawingml/chart/seriesconverter.cxx
|
|
|
f085be |
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
|
|
|
f085be |
@@ -234,9 +234,8 @@ void DataLabelsConverter::convertFromModel( const Reference< XDataSeries >& rxDa
|
|
|
f085be |
// data point label settings
|
|
|
f085be |
for( DataLabelsModel::DataLabelVector::iterator aIt = mrModel.maPointLabels.begin(), aEnd = mrModel.maPointLabels.end(); aIt != aEnd; ++aIt )
|
|
|
f085be |
{
|
|
|
f085be |
- (*aIt)->maNumberFormat.maFormatCode = mrModel.maNumberFormat.maFormatCode;
|
|
|
f085be |
- if( !mrModel.maNumberFormat.maFormatCode.isEmpty() )
|
|
|
f085be |
- (*aIt)->maNumberFormat.mbSourceLinked = false;
|
|
|
f085be |
+ if ((*aIt)->maNumberFormat.maFormatCode.isEmpty())
|
|
|
f085be |
+ (*aIt)->maNumberFormat = mrModel.maNumberFormat;
|
|
|
f085be |
|
|
|
f085be |
DataLabelConverter aLabelConv( *this, **aIt );
|
|
|
f085be |
aLabelConv.convertFromModel( rxDataSeries, rTypeGroup );
|
|
|
f085be |
--
|
|
|
f085be |
1.9.3
|
|
|
f085be |
|