summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2010-02-23 00:23:09 +0100
committerChristian Lippka <cl@openoffice.org>2010-02-23 00:23:09 +0100
commit1294294cc6db6560140b3ebc7aed82f77e58dd44 (patch)
tree285b16410ff0606196a254976694d1ca16f5e318 /sd/source/ui/func
parent9a0e6f1451435e0c2223d91dec51e95b1ccb0b35 (diff)
presentation placeholder rework
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fuinsert.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index daae9f37b49f..ce0dc8f67a58 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -368,19 +368,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
if(pPage && pPage->IsPresObj(pPickObj))
{
- bUndo = mpView->IsUndoEnabled();
-
- if( bUndo )
- mpView->BegUndo( SdrUndoNewObj::GetComment(*pOleObj) );
-
- // add new PresObj to the list
+ pPage->InsertPresObj( pOleObj, ePresObjKind );
pOleObj->SetUserCall(pPickObj->GetUserCall());
- if( bUndo )
- {
- mpView->AddUndo( new sd::UndoObjectPresentationKind( *pPickObj ) );
- mpView->AddUndo( new sd::UndoObjectPresentationKind( *pOleObj ) );
- }
- pPage->ReplacePresObj(pPickObj, pOleObj, ePresObjKind);
}
}
@@ -423,11 +412,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
}
}
- if( bUndo )
- {
- mpView->EndUndo();
- }
- else if( pPickObj )
+ if( !mpView->IsUndoEnabled() && pPickObj )
{
// replaced object must be freed if there is no undo action owning it
SdrObject::Free( pPickObj );