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:36:49 +0200
commit00eab70295cbce40368d57224c3f51c6e5f2457e (patch)
tree8855d8ab57fe15b8d259c409bf0ad229f274a58d
parent12f907da9535ae9fb28fb7ef1b05240eabf51e82 (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
-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");
+ }
}
}