diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-12 23:44:59 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-12 23:44:59 -0400 |
commit | 8d74cabd80634187ceaea1f7d8c5b2b59eb21add (patch) | |
tree | befdb7fcdbffac8062f708b6075e374a450e1fd5 /sc | |
parent | 0544af5f11ae71fb9c553bc04aa1dbbd98da440d (diff) |
Let's do hard re-calc only when necessary.
Since doing a hard re-calc can be slow, let's not do this for all
loading test cases, but only when we are testing formula interpretations.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index e1941bdd5939..569ec7d415db 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -192,8 +192,6 @@ ScDocShellRef FiltersTest::load(const rtl::OUString &rFilter, const rtl::OUStrin if (!xDocShRef->DoLoad(&aSrcMed)) // load failed. xDocShRef.Clear(); - else if (nFormat) - xDocShRef->DoHardRecalc(true); return xDocShRef; } @@ -332,6 +330,7 @@ void FiltersTest::testRangeName() rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8); std::cout << aFileFormats[i].pName << " Test" << std::endl; ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType); + xDocSh->DoHardRecalc(true); CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is()); ScDocument* pDoc = xDocSh->GetDocument(); @@ -391,6 +390,7 @@ void FiltersTest::testContent() rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8); std::cout << aFileFormats[i].pName << " Test" << std::endl; ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType); + xDocSh->DoHardRecalc(true); CPPUNIT_ASSERT_MESSAGE("Failed to load universal-content.*", xDocSh.Is()); ScDocument* pDoc = xDocSh->GetDocument(); @@ -408,6 +408,7 @@ void FiltersTest::testFunctions() rtl::OUString aFilterType(aFileFormats[0].pTypeName, strlen(aFileFormats[0].pTypeName), RTL_TEXTENCODING_UTF8); std::cout << aFileFormats[0].pName << " Test" << std::endl; ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[0].nFormatType); + xDocSh->DoHardRecalc(true); CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.Is()); ScDocument* pDoc = xDocSh->GetDocument(); |