summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-04-16 23:44:29 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-04-16 23:50:20 -0400
commitba644a0947a91bba7ccb62fe6e1ae85f0ee30041 (patch)
treee50b14b771d1175c5882f3cca51e7265e939039c
parent6199bd3f73019cc109d385db14596e1ca40300bc (diff)
EditUndoSplitPara
-rw-r--r--editeng/inc/editeng/editeng.hxx2
-rw-r--r--editeng/source/editeng/editeng.cxx5
-rw-r--r--editeng/source/editeng/editundo.cxx18
-rw-r--r--editeng/source/editeng/impedit.hxx1
4 files changed, 16 insertions, 10 deletions
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 5dfddf784467..a239b9f94958 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -562,6 +562,8 @@ public:
void InsertContent(ContentNode* pNode, sal_uInt16 nPos);
EditPaM SplitContent(sal_uInt16 nNode, sal_uInt16 nSepPos);
EditPaM ConnectContents(sal_uInt16 nLeftNode, bool bBackward);
+
+ EditPaM InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
};
#endif // _MyEDITENG_HXX
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