LibreOffice Module svx (master)  1
svdedtv.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <svx/svdedtv.hxx>
21 #include <svx/svdundo.hxx>
22 #include <svx/svdograf.hxx>
23 #include <svx/svdoole2.hxx>
24 #include <svx/svdoedge.hxx>
25 #include <svx/svdlayer.hxx>
26 #include <svx/svdpagv.hxx>
27 #include <svx/svdpage.hxx>
28 #include <svx/svdpoev.hxx>
29 #include <svx/strings.hrc>
30 #include <svx/dialmgr.hxx>
31 #include <svx/e3dsceneupdater.hxx>
32 #include <rtl/strbuf.hxx>
33 #include <svx/svdview.hxx>
34 #include <clonelist.hxx>
35 #include <svx/svdogrp.hxx>
36 #include <svx/scene3d.hxx>
37 #include <svx/xfillit0.hxx>
38 
39 
40 using namespace com::sun::star;
41 
43 {
44  m_bReadOnly =false;
45 
46  m_bGroupPossible =false;
47  m_bUnGroupPossible =false;
48  m_bGrpEnterPossible =false;
49  m_bToTopPossible =false;
50  m_bToBtmPossible =false;
51  m_bReverseOrderPossible =false;
52 
53  m_bImportMtfPossible =false;
54  m_bCombinePossible =false;
55  m_bDismantlePossible =false;
56  m_bCombineNoPolyPolyPossible =false;
57  m_bDismantleMakeLinesPossible=false;
58  m_bOrthoDesiredOnMarked =false;
59 
60  m_bOneOrMoreMovable =false;
61  m_bMoreThanOneNoMovRot =false;
62  m_bContortionPossible =false;
63  m_bMoveAllowed =false;
64  m_bResizeFreeAllowed =false;
65  m_bResizePropAllowed =false;
66  m_bRotateFreeAllowed =false;
67  m_bRotate90Allowed =false;
68  m_bMirrorFreeAllowed =false;
69  m_bMirror45Allowed =false;
70  m_bMirror90Allowed =false;
71  m_bTransparenceAllowed =false;
72  m_bCropAllowed =false;
73  m_bGradientAllowed =false;
74  m_bShearAllowed =false;
75  m_bEdgeRadiusAllowed =false;
76  m_bCanConvToPath =false;
77  m_bCanConvToPoly =false;
78  m_bCanConvToContour =false;
79  m_bMoveProtect =false;
80  m_bResizeProtect =false;
81 }
82 
84 {
85  ImpResetPossibilityFlags();
86  m_bPossibilitiesDirty=true; // << Purify didn't like this
87 }
88 
90  SdrModel& rSdrModel,
91  OutputDevice* pOut)
92 : SdrMarkView(rSdrModel, pOut)
93 {
94  ImpClearVars();
95 }
96 
98 {
99 }
100 
101 void SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos)
102 {
104  sal_uInt16 nMax=rLA.GetLayerCount();
105  if (nPos>nMax) nPos=nMax;
106  rLA.NewLayer(rName,nPos);
107 
108  if( GetModel()->IsUndoEnabled() )
109  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewLayer(nPos,rLA,*mpModel));
110 
111  mpModel->SetChanged();
112 }
113 
114 bool SdrEditView::ImpDelLayerCheck(SdrObjList const * pOL, SdrLayerID nDelID) const
115 {
116  bool bDelAll(true);
117 
118  for(size_t nObjNum = pOL->GetObjCount(); nObjNum > 0 && bDelAll;)
119  {
120  nObjNum--;
121  SdrObject* pObj = pOL->GetObj(nObjNum);
122  SdrObjList* pSubOL = pObj->GetSubList();
123 
124  // explicitly test for group objects and 3d scenes
125  if(pSubOL && (dynamic_cast<const SdrObjGroup*>(pObj) != nullptr || dynamic_cast< const E3dScene* >(pObj) != nullptr))
126  {
127  if(!ImpDelLayerCheck(pSubOL, nDelID))
128  {
129  bDelAll = false;
130  }
131  }
132  else
133  {
134  if(pObj->GetLayer() != nDelID)
135  {
136  bDelAll = false;
137  }
138  }
139  }
140 
141  return bDelAll;
142 }
143 
145 {
146  const size_t nObjCount(pOL->GetObjCount());
147  // make sure OrdNums are correct
148  pOL->GetObj(0)->GetOrdNum();
149 
150  const bool bUndo = GetModel()->IsUndoEnabled();
151 
152  for(size_t nObjNum = nObjCount; nObjNum > 0;)
153  {
154  nObjNum--;
155  SdrObject* pObj = pOL->GetObj(nObjNum);
156  SdrObjList* pSubOL = pObj->GetSubList();
157 
158 
159  // explicitly test for group objects and 3d scenes
160  if(pSubOL && (dynamic_cast<const SdrObjGroup*>( pObj) != nullptr || dynamic_cast<const E3dScene* >(pObj) != nullptr))
161  {
162  if(ImpDelLayerCheck(pSubOL, nDelID))
163  {
164  if( bUndo )
165  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
166  pOL->RemoveObject(nObjNum);
167 
168  if( !bUndo )
169  SdrObject::Free( pObj );
170  }
171  else
172  {
173  ImpDelLayerDelObjs(pSubOL, nDelID);
174  }
175  }
176  else
177  {
178  if(pObj->GetLayer() == nDelID)
179  {
180  if( bUndo )
181  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
182  pOL->RemoveObject(nObjNum);
183  if( !bUndo )
184  SdrObject::Free( pObj );
185  }
186  }
187  }
188 }
189 
190 void SdrEditView::DeleteLayer(const OUString& rName)
191 {
193  SdrLayer* pLayer = rLA.GetLayer(rName);
194 
195  if(pLayer)
196  {
197  sal_uInt16 nLayerNum(rLA.GetLayerPos(pLayer));
198  SdrLayerID nDelID = pLayer->GetID();
199 
200  const bool bUndo = IsUndoEnabled();
201  if( bUndo )
202  BegUndo(SvxResId(STR_UndoDelLayer));
203 
204  bool bMaPg(true);
205 
206  for(sal_uInt16 nPageKind(0); nPageKind < 2; nPageKind++)
207  {
208  // MasterPages and DrawPages
209  sal_uInt16 nPgCount(bMaPg ? mpModel->GetMasterPageCount() : mpModel->GetPageCount());
210 
211  for(sal_uInt16 nPgNum(0); nPgNum < nPgCount; nPgNum++)
212  {
213  // over all pages
214  SdrPage* pPage = bMaPg ? mpModel->GetMasterPage(nPgNum) : mpModel->GetPage(nPgNum);
215  const size_t nObjCount(pPage->GetObjCount());
216 
217  // make sure OrdNums are correct
218  if(nObjCount)
219  pPage->GetObj(0)->GetOrdNum();
220 
221  for(size_t nObjNum(nObjCount); nObjNum > 0;)
222  {
223  nObjNum--;
224  SdrObject* pObj = pPage->GetObj(nObjNum);
225  SdrObjList* pSubOL = pObj->GetSubList();
226 
227  // explicitly test for group objects and 3d scenes
228  if(pSubOL && (dynamic_cast<const SdrObjGroup*>(pObj) != nullptr || dynamic_cast<const E3dScene* >(pObj) != nullptr))
229  {
230  if(ImpDelLayerCheck(pSubOL, nDelID))
231  {
232  if( bUndo )
233  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
234  pPage->RemoveObject(nObjNum);
235  if( !bUndo )
236  SdrObject::Free(pObj);
237  }
238  else
239  {
240  ImpDelLayerDelObjs(pSubOL, nDelID);
241  }
242  }
243  else
244  {
245  if(pObj->GetLayer() == nDelID)
246  {
247  if( bUndo )
248  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
249  pPage->RemoveObject(nObjNum);
250  if( !bUndo )
251  SdrObject::Free(pObj);
252  }
253  }
254  }
255  }
256  bMaPg = false;
257  }
258 
259  if( bUndo )
260  {
261  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteLayer(nLayerNum, rLA, *mpModel));
262  rLA.RemoveLayer(nLayerNum).release();
263  EndUndo();
264  }
265  else
266  {
267  rLA.RemoveLayer(nLayerNum);
268  }
269 
270  mpModel->SetChanged();
271  }
272 }
273 
274 
276 {
277  // #i13033#
278  // Comparison changed to 1L since EndUndo() is called later now
279  // and EndUndo WILL change count to count-1
280  if(1 == mpModel->GetUndoBracketLevel())
281  {
283  }
284 
285  // #i13033#
286  // moved to bottom to still have access to UNDOs inside of
287  // ImpBroadcastEdgesOfMarkedNodes()
288  mpModel->EndUndo();
289 }
290 
292 {
293  std::vector<SdrObject*>::const_iterator iterPos;
294  const std::vector<SdrObject*>& rAllMarkedObjects = GetTransitiveHullOfMarkedObjects();
295 
296  // #i13033#
297  // New mechanism to search for necessary disconnections for
298  // changed connectors inside the transitive hull of all at
299  // the beginning of UNDO selected objects
300  for(size_t a(0); a < rAllMarkedObjects.size(); a++)
301  {
302  SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( rAllMarkedObjects[a] );
303 
304  if(pEdge)
305  {
306  SdrObject* pObj1 = pEdge->GetConnectedNode(false);
307  SdrObject* pObj2 = pEdge->GetConnectedNode(true);
308 
309  if(pObj1 && !pEdge->CheckNodeConnection(false))
310  {
311  iterPos = std::find(rAllMarkedObjects.begin(),rAllMarkedObjects.end(),pObj1);
312 
313  if (iterPos == rAllMarkedObjects.end())
314  {
315  if( IsUndoEnabled() )
317  pEdge->DisconnectFromNode(false);
318  }
319  }
320 
321  if(pObj2 && !pEdge->CheckNodeConnection(true))
322  {
323  iterPos = std::find(rAllMarkedObjects.begin(),rAllMarkedObjects.end(),pObj2);
324 
325  if (iterPos == rAllMarkedObjects.end())
326  {
327  if( IsUndoEnabled() )
329  pEdge->DisconnectFromNode(true);
330  }
331  }
332  }
333  }
334 
335  const size_t nMarkedEdgeCnt = GetMarkedEdgesOfMarkedNodes().GetMarkCount();
336 
337  for (size_t i=0; i<nMarkedEdgeCnt; ++i) {
339  SdrObject* pEdgeTmp=pEM->GetMarkedSdrObj();
340  SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pEdgeTmp );
341  if (pEdge!=nullptr) {
342  pEdge->SetEdgeTrackDirty();
343  }
344  }
345 }
346 
347 
348 // Possibilities
349 
350 
352 {
355 }
356 
358 {
361 }
362 
363 bool SdrEditView::IsResizeAllowed(bool bProp) const
364 {
366  if (m_bResizeProtect) return false;
367  if (bProp) return m_bResizePropAllowed;
368  return m_bResizeFreeAllowed;
369 }
370 
371 bool SdrEditView::IsRotateAllowed(bool b90Deg) const
372 {
374  if (m_bMoveProtect) return false;
375  if (b90Deg) return m_bRotate90Allowed;
376  return m_bRotateFreeAllowed;
377 }
378 
379 bool SdrEditView::IsMirrorAllowed(bool b45Deg, bool b90Deg) const
380 {
382  if (m_bMoveProtect) return false;
383  if (b90Deg) return m_bMirror90Allowed;
384  if (b45Deg) return m_bMirror45Allowed;
385  return m_bMirrorFreeAllowed;
386 }
387 
389 {
391  return m_bTransparenceAllowed;
392 }
393 
395 {
397  return m_bCropAllowed;
398 }
399 
401 {
403  return m_bGradientAllowed;
404 }
405 
407 {
409  if (m_bResizeProtect) return false;
410  return m_bShearAllowed;
411 }
412 
414 {
416  return m_bEdgeRadiusAllowed;
417 }
418 
419 bool SdrEditView::IsCrookAllowed(bool bNoContortion) const
420 {
421  // CrookMode missing here (no rotations allowed when shearing ...)
423  if (bNoContortion) {
424  if (!m_bRotateFreeAllowed) return false;
425  return !m_bMoveProtect && m_bMoveAllowed;
426  } else {
428  }
429 }
430 
431 bool SdrEditView::IsDistortAllowed(bool bNoContortion) const
432 {
434  if (bNoContortion) {
435  return false;
436  } else {
438  }
439 }
440 
441 bool SdrEditView::IsCombinePossible(bool bNoPolyPoly) const
442 {
444  if (bNoPolyPoly) return m_bCombineNoPolyPolyPossible;
445  else return m_bCombinePossible;
446 }
447 
448 bool SdrEditView::IsDismantlePossible(bool bMakeLines) const
449 {
451  if (bMakeLines) return m_bDismantleMakeLinesPossible;
452  else return m_bDismantlePossible;
453 }
454 
456 {
457  if (mbSomeObjChgdFlag)
458  {
459  m_bPossibilitiesDirty = true;
460 
461  // This call IS necessary to correct the MarkList, in which
462  // no longer to the model belonging objects still can reside.
463  // These ones need to be removed.
464  CheckMarked();
465  }
466 
468  {
471  const size_t nMarkCount = GetMarkedObjectCount();
472  if (nMarkCount != 0)
473  {
474  m_bReverseOrderPossible = (nMarkCount >= 2);
475 
476  size_t nMovableCount=0;
477  m_bGroupPossible=nMarkCount>=2;
478  m_bCombinePossible=nMarkCount>=2;
479  if (nMarkCount==1)
480  {
481  // check bCombinePossible more thoroughly
482  // still missing ...
483  const SdrObject* pObj=GetMarkedObjectByIndex(0);
484  //const SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pObj );
485  bool bGroup=pObj->GetSubList()!=nullptr;
486  bool bHasText=pObj->GetOutlinerParaObject()!=nullptr;
487  if (bGroup || bHasText) {
488  m_bCombinePossible=true;
489  }
490  }
492  // accept transformations for now
493  m_bMoveAllowed =true;
497  m_bRotate90Allowed =true;
499  m_bMirror45Allowed =true;
500  m_bMirror90Allowed =true;
501  m_bShearAllowed =true;
502  m_bEdgeRadiusAllowed=false;
504  m_bCanConvToContour = true;
505 
506  // these ones are only allowed when single object is selected
507  m_bTransparenceAllowed = (nMarkCount == 1);
508  m_bGradientAllowed = (nMarkCount == 1);
509  m_bCropAllowed = (nMarkCount == 1);
511  {
512  // gradient depends on fill style
513  const SdrMark* pM = GetSdrMarkByIndex(0);
514  const SdrObject* pObj = pM->GetMarkedSdrObj();
515 
516  // may be group object, so get merged ItemSet
517  const SfxItemSet& rSet = pObj->GetMergedItemSet();
518  SfxItemState eState = rSet.GetItemState(XATTR_FILLSTYLE, false);
519 
520  if(SfxItemState::DONTCARE != eState)
521  {
522  // If state is not DONTCARE, test the item
523  drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
524 
525  if(eFillStyle != drawing::FillStyle_GRADIENT)
526  {
527  m_bGradientAllowed = false;
528  }
529  }
530  }
531 
532  bool bNoMovRotFound=false;
533  const SdrPageView* pPV0=nullptr;
534 
535  for (size_t nm=0; nm<nMarkCount; ++nm) {
536  const SdrMark* pM=GetSdrMarkByIndex(nm);
537  const SdrObject* pObj=pM->GetMarkedSdrObj();
538  const SdrPageView* pPV=pM->GetPageView();
539  if (pPV!=pPV0) {
540  if (pPV->IsReadOnly()) m_bReadOnly=true;
541  pPV0=pPV;
542  }
543 
545  pObj->TakeObjInfo(aInfo);
546  bool bMovPrt=pObj->IsMoveProtect();
547  bool bSizPrt=pObj->IsResizeProtect();
548  if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // count MovableObjs
549  if (bMovPrt) m_bMoveProtect=true;
550  if (bSizPrt) m_bResizeProtect=true;
551 
552  // not allowed when not allowed at one object
553  if(!aInfo.bTransparenceAllowed)
554  m_bTransparenceAllowed = false;
555 
556  // If one of these can't do something, none can
557  if (!aInfo.bMoveAllowed ) m_bMoveAllowed =false;
558  if (!aInfo.bResizeFreeAllowed) m_bResizeFreeAllowed=false;
559  if (!aInfo.bResizePropAllowed) m_bResizePropAllowed=false;
560  if (!aInfo.bRotateFreeAllowed) m_bRotateFreeAllowed=false;
561  if (!aInfo.bRotate90Allowed ) m_bRotate90Allowed =false;
562  if (!aInfo.bMirrorFreeAllowed) m_bMirrorFreeAllowed=false;
563  if (!aInfo.bMirror45Allowed ) m_bMirror45Allowed =false;
564  if (!aInfo.bMirror90Allowed ) m_bMirror90Allowed =false;
565  if (!aInfo.bShearAllowed ) m_bShearAllowed =false;
567  if (aInfo.bNoContortion ) m_bContortionPossible=false;
568  // For Crook with Contortion: all objects have to be
569  // Movable and Rotatable, except for a maximum of 1 of them
570  if (!m_bMoreThanOneNoMovRot) {
571  if (!aInfo.bMoveAllowed || !aInfo.bResizeFreeAllowed) {
572  m_bMoreThanOneNoMovRot=bNoMovRotFound;
573  bNoMovRotFound=true;
574  }
575  }
576 
577  // Must be resizable to allow cropping
578  if (!aInfo.bResizeFreeAllowed && !aInfo.bResizePropAllowed)
579  m_bCropAllowed = false;
580 
581  // if one member cannot be converted, no conversion is possible
582  if(!aInfo.bCanConvToContour)
583  m_bCanConvToContour = false;
584 
585  // Ungroup
586  if (!m_bUnGroupPossible) m_bUnGroupPossible=pObj->GetSubList()!=nullptr;
587  // ConvertToCurve: If at least one can be converted, that is fine.
588  if (aInfo.bCanConvToPath ) m_bCanConvToPath =true;
589  if (aInfo.bCanConvToPoly ) m_bCanConvToPoly =true;
590 
591  // Combine/Dismantle
593  {
596  }
597 
600  // check OrthoDesiredOnMarked
602  // check ImportMtf
603 
605  {
606  const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
607  if (pSdrGrafObj != nullptr)
608  {
609  if ((pSdrGrafObj->HasGDIMetaFile() && !pSdrGrafObj->IsEPS()) ||
610  pSdrGrafObj->isEmbeddedVectorGraphicData())
611  {
612  m_bImportMtfPossible = true;
613  }
614  }
615 
616  const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
617  if (pSdrOle2Obj)
618  {
619  m_bImportMtfPossible = pSdrOle2Obj->GetObjRef().is();
620  }
621  }
622  }
623 
624  m_bOneOrMoreMovable=nMovableCount!=0;
626  }
628  static_cast<SdrPolyEditView*>(this)->ImpCheckPolyPossibilities();
629  m_bPossibilitiesDirty=false;
630 
631  if (m_bReadOnly) {
632  bool bTemp=m_bGrpEnterPossible;
634  m_bReadOnly=true;
635  m_bGrpEnterPossible=bTemp;
636  }
637  if (m_bMoveAllowed) {
638  // Don't allow moving glued connectors.
639  // Currently only implemented for single selection.
640  if (nMarkCount==1) {
642  SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pObj );
643  if (pEdge!=nullptr) {
644  SdrObject* pNode1=pEdge->GetConnectedNode(true);
645  SdrObject* pNode2=pEdge->GetConnectedNode(false);
646  if (pNode1!=nullptr || pNode2!=nullptr) m_bMoveAllowed=false;
647  }
648  }
649  }
650  }
651 }
652 
653 
655 {
656  bool bFlg=false;
657  for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
658  SdrMark* pM=GetSdrMarkByIndex(nm);
659  SdrObject* pObj=pM->GetMarkedSdrObj();
660  tools::Rectangle aObjRect(pObj->GetCurrentBoundRect());
661  tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect());
662  if (!aObjRect.IsOver(aPgRect)) {
663  bool bFnd=false;
664  SdrPageView* pPV = GetSdrPageView();
665 
666  if(pPV)
667  {
668  bFnd = aObjRect.IsOver(pPV->GetPageRect());
669  }
670 
671  if(bFnd)
672  {
673  pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum());
674  pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE);
675  pM->SetPageView(pPV);
676  InvalidateAllWin(aObjRect);
677  bFlg=true;
678  }
679  }
680  }
681  if (bFlg) {
683  }
684 }
685 
686 std::vector<SdrObject*> SdrEditView::DeleteMarkedList(SdrMarkList const& rMark)
687 {
688  std::vector<SdrObject*> ret;
689  if (rMark.GetMarkCount()!=0)
690  {
691  rMark.ForceSort();
692 
693  const bool bUndo = IsUndoEnabled();
694  if( bUndo )
695  BegUndo();
696  const size_t nMarkCount(rMark.GetMarkCount());
697 
698  if(nMarkCount)
699  {
700  std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
701 
702  if( bUndo )
703  {
704  for(size_t nm = nMarkCount; nm > 0;)
705  {
706  --nm;
707  SdrMark* pM = rMark.GetMark(nm);
708  SdrObject* pObj = pM->GetMarkedSdrObj();
709 
710  // extra undo actions for changed connector which now may hold its laid out path (SJ)
712 
713  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
714  }
715  }
716 
717  // make sure, OrderNums are correct:
718  rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
719 
720  for(size_t nm = nMarkCount; nm > 0;)
721  {
722  --nm;
723  SdrMark* pM = rMark.GetMark(nm);
724  SdrObject* pObj = pM->GetMarkedSdrObj();
726  const size_t nOrdNum(pObj->GetOrdNumDirect());
727 
728  bool bIs3D = dynamic_cast< E3dObject* >(pObj);
729  // set up a scene updater if object is a 3d object
730  if(bIs3D)
731  {
732  aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
733  }
734 
735  pOL->RemoveObject(nOrdNum);
736 
737  if( !bUndo )
738  {
739  // tdf#108863 don't delete objects before EndUndo()
740  ret.push_back(pObj);
741  }
742  }
743 
744  // fire scene updaters
745  while(!aUpdaters.empty())
746  {
747  delete aUpdaters.back();
748  aUpdaters.pop_back();
749  }
750  }
751 
752  if( bUndo )
753  EndUndo();
754  }
755  return ret;
756 }
757 
758 static void lcl_LazyDelete(std::vector<SdrObject*> & rLazyDelete)
759 {
760  // now delete removed scene objects
761  while (!rLazyDelete.empty())
762  {
763  SdrObject::Free( rLazyDelete.back() );
764  rLazyDelete.pop_back();
765  }
766 }
767 
769 {
770  // #i110981# return when nothing is to be done at all
771  if(!GetMarkedObjectCount())
772  {
773  return;
774  }
775 
776  // moved breaking action and undo start outside loop
777  BrkAction();
779 
780  std::vector<SdrObject*> lazyDeleteObjects;
781  // remove as long as something is selected. This allows to schedule objects for
782  // removal for a next run as needed
783  while(GetMarkedObjectCount())
784  {
785  // vector to remember the parents which may be empty after object removal
786  std::vector< SdrObject* > aParents;
787 
788  {
789  const SdrMarkList& rMarkList = GetMarkedObjectList();
790  const size_t nCount(rMarkList.GetMarkCount());
791 
792  for(size_t a = 0; a < nCount; ++a)
793  {
794  // in the first run, add all found parents, but only once
795  SdrMark* pMark(rMarkList.GetMark(a));
796  SdrObject* pObject(pMark->GetMarkedSdrObj());
797  SdrObject* pParent(pObject->getParentSdrObjectFromSdrObject());
798 
799  if(pParent)
800  {
801  if(!aParents.empty())
802  {
803  std::vector< SdrObject* >::iterator aFindResult =
804  std::find(aParents.begin(), aParents.end(), pParent);
805 
806  if(aFindResult == aParents.end())
807  {
808  aParents.push_back(pParent);
809  }
810  }
811  else
812  {
813  aParents.push_back(pParent);
814  }
815  }
816  }
817 
818  if(!aParents.empty())
819  {
820  // in a 2nd run, remove all objects which may already be scheduled for
821  // removal. I am not sure if this can happen, but theoretically
822  // a to-be-removed object may already be the group/3DScene itself
823  for(size_t a = 0; a < nCount; ++a)
824  {
825  SdrMark* pMark = rMarkList.GetMark(a);
826  SdrObject* pObject = pMark->GetMarkedSdrObj();
827 
828  std::vector< SdrObject* >::iterator aFindResult =
829  std::find(aParents.begin(), aParents.end(), pObject);
830 
831  if(aFindResult != aParents.end())
832  {
833  aParents.erase(aFindResult);
834  }
835  }
836  }
837  }
838 
839  // original stuff: remove selected objects. Handle clear will
840  // do something only once
842  for (auto p : temp)
843  {
844  lazyDeleteObjects.push_back(p);
845  }
847  maHdlList.Clear();
848 
849  while(!aParents.empty() && !GetMarkedObjectCount())
850  {
851  // iterate over remembered parents
852  SdrObject* pParent = aParents.back();
853  aParents.pop_back();
854 
855  if(pParent->GetSubList() && 0 == pParent->GetSubList()->GetObjCount())
856  {
857  // we detected an empty parent, a candidate to leave group/3DScene
858  // if entered
860  && GetSdrPageView()->GetCurrentGroup() == pParent)
861  {
863  }
864 
865  // schedule empty parent for removal
867  SdrMark(pParent, GetSdrPageView()));
868  }
869  }
870  }
871 
872  // end undo and change messaging moved at the end
873  EndUndo();
875 
876  lcl_LazyDelete(lazyDeleteObjects);
877 }
878 
880 {
882 
883  SdrMarkList aSourceObjectsForCopy(GetMarkedObjectList());
884  // The following loop is used instead of MarkList::Merge(), to be
885  // able to flag the MarkEntries.
886  const size_t nEdgeCnt = GetEdgesOfMarkedNodes().GetMarkCount();
887  for (size_t nEdgeNum=0; nEdgeNum<nEdgeCnt; ++nEdgeNum) {
888  SdrMark aM(*GetEdgesOfMarkedNodes().GetMark(nEdgeNum));
889  aM.SetUser(1);
890  aSourceObjectsForCopy.InsertEntry(aM);
891  }
892  aSourceObjectsForCopy.ForceSort();
893 
894  // #i13033#
895  // New mechanism to re-create the connections of cloned connectors
896  CloneList aCloneList;
897 
898  const bool bUndo = IsUndoEnabled();
899 
901  size_t nCloneErrCnt=0;
902  std::unordered_set<rtl::OUString> aNameSet;
903  const size_t nMarkCount=aSourceObjectsForCopy.GetMarkCount();
904  for (size_t nm=0; nm<nMarkCount; ++nm) {
905  SdrMark* pM=aSourceObjectsForCopy.GetMark(nm);
906  SdrObject* pSource(pM->GetMarkedSdrObj());
907  SdrObject* pO(pSource->CloneSdrObject(pSource->getSdrModelFromSdrObject()));
908  if (pO!=nullptr) {
909  pM->GetPageView()->GetObjList()->InsertObjectThenMakeNameUnique(pO, aNameSet);
910 
911  if( bUndo )
912  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoCopyObject(*pO));
913 
914  SdrMark aME(*pM);
915  aME.SetMarkedSdrObj(pO);
916  aCloneList.AddPair(pM->GetMarkedSdrObj(), pO);
917 
918  if (pM->GetUser()==0)
919  {
920  // otherwise it is only an Edge we have to copy as well
922  }
923  } else {
924  nCloneErrCnt++;
925  }
926  }
927 
928  // #i13033#
929  // New mechanism to re-create the connections of cloned connectors
930  aCloneList.CopyConnections();
931 
932  if(nCloneErrCnt)
933  {
934 #ifdef DBG_UTIL
935  OStringBuffer aStr("SdrEditView::CopyMarkedObj(): Error when cloning ");
936 
937  if(nCloneErrCnt == 1)
938  {
939  aStr.append("a drawing object.");
940  }
941  else
942  {
943  aStr.append(static_cast<sal_Int32>(nCloneErrCnt));
944  aStr.append(" drawing objects.");
945  }
946 
947  aStr.append(" This object's/These objects's connections will not be copied.");
948  OSL_FAIL(aStr.getStr());
949 #endif
950  }
952 }
953 
954 
956 {
957  if (nOptions & SdrInsertFlags::SETDEFLAYER) {
959  if (nLayer==SDRLAYER_NOTFOUND) nLayer=SdrLayerID(0);
960  if (rPV.GetLockedLayers().IsSet(nLayer) || !rPV.GetVisibleLayers().IsSet(nLayer)) {
961  SdrObject::Free( pObj ); // Layer locked or invisible
962  return false;
963  }
964  pObj->NbcSetLayer(nLayer);
965  }
966  if (nOptions & SdrInsertFlags::SETDEFATTR) {
967  if (mpDefaultStyleSheet!=nullptr) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
969  }
970  if (!pObj->IsInserted()) {
971  rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE);
972  }
973  if( IsUndoEnabled())
974  {
976  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
977  }
978 
979  if (!(nOptions & SdrInsertFlags::DONTMARK)) {
980  if (!(nOptions & SdrInsertFlags::ADDMARK)) UnmarkAllObj();
981  MarkObj(pObj,&rPV);
982  }
983  return true;
984 }
985 
986 void SdrEditView::ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, bool bMark)
987 {
988  if(IsTextEdit())
989  {
990 #ifdef DBG_UTIL
991  if(dynamic_cast< SdrTextObj* >(pOldObj) && static_cast< SdrTextObj* >(pOldObj)->IsTextEditActive())
992  {
993  OSL_ENSURE(false, "OldObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
994  }
995 
996  if(dynamic_cast< SdrTextObj* >(pNewObj) && static_cast< SdrTextObj* >(pNewObj)->IsTextEditActive())
997  {
998  OSL_ENSURE(false, "NewObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
999  }
1000 #endif
1001 
1002  // #i123468# emergency repair situation, needs to cast up to a class derived from
1003  // this one; (aw080 has a mechanism for that and the view hierarchy is secured to
1004  // always be a SdrView)
1005  SdrView *pSdrView = dynamic_cast<SdrView*>(this);
1006  if (pSdrView)
1007  pSdrView->SdrEndTextEdit();
1008  }
1009 
1011  const bool bUndo = IsUndoEnabled();
1012  if( bUndo )
1013  AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoReplaceObject(*pOldObj,*pNewObj));
1014 
1015  if( IsObjMarked( pOldObj ) )
1016  MarkObj( pOldObj, &rPV, true /*unmark!*/ );
1017 
1018  pOL->ReplaceObject(pNewObj,pOldObj->GetOrdNum());
1019 
1020  if( !bUndo )
1021  SdrObject::Free( pOldObj );
1022 
1023  if (bMark) MarkObj(pNewObj,&rPV);
1024 }
1025 
1026 
1028 {
1029  return mpModel->IsUndoEnabled();
1030 }
1031 
1033 {
1034  size_t nViews = mpModel->GetListenerCount();
1035  for (size_t nView = 0; nView < nViews; ++nView)
1036  {
1037  SdrObjEditView* pView = dynamic_cast<SdrObjEditView*>(mpModel->GetListener(nView));
1038  if (!pView)
1039  continue;
1040 
1041  if (pView->IsTextEdit())
1042  pView->SdrEndTextEdit();
1043  }
1044 }
1045 
1046 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void ImpCheckToTopBtmPossible()
Definition: svdedtv2.cxx:485
bool m_bGradientAllowed
Definition: svdedtv.hxx:109
bool m_bDismantleMakeLinesPossible
Definition: svdedtv.hxx:92
bool IsEPS() const
Definition: svdograf.cxx:396
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2342
bool m_bMirror90Allowed
Definition: svdedtv.hxx:104
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:563
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:308
size_t GetMarkCount() const
Definition: svdmark.hxx:180
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:854
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
Definition: svdedxv.cxx:1392
bool m_bMirror45Allowed
Definition: svdedtv.hxx:103
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
Definition: svdoole2.cxx:1812
void SortMarkedObjects() const
Definition: svdmrkv.hxx:259
bool IsEdgeRadiusAllowed() const
Definition: svdedtv.cxx:413
bool IsResizeAllowed(bool bProp=false) const
Definition: svdedtv.cxx:363
bool m_bCanConvToPoly
Definition: svdedtv.hxx:111
static bool ImpCanDismantle(const basegfx::B2DPolyPolygon &rPpolyPpolygon, bool bMakeLines)
Definition: svdedtv2.cxx:1456
bool m_bDismantlePossible
Definition: svdedtv.hxx:90
bool m_bCombinePossible
Definition: svdedtv.hxx:89
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
Definition: svdedtv.cxx:986
bool m_bImportMtfPossible
Definition: svdedtv.hxx:88
bool m_bShearAllowed
Definition: svdedtv.hxx:105
static bool ImpCanConvertForCombine(const SdrObject *pObj)
Definition: svdedtv2.cxx:591
bool IsUndoEnabled() const
Definition: svdedtv.cxx:1027
bool m_bCropAllowed
Definition: svdedtv.hxx:108
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
void ForcePossibilities() const
Definition: svdedtv.hxx:162
bool IsReadOnly() const
PV represents a RefPage or a SubList of a RefObj, or the Model is ReadOnly.
Definition: svdpagv.cxx:156
bool m_bResizeProtect
Definition: svdedtv.hxx:114
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:758
bool IsInserted() const
Definition: svdobj.hxx:793
tools::Rectangle GetPageRect() const
Definition: svdpagv.cxx:187
bool IsTransparenceAllowed() const
Definition: svdedtv.cxx:388
size_t GetObjCount() const
Definition: svdpage.cxx:752
bool IsCropAllowed() const
Definition: svdedtv.cxx:394
void BegUndo()
Definition: svdedtv.hxx:179
void ImpBroadcastEdgesOfMarkedNodes()
Definition: svdedtv.cxx:291
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:229
std::vector< std::unique_ptr< SdrUndoAction > > CreateConnectorUndo(SdrObject &rO)
Definition: svdedtv1.cxx:149
bool m_bMoreThanOneNoMovRot
Definition: svdedtv.hxx:95
const SdrPage * GetMasterPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1930
void Clear()
Definition: svdmark.cxx:200
virtual void BrkAction() override
Definition: svdmrkv.cxx:332
void EndTextEditAllViews() const
Checks if this or other views have an active text edit, if true, end them.
Definition: svdedtv.cxx:1032
static void Free(SdrObject *&_rpObject)
Definition: svdobj.cxx:396
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:343
EmbeddedObjectRef * pObject
bool m_bCombineNoPolyPolyPossible
Definition: svdedtv.hxx:91
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:647
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
Definition: svdedtv.cxx:955
std::vector< SdrObject * > DeleteMarkedList(SdrMarkList const &rMark)
Definition: svdedtv.cxx:686
bool m_bUnGroupPossible
Definition: svdedtv.hxx:83
virtual void MarkListHasChanged()
Definition: svdmrkv.cxx:2482
SdrModel * mpModel
Definition: svdpntv.hxx:126
bool m_bMoveProtect
Definition: svdedtv.hxx:113
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
sal_uInt16 GetLayerPos(const SdrLayer *pLayer) const
Definition: svdlayer.cxx:189
std::unique_ptr< SdrLayer > RemoveLayer(sal_uInt16 nPos)
Definition: svdlayer.cxx:168
bool m_bTransparenceAllowed
Definition: svdedtv.hxx:107
SdrLayerID GetID() const
Definition: svdlayer.hxx:94
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
void LeaveOneGroup()
Leave an object group we entered previously.
Definition: svdpagv.cxx:763
int nCount
virtual void ModelHasChanged() override
Definition: svdedtv.cxx:357
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
Definition: svdobj.cxx:1914
void Clear()
Definition: svdhdl.cxx:2249
bool IsRotateAllowed(bool b90Deg=false) const
Definition: svdedtv.cxx:371
constexpr SdrLayerID SDRLAYER_NOTFOUND(0xff)
bool IsCombinePossible(bool bNoPolyPoly=false) const
Definition: svdedtv.cxx:441
virtual void SetChanged(bool bFlg=true)
Definition: svdmodel.cxx:1261
o3tl::strong_int< sal_uInt8, struct SdrLayerIDTag > SdrLayerID
Definition: svdtypes.hxx:59
void EndUndo()
Definition: svdedtv.cxx:275
bool m_bPossibilitiesDirty
Definition: svdedtv.hxx:80
SdrLayer * GetLayer(sal_uInt16 i)
Definition: svdlayer.hxx:139
sal_uInt32 GetOrdNumDirect() const
Definition: svdobj.hxx:892
SdrObject * GetConnectedNode(bool bTail1) const override
Definition: svdoedge.cxx:472
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:174
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
SVX_DLLPRIVATE void ImpClearVars()
Definition: svdedtv.cxx:83
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:44
SfxStyleSheet * mpDefaultStyleSheet
Definition: svdpntv.hxx:129
sal_uInt16 GetLayerCount() const
Definition: svdlayer.hxx:137
const SdrLayerIDSet & GetVisibleLayers() const
Definition: svdpagv.hxx:215
bool m_bContortionPossible
Definition: svdedtv.hxx:96
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Definition: svdedtv.hxx:183
bool IsShearAllowed() const
Definition: svdedtv.cxx:406
SfxListener * GetListener(size_t nNo) const
void CopyMarkedObj()
Definition: svdedtv.cxx:879
virtual void MarkListHasChanged() override
Definition: svdedtv.cxx:351
sal_uInt16 GetMasterPageCount() const
Definition: svdmodel.cxx:1942
bool m_bCanConvToContour
Definition: svdedtv.hxx:112
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
void SetUser(sal_uInt16 nVal)
Definition: svdmark.hxx:100
uno_Any a
bool m_bGroupPossible
Definition: svdedtv.hxx:82
bool m_bReverseOrderPossible
Definition: svdedtv.hxx:87
bool IsUndoEnabled() const
returns true if undo is currently enabled This returns false if undo was disabled using EnableUndo( f...
Definition: svdmodel.cxx:577
void SetPageView(SdrPageView *pNewPageView)
Definition: svdmark.hxx:75
size_t GetMarkedObjectCount() const
Definition: svdmrkv.hxx:258
OUString const & GetDescriptionOfMarkedObjects() const
Definition: svdmrkv.hxx:261
virtual ~SdrEditView() override
Definition: svdedtv.cxx:97
void DisconnectFromNode(bool bTail1) override
Definition: svdoedge.cxx:463
bool m_bRotate90Allowed
Definition: svdedtv.hxx:101
bool m_bRotateFreeAllowed
Definition: svdedtv.hxx:100
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:252
SdrPageView * GetPageView() const
Definition: svdmark.hxx:70
void InsertNewLayer(const OUString &rName, sal_uInt16 nPos)
Definition: svdedtv.cxx:101
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1904
SdrLayer * NewLayer(const OUString &rName, sal_uInt16 nPos=0xFFFF)
Definition: svdlayer.cxx:176
void CopyConnections() const
Definition: clonelist.cxx:70
sal_uInt32 GetOrdNum() const
The order number (aka ZOrder, aka z-index) determines whether a SdrObject is located above or below a...
Definition: svdobj.cxx:796
bool m_bReadOnly
Definition: svdedtv.hxx:81
const SdrLayerAdmin & GetLayerAdmin() const
changing the layers does not set the modified-flag!
Definition: svdpage.cxx:1624
void ImpDelLayerDelObjs(SdrObjList *pOL, SdrLayerID nDelID)
Definition: svdedtv.cxx:144
const SdrMarkList & GetEdgesOfMarkedNodes() const
Definition: svdmrkv.hxx:267
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:168
OUString maActualLayer
Definition: svdpntv.hxx:131
bool IsResizeProtect() const
Definition: svdobj.hxx:801
void InsertObjectThenMakeNameUnique(SdrObject *pObj)
Definition: svdpage.cxx:317
bool CheckNodeConnection(bool bTail1) const
Definition: svdoedge.cxx:485
sal_uInt16 GetUndoBracketLevel() const
Definition: svdmodel.hxx:485
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:79
bool ImpDelLayerCheck(SdrObjList const *pOL, SdrLayerID nDelID) const
Definition: svdedtv.cxx:114
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual SdrObject * RemoveObject(size_t nObjNum)
Definition: svdpage.cxx:421
SdrUndoFactory & GetSdrUndoFactory() const
returns the models undo factory.
Definition: svdmodel.cxx:1961
SdrInsertFlags
Definition: svdedtv.hxx:58
void DeleteLayer(const OUString &rName)
Definition: svdedtv.cxx:190
bool m_bResizeFreeAllowed
Definition: svdedtv.hxx:98
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:577
virtual std::unique_ptr< SdrUndoAction > CreateUndoGeoObject(SdrObject &rObject)
Definition: svdundo.cxx:1644
void SetMarkedSdrObj(SdrObject *pNewObj)
Definition: svdmark.cxx:87
const SdrMarkList & GetMarkedEdgesOfMarkedNodes() const
Definition: svdmrkv.hxx:268
SdrEditView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdedtv.cxx:89
virtual void CheckPossibilities()
Definition: svdedtv.cxx:455
void EndUndo()
Definition: svdmodel.cxx:483
const SdrLayerIDSet & GetLockedLayers() const
Definition: svdpagv.hxx:219
bool m_bMirrorFreeAllowed
Definition: svdedtv.hxx:102
bool IsSet(SdrLayerID a) const
Definition: svdsob.hxx:66
void ForceMarkedObjToAnotherPage()
Definition: svdedtv.cxx:654
bool m_bMoveAllowed
Definition: svdedtv.hxx:97
void ForceSort() const
Definition: svdmark.cxx:141
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
Definition: svdedtv.cxx:379
SfxItemState
virtual bool IsTextEdit() const final override
Definition: svdedxv.cxx:1656
virtual SdrObject * ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
Replace existing object by different one.
Definition: svdpage.cxx:477
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SdrPage * GetPage() const
Definition: svdpagv.hxx:171
bool m_bEdgeRadiusAllowed
Definition: svdedtv.hxx:106
void DeleteMarkedObj()
Definition: svdedtv.cxx:768
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1889
sal_uInt16 GetUser() const
Definition: svdmark.hxx:105
void InvalidateAllWin()
Definition: svdpntv.cxx:821
bool HasGDIMetaFile() const
Definition: svdograf.cxx:834
bool m_bResizePropAllowed
Definition: svdedtv.hxx:99
void * p
bool IsGradientAllowed() const
Definition: svdedtv.cxx:400
bool m_bCanConvToPath
Definition: svdedtv.hxx:110
void AddUndoActions(std::vector< std::unique_ptr< SdrUndoAction > >)
Definition: svdedtv1.cxx:176
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
Definition: svdmrkv.hxx:257
bool IsCrookAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:419
bool m_bReadOnly
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:304
void SetEdgeTrackDirty()
Definition: svdoedge.hxx:210
Helper for 3d object changes affecting 2d geometry.
const std::vector< SdrObject * > & GetTransitiveHullOfMarkedObjects() const
Definition: svdmrkv.hxx:269
virtual void ModelHasChanged() override
Definition: svdmrkv.cxx:221
SdrHdlList maHdlList
Definition: svdmrkv.hxx:108
SVX_DLLPRIVATE void ImpResetPossibilityFlags()
Definition: svdedtv.cxx:42
size_t GetListenerCount() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1714
bool m_bOrthoDesiredOnMarked
Definition: svdedtv.hxx:93
SdrMark * GetSdrMarkByIndex(size_t nNum) const
Definition: svdmrkv.hxx:256
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:299
static void lcl_LazyDelete(std::vector< SdrObject * > &rLazyDelete)
Definition: svdedtv.cxx:758
virtual void NbcSetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
Definition: svdobj.cxx:2158
const SdrLayerAdmin & GetLayerAdmin() const
Definition: svdmodel.hxx:311
SdrLayerID GetLayerID(const OUString &rName) const
Definition: svdlayer.cxx:228
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
Definition: svdmark.cxx:259
SdrMarkList & GetMarkedObjectListWriteAccess()
Definition: svdmrkv.hxx:248
SdrModel * GetModel() const
Definition: svdpntv.hxx:265
bool isEmbeddedVectorGraphicData() const
Definition: svdograf.cxx:839
SfxItemSet maDefaultAttr
Definition: svdpntv.hxx:143
virtual OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdobj.cxx:1748
aStr
void CheckMarked()
Definition: svdmrkv.cxx:1612
bool IsDismantlePossible(bool bMakeLines=false) const
Definition: svdedtv.cxx:448
sal_uInt16 GetPageCount() const
Definition: svdmodel.cxx:1916
bool IsMoveProtect() const
Definition: svdobj.hxx:799
bool IsDistortAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:431
Utility class SdrEdgeObj.
Definition: svdoedge.hxx:128
bool m_bGrpEnterPossible
Definition: svdedtv.hxx:84
bool m_bOneOrMoreMovable
Definition: svdedtv.hxx:94
virtual void NbcSetLayer(SdrLayerID nLayer)
Definition: svdobj.cxx:594
SdrObject * GetCurrentGroup() const
Return current Group.
Definition: svdpagv.hxx:177
bool IsObjMarked(SdrObject const *pObj) const
Definition: svdmrkv.cxx:1980
void AddPair(const SdrObject *pOriginal, SdrObject *pClone)
Definition: clonelist.cxx:28