Kaydet (Commit) b0a890e5 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Eike Rathke

Some more tdf#92256 related tests

Change-Id: I052cceb229f8ab72277c51600994269e4ea52135
Reviewed-on: https://gerrit.libreoffice.org/17704Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 077c8838
...@@ -3109,8 +3109,16 @@ void ScFiltersTest::testRefStringXLSX() ...@@ -3109,8 +3109,16 @@ void ScFiltersTest::testRefStringXLSX()
double nVal = rDoc.GetValue(2, 2, 0); double nVal = rDoc.GetValue(2, 2, 0);
ASSERT_DOUBLES_EQUAL(3.0, nVal); ASSERT_DOUBLES_EQUAL(3.0, nVal);
const ScCalcConfig& rCalcConfig = rDoc.GetCalcConfig(); ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
CPPUNIT_ASSERT_EQUAL(formula::FormulaGrammar::CONV_XL_A1, rCalcConfig.meStringRefAddressSyntax); CPPUNIT_ASSERT_EQUAL(formula::FormulaGrammar::CONV_XL_A1, aCalcConfig.meStringRefAddressSyntax);
//make sure ref syntax gets saved for MSO-produced docs
xDocSh = saveAndReload( &(*xDocSh), XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to reload doc", xDocSh.Is());
ScDocument& rDoc2 = xDocSh->GetDocument();
aCalcConfig = rDoc2.GetCalcConfig();
CPPUNIT_ASSERT_EQUAL(formula::FormulaGrammar::CONV_XL_A1, aCalcConfig.meStringRefAddressSyntax);
xDocSh->DoClose(); xDocSh->DoClose();
} }
...@@ -3128,7 +3136,26 @@ void ScFiltersTest::testRefStringConfigXLSX() ...@@ -3128,7 +3136,26 @@ void ScFiltersTest::testRefStringConfigXLSX()
CPPUNIT_ASSERT_EQUAL_MESSAGE("String ref syntax doesn't match", formula::FormulaGrammar::CONV_OOO, CPPUNIT_ASSERT_EQUAL_MESSAGE("String ref syntax doesn't match", formula::FormulaGrammar::CONV_OOO,
aConfig.meStringRefAddressSyntax); aConfig.meStringRefAddressSyntax);
xDocSh = loadDoc("empty-noconf.", XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open 2nd doc", xDocSh.Is());
//set ref syntax to something else than ExcelA1 (native to xlsx format) ...
ScDocument& rDoc2 = xDocSh->GetDocument();
aConfig = rDoc2.GetCalcConfig();
aConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_A1_XL_A1;
rDoc2.SetCalcConfig( aConfig );
ScDocShellRef xNewDocSh = saveAndReload( &(*xDocSh), XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to reload 2nd doc", xNewDocSh.Is());
// ... and make sure it got saved
ScDocument& rDoc3 = xNewDocSh->GetDocument();
aConfig = rDoc3.GetCalcConfig();
CPPUNIT_ASSERT_EQUAL_MESSAGE("String ref syntax doesn't match", formula::FormulaGrammar::CONV_A1_XL_A1,
aConfig.meStringRefAddressSyntax);
xDocSh->DoClose(); xDocSh->DoClose();
xNewDocSh->DoClose();
} }
void ScFiltersTest::testBnc762542() void ScFiltersTest::testBnc762542()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment