summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r--oox/source/drawingml/shape.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index a9388e8a4a70..6e8ae072af56 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -295,7 +295,12 @@ void Shape::addShape(
if( meFrameType == FRAMETYPE_DIAGRAM )
{
keepDiagramCompatibilityInfo();
- if( !SvtFilterOptions::Get().IsSmartArt2Shape() )
+
+ // Check if this is the PPTX import, so far converting SmartArt to a non-editable
+ // metafile is only imlemented for DOCX.
+ bool bPowerPoint = dynamic_cast<oox::ppt::PowerPointImport*>(&rFilterBase) != nullptr;
+
+ if (!SvtFilterOptions::Get().IsSmartArt2Shape() && !bPowerPoint)
convertSmartArtToMetafile( rFilterBase );
}
@@ -964,7 +969,17 @@ Reference< XShape > const & Shape::createAndInsert(
Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
if ( !mxShape.is() )
+ {
mxShape.set( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
+ if (aServiceName == "com.sun.star.drawing.GroupShape")
+ {
+ // TODO why is this necessary? A newly created group shape should have an empty
+ // grab-bag.
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ beans::PropertyValues aVals;
+ xPropertySet->setPropertyValue("InteropGrabBag", uno::makeAny(aVals));
+ }
+ }
Reference< XPropertySet > xSet( mxShape, UNO_QUERY );
if (xSet.is())