diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-11-08 09:11:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-11-08 09:51:42 +0000 |
commit | c1eebcdac9f2b289fd363399130c485ca5ff444c (patch) | |
tree | a34d4cd3477e8699dd00df753fcab62152c2298e /writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | |
parent | bbf6c5171706e55edcf8e011a536264f4f2efd99 (diff) |
tdf#79329 DOCX import: fix missing outer table with floattable at cell start
The bug document has a normal table, then its C1 cell starts with a
nested table, which is floating. The problem is that converting the
nested table to a textframe invalidates the start text range of the C1
cell in the outer table we store, so the conversion of the outer table
from text to table fails.
This never worked, so to avoid the regression just don't convert inner
floating tables to textframes when they're anchored at the cell start.
A more general fix in the future can be addressing the actual
invalidation of the cell start/end text ranges, and then this specific
fix will not be necessary anymore.
Change-Id: I12cefa41977cf719b07b0fb3ef9ec423c17ef3b1
Reviewed-on: https://gerrit.libreoffice.org/30685
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFastContextHandler.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 50fcef361ac4..17ce14fbf9fe 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1306,6 +1306,17 @@ OOXMLFastContextHandlerTextTableCell::~OOXMLFastContextHandlerTextTableCell() void OOXMLFastContextHandlerTextTableCell::startCell() { + if (isForwardEvents()) + { + OOXMLPropertySet * pProps = new OOXMLPropertySet; + { + OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0); + OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tcStart, pVal, OOXMLProperty::SPRM)); + pProps->add(pProp); + } + + mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); + } } void OOXMLFastContextHandlerTextTableCell::endCell() @@ -1328,6 +1339,11 @@ void OOXMLFastContextHandlerTextTableCell::endCell() OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tblCell, pVal, OOXMLProperty::SPRM)); pProps->add(pProp); } + { + OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0); + OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tcEnd, pVal, OOXMLProperty::SPRM)); + pProps->add(pProp); + } mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); } |