summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-18 19:20:06 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-18 19:20:06 +0100
commitd58421c2cc5199e9892627b894eaab64265c82e7 (patch)
treeb5cb2aec856588e69ed92ed0ca65a2f792cb15b9
parent521456068d8a848e4e5a358b1ff7e8659c94a353 (diff)
add test case for fdo#40426
-rw-r--r--sc/qa/unit/data/ods/bug-fixes.odsbin10467 -> 9054 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx21
2 files changed, 18 insertions, 3 deletions
diff --git a/sc/qa/unit/data/ods/bug-fixes.ods b/sc/qa/unit/data/ods/bug-fixes.ods
index 686423527107..b7c05391b762 100644
--- a/sc/qa/unit/data/ods/bug-fixes.ods
+++ b/sc/qa/unit/data/ods/bug-fixes.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index f5f1eafd672a..4aac0fc100d9 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 <dbdata.hxx>
#define CALC_DEBUG_OUTPUT 0
#define TEST_BUG_FILES 0
@@ -483,9 +484,23 @@ void ScFiltersTest::testBugFixesODS()
CPPUNIT_ASSERT_MESSAGE("Failed to load bugFixes.ods", xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
- rtl::OUString aCSVFileName;
- createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bugFix_Sheet2.")), aCSVFileName);
- testFile(aCSVFileName, pDoc, 1);
+ {
+ // fdo
+ rtl::OUString aCSVFileName;
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bugFix_Sheet2.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 1);
+ }
+
+ {
+ // fdo#40426
+ ScDBData* pDBData = pDoc->GetDBCollection()->getNamedDBs().findByName("DBRange1");
+ CPPUNIT_ASSERT(pDBData);
+ CPPUNIT_ASSERT(pDBData->HasHeader());
+ // no header
+ pDBData = pDoc->GetDBCollection()->getNamedDBs().findByName("DBRange2");
+ CPPUNIT_ASSERT(pDBData);
+ CPPUNIT_ASSERT(!pDBData->HasHeader());
+ }
xDocSh->DoClose();
}