diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-13 17:41:45 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-16 10:35:24 +0100 |
commit | c9efa80d4d71aacb57a81c4fd1da163aee9f3966 (patch) | |
tree | 9cfaf0634e4e74b2736b3ccf4fbf587b16416417 /sc | |
parent | 27cfadd5e7a0897ee9fd046ab3e35edfd3aa2369 (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.
(cherry picked from commit 4038d6c393c3cf6330671124ba69cdba98b24960)
Change-Id: I883237902c71cb515e810a8e34443c9eeaca48b0
Reviewed-on: https://gerrit.libreoffice.org/82766
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/drawingfragment.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/drawingfragment.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx index 11d9b01a9f27..4fec8fe14367 100644 --- a/sc/source/filter/inc/drawingfragment.hxx +++ b/sc/source/filter/inc/drawingfragment.hxx @@ -75,14 +75,14 @@ class GroupShapeContext : public ::oox::drawingml::ShapeGroupContext, public Wor { public: explicit GroupShapeContext( - const ::oox::core::ContextHandler2Helper& rParent, + const ::oox::core::FragmentHandler2& rParent, const WorksheetHelper& rHelper, const ::oox::drawingml::ShapePtr& rxParentShape, const ::oox::drawingml::ShapePtr& rxShape ); static ::oox::core::ContextHandlerRef createShapeContext( - ::oox::core::ContextHandler2Helper& rParent, + ::oox::core::FragmentHandler2& rParent, const WorksheetHelper& rHelper, sal_Int32 nElement, const AttributeList& rAttribs, diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx index 70701e193c28..4686efc01701 100644 --- a/sc/source/filter/oox/drawingfragment.cxx +++ b/sc/source/filter/oox/drawingfragment.cxx @@ -121,14 +121,14 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& } } -GroupShapeContext::GroupShapeContext( const ContextHandler2Helper& rParent, +GroupShapeContext::GroupShapeContext( const FragmentHandler2& rParent, const WorksheetHelper& rHelper, const ShapePtr& rxParentShape, const ShapePtr& rxShape ) : ShapeGroupContext( rParent, rxParentShape, rxShape ), WorksheetHelper( rHelper ) { } -/*static*/ ContextHandlerRef GroupShapeContext::createShapeContext( ContextHandler2Helper& rParent, +/*static*/ ContextHandlerRef GroupShapeContext::createShapeContext( FragmentHandler2& rParent, const WorksheetHelper& rHelper, sal_Int32 nElement, const AttributeList& rAttribs, const ShapePtr& rxParentShape, ShapePtr* pxShape ) { |