[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - oox/source sd/qa

Justin Luth justin.luth at collabora.com
Fri Jun 22 17:04:19 UTC 2018


 oox/source/drawingml/table/tablecell.cxx |    3 +--
 sd/qa/unit/import-tests.cxx              |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 05021abd97316fe3d188cd9f15c44db2170927d7
Author: Justin Luth <justin.luth at collabora.com>
Date:   Sat Jun 2 14:57:47 2018 +0300

    tdf#104199 sd: nofill borders shouldn't be visible.
    
    regression from export bugfix tdf#90190.
    rLineProperties.maLineFill was set, but that value was
    never used, leaving aBorderLine with the default value.
    
    Setting borderline to COL_AUTO lets it merge in with background
    colors while still taking up the space defined by the border width.
    
    The existing unit test says "it is likely you will break
    this if fixing background issues, so feel free to adjust the
    test values." Indeed, this patch removes an unwanted black border,
    so utilizing that test as a proof.
    
    Change-Id: I0725a3d5874a509a4464c586d60c77cde2b49fcb
    Reviewed-on: https://gerrit.libreoffice.org/55205
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit 76505bbd862b17b9b02a2d6e68bac308890dec70)
    Reviewed-on: https://gerrit.libreoffice.org/55777
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 552b3fa548e19436af24f4b413e34b2f15100718)
    Reviewed-on: https://gerrit.libreoffice.org/55883

diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 36751930d59a..0630d2ffca5d 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -85,8 +85,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
     }
     else if ( rLineProperties.moLineWidth.get(0)!=0 )
     {
-        // Default color of Line is black.
-        rLineProperties.maLineFill.maFillColor.setSrgbClr( 0 );
+        aBorderLine.Color = sal_Int32( COL_AUTO );
         aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
         aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
         aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 5504e0454c48..887bbda27457 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -892,7 +892,7 @@ void SdImportTest::testBnc480256()
 
     xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
     xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
-    CPPUNIT_ASSERT_EQUAL(util::Color(0), aBorderLine.Color);
+    CPPUNIT_ASSERT_EQUAL(util::Color(COL_AUTO), aBorderLine.Color);
 
     xDocShRef->DoClose();
 }


More information about the Libreoffice-commits mailing list