diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-15 18:09:37 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-15 20:56:37 +0200 |
commit | 97887cd810194ee556d2ec12f2a8be40075c29d2 (patch) | |
tree | 64d9d840048e10aaf1b3485162562ce80e8f776b /sw | |
parent | ecf9f9f8697dc53798d6d4a6c6db84ac2ed51422 (diff) |
tdf#91140: ODF import: try to ignore invalid draw:fill="solid"
... which was apparently written by LO >= 4.1 on a frame with image
background, under unknown circumstances.
Change-Id: Ie86643ab67f58bfe5c19d6a1f80a7af8f793edf2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 551c2de35f05..625905da206e 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -573,7 +573,7 @@ DECLARE_ODFIMPORT_TEST(fdo81223, "fdo81223.odt") uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); sal_Int32 nValue(0); xFrame->getPropertyValue("BackColor") >>= nValue; - CPPUNIT_ASSERT_EQUAL(sal_Int32(0xfeffffff), nValue); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffffff), nValue); } DECLARE_ODFIMPORT_TEST(fdo90130_1, "fdo90130-1.odt") diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 2876c8967e9b..9c44c672d34c 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -254,8 +254,13 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI const uno::Any* pXFillBackgroundItem = 0; GetProperty(XATTR_FILLBACKGROUND, 0, pXFillBackgroundItem); const uno::Any* pOwnAttrFillBmpItem = 0; GetProperty(OWN_ATTR_FILLBMP_MODE, 0, pOwnAttrFillBmpItem); + // tdf#91140: ignore SOLID fill style for determining if fill style is used + // but there is a GraphicURL + const bool bFillStyleUsed(pXFillStyleItem && pXFillStyleItem->hasValue() && + (pXFillStyleItem->get<drawing::FillStyle>() != drawing::FillStyle_SOLID + || !pGrURL)); const bool bXFillStyleItemUsed( - pXFillStyleItem || + bFillStyleUsed || pXFillColorItem || pXFillGradientItem || pXFillGradientNameItem || pXFillHatchItem || pXFillHatchNameItem || |