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