diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-17 09:37:51 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-17 09:56:36 +0100 |
commit | e5fd7c2dacf3c128cdc62622e736ce8abbc578a5 (patch) | |
tree | 6726520cc6171a683194b0b0b5ff0898e1aeec91 /writerfilter | |
parent | 4a153b4d4429480d04d3b347669723753c05e267 (diff) |
fdo#74357 DOCX import: fix nested tables anchored inside tables
Regression from bbef85c157169efa958ea1014d91d467cb243e6f (bnc#779620
DOCX import: try harder to convert floating tables to text frames,
2013-10-01), the conversion of nested tables is delayed by default till
we know the page size. However, in case the anchor is in a table, we
should convert it right away, because the conversion of the parent table
would invalidate our XTextRange references.
Change-Id: Id41556e721c6e1c7239e4ea25abd57c999d2219b
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 3bc66fac72d7..ecacbcd8fb60 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -959,9 +959,12 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel) // SectionPropertyMap::CloseSectionGroup(), so we'll have no idea // about the text area width, nor can fix this by delaying the text // frame conversion: just do it here. + // Also, we the anchor is within a table, then do it here as well, + // as xStart/xEnd would not point to the start/end at conversion + // time anyway. sal_Int32 nTableWidth = 0; m_aTableProperties->getValue(TablePropertyMap::TABLE_WIDTH, nTableWidth); - if (m_rDMapper_Impl.GetSectionContext()) + if (m_rDMapper_Impl.GetSectionContext() && nestedTableLevel <= 1) m_rDMapper_Impl.m_aPendingFloatingTables.push_back(FloatingTableInfo(xStart, xEnd, aFrameProperties, nTableWidth)); else m_xText->convertToTextFrame(xStart, xEnd, aFrameProperties); |