Kaydet (Commit) befef6a7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

use correct axis type in secondary x axis export

Change-Id: Ic21d88b55b22c650de4fd69479b51d0f640fec6f
üst 7ce77fcf
...@@ -2455,6 +2455,21 @@ void ChartExport::exportAxes( ) ...@@ -2455,6 +2455,21 @@ void ChartExport::exportAxes( )
} }
} }
namespace {
sal_Int32 getXAxisType(sal_Int32 eChartType)
{
if( (eChartType == chart::TYPEID_SCATTER)
|| (eChartType == chart::TYPEID_BUBBLE) )
return XML_valAx;
else if( eChartType == chart::TYPEID_STOCK )
return XML_dateAx;
return XML_catAx;
}
}
void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
{ {
// get some properties from document first // get some properties from document first
...@@ -2518,12 +2533,8 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) ...@@ -2518,12 +2533,8 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
if( bHasXAxisMinorGrid ) if( bHasXAxisMinorGrid )
xMinorGrid.set( xAxisXSupp->getXHelpGrid(), uno::UNO_QUERY ); xMinorGrid.set( xAxisXSupp->getXHelpGrid(), uno::UNO_QUERY );
sal_Int32 eChartType = getChartType( ); sal_Int32 eChartType = getChartType();
if( (eChartType == chart::TYPEID_SCATTER) nAxisType = getXAxisType(eChartType);
|| (eChartType == chart::TYPEID_BUBBLE) )
nAxisType = XML_valAx;
else if( eChartType == chart::TYPEID_STOCK )
nAxisType = XML_dateAx;
// FIXME: axPos, need to check axis direction // FIXME: axPos, need to check axis direction
sAxPos = "b"; sAxPos = "b";
break; break;
...@@ -2578,7 +2589,8 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) ...@@ -2578,7 +2589,8 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair)
xAxisTitle.set( xAxisSupp->getSecondXAxisTitle(), uno::UNO_QUERY ); xAxisTitle.set( xAxisSupp->getSecondXAxisTitle(), uno::UNO_QUERY );
} }
nAxisType = XML_valAx; sal_Int32 eChartType = getChartType();
nAxisType = getXAxisType(eChartType);
// FIXME: axPos, need to check axis direction // FIXME: axPos, need to check axis direction
sAxPos = "t"; sAxPos = "t";
break; break;
......
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