diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-13 17:41:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-13 18:43:57 +0100 |
commit | 4038d6c393c3cf6330671124ba69cdba98b24960 (patch) | |
tree | 79dbbc062df6fb3acd544e223b6b7cd036f1da54 /oox/source/shape/WpgContext.hxx | |
parent | ae499df25c01a149dfbb387da17a7f8a232a6a4e (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
Diffstat (limited to 'oox/source/shape/WpgContext.hxx')
-rw-r--r-- | oox/source/shape/WpgContext.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/shape/WpgContext.hxx b/oox/source/shape/WpgContext.hxx index 1bdc53ecf09c..363750169040 100644 --- a/oox/source/shape/WpgContext.hxx +++ b/oox/source/shape/WpgContext.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_OOX_SOURCE_SHAPE_WPGCONTEXT_HXX #define INCLUDED_OOX_SOURCE_SHAPE_WPGCONTEXT_HXX -#include <oox/core/contexthandler2.hxx> +#include <oox/core/fragmenthandler2.hxx> #include <oox/drawingml/drawingmltypes.hxx> namespace oox @@ -19,10 +19,10 @@ namespace shape { /// Wpg is the drawingML equivalent of v:group. -class WpgContext final : public oox::core::ContextHandler2 +class WpgContext final : public oox::core::FragmentHandler2 { public: - explicit WpgContext(oox::core::ContextHandler2Helper const& rParent); + explicit WpgContext(oox::core::FragmentHandler2 const& rParent); ~WpgContext() override; oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override; |