diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-16 23:44:29 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-16 23:50:20 -0400 |
commit | ba644a0947a91bba7ccb62fe6e1ae85f0ee30041 (patch) | |
tree | e50b14b771d1175c5882f3cca51e7265e939039c /editeng/source | |
parent | 6199bd3f73019cc109d385db14596e1ca40300bc (diff) |
EditUndoSplitPara
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/editundo.cxx | 18 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 1 |
3 files changed, 14 insertions, 10 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 3d28480048a4..4a1fa612698e 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -782,6 +782,11 @@ EditPaM EditEngine::ConnectContents(sal_uInt16 nLeftNode, bool bBackward) return pImpEditEngine->ConnectContents(nLeftNode, bBackward); } +EditPaM EditEngine::InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem) +{ + return pImpEditEngine->ImpInsertFeature(rEditSelection, rItem); +} + uno::Reference<datatransfer::XTransferable> EditEngine::CreateTransferable(const EditSelection& rSelection) { return pImpEditEngine->CreateTransferable(rSelection); diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index fa5c72fbdd84..9c370d16e23d 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -412,26 +412,26 @@ EditUndoInsertFeature::~EditUndoInsertFeature() void EditUndoInsertFeature::Undo() { - 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 ); // Attributes are then corrected implicitly by the document ... aSel.Max().GetIndex()++; - GetImpEditEngine()->ImpDeleteSelection( aSel ); + GetEditEngine()->DeleteSelection(aSel); aSel.Max().GetIndex()--; // For Selection - GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); + GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel); } void EditUndoInsertFeature::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 ); - GetImpEditEngine()->ImpInsertFeature( aSel, *pFeature ); + GetEditEngine()->InsertFeature(aSel, *pFeature); if ( pFeature->Which() == EE_FEATURE_FIELD ) - GetImpEditEngine()->UpdateFields(); + GetEditEngine()->UpdateFieldsOnly(); aSel.Max().GetIndex()++; - GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); + GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel); } EditUndoMoveParagraphs::EditUndoMoveParagraphs diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 842ba66c2cb4..6e0ebb727d55 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 EditUndoInsertFeature; friend class EditUndoMoveParagraphs; friend class EditEngine; // For access to Imp-Methods |