diff options
-rw-r--r-- | oox/qa/unit/data/tdf156902_GlowOnGroup.docx | bin | 0 -> 34795 bytes | |||
-rw-r--r-- | oox/qa/unit/shape.cxx | 12 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/oox/qa/unit/data/tdf156902_GlowOnGroup.docx b/oox/qa/unit/data/tdf156902_GlowOnGroup.docx Binary files differnew file mode 100644 index 000000000000..0c176eefa025 --- /dev/null +++ b/oox/qa/unit/data/tdf156902_GlowOnGroup.docx diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index cc44152a84b4..c0bae9cbb536 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -318,6 +318,18 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor) } } +CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGlowOnGroup) +{ + // The document contains a group of two shapes. A glow-effect is set on the group. + // Without the fix, the children of the group were not imported at all. + loadFromURL(u"tdf156902_GlowOnGroup.docx"); + uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xGroup->getCount()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index c9a4137c77a1..9b4ee5f92d72 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -2033,7 +2033,8 @@ Reference< XShape > const & Shape::createAndInsert( } // Set glow effect properties - if ( aEffectProperties.maGlow.moGlowRad.has_value() ) + if (aEffectProperties.maGlow.moGlowRad.has_value() + && aServiceName != "com.sun.star.drawing.GroupShape") { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value()))); |