Kaydet (Commit) 2d732b49 authored tarafından Miklos Vajna's avatar Miklos Vajna

Related: tdf#105707 PPTX import: warn on invalid SmartArt fallback relid

We already warn when the SmartArt doesn't have a drawingML fallback, but
having a reference to a fallback that is not a valid one (so resolves to
an empty fragment path) is also unusable. So warn in that case as well.

Change-Id: I03b2325003b4eb38b1347a88899799c6d5c33606
Reviewed-on: https://gerrit.libreoffice.org/34129Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 0939e079
......@@ -275,6 +275,18 @@ ContextHandlerRef DiagramGraphicDataContext::onCreateContext( ::sal_Int32 aEleme
// No DrawingML fallback, need to warn the user at the end.
if (mpShapePtr->getExtDrawings().empty())
getFilter().setMissingExtDrawing();
else
{
for (const auto& rRelId : mpShapePtr->getExtDrawings())
{
// An invalid fallback reference is as bad as a missing one.
if (getFragmentPathFromRelId(rRelId).isEmpty())
{
getFilter().setMissingExtDrawing();
break;
}
}
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment