From 4a38ca4035ac03571925e72cb47e0beb8da2003a Mon Sep 17 00:00:00 2001 From: "Attila Bakos (NISZ)" Date: Wed, 19 Jan 2022 17:43:54 +0100 Subject: tdf#146802 OOXML import: fix embedded VML in grouped textbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: László Németh --- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'writerfilter') 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 -- cgit