summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2022-03-14 14:52:59 +0300
committerAndras Timar <andras.timar@collabora.com>2022-04-14 14:02:11 +0200
commitc6c3a6c3fdf18de7b24863bb949f8d1a69b2d39e (patch)
tree4fc20a05f5114a9413a0568767fe85eebb211fb4 /sd
parent6adb8e3e72bcc3fbbaa2a09e6cda8a22a72c0f50 (diff)
tdf#147766 Export empty lines as line with noFill
We have a case that 0 width line but has auto color. If that case exported there is no line over there, LO handles normally but MSO draws back borders as default. To prevent this we have to export them as line with noFill. testTableBorderLineStyle change reverts a workaround for 3faf005a367cbd28077403bf93810bbaf4805851 testBnc480256 Cell(1,0) still invisible. We are just checking this with another way. Change-Id: If5f6d2dbdba5c295d58307fcfe3b37629ede8a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131532 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132886
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests.cxx3
-rw-r--r--sd/qa/unit/import-tests.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index f1d0281aab0d..729d9f154b12 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -602,9 +602,10 @@ void SdExportTest::testBnc480256()
xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0x4697e0), nColor);
+ // This border should be invisible.
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(ColorTransparency, aBorderLine.Color));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), sal_Int32(aBorderLine.LineWidth));
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c7b508de5dc3..e49892d3a738 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1474,7 +1474,7 @@ void SdImportTest::testTableBorderLineStyle()
xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("TopBorder") >>= aBorderLine;
- if (aBorderLine.Color != -1) {
+ if (aBorderLine.LineWidth > 0) {
CPPUNIT_ASSERT_EQUAL(nObjBorderLineStyles[i], aBorderLine.LineStyle);
}
}