summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-09-28 14:48:59 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-10-15 13:26:10 +0100
commita1077b3cbdb847a452fccd15d9b834bc262cfb62 (patch)
tree68b006b881ac12da5b8faf2151bab0d02db8598d /sc/source/ui/undo
parent8552e5fa1c56bb3ed7c86ef3c4922635e4178ebc (diff)
fdo#47958: gross cut/paste signal emission nonsense
Change-Id: I60b7a4c5b80410429e5489ee6517bbda8cf328dd
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undoblk3.cxx20
-rw-r--r--sc/source/ui/undo/undocell.cxx16
2 files changed, 14 insertions, 22 deletions
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 00ae959cc6c1..785a253bc5bb 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -182,13 +182,11 @@ void ScUndoDeleteContents::Undo()
DoChange( sal_True );
EndUndo();
- // #i97876# Spreadsheet data changes are not notified
- ScModelObj* pModelObj = ScModelObj::getImplementation( pDocShell->GetModel() );
- if ( pModelObj && pModelObj->HasChangesListeners() )
+ ScRangeList aChangeRanges;
+ HelperNotifyChanges aHelperNotifyChanges(&aChangeRanges, "cell-change");
+ if (aHelperNotifyChanges.getMustPropagateChanges())
{
- ScRangeList aChangeRanges;
- aChangeRanges.Append( aRange );
- pModelObj->NotifyChanges( OUString( "cell-change" ), aChangeRanges );
+ aChangeRanges.Append(aRange);
}
}
@@ -198,13 +196,11 @@ void ScUndoDeleteContents::Redo()
DoChange( false );
EndRedo();
- // #i97876# Spreadsheet data changes are not notified
- ScModelObj* pModelObj = ScModelObj::getImplementation( pDocShell->GetModel() );
- if ( pModelObj && pModelObj->HasChangesListeners() )
+ ScRangeList aChangeRanges;
+ HelperNotifyChanges aHelperNotifyChanges(&aChangeRanges, "cell-change");
+ if (aHelperNotifyChanges.getMustPropagateChanges())
{
- ScRangeList aChangeRanges;
- aChangeRanges.Append( aRange );
- pModelObj->NotifyChanges( OUString( "cell-change" ), aChangeRanges );
+ aChangeRanges.Append(aRange);
}
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 24f27a9ef637..710105601dc5 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -260,16 +260,14 @@ void ScUndoEnterData::Undo()
DoChange();
EndUndo();
- // #i97876# Spreadsheet data changes are not notified
- ScModelObj* pModelObj = ScModelObj::getImplementation( pDocShell->GetModel() );
- if ( pModelObj && pModelObj->HasChangesListeners() )
+ ScRangeList aChangeRanges;
+ HelperNotifyChanges aHelperNotifyChanges(&aChangeRanges, "cell-change");
+ if (aHelperNotifyChanges.getMustPropagateChanges())
{
- ScRangeList aChangeRanges;
for (size_t i = 0, n = maOldValues.size(); i < n; ++i)
{
aChangeRanges.Append( ScRange(maPos.Col(), maPos.Row(), maOldValues[i].mnTab));
}
- pModelObj->NotifyChanges( OUString( "cell-change" ), aChangeRanges );
}
}
@@ -299,16 +297,14 @@ void ScUndoEnterData::Redo()
DoChange();
EndRedo();
- // #i97876# Spreadsheet data changes are not notified
- ScModelObj* pModelObj = ScModelObj::getImplementation( pDocShell->GetModel() );
- if ( pModelObj && pModelObj->HasChangesListeners() )
+ ScRangeList aChangeRanges;
+ HelperNotifyChanges aHelperNotifyChanges(&aChangeRanges, "cell-change");
+ if (aHelperNotifyChanges.getMustPropagateChanges())
{
- ScRangeList aChangeRanges;
for (size_t i = 0, n = maOldValues.size(); i < n; ++i)
{
aChangeRanges.Append(ScRange(maPos.Col(), maPos.Row(), maOldValues[i].mnTab));
}
- pModelObj->NotifyChanges( OUString( "cell-change" ), aChangeRanges );
}
}