[Libreoffice-commits] core.git: sw/qa sw/source

Michael Stahl mstahl at redhat.com
Fri May 15 12:02:16 PDT 2015


 sw/qa/extras/odfimport/odfimport.cxx |    2 +-
 sw/source/core/unocore/unoframe.cxx  |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 97887cd810194ee556d2ec12f2a8be40075c29d2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri May 15 18:09:37 2015 +0200

    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

diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 551c2de..625905d 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 2876c89..9c44c67 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 ||


More information about the Libreoffice-commits mailing list