summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-02-23 23:36:49 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-02-29 23:37:51 +0100
commitc06dbbe7594c2a0b5a5b19f8e183d9c421e6e094 (patch)
tree276dbc9a2c9589953c79bc45c70a965b99482ec0 /sc/source/ui/undo
parenta6d65732f14e49be8ec61aac53a2a8b909d810f7 (diff)
remove mpNote from ScBaseCell
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undoblk3.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 00f3b6e850fe..3286614bb530 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1210,7 +1210,7 @@ void ScUndoReplace::Undo()
}
else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE)
{
- ScPostIt* pNote = pDoc->GetNote( aCursorPos );
+ ScPostIt* pNote = pDoc->GetNotes( aCursorPos.Tab() )->findByAddress( aCursorPos );
OSL_ENSURE( pNote, "ScUndoReplace::Undo - cell does not contain a note" );
if (pNote)
pNote->SetText( aCursorPos, aUndoStr );
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 114964220a19..a0198bb52c17 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -897,9 +897,9 @@ void ScUndoReplaceNote::DoInsertNote( const ScNoteData& rNoteData )
if( rNoteData.mpCaption )
{
ScDocument& rDoc = *pDocShell->GetDocument();
- OSL_ENSURE( !rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoInsertNote - unexpected cell note" );
+ OSL_ENSURE( !rDoc.GetNotes( maPos.Tab() )->findByAddress(maPos), "ScUndoReplaceNote::DoInsertNote - unexpected cell note" );
ScPostIt* pNote = new ScPostIt( rDoc, maPos, rNoteData, false );
- rDoc.TakeNote( maPos, pNote );
+ rDoc.GetNotes(maPos.Tab())->insert( maPos, pNote );
}
}
@@ -908,8 +908,8 @@ void ScUndoReplaceNote::DoRemoveNote( const ScNoteData& rNoteData )
if( rNoteData.mpCaption )
{
ScDocument& rDoc = *pDocShell->GetDocument();
- OSL_ENSURE( rDoc.GetNote( maPos ), "ScUndoReplaceNote::DoRemoveNote - missing cell note" );
- if( ScPostIt* pNote = rDoc.ReleaseNote( maPos ) )
+ OSL_ENSURE( rDoc.GetNotes( maPos.Tab() )->findByAddress(maPos), "ScUndoReplaceNote::DoRemoveNote - missing cell note" );
+ if( ScPostIt* pNote = rDoc.GetNotes(maPos.Tab())->ReleaseNote( maPos ) )
{
/* Forget pointer to caption object to suppress removing the
caption object from the drawing layer while deleting pNote
@@ -936,7 +936,7 @@ ScUndoShowHideNote::~ScUndoShowHideNote()
void ScUndoShowHideNote::Undo()
{
BeginUndo();
- if( ScPostIt* pNote = pDocShell->GetDocument()->GetNote( maPos ) )
+ if( ScPostIt* pNote = pDocShell->GetDocument()->GetNotes( maPos.Tab() )->findByAddress(maPos) )
pNote->ShowCaption( maPos, !mbShown );
EndUndo();
}
@@ -944,7 +944,7 @@ void ScUndoShowHideNote::Undo()
void ScUndoShowHideNote::Redo()
{
BeginRedo();
- if( ScPostIt* pNote = pDocShell->GetDocument()->GetNote( maPos ) )
+ if( ScPostIt* pNote = pDocShell->GetDocument()->GetNotes( maPos.Tab() )->findByAddress(maPos) )
pNote->ShowCaption( maPos, mbShown );
EndRedo();
}