oox/source/export/chartexport.cxx | 101 +++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 48 deletions(-)
New commits: commit a4b6f261489817737fd974dee123ab6b76a66c49 Author: Markus Mohrhard <[email protected]> Date: Sun May 5 19:31:03 2013 +0200 another validation error in chart OOXML export Change-Id: I2edd5cb877fdf66926483c866382480f7ae3d36f diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 3f65ef2..2d1b930 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2200,14 +2200,6 @@ void ChartExport::_exportAxis( FSEND ); } - if( nAxisType == XML_catAx ) - { - // FIXME: seems not support? lblAlgn - const char* sLblAlgn = "ctr"; - pFS->singleElement( FSNS( XML_c, XML_lblAlgn ), - XML_val, sLblAlgn, - FSEND ); - } if( ( nAxisType == XML_catAx ) || ( nAxisType == XML_dateAx ) ) { @@ -2217,6 +2209,15 @@ void ChartExport::_exportAxis( XML_val, isAuto, FSEND ); + if( nAxisType == XML_catAx ) + { + // FIXME: seems not support? lblAlgn + const char* sLblAlgn = "ctr"; + pFS->singleElement( FSNS( XML_c, XML_lblAlgn ), + XML_val, sLblAlgn, + FSEND ); + } + // FIXME: seems not support? lblOffset sal_Int32 nLblOffset = 100; pFS->singleElement( FSNS( XML_c, XML_lblOffset ), commit d28d25d0903f94ce9485c04e72400e493db44618 Author: Markus Mohrhard <[email protected]> Date: Sun May 5 19:10:31 2013 +0200 respect element order in OOXML chart export, fdo#59857 The chart part of the document passes validation now. Change-Id: I52c946c0ad399038e5f9ffff08a117f2693c55b5 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index cae4dd2..3f65ef2 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -918,9 +918,6 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) FSHelperPtr pFS = GetFS(); pFS->startElement( FSNS( XML_c, XML_title ), FSEND ); - // TODO:customize layout - pFS->singleElement( FSNS( XML_c, XML_layout ), - FSEND ); pFS->startElement( FSNS( XML_c, XML_tx ), FSEND ); @@ -963,6 +960,11 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) pFS->endElement( FSNS( XML_c, XML_rich ) ); pFS->endElement( FSNS( XML_c, XML_tx ) ); + + // TODO:customize layout + pFS->singleElement( FSNS( XML_c, XML_layout ), + FSEND ); + pFS->endElement( FSNS( XML_c, XML_title ) ); } commit 3ed3d39230f5664ae38ecf683da133034901cbbf Author: Markus Mohrhard <[email protected]> Date: Sun May 5 19:08:01 2013 +0200 respect element order in OOXML chart export, related fdo#59857 Change-Id: Iecb47635cb8c854ec6c12a12f895972fcf099009 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index ba17b04..cae4dd2 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2042,10 +2042,6 @@ void ChartExport::_exportAxis( pFS->endElement( FSNS( XML_c, XML_scaling ) ); - // title - if( xAxisTitle.is() ) - exportTitle( xAxisTitle ); - sal_Bool bVisible = sal_True; if( xAxisProp.is() ) { @@ -2079,6 +2075,10 @@ void ChartExport::_exportAxis( pFS->endElement( FSNS( XML_c, XML_minorGridlines ) ); } + // title + if( xAxisTitle.is() ) + exportTitle( xAxisTitle ); + // majorTickMark sal_Int32 nValue = 0; if(GetProperty( xAxisProp, "Marks" ) ) commit a927086f9a3c94bb7b6b8edec37ae723a6b243aa Author: Markus Mohrhard <[email protected]> Date: Sun May 5 19:03:48 2013 +0200 respect element order in OOXML export, related fdo#59857 Change-Id: I00bb173010419a47ee30c9d6ae1173bb1ea0e370 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 1a7a3ca..ba17b04 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1127,6 +1127,20 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType ) exportSeries( xChartType, nAttachedAxis ); Reference< XPropertySet > xTypeProp( xChartType, uno::UNO_QUERY ); + + if( xTypeProp.is() && GetProperty( xTypeProp, "GapwidthSequence") ) + { + uno::Sequence< sal_Int32 > aBarPositionSequence; + mAny >>= aBarPositionSequence; + if( aBarPositionSequence.getLength() ) + { + sal_Int32 nGapWidth = aBarPositionSequence[0]; + pFS->singleElement( FSNS( XML_c, XML_gapWidth ), + XML_val, I32S( nGapWidth ), + FSEND ); + } + } + if( mbIs3DChart ) { // Shape commit 010f58c4ef9a5e36d1c703ff20f8293bed90100a Author: Markus Mohrhard <[email protected]> Date: Sun May 5 18:59:34 2013 +0200 overlap is only valid for the 2D bar chart, related fdo#59857 Change-Id: Ie17ef54a2b2f2058cef97dacd9110a3065f76f68 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index ab97e50..1a7a3ca 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1156,7 +1156,7 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType ) } //overlap - if( xTypeProp.is() && GetProperty( xTypeProp, "OverlapSequence") ) + if( !mbIs3DChart && xTypeProp.is() && GetProperty( xTypeProp, "OverlapSequence") ) { uno::Sequence< sal_Int32 > aBarPositionSequence; mAny >>= aBarPositionSequence; @@ -1169,18 +1169,6 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType ) FSEND ); } } - if( xTypeProp.is() && GetProperty( xTypeProp, "GapwidthSequence") ) - { - uno::Sequence< sal_Int32 > aBarPositionSequence; - mAny >>= aBarPositionSequence; - if( aBarPositionSequence.getLength() ) - { - sal_Int32 nGapWidth = aBarPositionSequence[0]; - pFS->singleElement( FSNS( XML_c, XML_gapWidth ), - XML_val, I32S( nGapWidth ), - FSEND ); - } - } exportAxesId( nAttachedAxis ); commit 16010abe0102a53e478de0e28453c7b14d48772b Author: Markus Mohrhard <[email protected]> Date: Sun May 5 18:53:53 2013 +0200 respect element order in OOXML chart export, related fdo#59857 Change-Id: Icd40ad5a1a428d6ae0d012b1896a9dd713a4e79b diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 75fb6a8..ab97e50 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2734,6 +2734,16 @@ void ChartExport::exportView3D() XML_val, I32S( nRotationY ), FSEND ); } + // rAngAx + if( GetProperty( xPropSet, "RightAngledAxes" ) ) + { + sal_Bool bRightAngled = sal_False; + mAny >>= bRightAngled; + const char* sRightAngled = bRightAngled ? "1":"0"; + pFS->singleElement( FSNS( XML_c, XML_rAngAx ), + XML_val, sRightAngled, + FSEND ); + } // perspective if( GetProperty( xPropSet, "Perspective" ) ) { @@ -2745,16 +2755,6 @@ void ChartExport::exportView3D() XML_val, I32S( nPerspective ), FSEND ); } - // rAngAx - if( GetProperty( xPropSet, "RightAngledAxes" ) ) - { - sal_Bool bRightAngled = sal_False; - mAny >>= bRightAngled; - const char* sRightAngled = bRightAngled ? "1":"0"; - pFS->singleElement( FSNS( XML_c, XML_rAngAx ), - XML_val, sRightAngled, - FSEND ); - } pFS->endElement( FSNS( XML_c, XML_view3D ) ); } commit e415e070d6aaba48f457acb4c295381c69d67c99 Author: Markus Mohrhard <[email protected]> Date: Sun May 5 18:50:51 2013 +0200 respect order of elements in OOXML chart export, related fdo#59857 Change-Id: I541e04d2f4a3b272894ceb67b4bd970e235b96a2 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 11a79fc..75fb6a8 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -806,6 +806,16 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen { exportView3D(); + // floor + Reference< beans::XPropertySet > xFloor( mxNewDiagram->getFloor(), uno::UNO_QUERY ); + if( xFloor.is() ) + { + pFS->startElement( FSNS( XML_c, XML_floor ), + FSEND ); + exportShapeProps( xFloor ); + pFS->endElement( FSNS( XML_c, XML_floor ) ); + } + // sideWall // backWall @@ -818,16 +828,6 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen pFS->endElement( FSNS( XML_c, XML_backWall ) ); } - // floor - Reference< beans::XPropertySet > xFloor( mxNewDiagram->getFloor(), uno::UNO_QUERY ); - if( xFloor.is() ) - { - pFS->startElement( FSNS( XML_c, XML_floor ), - FSEND ); - exportShapeProps( xFloor ); - pFS->endElement( FSNS( XML_c, XML_floor ) ); - } - } // plot area exportPlotArea( ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
