diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index 2a3ff80b313e..31c52346c4e0 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -154,6 +154,7 @@ private: void exportSeriesValues( const css::uno::Reference< css::chart2::data::XDataSequence >& xValueSeq, sal_Int32 nValueType = XML_val ); void exportShapeProps( css::uno::Reference< css::beans::XPropertySet > xPropSet ); + void exportTextProps(css::uno::Reference< css::beans::XPropertySet > xPropSet); void exportDataPoints( const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties, sal_Int32 nSeriesLength ); diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 4bfaf3a6e572..77cfd3ccef56 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -29,6 +29,7 @@ #include #include #include "oox/drawingml/drawingmltypes.hxx" +#include #ifndef OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY // Our rotation is counter-clockwise and is in 100ths of a degree. // drawingML rotation is clockwise and is in 60000ths of a degree. @@ -172,7 +173,7 @@ public: void WriteParagraphNumbering( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, sal_Int16 nLevel ); void WriteRun( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun ); - void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rRun, bool bIsField ); + void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement = XML_rPr ); void WritePresetShape( const char* pShape ); void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const ::com::sun::star::beans::PropertyValue& rProp ); diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 263db8d7e122..c8fb4c9e2693 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2306,6 +2306,25 @@ void ChartExport::exportShapeProps( Reference< XPropertySet > xPropSet ) pFS->endElement( FSNS( XML_c, XML_spPr ) ); } +void ChartExport::exportTextProps(Reference xPropSet) +{ + FSHelperPtr pFS = GetFS(); + pFS->startElement(FSNS(XML_c, XML_txPr), FSEND); + + pFS->startElement(FSNS(XML_c, XML_bodyPr), FSEND); + pFS->endElement(FSNS(XML_c, XML_bodyPr)); + + pFS->startElement(FSNS(XML_a, XML_p), FSEND); + pFS->startElement(FSNS(XML_a, XML_pPr), FSEND); + + WriteRunProperties(xPropSet, false, XML_defRPr); + + pFS->endElement(FSNS(XML_a, XML_pPr)); + pFS->endElement(FSNS(XML_a, XML_p)); + + pFS->endElement(FSNS(XML_c, XML_txPr)); +} + void ChartExport::InitPlotArea( ) { Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY); @@ -2680,6 +2699,8 @@ void ChartExport::_exportAxis( // shape properties exportShapeProps( xAxisProp ); + exportTextProps(xAxisProp); + pFS->singleElement( FSNS( XML_c, XML_crossAx ), XML_val, I32S( rAxisIdPair.nCrossAx ), FSEND ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7ba4f1fa8119..4f0621dd79d0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1167,7 +1167,7 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32 WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) ); } -void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsField ) +void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsField, sal_Int32 nElement /*= XML_rPr*/ ) { Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY ); Reference< XPropertyState > rXPropState( rRun, UNO_QUERY ); @@ -1318,7 +1318,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel } } - mpFS->startElementNS( XML_a, XML_rPr, + mpFS->startElementNS( XML_a, nElement, XML_b, bold, XML_i, italic, XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), @@ -1405,7 +1405,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel } } - mpFS->endElementNS( XML_a, XML_rPr ); + mpFS->endElementNS( XML_a, nElement ); } const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun, bool& bIsField )