summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-06-28 19:42:47 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-06-28 21:31:03 +0200
commitf07a56498875e67fa2637fd0a73890629024efa8 (patch)
tree650897c7c4ab2eab12e7b65fe1b7d5d1871349a9
parent263dedd5f6c242045174a3be21a16212f65408de (diff)
tdf#44076: sc: Add unittest
Change-Id: I9469b90e10fa51006a5dfb267c4129cf2b5e40dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97348 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 71d0d22ea069..a1027fd06d03 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -215,6 +215,7 @@ public:
void testCopyMergedNumberFormats();
void testVBAUserFunctionXLSM();
void testEmbeddedImageXLS();
+ void testTdf44076();
void testEditEngStrikeThroughXLSX();
void testRefStringXLSX();
void testHiddenSheetsXLSX();
@@ -371,6 +372,7 @@ public:
CPPUNIT_TEST(testVBAUserFunctionXLSM);
CPPUNIT_TEST(testEmbeddedImageXLS);
CPPUNIT_TEST(testErrorOnExternalReferences);
+ CPPUNIT_TEST(testTdf44076);
CPPUNIT_TEST(testEditEngStrikeThroughXLSX);
CPPUNIT_TEST(testRefStringXLSX);
CPPUNIT_TEST(testRelFormulaValidationXLS);
@@ -3452,6 +3454,20 @@ void ScFiltersTest::testErrorOnExternalReferences()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf44076()
+{
+ ScDocShellRef xDocSh = loadDoc("blank.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open empty doc", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ rDoc.SetString(ScAddress(0,0,0), "=(-8)^(1/3)");
+
+ CPPUNIT_ASSERT_EQUAL(-2.0, rDoc.GetValue(ScAddress(0,0,0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testEditEngStrikeThroughXLSX()
{
ScDocShellRef xDocSh = loadDoc("strike-through.", FORMAT_XLSX);