diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-13 17:41:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-14 08:30:27 +0100 |
commit | 956153105bbf900f3b20aea98338148cf545fa0e (patch) | |
tree | 255422913af423cb98604bff11d9d46f9742b8fb /include | |
parent | 65767523ba5ad8e974a3144b33ad0e9d627a53f7 (diff) |
tdf#117658 PPTX import: fix duplicated math object handling
We used to recurse into both arms of <mc:AlternateContent>: while the
intention is that an importer either reads <mc:Choice> or <mc:Fallback>.
Fix this by converting PPTShapeGroupContext to be a FragmentHandler2,
this way FragmentHandler2::prepareMceContext() is invoked, which knows
how to do this correctly.
This requires declaring "a14" as a supported namespace, e.g.
SdOOXMLExportTest2::testMathObject() would fail without it. This also
requires keeping "a14" unsupported in the Calc case, e.g.
ScFiltersTest::testControlImport() would fail without it. Finally the
"Convert this to FragmentHandler2" TODO in
SlideFragmentHandler::onCreateContext() from 2011 can be removed with
this.
Change-Id: I883237902c71cb515e810a8e34443c9eeaca48b0
Reviewed-on: https://gerrit.libreoffice.org/82623
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 4038d6c393c3cf6330671124ba69cdba98b24960)
Reviewed-on: https://gerrit.libreoffice.org/82633
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/drawingml/shapegroupcontext.hxx | 6 | ||||
-rw-r--r-- | include/oox/ppt/pptshapegroupcontext.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/oox/drawingml/shapegroupcontext.hxx b/include/oox/drawingml/shapegroupcontext.hxx index 1f9c860dc940..4fa313493d3e 100644 --- a/include/oox/drawingml/shapegroupcontext.hxx +++ b/include/oox/drawingml/shapegroupcontext.hxx @@ -21,7 +21,7 @@ #define INCLUDED_OOX_DRAWINGML_SHAPEGROUPCONTEXT_HXX #include <oox/core/contexthandler.hxx> -#include <oox/core/contexthandler2.hxx> +#include <oox/core/fragmenthandler2.hxx> #include <oox/dllapi.h> #include <oox/drawingml/drawingmltypes.hxx> #include <sal/types.h> @@ -30,10 +30,10 @@ namespace oox { class AttributeList; } namespace oox { namespace drawingml { -class OOX_DLLPUBLIC ShapeGroupContext : public ::oox::core::ContextHandler2 +class OOX_DLLPUBLIC ShapeGroupContext : public ::oox::core::FragmentHandler2 { public: - ShapeGroupContext( ::oox::core::ContextHandler2Helper const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pGroupShapePtr ); + ShapeGroupContext( ::oox::core::FragmentHandler2 const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pGroupShapePtr ); virtual ~ShapeGroupContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index 76b743ee16af..15667109d409 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -44,7 +44,7 @@ class PPTShapeGroupContext final : public ::oox::drawingml::ShapeGroupContext public: PPTShapeGroupContext( - ::oox::core::ContextHandler2Helper const & rParent, + ::oox::core::FragmentHandler2 const & rParent, const oox::ppt::SlidePersistPtr& rSlidePersistPtr, const oox::ppt::ShapeLocation eShapeLocation, const oox::drawingml::ShapePtr& pMasterShapePtr, |