Kaydet (Commit) 2ba80e59 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Adjusted all test methods for loadDoc.

There was already a method that did the same thing (loadDoc). Let's
stick with loadDoc instead.

Also took advantage of automatic literal to OUString conversion while
I was at it.

Change-Id: I184f6278dd4bf8e3f2f7e5eda1e5e293303df68c
üst 568e489b
...@@ -320,8 +320,7 @@ ScDocShellRef ScFiltersTest::loadDoc(const rtl::OUString& rName, sal_Int32 nForm ...@@ -320,8 +320,7 @@ ScDocShellRef ScFiltersTest::loadDoc(const rtl::OUString& rName, sal_Int32 nForm
void ScFiltersTest::testRangeNameODS() void ScFiltersTest::testRangeNameODS()
{ {
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("named-ranges-global.")); ScDocShellRef xDocSh = loadDoc("named-ranges-global.", ODS);
ScDocShellRef xDocSh = loadDoc(aFileNameBase, 0);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is()); CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is());
...@@ -387,8 +386,7 @@ void testContentImpl(ScDocument* pDoc, sal_Int32 nFormat ) //same code for ods, ...@@ -387,8 +386,7 @@ void testContentImpl(ScDocument* pDoc, sal_Int32 nFormat ) //same code for ods,
void ScFiltersTest::testContentODS() void ScFiltersTest::testContentODS()
{ {
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("universal-content.")); ScDocShellRef xDocSh = loadDoc("universal-content.", ODS);
ScDocShellRef xDocSh = loadDoc(aFileNameBase, ODS);
xDocSh->DoHardRecalc(true); xDocSh->DoHardRecalc(true);
ScDocument* pDoc = xDocSh->GetDocument(); ScDocument* pDoc = xDocSh->GetDocument();
...@@ -398,8 +396,7 @@ void ScFiltersTest::testContentODS() ...@@ -398,8 +396,7 @@ void ScFiltersTest::testContentODS()
void ScFiltersTest::testContentXLS() void ScFiltersTest::testContentXLS()
{ {
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("universal-content.")); ScDocShellRef xDocSh = loadDoc("universal-content.", XLS);
ScDocShellRef xDocSh = loadDoc(aFileNameBase, XLS);
xDocSh->DoHardRecalc(true); xDocSh->DoHardRecalc(true);
ScDocument* pDoc = xDocSh->GetDocument(); ScDocument* pDoc = xDocSh->GetDocument();
...@@ -409,8 +406,7 @@ void ScFiltersTest::testContentXLS() ...@@ -409,8 +406,7 @@ void ScFiltersTest::testContentXLS()
void ScFiltersTest::testContentXLSX() void ScFiltersTest::testContentXLSX()
{ {
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("universal-content.")); ScDocShellRef xDocSh = loadDoc("universal-content.", XLSX);
ScDocShellRef xDocSh = loadDoc(aFileNameBase, XLSX);
xDocSh->DoHardRecalc(true); xDocSh->DoHardRecalc(true);
ScDocument* pDoc = xDocSh->GetDocument(); ScDocument* pDoc = xDocSh->GetDocument();
...@@ -420,8 +416,7 @@ void ScFiltersTest::testContentXLSX() ...@@ -420,8 +416,7 @@ void ScFiltersTest::testContentXLSX()
void ScFiltersTest::testContentLotus123() void ScFiltersTest::testContentLotus123()
{ {
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("universal-content.")); ScDocShellRef xDocSh = loadDoc("universal-content.", LOTUS123);
ScDocShellRef xDocSh = loadDoc(aFileNameBase, LOTUS123);
xDocSh->DoHardRecalc(true); xDocSh->DoHardRecalc(true);
ScDocument* pDoc = xDocSh->GetDocument(); ScDocument* pDoc = xDocSh->GetDocument();
......
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