summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-01 03:32:40 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-01 03:34:07 +0200
commitf19ebe978a329e5322fca89aaf568371c532e5fb (patch)
tree3851cff119be3328e9f691d698e9b9b8f84060e9 /sc
parentc41f72f5a9cdee8e048c29768ada9a9e2666b7d7 (diff)
first part of border import test
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/qa/unit/data/ods/border.odsbin0 -> 7718 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx26
3 files changed, 27 insertions, 1 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 2fbd0eb27970..1c0477cd6e3b 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -865,7 +865,7 @@ public:
SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask ) const;
SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, sal_uInt16 nMask ) const;
- void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
const ::editeng::SvxBorderLine** ppLeft,
const ::editeng::SvxBorderLine** ppTop,
const ::editeng::SvxBorderLine** ppRight,
diff --git a/sc/qa/unit/data/ods/border.ods b/sc/qa/unit/data/ods/border.ods
new file mode 100644
index 000000000000..e2ac68beee33
--- /dev/null
+++ b/sc/qa/unit/data/ods/border.ods
Binary files differ
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."));