Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / sw / source / core / undo / undraw.cxx
blobf725c29fe212e4e86276dd9941c42447d568617d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <UndoDraw.hxx>
23 #include <rtl/string.h>
25 #include <svx/svdogrp.hxx>
26 #include <svx/svdundo.hxx>
27 #include <svx/svdpage.hxx>
28 #include <svx/svdmark.hxx>
30 #include <hintids.hxx>
31 #include <hints.hxx>
32 #include <fmtanchr.hxx>
33 #include <fmtflcnt.hxx>
34 #include <txtflcnt.hxx>
35 #include <frmfmt.hxx>
36 #include <doc.hxx>
37 #include <IDocumentUndoRedo.hxx>
38 #include <docary.hxx>
39 #include <frame.hxx>
40 #include <swundo.hxx> // fuer die UndoIds
41 #include <pam.hxx>
42 #include <ndtxt.hxx>
43 #include <UndoCore.hxx>
44 #include <dcontact.hxx>
45 #include <dview.hxx>
46 #include <rootfrm.hxx>
47 #include <viewsh.hxx>
50 struct SwUndoGroupObjImpl
52 SwDrawFrmFmt* pFmt;
53 SdrObject* pObj;
54 sal_uLong nNodeIdx;
58 // Draw-Objecte
60 IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo )
62 #if OSL_DEBUG_LEVEL > 1
63 sal_uInt16 nId = pUndo->GetId();
64 (void)nId;
65 String sComment( pUndo->GetComment() );
66 #endif
68 if (GetIDocumentUndoRedo().DoesUndo() &&
69 GetIDocumentUndoRedo().DoesDrawUndo())
71 const SdrMarkList* pMarkList = 0;
72 ViewShell* pSh = GetCurrentViewShell();
73 if( pSh && pSh->HasDrawView() )
74 pMarkList = &pSh->GetDrawView()->GetMarkedObjectList();
76 GetIDocumentUndoRedo().AppendUndo( new SwSdrUndo(pUndo, pMarkList) );
78 else
79 delete pUndo;
80 return 0;
83 SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrMarkList* pMrkLst )
84 : SwUndo( UNDO_DRAWUNDO ), pSdrUndo( pUndo )
86 if( pMrkLst && pMrkLst->GetMarkCount() )
87 pMarkList = new SdrMarkList( *pMrkLst );
88 else
89 pMarkList = 0;
92 SwSdrUndo::~SwSdrUndo()
94 delete pSdrUndo;
95 delete pMarkList;
98 void SwSdrUndo::UndoImpl(::sw::UndoRedoContext & rContext)
100 pSdrUndo->Undo();
101 rContext.SetSelections(0, pMarkList);
104 void SwSdrUndo::RedoImpl(::sw::UndoRedoContext & rContext)
106 pSdrUndo->Redo();
107 rContext.SetSelections(0, pMarkList);
110 rtl::OUString SwSdrUndo::GetComment() const
112 return pSdrUndo->GetComment();
115 //--------------------------------------------
117 static void lcl_SendRemoveToUno( SwFmt& rFmt )
119 SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, &rFmt );
120 rFmt.ModifyNotification( &aMsgHint, &aMsgHint );
123 static void lcl_SaveAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
125 const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
126 if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
127 (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
128 (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
129 (FLY_AS_CHAR == rAnchor.GetAnchorId()))
131 rNodePos = rAnchor.GetCntntAnchor()->nNode.GetIndex();
132 xub_StrLen nCntntPos = 0;
134 if (FLY_AS_CHAR == rAnchor.GetAnchorId())
136 nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex();
138 // destroy TextAttribute
139 SwTxtNode *pTxtNd = pFmt->GetDoc()->GetNodes()[ rNodePos ]->GetTxtNode();
140 OSL_ENSURE( pTxtNd, "No text node found!" );
141 SwTxtFlyCnt* pAttr = static_cast<SwTxtFlyCnt*>(
142 pTxtNd->GetTxtAttrForCharAt( nCntntPos, RES_TXTATR_FLYCNT ));
143 // attribute still in text node, delete
144 if( pAttr && pAttr->GetFlyCnt().GetFrmFmt() == pFmt )
146 // just set pointer to 0, don't delete
147 ((SwFmtFlyCnt&)pAttr->GetFlyCnt()).SetFlyFmt();
148 SwIndex aIdx( pTxtNd, nCntntPos );
149 pTxtNd->EraseText( aIdx, 1 );
152 else if (FLY_AT_CHAR == rAnchor.GetAnchorId())
154 nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex();
157 pFmt->SetFmtAttr( SwFmtAnchor( rAnchor.GetAnchorId(), nCntntPos ) );
161 static void lcl_RestoreAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
163 const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
164 if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
165 (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
166 (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
167 (FLY_AS_CHAR == rAnchor.GetAnchorId()))
169 xub_StrLen nCntntPos = rAnchor.GetPageNum();
170 SwNodes& rNds = pFmt->GetDoc()->GetNodes();
172 SwNodeIndex aIdx( rNds, rNodePos );
173 SwPosition aPos( aIdx );
175 SwFmtAnchor aTmp( rAnchor.GetAnchorId() );
176 if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
177 (FLY_AT_CHAR == rAnchor.GetAnchorId()))
179 aPos.nContent.Assign( aIdx.GetNode().GetCntntNode(), nCntntPos );
181 aTmp.SetAnchor( &aPos );
182 pFmt->SetFmtAttr( aTmp );
184 if (FLY_AS_CHAR == rAnchor.GetAnchorId())
186 SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
187 OSL_ENSURE( pTxtNd, "no Text Node" );
188 SwFmtFlyCnt aFmt( pFmt );
189 pTxtNd->InsertItem( aFmt, nCntntPos, nCntntPos );
194 SwUndoDrawGroup::SwUndoDrawGroup( sal_uInt16 nCnt )
195 : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( sal_True )
197 pObjArr = new SwUndoGroupObjImpl[ nSize ];
200 SwUndoDrawGroup::~SwUndoDrawGroup()
202 if( bDelFmt )
204 SwUndoGroupObjImpl* pTmp = pObjArr + 1;
205 for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
206 delete pTmp->pFmt;
208 else
209 delete pObjArr->pFmt;
211 delete [] pObjArr;
214 void SwUndoDrawGroup::UndoImpl(::sw::UndoRedoContext &)
216 bDelFmt = sal_False;
218 // save group object
219 SwDrawFrmFmt* pFmt = pObjArr->pFmt;
220 SwDrawContact* pDrawContact = (SwDrawContact*)pFmt->FindContactObj();
221 SdrObject* pObj = pDrawContact->GetMaster();
222 pObjArr->pObj = pObj;
224 // object will destroy itself
225 pDrawContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
226 pObj->SetUserCall( 0 );
228 ::lcl_SaveAnchor( pFmt, pObjArr->nNodeIdx );
230 // notify UNO objects to decouple
231 ::lcl_SendRemoveToUno( *pFmt );
233 // remove from array
234 SwDoc* pDoc = pFmt->GetDoc();
235 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts();
236 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
238 for( sal_uInt16 n = 1; n < nSize; ++n )
240 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
242 ::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx );
243 rFlyFmts.push_back( rSave.pFmt );
245 pObj = rSave.pObj;
247 SwDrawContact *pContact = new SwDrawContact( rSave.pFmt, pObj );
248 pContact->ConnectToLayout();
249 // #i45718# - follow-up of #i35635# move object to visible layer
250 pContact->MoveObjToVisibleLayer( pObj );
251 // #i45952# - notify that position attributes are already set
252 OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
253 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
254 if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
256 static_cast<SwDrawFrmFmt*>(rSave.pFmt)->PosAttrSet();
261 void SwUndoDrawGroup::RedoImpl(::sw::UndoRedoContext &)
263 bDelFmt = sal_True;
265 // remove from array
266 SwDoc* pDoc = pObjArr->pFmt->GetDoc();
267 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts();
268 SdrObject* pObj;
270 for( sal_uInt16 n = 1; n < nSize; ++n )
272 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
274 pObj = rSave.pObj;
276 SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
278 // object will destroy itself
279 pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
280 pObj->SetUserCall( 0 );
282 ::lcl_SaveAnchor( rSave.pFmt, rSave.nNodeIdx );
284 // notify UNO objects to decouple
285 ::lcl_SendRemoveToUno( *rSave.pFmt );
287 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), rSave.pFmt ));
290 // re-insert group object
291 ::lcl_RestoreAnchor( pObjArr->pFmt, pObjArr->nNodeIdx );
292 rFlyFmts.push_back( pObjArr->pFmt );
294 SwDrawContact *pContact = new SwDrawContact( pObjArr->pFmt, pObjArr->pObj );
295 // #i26791# - correction: connect object to layout
296 pContact->ConnectToLayout();
297 // #i45718# - follow-up of #i35635# move object to visible layer
298 pContact->MoveObjToVisibleLayer( pObjArr->pObj );
299 // #i45952# - notify that position attributes are already set
300 OSL_ENSURE( pObjArr->pFmt->ISA(SwDrawFrmFmt),
301 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
302 if ( pObjArr->pFmt->ISA(SwDrawFrmFmt) )
304 static_cast<SwDrawFrmFmt*>(pObjArr->pFmt)->PosAttrSet();
308 void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj )
310 SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
311 rSave.pObj = pObj;
312 rSave.pFmt = pFmt;
313 ::lcl_SaveAnchor( pFmt, rSave.nNodeIdx );
315 // notify UNO objects to decouple
316 ::lcl_SendRemoveToUno( *pFmt );
318 // remove from array
319 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pFmt->GetDoc()->GetSpzFrmFmts();
320 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
323 void SwUndoDrawGroup::SetGroupFmt( SwDrawFrmFmt* pFmt )
325 pObjArr->pObj = 0;
326 pObjArr->pFmt = pFmt;
330 // ------------------------------
332 SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj )
333 : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( sal_False )
335 nSize = (sal_uInt16)pObj->GetSubList()->GetObjCount() + 1;
336 pObjArr = new SwUndoGroupObjImpl[ nSize ];
338 SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
339 SwDrawFrmFmt* pFmt = (SwDrawFrmFmt*)pContact->GetFmt();
341 pObjArr->pObj = pObj;
342 pObjArr->pFmt = pFmt;
344 // object will destroy itself
345 pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
346 pObj->SetUserCall( 0 );
348 ::lcl_SaveAnchor( pFmt, pObjArr->nNodeIdx );
350 // notify UNO objects to decouple
351 ::lcl_SendRemoveToUno( *pFmt );
353 // remove from array
354 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pFmt->GetDoc()->GetSpzFrmFmts();
355 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
358 SwUndoDrawUnGroup::~SwUndoDrawUnGroup()
360 if( bDelFmt )
362 SwUndoGroupObjImpl* pTmp = pObjArr + 1;
363 for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
364 delete pTmp->pFmt;
366 else
367 delete pObjArr->pFmt;
369 delete [] pObjArr;
372 void SwUndoDrawUnGroup::UndoImpl(::sw::UndoRedoContext & rContext)
374 bDelFmt = sal_True;
376 SwDoc *const pDoc = & rContext.GetDoc();
377 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts();
379 // remove from array
380 for( sal_uInt16 n = 1; n < nSize; ++n )
382 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
384 ::lcl_SaveAnchor( rSave.pFmt, rSave.nNodeIdx );
386 // notify UNO objects to decouple
387 ::lcl_SendRemoveToUno( *rSave.pFmt );
389 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), rSave.pFmt ));
392 // re-insert group object
393 ::lcl_RestoreAnchor( pObjArr->pFmt, pObjArr->nNodeIdx );
394 rFlyFmts.push_back( pObjArr->pFmt );
396 SwDrawContact *pContact = new SwDrawContact( pObjArr->pFmt, pObjArr->pObj );
397 pContact->ConnectToLayout();
398 // #i45718# - follow-up of #i35635# move object to visible layer
399 pContact->MoveObjToVisibleLayer( pObjArr->pObj );
400 // #i45952# - notify that position attributes are already set
401 OSL_ENSURE( pObjArr->pFmt->ISA(SwDrawFrmFmt),
402 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
403 if ( pObjArr->pFmt->ISA(SwDrawFrmFmt) )
405 static_cast<SwDrawFrmFmt*>(pObjArr->pFmt)->PosAttrSet();
409 void SwUndoDrawUnGroup::RedoImpl(::sw::UndoRedoContext &)
411 bDelFmt = sal_False;
413 // save group object
414 SwDrawFrmFmt* pFmt = pObjArr->pFmt;
415 SwDrawContact* pContact = (SwDrawContact*)pFmt->FindContactObj();
417 // object will destroy itself
418 pContact->Changed( *pObjArr->pObj, SDRUSERCALL_DELETE,
419 pObjArr->pObj->GetLastBoundRect() );
420 pObjArr->pObj->SetUserCall( 0 );
422 ::lcl_SaveAnchor( pFmt, pObjArr->nNodeIdx );
424 // notify UNO objects to decouple
425 ::lcl_SendRemoveToUno( *pFmt );
427 // remove from array
428 SwDoc* pDoc = pFmt->GetDoc();
429 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts();
430 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
432 for( sal_uInt16 n = 1; n < nSize; ++n )
434 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
436 ::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx );
437 rFlyFmts.push_back( rSave.pFmt );
439 // #i45952# - notify that position attributes are already set
440 OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
441 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
442 if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
444 static_cast<SwDrawFrmFmt*>(rSave.pFmt)->PosAttrSet();
449 void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt )
451 SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
452 rSave.pFmt = pFmt;
453 rSave.pObj = 0;
456 SwUndoDrawUnGroupConnectToLayout::SwUndoDrawUnGroupConnectToLayout()
457 : SwUndo( UNDO_DRAWUNGROUP )
461 SwUndoDrawUnGroupConnectToLayout::~SwUndoDrawUnGroupConnectToLayout()
465 void
466 SwUndoDrawUnGroupConnectToLayout::UndoImpl(::sw::UndoRedoContext &)
468 for ( std::vector< SdrObject >::size_type i = 0;
469 i < aDrawFmtsAndObjs.size(); ++i )
471 SdrObject* pObj( aDrawFmtsAndObjs[i].second );
472 SwDrawContact* pDrawContact( dynamic_cast<SwDrawContact*>(pObj->GetUserCall()) );
473 OSL_ENSURE( pDrawContact,
474 "<SwUndoDrawUnGroupConnectToLayout::Undo(..)> -- missing SwDrawContact instance" );
475 if ( pDrawContact )
477 // deletion of instance <pDrawContact> and thus disconnection from
478 // the Writer layout.
479 pDrawContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
480 pObj->SetUserCall( 0 );
485 void
486 SwUndoDrawUnGroupConnectToLayout::RedoImpl(::sw::UndoRedoContext &)
488 for ( std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >::size_type i = 0;
489 i < aDrawFmtsAndObjs.size(); ++i )
491 SwDrawFrmFmt* pFmt( aDrawFmtsAndObjs[i].first );
492 SdrObject* pObj( aDrawFmtsAndObjs[i].second );
493 SwDrawContact *pContact = new SwDrawContact( pFmt, pObj );
494 pContact->ConnectToLayout();
495 pContact->MoveObjToVisibleLayer( pObj );
499 void SwUndoDrawUnGroupConnectToLayout::AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
500 SdrObject* pDrawObject )
502 aDrawFmtsAndObjs.push_back(
503 std::pair< SwDrawFrmFmt*, SdrObject* >( pDrawFrmFmt, pDrawObject ) );
506 //-------------------------------------
508 SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt )
509 : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( sal_True )
511 pObjArr = new SwUndoGroupObjImpl[ nSize ];
512 pMarkLst = new SdrMarkList();
515 SwUndoDrawDelete::~SwUndoDrawDelete()
517 if( bDelFmt )
519 SwUndoGroupObjImpl* pTmp = pObjArr;
520 for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
521 delete pTmp->pFmt;
523 delete [] pObjArr;
524 delete pMarkLst;
527 void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
529 bDelFmt = sal_False;
530 SwFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts();
531 for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
533 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
534 ::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx );
535 rFlyFmts.push_back( rSave.pFmt );
536 SdrObject *pObj = rSave.pObj;
537 SwDrawContact *pContact = new SwDrawContact( rSave.pFmt, pObj );
538 pContact->_Changed( *pObj, SDRUSERCALL_INSERTED, NULL );
539 // #i45718# - follow-up of #i35635# move object to visible layer
540 pContact->MoveObjToVisibleLayer( pObj );
541 // #i45952# - notify that position attributes are already set
542 OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
543 "<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
544 if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
546 static_cast<SwDrawFrmFmt*>(rSave.pFmt)->PosAttrSet();
549 rContext.SetSelections(0, pMarkLst);
552 void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext)
554 bDelFmt = sal_True;
555 SwFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts();
556 for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
558 SwUndoGroupObjImpl& rSave = *( pObjArr + n );
559 SdrObject *pObj = rSave.pObj;
560 SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
561 SwDrawFrmFmt *pFmt = (SwDrawFrmFmt*)pContact->GetFmt();
563 // object will destroy itself
564 pContact->Changed( *pObj, SDRUSERCALL_DELETE, pObj->GetLastBoundRect() );
565 pObj->SetUserCall( 0 );
567 // notify UNO objects to decouple
568 ::lcl_SendRemoveToUno( *pFmt );
570 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
571 ::lcl_SaveAnchor( pFmt, rSave.nNodeIdx );
575 void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt,
576 const SdrMark& rMark )
578 SwUndoGroupObjImpl& rSave = *( pObjArr + pMarkLst->GetMarkCount() );
579 rSave.pObj = rMark.GetMarkedSdrObj();
580 rSave.pFmt = pFmt;
581 ::lcl_SaveAnchor( pFmt, rSave.nNodeIdx );
583 // notify UNO objects to decouple
584 ::lcl_SendRemoveToUno( *pFmt );
586 // remove from array
587 SwDoc* pDoc = pFmt->GetDoc();
588 SwFrmFmts& rFlyFmts = *(SwFrmFmts*)pDoc->GetSpzFrmFmts();
589 rFlyFmts.erase( std::find( rFlyFmts.begin(), rFlyFmts.end(), pFmt ));
591 pMarkLst->InsertEntry( rMark );
594 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */