summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-11-13 17:41:45 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-11-21 17:59:02 +0100
commit50f52d0d45d40670a7e75c82506fa47edf85ddf8 (patch)
treefe458a55b1ce5f52ae26fc27032978ecb753cd8d /sc
parentb78bb32e743cb1a24e7e8f5e76f01af5441ef956 (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/83408 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/drawingfragment.hxx4
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx4
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 012cf615a342..f607c44abc4f 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 )
{