diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-05-22 08:14:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-22 09:24:24 +0100 |
commit | fc36c689cad5b76a3b256f19cf7caeaa9359560c (patch) | |
tree | 394f4f031a3e646e13afaf330f2efcfebbf2121f /oox/source | |
parent | 24600dcf3118cb01d57c31518d36be870f73e79c (diff) |
fix asserts on export to pptx
regression from
commit e4fab06d82299054ddd46c7d925d300cd3d0a17d
Author: Sujith Sudhakaran <sudhakaran.sujith@yahoo.com>
Date: Tue Apr 7 08:56:04 2015 +0530
tdf#90245: Support for table merge cell export.
where we can now ened up with unbalanced start/end cell tags
Change-Id: I03a8fd5f9f3d77a984d68423bae946fca85135ec
Diffstat (limited to 'oox/source')
-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 ); |