summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 720ac4cf4883..fe1b6b9bd1db 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -238,6 +238,19 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
OUString sStyleName;
rState.maValue >>= sStyleName;
sStyleName = GetImport().GetStyleDisplayName( aFamilies[i], sStyleName );
+ // All of these attributes refer to something with draw:name
+ // of type styleName = NCName which is non-empty.
+ // tdf#89802: for Writer frames there would be no exception here but
+ // it will fail later on attach() and take out the entire frame
+ if (sStyleName.isEmpty())
+ {
+ Sequence<OUString> const seq{ sStyleName };
+ GetImport().SetError(
+ XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING,
+ seq, "empty style name reference", NULL );
+ break;
+ }
+
try
{