Kaydet (Commit) 00eab702 authored tarafından Michael Stahl's avatar Michael Stahl

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
üst 12f907da
...@@ -394,7 +394,17 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI ...@@ -394,7 +394,17 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
throw lang::IllegalArgumentException(); 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");
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment