summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-06-02 14:57:47 +0300
committerJustin Luth <justin_luth@sil.org>2018-06-14 08:31:09 +0200
commit76505bbd862b17b9b02a2d6e68bac308890dec70 (patch)
tree675dc5aff312da611fbf382fa5343f095cabaa94
parentc3e552ac25be001a623469c549ee8d0719b98133 (diff)
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@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--oox/source/drawingml/table/tablecell.cxx3
-rw-r--r--sd/qa/unit/import-tests.cxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 3dc40ceafab9..7639743842b2 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 39f7f6df766e..21b78715f5d7 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -940,7 +940,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();
}