include/oox/export/shapes.hxx | 1 + oox/source/export/shapes.cxx | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit 21750ee2e7c8d29e48abe33eaa2f11ffb2f5976e Author: Sushil Shinde <[email protected]> Date: Tue Mar 3 19:14:25 2015 +0530 tdf#89806 : Fixed background fill export for table cell. 1. Table cell properties were exproted empty if file saved as .pptx file. 2. Now added code to export table cell fill properties in 'tcPr'(Table cell properties xml tag) Reviewed-on: https://gerrit.libreoffice.org/14734 Tested-by: Jenkins <[email protected]> Reviewed-by: David Tardon <[email protected]> Tested-by: David Tardon <[email protected]> (cherry picked from commit 63442ec636d637e05d7d585817df531dbbeb96d9) Conflicts: sd/qa/unit/export-tests.cxx Change-Id: Ica6005a65c7eefb8629c808f2a54764f98badb11 diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx index 6403aec..dd70c38 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -160,6 +160,7 @@ public: void WriteTable( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > rXShape ); + void WriteTableCellProperties(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet); sal_Int32 GetNewShapeID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > rShape ); sal_Int32 GetNewShapeID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > rShape, ::oox::core::XmlFilterBase* pFB ); diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 3526636..9a170f1 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -890,7 +890,9 @@ void ShapeExport::WriteTable( Reference< XShape > rXShape ) WriteTextBox( xCell, XML_a ); - mpFS->singleElementNS( XML_a, XML_tcPr, FSEND ); + Reference< XPropertySet > xCellPropSet(xCell, UNO_QUERY_THROW); + WriteTableCellProperties(xCellPropSet); + mpFS->endElementNS( XML_a, XML_tc ); } } @@ -905,6 +907,17 @@ void ShapeExport::WriteTable( Reference< XShape > rXShape ) mpFS->endElementNS( XML_a, XML_graphic ); } +void ShapeExport::WriteTableCellProperties(Reference< XPropertySet> xCellPropSet) +{ + mpFS->startElementNS( XML_a, XML_tcPr, FSEND ); + // Write background fill for table cell. + DrawingML::WriteFill(xCellPropSet); + // TODO + // tcW : Table cell width + // tcBorders : Table cell border values. + mpFS->endElementNS( XML_a, XML_tcPr ); +} + ShapeExport& ShapeExport::WriteTableShape( Reference< XShape > xShape ) { FSHelperPtr pFS = GetFS(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
