diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-22 17:59:55 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-25 14:53:23 +0000 |
commit | 25922e2f50b27e47d0953d4a2ac51e9f6673a17a (patch) | |
tree | f89e8ac772f2012cb9a074a42b556718ed41f12d | |
parent | 668e6353f4597b81ebfd153b6197831dac50d398 (diff) |
tdf#90946: sw: ODF import: ignore invalid gradient-name if style SOLID
The bugdoc has a fill-gradient-name that refers to a non-existent
gradient and also draw:fill="solid"; handle this combination without
exception.
Change-Id: I2c912b28a6b1550e2e4c6c71ff8889ae1779c618
(cherry picked from commit 00eab70295cbce40368d57224c3f51c6e5f2457e)
Reviewed-on: https://gerrit.libreoffice.org/15866
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 716877756f15..f151e36b6a24 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -392,7 +392,17 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI throw lang::IllegalArgumentException(); } - bRet &= SvxShape::SetFillAttribute(XATTR_FILLGRADIENT, aTempName, rToSet); + bool const bSuccess = SvxShape::SetFillAttribute( + XATTR_FILLGRADIENT, aTempName, rToSet); + if (aXFillStyleItem.GetValue() == drawing::FillStyle_GRADIENT) + { // tdf#90946 ignore invalid gradient-name if SOLID + bRet &= bSuccess; + } + else + { + SAL_INFO_IF(!bSuccess, "sw.uno", + "FillBaseProperties: ignoring invalid FillGradientName"); + } } } |