diff options
Diffstat (limited to 'oox/source/export/shapes.cxx')
-rw-r--r-- | oox/source/export/shapes.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 1dce98ced58c..fb311b2fb54e 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1032,6 +1032,9 @@ void ShapeExport::WriteTable( Reference< XShape > rXShape ) UNO_QUERY_THROW ); sal_Int32 transposedIndexofCell = (nRow * nColumnCount) + nColumn; + //assume we will open a cell, set to false below if we won't + bool bCellOpened = true; + if(xCell->getColumnSpan() > 1 && xCell->getRowSpan() > 1) { // having both : horizontal and vertical merge @@ -1144,14 +1147,20 @@ void ShapeExport::WriteTable( Reference< XShape > rXShape ) FSEND ); } } + else + bCellOpened = false; } } - WriteTextBox( xCell, XML_a ); - Reference< XPropertySet > xCellPropSet(xCell, UNO_QUERY_THROW); - WriteTableCellProperties(xCellPropSet); + if (bCellOpened) + { + WriteTextBox( xCell, XML_a ); - mpFS->endElementNS( XML_a, XML_tc ); + Reference< XPropertySet > xCellPropSet(xCell, UNO_QUERY_THROW); + WriteTableCellProperties(xCellPropSet); + + mpFS->endElementNS( XML_a, XML_tc ); + } } mpFS->endElementNS( XML_a, XML_tr ); |