[Libreoffice-commits] core.git: sc/qa
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Sun Dec 21 21:58:12 PST 2014
sc/qa/unit/data/xlsb/universal-content.xlsb |binary
sc/qa/unit/filters-test.cxx | 12 ++++++++++++
sc/qa/unit/helper/qahelper.cxx | 3 ++-
sc/qa/unit/helper/qahelper.hxx | 2 ++
4 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 319ba046b3a1266b20661116d742779417d38cbf
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Dec 22 06:57:05 2014 +0100
add import test for xlsb
Change-Id: Ieb01027851b423287681f0145d3a39f98fc97f88
diff --git a/sc/qa/unit/data/xlsb/universal-content.xlsb b/sc/qa/unit/data/xlsb/universal-content.xlsb
new file mode 100644
index 0000000..fd9c253
Binary files /dev/null and b/sc/qa/unit/data/xlsb/universal-content.xlsb differ
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index fab94ba..3e3b02b 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -72,6 +72,7 @@ public:
void testContentXLSXStrict(); // strict OOXML
void testContentLotus123();
void testContentDIF();
+ void testContentXLSB();
//void testContentXLS_XML();
void testSharedFormulaXLS();
void testSharedFormulaXLSX();
@@ -93,6 +94,7 @@ public:
CPPUNIT_TEST(testContentXLSXStrict);
CPPUNIT_TEST(testContentLotus123);
CPPUNIT_TEST(testContentDIF);
+ CPPUNIT_TEST(testContentXLSB);
//CPPUNIT_TEST(testContentXLS_XML);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testSharedFormulaXLSX);
@@ -301,6 +303,16 @@ void ScFiltersTest::testContentDIF()
xDocSh->DoClose();
}
+void ScFiltersTest::testContentXLSB()
+{
+ ScDocShellRef xDocSh = loadDoc("universal-content.", XLSB);
+ xDocSh->DoHardRecalc(true);
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+ testContentImpl(rDoc, XLSB);
+ xDocSh->DoClose();
+}
+
// void ScFiltersTest::testContentXLS_XML()
// {
// ScDocShellRef xDocSh = loadDoc("universal-content.", XLS_XML);
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 2b183eb..9713eac 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -74,7 +74,8 @@ FileFormat aFileFormats[] = {
{ "html" , "calc_HTML_WebQuery", "generic_HTML", HTML_FORMAT_TYPE },
{ "123" , "Lotus", "calc_Lotus", LOTUS123_FORMAT_TYPE },
{ "dif", "DIF", "calc_DIF", DIF_FORMAT_TYPE },
- { "xml", "MS Excel 2003 XML", "calc_MS_Excel_2003_XML", XLS_XML_FORMAT_TYPE }
+ { "xml", "MS Excel 2003 XML", "calc_MS_Excel_2003_XML", XLS_XML_FORMAT_TYPE },
+ { "xlsb", "Calc MS Excel 2007 Binary", "MS Excel 2007 Binary", XLSB_XML_FORMAT_TYPE }
};
bool testEqualsWithTolerance( long nVal1, long nVal2, long nTol )
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 30a655d..f204dba 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -48,6 +48,7 @@
#define HTML_FORMAT_TYPE (SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_ALIEN | SFX_FILTER_USESOPTIONS)
#define DIF_FORMAT_TYPE 195
#define XLS_XML_FORMAT_TYPE (SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_ALIEN)
+#define XLSB_XML_FORMAT_TYPE 268959809
#define ODS 0
#define XLS 1
@@ -58,6 +59,7 @@
#define LOTUS123 6
#define DIF 7
#define XLS_XML 8
+#define XLSB 9
enum StringType { PureString, FormulaValue, StringValue };
More information about the Libreoffice-commits
mailing list