diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2022-01-19 17:43:54 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-02-03 09:12:20 +0100 |
commit | 4a38ca4035ac03571925e72cb47e0beb8da2003a (patch) | |
tree | 6c472f1efe01827320bfd3ae35404f38ee18ba9a /writerfilter | |
parent | b8925251e48534706c6960a54c320d3879317321 (diff) |
tdf#146802 OOXML import: fix embedded VML in grouped textbox
E.g. OLE formulas inside them broke document load.
Regression from 121cbc250b36290f0f8c7265fea57256dad69553
"tdf#66039 DOCX: import textboxes (with tables, images etc.)
in group shapes".
Note: now embedded VML OLE is loaded in WPG shapes, thanks to
that the ShapeHandler in oox/ has a stack having the start
token inside for each shape.
Change-Id: I973d78ed88c5c83efffd9629061e2a2c6fdd25e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128627
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index e245e37b4772..aa9de6408202 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1721,7 +1721,7 @@ void OOXMLFastContextHandlerShape::setToken(Token_t nToken) OOXMLFastContextHandler::setToken(nToken); if (mrShapeContext.is()) - mrShapeContext->setStartToken(nToken); + mrShapeContext->pushStartToken(nToken); } void OOXMLFastContextHandlerShape::sendShape( Token_t Element ) @@ -1761,8 +1761,7 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element ) bool OOXMLFastContextHandlerShape::isDMLGroupShape() const { - return (mrShapeContext->getFullWPGSupport() && - (mrShapeContext->getStartToken() == Token_t(oox::NMSP_wpg | oox::XML_wgp))); + return (mrShapeContext->getFullWPGSupport() && mrShapeContext->isWordProcessingGroupShape()); }; void OOXMLFastContextHandlerShape::lcl_endFastElement |