From 04bc1bd40c57a815cd25c61401c4b710d77edcf8 Mon Sep 17 00:00:00 2001 From: matteocam Date: Mon, 7 Sep 2015 20:01:35 +0200 Subject: chained editeng: Handle chaining for cutting and pasting Change-Id: Iec08e339a7f06c5fa56e67b42206b31c766f845b --- editeng/source/outliner/outlvw.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 4a0d96ea5581..edf617fcc503 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -675,8 +675,12 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) void OutlinerView::Cut() { - if ( !ImpCalcSelectedPages( false ) || pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( !ImpCalcSelectedPages( false ) || pOwner->ImpCanDeleteSelectedPages( this ) ) { pEditView->Cut(); + // Chaining handling + if (aEndCutPasteLink.IsSet()) + aEndCutPasteLink.Call(NULL); + } } void OutlinerView::Paste() @@ -705,6 +709,11 @@ void OutlinerView::PasteSpecial() pEditView->SetEditEngineUpdateMode( true ); pOwner->UndoActionEnd( OLUNDO_INSERT ); pEditView->ShowCursor( true ); + + // Chaining handling + // NOTE: We need to do this last because it pEditView may be deleted if a switch of box occurs + if (aEndCutPasteLink.IsSet()) + aEndCutPasteLink.Call(NULL); } } -- cgit