summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xechart.cxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.co.uk>2017-07-31 10:52:55 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-02 07:44:58 +0200
commitd8e731adb8608aab17385e02f4441ed3122efa40 (patch)
tree52c3a694d6d4e768ace0fdfe6cd87285665218ab /sc/source/filter/excel/xechart.cxx
parent95c2f226b122c7fdb77c6e9085b1fbd02189db03 (diff)
tdf#90352: set/handle LinkNumberFormatToSource property in xls...
Import/Export filter respectively for axis numbers. For ods and xlsx this was already getting set/handled correctly. Also add unit test to assert LinkNumberFormatToSource property and number format for import and export-import roundtrip. Change-Id: Id029ac7d0233ca490a6a00609e9cea8fdafee70f Reviewed-on: https://gerrit.libreoffice.org/40577 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/filter/excel/xechart.cxx')
-rw-r--r--sc/source/filter/excel/xechart.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 3cdbd6e5006c..4d250593c33f 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -3002,7 +3002,11 @@ void XclExpChAxis::Convert( Reference< XAxis > const & xAxis, Reference< XAxis >
// axis number format
sal_Int32 nApiNumFmt = 0;
if( !bCategoryAxis && aAxisProp.GetProperty( nApiNumFmt, EXC_CHPROP_NUMBERFORMAT ) )
- mnNumFmtIdx = GetNumFmtBuffer().Insert( static_cast< sal_uInt32 >( nApiNumFmt ) );
+ {
+ bool bLinkNumberFmtToSource = false;
+ if ( !aAxisProp.GetProperty( bLinkNumberFmtToSource, EXC_CHPROP_NUMBERFORMAT_LINKSRC ) || !bLinkNumberFmtToSource )
+ mnNumFmtIdx = GetNumFmtBuffer().Insert( static_cast< sal_uInt32 >( nApiNumFmt ) );
+ }
// grid -------------------------------------------------------------------