summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx12
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.cxx5
2 files changed, 16 insertions, 1 deletions
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index b58bf56bdda7..e211d7315a74 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -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;
}
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx
index 72b33ff83c9e..7d1a3cf6a4a7 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.cxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -11,6 +11,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include <oox/core/xmlfilterbase.hxx>
using namespace ::oox::core;
using namespace ::com::sun::star::xml::sax;
@@ -35,7 +36,9 @@ ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
{
-
+ // Empty DrawingML fallback, need to warn the user at the end.
+ if (mpShapePtr && mpShapePtr->getChildren().empty())
+ getFilter().setMissingExtDrawing();
}
ContextHandlerRef