summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/XMLShapeStyleContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/XMLShapeStyleContext.cxx')
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 720ac4cf4883..0dc8371a1944 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -238,6 +238,20 @@ 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> seq(1);
+ seq[0] = sStyleName;
+ GetImport().SetError(
+ XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING,
+ seq, "empty style name reference", NULL );
+ break;
+ }
+
try
{