summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2024-09-09 16:19:14 +0200
committerBalazs Varga <balazs.varga.extern@allotropia.de>2024-09-11 12:28:06 +0200
commit070682854800cb983b452a5b5bd16943433c4b2b (patch)
tree9c786471b7e647106973b7a61e8d0b46df434f4f /sd/qa/unit
parentb4c52eb467b3f2164abfdece25830c8347f1ced9 (diff)
tdf#149865 - FILEOPEN PPTX: fix table lacks border
Fix wrong border line styles if we have merged cells. Change-Id: I238aa08c65b9aefd7b77b0f4ae3c3df979a7171d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173109 Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/pptx/tdf149865.pptxbin0 -> 186883 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx22
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf149865.pptx b/sd/qa/unit/data/pptx/tdf149865.pptx
new file mode 100644
index 000000000000..3b5a0cbb8f7a
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf149865.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 220bf3e30342..6e6cd651d3b9 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1653,6 +1653,28 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTableBorderLineStyle)
}
}
+CPPUNIT_TEST_FIXTURE(SdImportTest, testTableMergedCellsBorderLineStyle)
+{
+ createSdImpressDoc("pptx/tdf149865.pptx");
+
+ const SdrPage* pPage = GetPage(1);
+
+ sdr::table::SdrTableObj* pTableObj;
+ uno::Reference<table::XCellRange> xTable;
+ uno::Reference<beans::XPropertySet> xCell;
+ table::BorderLine2 aBorderLine;
+
+ pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT(pTableObj);
+ xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+ xCell.set(xTable->getCellByPosition(4, 1), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine;
+ table::BorderLine2 expectedRight(0x30ba78, 0, 17, 0, 0, 17);
+ CPPUNIT_ASSERT_EQUAL(expectedRight.LineStyle, aBorderLine.LineStyle);
+ CPPUNIT_ASSERT_EQUAL(expectedRight.Color, aBorderLine.Color);
+ CPPUNIT_ASSERT_EQUAL(expectedRight.LineWidth, aBorderLine.LineWidth);
+}
+
CPPUNIT_TEST_FIXTURE(SdImportTest, testBnc862510_6)
{
// Black text was imported instead of gray