diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-02-23 23:36:49 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-02-29 23:37:51 +0100 |
commit | c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094 (patch) | |
tree | 276dbc9a2c9589953c79bc45c70a965b99482ec0 /sc/qa/unit | |
parent | a6d65732f14e49be8ec61aac53a2a8b909d810f7 (diff) |
remove mpNote from ScBaseCell
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index a7d9b6fa04dc..dc70d5e918ce 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -346,7 +346,7 @@ void testContentImpl(ScDocument* pDoc) //same code for ods, xls, xlsx CPPUNIT_ASSERT_MESSAGE("merged cells are not imported", nCol == 5 && nRow == 2); //check notes import ScAddress aAddress(7, 2, 0); - ScPostIt* pNote = pDoc->GetNote(aAddress); + ScPostIt* pNote = pDoc->GetNotes(aAddress.Tab())->findByAddress(aAddress); CPPUNIT_ASSERT_MESSAGE("note not imported", pNote); CPPUNIT_ASSERT_MESSAGE("note text not imported correctly", pNote->GetText() == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Test"))); //add additional checks here diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 89bc980ad9fc..007975804780 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -2898,35 +2898,35 @@ void Test::testPostIts() m_pDoc->InsertTab(0, aTabName); ScAddress rAddr(2, 2, 0); - ScPostIt *pNote = m_pDoc->GetOrCreateNote(rAddr); + ScPostIt *pNote = m_pDoc->GetNotes(rAddr.Tab())->GetOrCreateNote(rAddr); pNote->SetText(rAddr, aHello); pNote->SetAuthor(aJimBob); - ScPostIt *pGetNote = m_pDoc->GetNote(rAddr); + ScPostIt *pGetNote = m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr); CPPUNIT_ASSERT_MESSAGE("note should be itself", pGetNote == pNote ); bool bInsertRow = m_pDoc->InsertRow( 0, 0, 100, 0, 1, 1 ); CPPUNIT_ASSERT_MESSAGE("failed to insert row", bInsertRow ); - CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(rAddr) == NULL); + CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == NULL); rAddr.IncRow(); - CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(rAddr) == pNote); + CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); bool bInsertCol = m_pDoc->InsertCol( 0, 0, 100, 0, 1, 1 ); CPPUNIT_ASSERT_MESSAGE("failed to insert column", bInsertCol ); - CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(rAddr) == NULL); + CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == NULL); rAddr.IncCol(); - CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(rAddr) == pNote); + CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); m_pDoc->InsertTab(0, aTabName2); - CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNote(rAddr) == NULL); + CPPUNIT_ASSERT_MESSAGE("note hasn't moved", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == NULL); rAddr.IncTab(); - CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(rAddr) == pNote); + CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); m_pDoc->DeleteTab(0); rAddr.IncTab(-1); - CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNote(rAddr) == pNote); + CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); m_pDoc->DeleteTab(0); } |