summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 69d4759e8230..a0883679693b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2490,6 +2490,9 @@ void DocxAttributeOutput::switchHeaderFooter(bool isHeaderFooter, sal_Int32 inde
else if( index == -1)
{
*m_tableReference = *m_oldTableReference;
+ //Reset the oldReference, after copying it back to the original.
+ m_oldTableReference->m_bTableCellOpen = false ;
+ m_oldTableReference->m_nTableDepth = 0;
}
else
{
@@ -2519,7 +2522,9 @@ void DocxAttributeOutput::EndTable()
// We closed the table; if it is a nested table, the cell that contains it
// still continues
- m_tableReference->m_bTableCellOpen = true;
+ // set to true only if we were in a nested table, not otherwise.
+ if( 0 != tableFirstCells.size() )
+ m_tableReference->m_bTableCellOpen = true;
// Cleans the table helper
delete m_pTableWrt, m_pTableWrt = NULL;