summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-11-13 17:41:45 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-16 10:35:24 +0100
commitc9efa80d4d71aacb57a81c4fd1da163aee9f3966 (patch)
tree9cfaf0634e4e74b2736b3ccf4fbf587b16416417 /include
parenttdf#128434 really free the VclPtr<PDFWriterImpl> (diff)
downloadcore-c9efa80d4d71aacb57a81c4fd1da163aee9f3966.tar.gz
core-c9efa80d4d71aacb57a81c4fd1da163aee9f3966.zip
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 'include')
-rw-r--r--include/oox/drawingml/shapegroupcontext.hxx6
-rw-r--r--include/oox/ppt/pptshapegroupcontext.hxx2
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 1043b3fa8177..c4b7b4a10191 100644
--- a/include/oox/ppt/pptshapegroupcontext.hxx
+++ b/include/oox/ppt/pptshapegroupcontext.hxx
@@ -44,7 +44,7 @@ class PPTShapeGroupContext : 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,