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