diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-07 22:20:49 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-07 22:55:26 +0200 |
commit | db1d278dcc308c73eb5edebc20481c96e7f479d8 (patch) | |
tree | 255401e09027f22bbe0ec35a592f8d50654de191 /xmloff | |
parent | 8f2209b1ebcb053c9f6fa8cb2c39041bec08f9f8 (diff) |
tdf#89802: xmloff: fix ODF import of frame with empty style name ref
draw:fill-gradient-name="" in the graphic properties now causes
BaseFrameProperties_Impl::FillBaseProperties() to fail and prevent
insertion of the SwXTextFrame.
(regression from 6e61ecd09679a66060f932835622821d39e92f01)
Change-Id: I9b4f3ddb0f0e1b3a80e86bbdc1af2dade1c8edf7
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/XMLShapeStyleContext.cxx | 13 |
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 { |