include/oox/export/shapes.hxx | 1 + oox/source/export/shapes.cxx | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit c32709bac2b729572a96242cb8aa9026598dc269 Author: Sushil Shinde <sushil.shi...@synerzip.com> 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 <c...@libreoffice.org> Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> (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 bfc0cab..c94be84 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -158,6 +158,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 a324d27..9d54b44 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -985,7 +985,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 ); } } @@ -1000,6 +1002,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 libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits