summaryrefslogtreecommitdiff
path: root/oox/source/export/chartexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/export/chartexport.cxx')
-rw-r--r--oox/source/export/chartexport.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 657ae8ea98e2..86e7c7c6afb1 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2802,9 +2802,20 @@ void ChartExport::_exportAxis(
{
double dMinorUnit = 0;
mAny >>= dMinorUnit;
- pFS->singleElement( FSNS( XML_c, XML_minorUnit ),
- XML_val, IS( dMinorUnit ),
- FSEND );
+ if( GetProperty( xAxisProp, "StepHelpCount" ) )
+ {
+ sal_Int32 dMinorUnitCount = 0;
+ mAny >>= dMinorUnitCount;
+ // tdf#114168 Don't save minor unit if number of step help count is 5 (which is default for MS Excel),
+ // to allow proper .xlsx import. If minorUnit is set and majorUnit not, then it is impossible
+ // to calculate StepHelpCount.
+ if( dMinorUnitCount != 5 )
+ {
+ pFS->singleElement( FSNS( XML_c, XML_minorUnit ),
+ XML_val, IS( dMinorUnit ),
+ FSEND );
+ }
+ }
}
if( nAxisType == XML_valAx && GetProperty( xAxisProp, "DisplayUnits" ) )