diff options
author | Sushil Shinde <sushil.shinde@synerzip.com> | 2015-03-03 19:14:25 +0530 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-03-20 08:13:00 +0000 |
commit | 63442ec636d637e05d7d585817df531dbbeb96d9 (patch) | |
tree | 7194425a0741d5be07c1c36533f1a9dc37ca47b0 /oox | |
parent | 5f904b2646771b5270efc59dd38bcf4122741c12 (diff) |
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)
3. Added unit test to check exported table cell fill
properties.
Change-Id: Ica6005a65c7eefb8629c808f2a54764f98badb11
Reviewed-on: https://gerrit.libreoffice.org/14734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 4ef0838f233f..95b0b37383ad 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1004,7 +1004,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 ); } } @@ -1019,6 +1021,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(); |