summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-05-22 17:59:55 +0200
committerMichael Stahl <mstahl@redhat.com>2015-05-22 18:39:56 +0200
commitb2ae2266b81441b0e0c9879d532b1291a31314d8 (patch)
tree75bd6e0e57963c5836dcb7dd13466e68d355819d
parent7dba64e6e4e7dfa4268b5d4c3ba296ac02aa814b (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)
-rw-r--r--sw/source/core/unocore/unoframe.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 1f03d7fc8652..54a5b6ba963c 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -394,7 +394,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");
+ }
}
}