sw/source/core/unocore/unoframe.cxx | 14 +++++++++++++- xmloff/source/style/XMLBackgroundImageContext.cxx | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-)
New commits: commit 00eab70295cbce40368d57224c3f51c6e5f2457e Author: Michael Stahl <mst...@redhat.com> Date: Fri May 22 17:59:55 2015 +0200 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 diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 1f03d7f..54a5b6b 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"); + } } } commit 12f907da9535ae9fb28fb7ef1b05240eabf51e82 Author: Michael Stahl <mst...@redhat.com> Date: Fri May 22 17:58:57 2015 +0200 tdf#91140: tweak fix a bit, turns out xmloff was also passing empty URL Change-Id: Ia6e1fbe18e72c9c06915e1b437076a1f56a6c206 diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 897a987..1f03d7f 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -259,6 +259,8 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI const bool bFillStyleUsed(pXFillStyleItem && pXFillStyleItem->hasValue() && (pXFillStyleItem->get<drawing::FillStyle>() != drawing::FillStyle_SOLID || !pGrURL)); + SAL_INFO_IF(pXFillStyleItem && pXFillStyleItem->hasValue() && !bFillStyleUsed, + "sw.uno", "FillBaseProperties: ignoring invalid FillStyle"); const bool bXFillStyleItemUsed( bFillStyleUsed || pXFillColorItem || diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index 18749d82..5acd951 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -389,7 +389,8 @@ void XMLBackgroundImageContext::EndElement() else if( GraphicLocation_NONE == ePos ) ePos = GraphicLocation_TILED; - aProp.maValue <<= sURL; + if (!sURL.isEmpty()) + aProp.maValue <<= sURL; aPosProp.maValue <<= ePos; aFilterProp.maValue <<= sFilter; aTransparencyProp.maValue <<= nTransparency; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits