diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-16 23:12:59 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-16 23:50:19 -0400 |
commit | 1ab81c180bdda46434fe470f31450c676265aefd (patch) | |
tree | a88cbb46ef7936d8520bd408593eb98d866be25e /editeng/source | |
parent | c6eceac87b5f904a2ec51b161dd4136bfb8c4e54 (diff) |
same with EditUndoRemoveChars.
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editundo.cxx | 16 | ||||
-rw-r--r-- | 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; |