[Libreoffice-commits] core.git: sc/qa

Noel Power noel.power at suse.com
Tue Jun 25 02:42:18 PDT 2013


 sc/qa/unit/data/xls/border.xls         |binary
 sc/qa/unit/data/xlsx/border.xlsx       |binary
 sc/qa/unit/subsequent_filters-test.cxx |   25 ++++++++++++++++++++++---
 3 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 69dcacedaccd1d698a54eed615ee8739747bc975
Author: Noel Power <noel.power at suse.com>
Date:   Tue Jun 25 10:28:27 2013 +0100

    unit test for commit:1680a8cd4f4393ec15c4f85cb63b6654117d56d1 (fdo#56960)
    
    expand the existing borders import check to cater for xlsx ( and
    testing for fine/hair border styles )
    
    Change-Id: Ic5c3cd46e0049dbce9997f0881c4d98e0d64e00c

diff --git a/sc/qa/unit/data/xls/border.xls b/sc/qa/unit/data/xls/border.xls
index b314f7d..876839b 100644
Binary files a/sc/qa/unit/data/xls/border.xls and b/sc/qa/unit/data/xls/border.xls differ
diff --git a/sc/qa/unit/data/xlsx/border.xlsx b/sc/qa/unit/data/xlsx/border.xlsx
new file mode 100755
index 0000000..e33c083
Binary files /dev/null and b/sc/qa/unit/data/xlsx/border.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index f55cb9b..8861a9d 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -96,6 +96,7 @@ public:
     void testMatrixXLS();
     void testBorderODS();
     void testBorderXLS();
+    void testBorderXLSX();
     void testBordersOoo33();
     void testBugFixesODS();
     void testBugFixesXLS();
@@ -158,6 +159,7 @@ public:
     CPPUNIT_TEST(testMatrixXLS);
     CPPUNIT_TEST(testBorderODS);
     CPPUNIT_TEST(testBorderXLS);
+    CPPUNIT_TEST(testBorderXLSX);
     CPPUNIT_TEST(testBordersOoo33);
     CPPUNIT_TEST(testBugFixesODS);
     CPPUNIT_TEST(testBugFixesXLS);
@@ -208,7 +210,7 @@ public:
 
 private:
     void testPassword_Impl(const OUString& rFileNameBase);
-
+    void testBorderImpl( sal_uLong nFormatType );
     uno::Reference<uno::XInterface> m_xCalcComponent;
 };
 
@@ -750,9 +752,9 @@ void ScFiltersTest::testBorderODS()
     xDocSh->DoClose();
 }
 
-void ScFiltersTest::testBorderXLS()
+void ScFiltersTest::testBorderImpl( sal_uLong nFormatType )
 {
-    ScDocShellRef xDocSh = loadDoc("border.", XLS);
+    ScDocShellRef xDocSh = loadDoc("border.", nFormatType );
 
     CPPUNIT_ASSERT_MESSAGE("Failed to load border.xls", xDocSh.Is());
     ScDocument* pDoc = xDocSh->GetDocument();
@@ -779,7 +781,24 @@ void ScFiltersTest::testBorderXLS()
     CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
             table::BorderLineStyle::SOLID);
     CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),30L);
+
+    pDoc->GetBorderLines( 7, 9, 0, &pLeft, &pTop, &pRight, &pBottom );
+    CPPUNIT_ASSERT(pRight);
+    CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+            table::BorderLineStyle::FINE_DASHED);
+    CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),1L);
+}
+
+void ScFiltersTest::testBorderXLS()
+{
+    testBorderImpl( XLS );
 }
+
+void ScFiltersTest::testBorderXLSX()
+{
+    testBorderImpl( XLSX );
+}
+
 struct Border
 {
     sal_Int16 column;


More information about the Libreoffice-commits mailing list