diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-21 16:38:42 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-23 21:08:23 -0400 |
commit | b99c91456491781556f89b9ad3e9c6150e7de3b2 (patch) | |
tree | ae1a82367c32c3e9c4f544d20bf7a5de1c0ddf1a | |
parent | daaa3026774ba7b21c2b045c185171bb8fd6e551 (diff) |
We have m_pDoc available here in the test...
Change-Id: Ib541cb9f99b3f1094e33d7b333fdbeeeccadce26
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 7563012d0458..824f84a3159d 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4595,9 +4595,8 @@ void Test::testFindAreaPosColRight() // if cells in the sort are referenced by formulas void Test::testSortWithFormulaRefs() { - ScDocument* pDoc = getDocShell().GetDocument(); - pDoc->InsertTab(0, "List1"); - pDoc->InsertTab(1, "List2"); + m_pDoc->InsertTab(0, "List1"); + m_pDoc->InsertTab(1, "List2"); const char* aFormulaData[6] = { "=IF($List1.A2<>\"\",$List1.A2,\"\")", @@ -4615,7 +4614,7 @@ void Test::testSortWithFormulaRefs() "larry", }; - const char* aResults[ 6 ] = { + const char* aResults[6] = { "bob", "brian", "larry", @@ -4626,12 +4625,12 @@ void Test::testSortWithFormulaRefs() // insert data to sort SCROW nStart = 1, nEnd = 4; for ( SCROW i = nStart; i <= nEnd; ++i ) - pDoc->SetString( 0, i, 0, OUString::createFromAscii(aTextData[i-1]) ); + m_pDoc->SetString( 0, i, 0, OUString::createFromAscii(aTextData[i-1]) ); // insert forumulas nStart = 0; nEnd = SAL_N_ELEMENTS(aFormulaData); for ( SCROW i = nStart; i < nEnd; ++i ) - pDoc->SetString( 0, i, 1, OUString::createFromAscii(aFormulaData[i]) ); + m_pDoc->SetString( 0, i, 1, OUString::createFromAscii(aFormulaData[i]) ); ScSortParam aSortData; aSortData.nCol1 = 0; @@ -4641,16 +4640,16 @@ void Test::testSortWithFormulaRefs() aSortData.maKeyState[0].bDoSort = true; aSortData.maKeyState[0].nField = 0; - pDoc->Sort(0, aSortData, false, NULL); + m_pDoc->Sort(0, aSortData, false, NULL); nEnd = SAL_N_ELEMENTS( aResults ); for ( SCROW i = nStart; i < nEnd; ++i ) { - OUString sResult = pDoc->GetString( 0, i + 1, 0); - CPPUNIT_ASSERT_EQUAL( OUString::createFromAscii( aResults[ i ] ), sResult ); + OUString sResult = m_pDoc->GetString(0, i + 1, 0); + CPPUNIT_ASSERT_EQUAL( OUString::createFromAscii( aResults[i] ), sResult ); } - pDoc->DeleteTab(0); - pDoc->DeleteTab(1); + m_pDoc->DeleteTab(1); + m_pDoc->DeleteTab(0); } void Test::testSortWithStrings() |