diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-02-03 13:35:43 +0100 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-02-03 13:35:43 +0100 |
commit | cd2e366f58ba5980150a82977d4ee678656f66dd (patch) | |
tree | 7affa0f84188ecf9ec6ef0a7a6d73254a45c5e68 /writerfilter/inc/resourcemodel/TableManager.hxx | |
parent | 4857b606698f0b33092e4871afef185518bdc9f9 (diff) |
writerfilter07: handle cell properties with nested cell at the beginning correctly
Diffstat (limited to 'writerfilter/inc/resourcemodel/TableManager.hxx')
-rw-r--r-- | writerfilter/inc/resourcemodel/TableManager.hxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index e0f7c325e4d4..21ebad025f44 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -354,7 +354,7 @@ private: /** Ensure a cell is open at the current level. */ - void ensureOpenCell(); + void ensureOpenCell(PropertiesPointer pProps); protected: @@ -631,9 +631,12 @@ template <typename T, typename PropertiesPointer> void TableManager<T, PropertiesPointer>::endParagraphGroup() { sal_Int32 nTableDepthDifference = mnTableDepthNew - mnTableDepth; + + PropertiesPointer pEmptyProps; + while (nTableDepthDifference > 0) { - ensureOpenCell(); + ensureOpenCell(pEmptyProps); startLevel(); --nTableDepthDifference; @@ -661,7 +664,7 @@ void TableManager<T, PropertiesPointer>::endParagraphGroup() else if (isInCell()) { - ensureOpenCell(); + ensureOpenCell(getCellProps()); if (isCellEnd()) { @@ -935,7 +938,7 @@ void TableManager<T, PropertiesPointer>::closeCell } template <typename T, typename PropertiesPointer> -void TableManager<T, PropertiesPointer>::ensureOpenCell() +void TableManager<T, PropertiesPointer>::ensureOpenCell(PropertiesPointer pProps) { #ifdef DEBUG_TABLE mpTableLogger->startElement("tablemanager.ensureOpenCell"); @@ -947,7 +950,9 @@ void TableManager<T, PropertiesPointer>::ensureOpenCell() pTableData = mTableDataStack.top(); if (!pTableData->isCellOpen()) - openCell(getHandle(), getCellProps()); + openCell(getHandle(), pProps); + else + pTableData->insertCellProperties(pProps); } #ifdef DEBUG_TABLE |