[Libreoffice-commits] core.git: 2 commits - sc/qa
Tor Lillqvist
tml at collabora.com
Tue Mar 10 03:18:34 PDT 2015
sc/qa/unit/data/xls/shared-formula/relative-refs2.xls |binary
sc/qa/unit/subsequent_filters-test.cxx | 43 ++++++++++++++----
2 files changed, 35 insertions(+), 8 deletions(-)
New commits:
commit bb2728fd246716588d135c9e159135b1c5a7d3e1
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 10 11:25:53 2015 +0200
Add unit test for bb0c05cebed131805d04919fac2b83030087451b
Change-Id: I2b21a488a7f597603b65fac0ff3c6b05c3660994
diff --git a/sc/qa/unit/data/xls/shared-formula/relative-refs2.xls b/sc/qa/unit/data/xls/shared-formula/relative-refs2.xls
index 56ff822..36c188c 100644
Binary files a/sc/qa/unit/data/xls/shared-formula/relative-refs2.xls and b/sc/qa/unit/data/xls/shared-formula/relative-refs2.xls differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fdf892e..7de72c1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2677,9 +2677,17 @@ void ScFiltersTest::testSharedFormulaXLS()
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), pFC->GetSharedTopRow());
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+ pFC = rDoc.GetFormulaCell(ScAddress(2,10,0));
+ CPPUNIT_ASSERT(pFC);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), pFC->GetSharedTopRow());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+
OUString aFormula;
rDoc.GetFormula(2, 1, 0, aFormula);
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(B9:D9)"), aFormula);
+
+ rDoc.GetFormula(2, 10, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUM(B18:D18)"), aFormula);
}
{
@@ -2688,9 +2696,36 @@ void ScFiltersTest::testSharedFormulaXLS()
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+ pFC = rDoc.GetFormulaCell(ScAddress(4,17,0));
+ CPPUNIT_ASSERT(pFC);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+
OUString aFormula;
rDoc.GetFormula(4, 8, 0, aFormula);
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(G9:EY9)"), aFormula);
+
+ rDoc.GetFormula(4, 17, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUM(G18:EY18)"), aFormula);
+ }
+
+ {
+ const ScFormulaCell* pFC = rDoc.GetFormulaCell(ScAddress(6,15,0));
+ CPPUNIT_ASSERT(pFC);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(15), pFC->GetSharedTopRow());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+
+ pFC = rDoc.GetFormulaCell(ScAddress(6,24,0));
+ CPPUNIT_ASSERT(pFC);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(15), pFC->GetSharedTopRow());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(10), pFC->GetSharedLength());
+
+ OUString aFormula;
+ rDoc.GetFormula(6, 15, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A16:A40000)"), aFormula);
+
+ rDoc.GetFormula(6, 24, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A25:A40009)"), aFormula);
}
xDocSh->DoClose();
commit 653d7bdceac9e83b2e8e0ffcc457d5a5b514742d
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 10 10:47:19 2015 +0200
Revert "Ifdef out testSharedFormulaXLS() for now, fails for me with ..."
"... OpenCL on CPU"
I can't reproduce the problem any more. It was likely fixed by
fa4ce83f567cfb735bdfd2319458585ded4cd554.
This reverts commit 219f2dc83f40afb7470bffc307371925e8fae018.
Change-Id: Ib6d3a42137bcf21b0edec2173cf483ade6104b0b
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 7e96929..fdf892e 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -181,9 +181,7 @@ public:
void testSharedFormulaWrappedRefsXLS();
void testSharedFormulaBIFF5();
void testSharedFormulaXLSB();
-#if 0
void testSharedFormulaXLS();
-#endif
void testExternalRefCacheXLSX();
void testExternalRefCacheODS();
void testHybridSharedStringODS();
@@ -269,9 +267,7 @@ public:
CPPUNIT_TEST(testSharedFormulaWrappedRefsXLS);
CPPUNIT_TEST(testSharedFormulaBIFF5);
CPPUNIT_TEST(testSharedFormulaXLSB);
-#if 0
CPPUNIT_TEST(testSharedFormulaXLS);
-#endif
CPPUNIT_TEST(testExternalRefCacheXLSX);
CPPUNIT_TEST(testExternalRefCacheODS);
CPPUNIT_TEST(testHybridSharedStringODS);
@@ -2645,8 +2641,6 @@ void ScFiltersTest::testSharedFormulaXLSB()
xDocSh->DoClose();
}
-#if 0
-
void ScFiltersTest::testSharedFormulaXLS()
{
{
@@ -2703,8 +2697,6 @@ void ScFiltersTest::testSharedFormulaXLS()
}
}
-#endif
-
void ScFiltersTest::testExternalRefCacheXLSX()
{
ScDocShellRef xDocSh = loadDoc("external-refs.", XLSX);
More information about the Libreoffice-commits
mailing list