From 1ab81c180bdda46434fe470f31450c676265aefd Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 16 Apr 2012 23:12:59 -0400 Subject: same with EditUndoRemoveChars. --- editeng/source/editeng/editundo.cxx | 16 ++++++++-------- editeng/source/editeng/impedit.hxx | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index c98ea016aeb3..e2b9d81cc659 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -381,22 +381,22 @@ EditUndoRemoveChars::EditUndoRemoveChars( ImpEditEngine* _pImpEE, const EPaM& rE void EditUndoRemoveChars::Undo() { - DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); - EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); + DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); + EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); EditSelection aSel( aPaM, aPaM ); - GetImpEditEngine()->ImpInsertText( aSel, aText ); + GetEditEngine()->InsertText(aSel, aText); aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.Len(); - GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); + GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel); } void EditUndoRemoveChars::Redo() { - DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" ); - EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); + DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" ); + EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); EditSelection aSel( aPaM, aPaM ); aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.Len(); - EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel ); - GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewPaM ); + EditPaM aNewPaM = GetEditEngine()->DeleteSelection(aSel); + GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aNewPaM); } EditUndoInsertFeature::EditUndoInsertFeature( ImpEditEngine* _pImpEE, const EPaM& rEPaM, const SfxPoolItem& rFeature) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index a74fbef44c70..9f8fb4649f27 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -382,7 +382,6 @@ class ImpEditEngine : public SfxListener, boost::noncopyable { // The Undos have to manipulate directly ( private-Methods ), // do that no new Undo is inserted! - friend class EditUndoRemoveChars; friend class EditUndoDelContent; friend class EditUndoConnectParas; friend class EditUndoSplitPara; -- cgit