diff options
-rw-r--r-- | oox/source/export/shapes.cxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 0facbf16db3f..b4e7b137b182 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1678,15 +1678,24 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape ) return *this; } - uno::Reference<beans::XPropertySet> const xParent( - uno::Reference<container::XChild>(xObj, uno::UNO_QUERY)->getParent(), - uno::UNO_QUERY); - uno::Sequence<beans::PropertyValue> grabBag; - xParent->getPropertyValue("InteropGrabBag") >>= grabBag; + OUString entryName; + try + { + uno::Reference<beans::XPropertySet> const xParent( + uno::Reference<container::XChild>(xObj, uno::UNO_QUERY_THROW)->getParent(), + uno::UNO_QUERY_THROW); + + xParent->getPropertyValue("InteropGrabBag") >>= grabBag; + + entryName = uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY)->getEntryName(); + } + catch (uno::Exception const& e) + { + SAL_WARN("oox", "ShapeExport::WriteOLE2Shape: exception: " << e.Message); + return *this; + } - OUString const entryName( - uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY)->getEntryName()); OUString progID; for (auto const& it : grabBag) |