Kaydet (Commit) 3956a848 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

SdrUndoDelObj: one more manual swap out call

This thing seems a good optimization to me, but
it would be good to hide all of this swapping thing
inside GraphicObject class, to make our code more
robust (e.g. no image loss because of missing
manual swap in / swap out call).
Auto swapping mechanism will take care of that, anyway.

Change-Id: I933dafd95597ffff038dc6aeb0a64fcaa3941bd8
üst cf78f9c0
......@@ -301,9 +301,6 @@ public:
class SVX_DLLPUBLIC SdrUndoDelObj : public SdrUndoRemoveObj
{
private:
void TryToFlushGraphicContent();
public:
SdrUndoDelObj(SdrObject& rNewObj, bool bOrdNumDirect = false);
......
......@@ -889,34 +889,10 @@ void SdrUndoInsertObj::Redo()
ImpShowPageOfThisObject();
}
void SdrUndoDelObj::TryToFlushGraphicContent()
{
SdrGrafObj* pSdrGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
if(pSdrGrafObj)
{
sdr::contact::ViewContactOfGraphic* pVC = dynamic_cast< sdr::contact::ViewContactOfGraphic* >(&pSdrGrafObj->GetViewContact());
if(pVC)
{
pVC->flushViewObjectContacts();
pVC->flushGraphicObjects();
}
pSdrGrafObj->ForceSwapOut();
}
}
SdrUndoDelObj::SdrUndoDelObj(SdrObject& rNewObj, bool bOrdNumDirect)
: SdrUndoRemoveObj(rNewObj,bOrdNumDirect)
{
SetOwner(true);
// #i122985# if graphic object is deleted (but goes to undo) flush it's graphic content
// since it is potentially no longer needed
TryToFlushGraphicContent();
}
void SdrUndoDelObj::Undo()
......@@ -931,10 +907,6 @@ void SdrUndoDelObj::Redo()
SdrUndoRemoveObj::Redo();
DBG_ASSERT(!IsOwner(),"RedoDeleteObj: pObj already belongs to UndoAction");
SetOwner(true);
// #i122985# if graphic object is deleted (but goes to undo) flush it's graphic content
// since it is potentially no longer needed
TryToFlushGraphicContent();
}
OUString SdrUndoDelObj::GetComment() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment