diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-09-22 11:59:14 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-10-14 15:27:47 +0200 |
commit | 83897a8291dc4023dbdf02558a9725efea4c668b (patch) | |
tree | d28d10b39e2f7c55957fb3836e7a6ef63295f3d9 /sd | |
parent | 7c03c89a4a5544c3849af99caacb54de366d6fee (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
(cherry picked from commit 18898e13fda25fe6dc85318dd0711355c7b2cc26)
Reviewed-on: https://gerrit.libreoffice.org/11652
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index ecd29b9a5c29..f9fc0dde5b7a 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 <config_features.h> @@ -1024,6 +1025,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 ); @@ -1032,10 +1034,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 ); @@ -1044,11 +1050,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(); } |