summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-22 11:59:14 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-09-26 08:23:33 +0200
commit18898e13fda25fe6dc85318dd0711355c7b2cc26 (patch)
tree8e33714a6a6eb33ace06d9e8f586f28dd0968289 /sd
parentdf73f4115cfe4d07e4159adf087571687eb173ec (diff)
bnc#897769: OOXML import: Import border lines using reference too.
Do not ignore 'lnRef' element. Also fix typo to apply 'seCell' properties to the right cell (southeast). Change-Id: Ia45f7016f358b70e6db06a232c569335ce9d7051
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6bc206a5b304..c654acbf28ac 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
#include <stlpool.hxx>
@@ -689,6 +690,7 @@ void SdFiltersTest::testBnc480256()
uno::Reference< table::XCellRange > xTable;
uno::Reference< beans::XPropertySet > xCell;
sal_Int32 nColor;
+ table::BorderLine2 aBorderLine;
pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
@@ -697,10 +699,14 @@ void SdFiltersTest::testBnc480256()
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(10208238), nColor);
+ xCell->getPropertyValue("LeftBorder") >>= aBorderLine;
+ CPPUNIT_ASSERT_EQUAL(util::Color(5609427), aBorderLine.Color);
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(13032959), nColor);
+ xCell->getPropertyValue("TopBorder") >>= aBorderLine;
+ CPPUNIT_ASSERT_EQUAL(util::Color(5609427), aBorderLine.Color);
pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(1));
CPPUNIT_ASSERT( pTableObj );
@@ -709,11 +715,17 @@ void SdFiltersTest::testBnc480256()
xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(7056614), nColor);
+ xCell->getPropertyValue("LeftBorder") >>= aBorderLine;
+ CPPUNIT_ASSERT_EQUAL(util::Color(12505062), aBorderLine.Color);
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(sal_Int32(4626400), nColor);
+ xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
+ CPPUNIT_ASSERT_EQUAL(util::Color(0), aBorderLine.Color);
+
xDocShRef->DoClose();
}