summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/TableData.hxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-07-17 14:39:45 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-20 09:36:26 +0200
commitabea0d6647c7f1f7e76c73c26cb80e6a67dc5111 (patch)
tree50930be56b6aa00f21bf9efddb341392ddf247da /writerfilter/source/dmapper/TableData.hxx
parent697e8b69263c8dd9c518fbbb093f9a3776608257 (diff)
tdf#134685 DOCX table import: fix gridBefore + cell width
Improve workaround to handle nested tables started at cell start in a row with gridBefore. Omitted gridBefore cells from commit 5483d4e10aad27889b961b9cb94d7ba6c86aed0b (tdf#134606 DOCX table import: fix gridBefore + nesting) resulted less cells in the row than defined by the grid, and the different code path could lead to narrow cell width with partially invisible nested table. Fix this by adding gridBefore cell count to the cell span in the first cell. Regression from commit 70274f86cdc1c023ffdd0130c262c1479262d76b (tdf#116194 DOCX import: fix missing tables with w:gridBefore) Change-Id: If332305d54ff2b34b258270a607fb31ff7380149 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98973 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/dmapper/TableData.hxx')
-rw-r--r--writerfilter/source/dmapper/TableData.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx
index 9da80a620481..a88c6a477430 100644
--- a/writerfilter/source/dmapper/TableData.hxx
+++ b/writerfilter/source/dmapper/TableData.hxx
@@ -248,10 +248,15 @@ public:
nRet.push_back(aCell->getGridSpan());
return nRet;
}
- void setCurrentGridSpan(sal_uInt32 nSpan)
+ void setCurrentGridSpan(sal_uInt32 nSpan, bool bFirstCell = false)
{
if ( mCells.size() )
- mCells.back()->setGridSpan(nSpan);
+ {
+ if ( bFirstCell )
+ mCells.front()->setGridSpan(nSpan);
+ else
+ mCells.back()->setGridSpan(nSpan);
+ }
}
};