tdf#105272: Add unittest

Change-Id: I80aa192651595a719a5ac9a06423d2cf80aa7a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92078
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/xlsx/tdf105272.xlsx b/sc/qa/unit/data/xlsx/tdf105272.xlsx
new file mode 100644
index 0000000..51fc60d
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf105272.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index e212fd9..2c8940b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -214,6 +214,7 @@
    void testOpenDocumentAsReadOnly();
    void testKeepSettingsOfBlankRows();

    void testTdf105272();
    void testTdf118990();
    void testTdf121612();
    void testPivotCacheAfterExportXLSX();
@@ -352,6 +353,7 @@
    CPPUNIT_TEST(testOpenDocumentAsReadOnly);
    CPPUNIT_TEST(testKeepSettingsOfBlankRows);

    CPPUNIT_TEST(testTdf105272);
    CPPUNIT_TEST(testTdf118990);
    CPPUNIT_TEST(testTdf121612);
    CPPUNIT_TEST(testPivotCacheAfterExportXLSX);
@@ -4327,6 +4329,21 @@
    xDocSh->DoClose();
}

void ScExportTest::testTdf105272()
{
    ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX);
    CPPUNIT_ASSERT(xDocSh.is());
    xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
    ScDocument& rDoc = xDocSh->GetDocument();
    //without the fix in place,it would fail
    //Expected: Table1[[#This Row],[Total]]/Table1[[#This Row],['# Athletes]]
    //Actual  : table1[[#this row],[total]]/table1[[#this row],['# athletes]]

    ASSERT_FORMULA_EQUAL(rDoc, ScAddress(7, 3, 0),
                         "Table1[[#This Row],[Total]]/Table1[[#This Row],['# Athletes]]",
                         "Wrong formula");
}

void ScExportTest::testTdf118990()
{
    ScDocShellRef xDocSh = loadDoc("tdf118990.", FORMAT_XLSX);