diff options
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/border.ods | bin | 0 -> 7718 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/border.ods b/sc/qa/unit/data/ods/border.ods Binary files differnew file mode 100644 index 000000000000..e2ac68beee33 --- /dev/null +++ b/sc/qa/unit/data/ods/border.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 7ff3ba0c8378..3502d34fd32a 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -41,6 +41,7 @@ #include <editeng/brshitem.hxx> #include <editeng/justifyitem.hxx> +#include <editeng/borderline.hxx> #include <dbdata.hxx> #define CALC_DEBUG_OUTPUT 0 @@ -102,6 +103,7 @@ public: void testFormatsXLSX(); void testMatrixODS(); void testMatrixXLS(); + void testBorderODS(); void testBugFixesODS(); void testBugFixesXLS(); void testBugFixesXLSX(); @@ -121,6 +123,7 @@ public: CPPUNIT_TEST(testFormatsXLSX); CPPUNIT_TEST(testMatrixODS); CPPUNIT_TEST(testMatrixXLS); + CPPUNIT_TEST(testBorderODS); CPPUNIT_TEST(testBugFixesODS); CPPUNIT_TEST(testBugFixesXLS); CPPUNIT_TEST(testBugFixesXLSX); @@ -470,6 +473,29 @@ void ScFiltersTest::testMatrixXLS() xDocSh->DoClose(); } +void ScFiltersTest::testBorderODS() +{ + const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("border.")); + ScDocShellRef xDocSh = loadDoc( aFileNameBase, 0); + + CPPUNIT_ASSERT_MESSAGE("Failed to load border.*", xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + + const editeng::SvxBorderLine* pLeft = NULL; + const editeng::SvxBorderLine* pTop = NULL; + const editeng::SvxBorderLine* pRight = NULL; + const editeng::SvxBorderLine* pBottom = NULL; + + pDoc->GetBorderLines( 0, 1, 0, &pLeft, &pTop, &pRight, &pBottom ); + CPPUNIT_ASSERT(!pLeft); + CPPUNIT_ASSERT(!pTop); + CPPUNIT_ASSERT(!pBottom); + CPPUNIT_ASSERT(pRight); + CPPUNIT_ASSERT_EQUAL(pRight->GetStyle(),editeng::SOLID); + + xDocSh->DoClose(); +} + void ScFiltersTest::testBugFixesODS() { const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("bug-fixes.")); |