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>
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
42using namespace com::sun::star;
43
45{
46 m_bReadOnly =false;
47
48 m_bGroupPossible =false;
49 m_bUnGroupPossible =false;
51 m_bToTopPossible =false;
52 m_bToBtmPossible =false;
54
56 m_bCombinePossible =false;
61
65 m_bMoveAllowed =false;
69 m_bRotate90Allowed =false;
71 m_bMirror45Allowed =false;
72 m_bMirror90Allowed =false;
74 m_bCropAllowed =false;
75 m_bGradientAllowed =false;
76 m_bShearAllowed =false;
78 m_bCanConvToPath =false;
79 m_bCanConvToPoly =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
129void 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, GetModel()));
138
140}
141
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 || DynCastE3dScene(pObj)))
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 || DynCastE3dScene(pObj)))
189 {
190 if(ImpDelLayerCheck(pSubOL, nDelID))
191 {
192 if( bUndo )
193 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
194 pOL->RemoveObject(nObjNum);
195 }
196 else
197 {
198 ImpDelLayerDelObjs(pSubOL, nDelID);
199 }
200 }
201 else
202 {
203 if(pObj->GetLayer() == nDelID)
204 {
205 if( bUndo )
206 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
207 pOL->RemoveObject(nObjNum);
208 }
209 }
210 }
211}
212
213void SdrEditView::DeleteLayer(const OUString& rName)
214{
216 SdrLayer* pLayer = rLA.GetLayer(rName);
217
218 if(!pLayer)
219 return;
220
221 sal_uInt16 nLayerNum(rLA.GetLayerPos(pLayer));
222 SdrLayerID nDelID = pLayer->GetID();
223
224 const bool bUndo = IsUndoEnabled();
225 if( bUndo )
226 BegUndo(SvxResId(STR_UndoDelLayer));
227
228 bool bMaPg(true);
229
230 for(sal_uInt16 nPageKind(0); nPageKind < 2; nPageKind++)
231 {
232 // MasterPages and DrawPages
233 sal_uInt16 nPgCount(bMaPg ? GetModel().GetMasterPageCount() : GetModel().GetPageCount());
234
235 for(sal_uInt16 nPgNum(0); nPgNum < nPgCount; nPgNum++)
236 {
237 // over all pages
238 SdrPage* pPage = bMaPg ? GetModel().GetMasterPage(nPgNum) : GetModel().GetPage(nPgNum);
239 const size_t nObjCount(pPage->GetObjCount());
240
241 // make sure OrdNums are correct
242 if(nObjCount)
243 pPage->GetObj(0)->GetOrdNum();
244
245 for(size_t nObjNum(nObjCount); nObjNum > 0;)
246 {
247 nObjNum--;
248 SdrObject* pObj = pPage->GetObj(nObjNum);
249 SdrObjList* pSubOL = pObj->GetSubList();
250
251 // explicitly test for group objects and 3d scenes
252 if(pSubOL && (dynamic_cast<const SdrObjGroup*>(pObj) != nullptr || DynCastE3dScene(pObj)))
253 {
254 if(ImpDelLayerCheck(pSubOL, nDelID))
255 {
256 if( bUndo )
257 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
258 pPage->RemoveObject(nObjNum);
259 }
260 else
261 {
262 ImpDelLayerDelObjs(pSubOL, nDelID);
263 }
264 }
265 else
266 {
267 if(pObj->GetLayer() == nDelID)
268 {
269 if( bUndo )
270 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
271 pPage->RemoveObject(nObjNum);
272 }
273 }
274 }
275 }
276 bMaPg = false;
277 }
278
279 if( bUndo )
280 {
281 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteLayer(nLayerNum, rLA, GetModel()));
282 // coverity[leaked_storage] - ownership transferred to UndoDeleteLayer
283 rLA.RemoveLayer(nLayerNum).release();
284 EndUndo();
285 }
286 else
287 {
288 rLA.RemoveLayer(nLayerNum);
289 }
290
292}
293
294
296{
297 // #i13033#
298 // Comparison changed to 1L since EndUndo() is called later now
299 // and EndUndo WILL change count to count-1
300 if(1 == GetModel().GetUndoBracketLevel())
301 {
303 }
304
305 // #i13033#
306 // moved to bottom to still have access to UNDOs inside of
307 // ImpBroadcastEdgesOfMarkedNodes()
308 GetModel().EndUndo();
309}
310
312{
313 std::vector<SdrObject*>::const_iterator iterPos;
314 const std::vector<SdrObject*>& rAllMarkedObjects = GetTransitiveHullOfMarkedObjects();
315
316 // #i13033#
317 // New mechanism to search for necessary disconnections for
318 // changed connectors inside the transitive hull of all at
319 // the beginning of UNDO selected objects
320 for(size_t a(0); a < rAllMarkedObjects.size(); a++)
321 {
322 SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( rAllMarkedObjects[a] );
323
324 if(pEdge)
325 {
326 SdrObject* pObj1 = pEdge->GetConnectedNode(false);
327 SdrObject* pObj2 = pEdge->GetConnectedNode(true);
328
329 if(pObj1 && !pEdge->CheckNodeConnection(false))
330 {
331 iterPos = std::find(rAllMarkedObjects.begin(),rAllMarkedObjects.end(),pObj1);
332
333 if (iterPos == rAllMarkedObjects.end())
334 {
335 if( IsUndoEnabled() )
336 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
337 pEdge->DisconnectFromNode(false);
338 }
339 }
340
341 if(pObj2 && !pEdge->CheckNodeConnection(true))
342 {
343 iterPos = std::find(rAllMarkedObjects.begin(),rAllMarkedObjects.end(),pObj2);
344
345 if (iterPos == rAllMarkedObjects.end())
346 {
347 if( IsUndoEnabled() )
348 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
349 pEdge->DisconnectFromNode(true);
350 }
351 }
352 }
353 }
354
355 const size_t nMarkedEdgeCnt = GetMarkedEdgesOfMarkedNodes().GetMarkCount();
356
357 for (size_t i=0; i<nMarkedEdgeCnt; ++i) {
359 SdrObject* pEdgeTmp=pEM->GetMarkedSdrObj();
360 SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pEdgeTmp );
361 if (pEdge!=nullptr) {
362 pEdge->SetEdgeTrackDirty();
363 }
364 }
365}
366
367
368// Possibilities
369
370
372{
375}
376
378{
381}
382
383bool SdrEditView::IsResizeAllowed(bool bProp) const
384{
386 if (m_bResizeProtect) return false;
387 if (bProp) return m_bResizePropAllowed;
389}
390
391bool SdrEditView::IsRotateAllowed(bool b90Deg) const
392{
394 if (m_bMoveProtect) return false;
395 if (b90Deg) return m_bRotate90Allowed;
397}
398
399bool SdrEditView::IsMirrorAllowed(bool b45Deg, bool b90Deg) const
400{
402 if (m_bMoveProtect) return false;
403 if (b90Deg) return m_bMirror90Allowed;
404 if (b45Deg) return m_bMirror45Allowed;
406}
407
409{
412}
413
415{
417 return m_bCropAllowed;
418}
419
421{
423 return m_bGradientAllowed;
424}
425
427{
429 if (m_bResizeProtect) return false;
430 return m_bShearAllowed;
431}
432
434{
437}
438
439bool SdrEditView::IsCrookAllowed(bool bNoContortion) const
440{
441 // CrookMode missing here (no rotations allowed when shearing ...)
443 if (bNoContortion) {
444 if (!m_bRotateFreeAllowed) return false;
446 } else {
448 }
449}
450
451bool SdrEditView::IsDistortAllowed(bool bNoContortion) const
452{
454 if (bNoContortion) {
455 return false;
456 } else {
458 }
459}
460
461bool SdrEditView::IsCombinePossible(bool bNoPolyPoly) const
462{
464 if (bNoPolyPoly) return m_bCombineNoPolyPolyPossible;
465 else return m_bCombinePossible;
466}
467
468bool SdrEditView::IsDismantlePossible(bool bMakeLines) const
469{
471 if (bMakeLines) return m_bDismantleMakeLinesPossible;
472 else return m_bDismantlePossible;
473}
474
476{
478 {
480
481 // This call IS necessary to correct the MarkList, in which
482 // no longer to the model belonging objects still can reside.
483 // These ones need to be removed.
484 CheckMarked();
485 }
486
488 return;
489
492 const size_t nMarkCount = GetMarkedObjectCount();
493 if (nMarkCount != 0)
494 {
495 m_bReverseOrderPossible = (nMarkCount >= 2);
496
497 size_t nMovableCount=0;
498 m_bGroupPossible=nMarkCount>=2;
499 m_bCombinePossible=nMarkCount>=2;
500 if (nMarkCount==1)
501 {
502 // check bCombinePossible more thoroughly
503 // still missing ...
504 const SdrObject* pObj=GetMarkedObjectByIndex(0);
505 //const SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pObj );
506 bool bGroup=pObj->GetSubList()!=nullptr;
507 bool bHasText=pObj->GetOutlinerParaObject()!=nullptr;
508 if (bGroup || bHasText) {
510 }
511 }
513 // accept transformations for now
514 m_bMoveAllowed =true;
518 m_bRotate90Allowed =true;
520 m_bMirror45Allowed =true;
521 m_bMirror90Allowed =true;
522 m_bShearAllowed =true;
525 m_bCanConvToContour = true;
526
527 // these ones are only allowed when single object is selected
528 m_bTransparenceAllowed = (nMarkCount == 1);
529 m_bGradientAllowed = (nMarkCount == 1);
530 m_bCropAllowed = (nMarkCount == 1);
532 {
533 // gradient depends on fill style
534 const SdrMark* pM = GetSdrMarkByIndex(0);
535 const SdrObject* pObj = pM->GetMarkedSdrObj();
536
537 // may be group object, so get merged ItemSet
538 const SfxItemSet& rSet = pObj->GetMergedItemSet();
540
541 if(SfxItemState::DONTCARE != eState)
542 {
543 // If state is not DONTCARE, test the item
544 drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
545
546 if(eFillStyle != drawing::FillStyle_GRADIENT)
547 {
548 m_bGradientAllowed = false;
549 }
550 }
551 }
552
553 bool bNoMovRotFound=false;
554 const SdrPageView* pPV0=nullptr;
555
556 for (size_t nm=0; nm<nMarkCount; ++nm) {
557 const SdrMark* pM=GetSdrMarkByIndex(nm);
558 const SdrObject* pObj=pM->GetMarkedSdrObj();
559 const SdrPageView* pPV=pM->GetPageView();
560 if (pPV!=pPV0) {
561 if (pPV->IsReadOnly()) m_bReadOnly=true;
562 pPV0=pPV;
563 }
564
566 pObj->TakeObjInfo(aInfo);
567 bool bMovPrt=pObj->IsMoveProtect();
568 bool bSizPrt=pObj->IsResizeProtect();
569 if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // count MovableObjs
570 if (bMovPrt) m_bMoveProtect=true;
571 if (bSizPrt) m_bResizeProtect=true;
572
573 // not allowed when not allowed at one object
574 if(!aInfo.bTransparenceAllowed)
576
577 // If one of these can't do something, none can
578 if (!aInfo.bMoveAllowed ) m_bMoveAllowed =false;
582 if (!aInfo.bRotate90Allowed ) m_bRotate90Allowed =false;
584 if (!aInfo.bMirror45Allowed ) m_bMirror45Allowed =false;
585 if (!aInfo.bMirror90Allowed ) m_bMirror90Allowed =false;
586 if (!aInfo.bShearAllowed ) m_bShearAllowed =false;
588 if (aInfo.bNoContortion ) m_bContortionPossible=false;
589 // For Crook with Contortion: all objects have to be
590 // Movable and Rotatable, except for a maximum of 1 of them
592 if (!aInfo.bMoveAllowed || !aInfo.bResizeFreeAllowed) {
593 m_bMoreThanOneNoMovRot=bNoMovRotFound;
594 bNoMovRotFound=true;
595 }
596 }
597
598 // Must be resizable to allow cropping
599 if (!aInfo.bResizeFreeAllowed && !aInfo.bResizePropAllowed)
600 m_bCropAllowed = false;
601
602 // if one member cannot be converted, no conversion is possible
603 if(!aInfo.bCanConvToContour)
604 m_bCanConvToContour = false;
605
606 // Ungroup
607 if (!m_bUnGroupPossible) m_bUnGroupPossible=pObj->GetSubList()!=nullptr;
608 // ConvertToCurve: If at least one can be converted, that is fine.
609 if (aInfo.bCanConvToPath ) m_bCanConvToPath =true;
610 if (aInfo.bCanConvToPoly ) m_bCanConvToPoly =true;
611
612 // Combine/Dismantle
614 {
617 }
618
621 // check OrthoDesiredOnMarked
623 // check ImportMtf
624
626 {
627 const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
628 if (pSdrGrafObj != nullptr)
629 {
630 if ((pSdrGrafObj->HasGDIMetaFile() && !pSdrGrafObj->IsEPS()) ||
631 pSdrGrafObj->isEmbeddedVectorGraphicData())
632 {
634 }
635 }
636
637 const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
638 if (pSdrOle2Obj)
639 {
640 m_bImportMtfPossible = pSdrOle2Obj->GetObjRef().is();
641 }
642 }
643 }
644
645 m_bOneOrMoreMovable=nMovableCount!=0;
647 }
649 static_cast<SdrPolyEditView*>(this)->ImpCheckPolyPossibilities();
651
652 if (m_bReadOnly) {
653 bool bTemp=m_bGrpEnterPossible;
655 m_bReadOnly=true;
657 }
658 if (!m_bMoveAllowed) return;
659
660 // Don't allow moving glued connectors.
661 // Currently only implemented for single selection.
662 if (nMarkCount==1) {
664 SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pObj );
665 if (pEdge!=nullptr) {
666 SdrObject* pNode1=pEdge->GetConnectedNode(true);
667 SdrObject* pNode2=pEdge->GetConnectedNode(false);
668 if (pNode1!=nullptr || pNode2!=nullptr) m_bMoveAllowed=false;
669 }
670 }
671
672 // Don't allow enter Diagrams
673 if (1 == nMarkCount && m_bGrpEnterPossible)
674 {
675 SdrObject* pCandidate(GetMarkedObjectByIndex(0));
676
677 if(nullptr != pCandidate && pCandidate->isDiagram())
678 m_bGrpEnterPossible = false;
679 }
680}
681
682
684{
685 bool bFlg=false;
686 for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
688 SdrObject* pObj=pM->GetMarkedSdrObj();
689 tools::Rectangle aObjRect(pObj->GetCurrentBoundRect());
690 tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect());
691 if (!aObjRect.Overlaps(aPgRect)) {
692 bool bFnd=false;
694
695 if(pPV)
696 {
697 bFnd = aObjRect.Overlaps(pPV->GetPageRect());
698 }
699
700 if(bFnd)
701 {
702 pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum());
703 pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE);
704 pM->SetPageView(pPV);
705 InvalidateAllWin(aObjRect);
706 bFlg=true;
707 }
708 }
709 }
710 if (bFlg) {
712 }
713}
714
715std::vector<rtl::Reference<SdrObject>> SdrEditView::DeleteMarkedList(SdrMarkList const& rMark)
716{
717 std::vector<rtl::Reference<SdrObject>> ret;
718 if (rMark.GetMarkCount()!=0)
719 {
720 rMark.ForceSort();
721
722 const bool bUndo = IsUndoEnabled();
723 if( bUndo )
724 BegUndo();
725 const size_t nMarkCount(rMark.GetMarkCount());
726
727 if(nMarkCount)
728 {
729 std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
730
731 if( bUndo )
732 {
733 for(size_t nm = nMarkCount; nm > 0;)
734 {
735 --nm;
736 SdrMark* pM = rMark.GetMark(nm);
737 SdrObject* pObj = pM->GetMarkedSdrObj();
738
739 // extra undo actions for changed connector which now may hold its laid out path (SJ)
741
742 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
743 }
744 }
745
746 // make sure, OrderNums are correct:
747 rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
748
749 for(size_t nm = nMarkCount; nm > 0;)
750 {
751 --nm;
752 SdrMark* pM = rMark.GetMark(nm);
753 SdrObject* pObj = pM->GetMarkedSdrObj();
755 const size_t nOrdNum(pObj->GetOrdNumDirect());
756
757 bool bIs3D = DynCastE3dObject(pObj);
758 // set up a scene updater if object is a 3d object
759 if(bIs3D)
760 {
761 aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
762 }
763
764 if( !bUndo )
765 {
766 // tdf#108863 and tdf#108889 don't delete objects before EndUndo()
767 ret.push_back(pObj);
768 }
769
770 pOL->RemoveObject(nOrdNum);
771 }
772
773 // fire scene updaters
774 while(!aUpdaters.empty())
775 {
776 delete aUpdaters.back();
777 aUpdaters.pop_back();
778 }
779 }
780
781 if( bUndo )
782 EndUndo();
783 }
784 return ret;
785}
786
787static void lcl_LazyDelete(std::vector<rtl::Reference<SdrObject>> & rLazyDelete)
788{
789 // now delete removed scene objects
790 while (!rLazyDelete.empty())
791 rLazyDelete.pop_back();
792}
793
795{
796 // #i110981# return when nothing is to be done at all
798 {
799 return;
800 }
801
802 // moved breaking action and undo start outside loop
803 BrkAction();
805
806 std::vector<rtl::Reference<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));
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);
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 lazyDeleteObjects.insert(lazyDeleteObjects.end(), temp.begin(), temp.end());
871
872 while(!aParents.empty() && !GetMarkedObjectCount())
873 {
874 // iterate over remembered parents
875 SdrObject* pParent = aParents.back();
876 aParents.pop_back();
877
878 if(pParent->GetSubList() && 0 == pParent->GetSubList()->GetObjCount())
879 {
880 // we detected an empty parent, a candidate to leave group/3DScene
881 // if entered
882 if(GetSdrPageView()->GetCurrentGroup()
883 && GetSdrPageView()->GetCurrentGroup() == pParent)
884 {
886 }
887
888 // schedule empty parent for removal
890 SdrMark(pParent, GetSdrPageView()));
891 }
892 }
893 }
894
895 // end undo and change messaging moved at the end
896 EndUndo();
898
899 lcl_LazyDelete(lazyDeleteObjects);
900}
901
903{
905
906 SdrMarkList aSourceObjectsForCopy(GetMarkedObjectList());
907 // The following loop is used instead of MarkList::Merge(), to be
908 // able to flag the MarkEntries.
909 const size_t nEdgeCnt = GetEdgesOfMarkedNodes().GetMarkCount();
910 for (size_t nEdgeNum=0; nEdgeNum<nEdgeCnt; ++nEdgeNum) {
911 SdrMark aM(*GetEdgesOfMarkedNodes().GetMark(nEdgeNum));
912 aM.SetUser(1);
913 aSourceObjectsForCopy.InsertEntry(aM);
914 }
915 aSourceObjectsForCopy.ForceSort();
916
917 // #i13033#
918 // New mechanism to re-create the connections of cloned connectors
919 CloneList aCloneList;
920
921 const bool bUndo = IsUndoEnabled();
922
924 size_t nCloneErrCnt=0;
925 std::unordered_set<rtl::OUString> aNameSet;
926 const size_t nMarkCount=aSourceObjectsForCopy.GetMarkCount();
927 for (size_t nm=0; nm<nMarkCount; ++nm) {
928 SdrMark* pM=aSourceObjectsForCopy.GetMark(nm);
929 SdrObject* pSource(pM->GetMarkedSdrObj());
931 if (pO!=nullptr) {
932 pM->GetPageView()->GetObjList()->InsertObjectThenMakeNameUnique(pO.get(), aNameSet);
933
934 if( bUndo )
935 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoCopyObject(*pO));
936
937 SdrMark aME(*pM);
938 aME.SetMarkedSdrObj(pO.get());
939 aCloneList.AddPair(pM->GetMarkedSdrObj(), pO.get());
940
941 if (pM->GetUser()==0)
942 {
943 // otherwise it is only an Edge we have to copy as well
945 }
946 } else {
947 nCloneErrCnt++;
948 }
949 }
950
951 // #i13033#
952 // New mechanism to re-create the connections of cloned connectors
953 aCloneList.CopyConnections();
954
955 if(nCloneErrCnt)
956 {
957#ifdef DBG_UTIL
958 OStringBuffer aStr("SdrEditView::CopyMarkedObj(): Error when cloning ");
959
960 if(nCloneErrCnt == 1)
961 {
962 aStr.append("a drawing object.");
963 }
964 else
965 {
966 aStr.append(OString::number(static_cast<sal_Int32>(nCloneErrCnt))
967 + " drawing objects.");
968 }
969
970 aStr.append(" This object's/These objects's connections will not be copied.");
971 OSL_FAIL(aStr.getStr());
972#endif
973 }
975}
976
977
979{
980 if (nOptions & SdrInsertFlags::SETDEFLAYER) {
982 if (nLayer==SDRLAYER_NOTFOUND) nLayer=SdrLayerID(0);
983 if (rPV.GetLockedLayers().IsSet(nLayer) || !rPV.GetVisibleLayers().IsSet(nLayer)) {
984 return false;
985 }
986 pObj->NbcSetLayer(nLayer);
987 }
988 if (nOptions & SdrInsertFlags::SETDEFATTR) {
989 if (mpDefaultStyleSheet!=nullptr) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
991 }
992 if (!pObj->IsInserted()) {
993 rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE);
994 }
995 if( IsUndoEnabled())
996 {
997 bool bDontDeleteReally = true;
998 EndTextEditCurrentView(bDontDeleteReally);
999 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pObj));
1000 }
1001
1002 css::uno::Reference<lang::XServiceInfo> xServices(GetModel().getUnoModel(),
1003 css::uno::UNO_QUERY);
1004 if (xServices.is() && (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") ||
1005 xServices->supportsService("com.sun.star.text.TextDocument")))
1006 {
1007 const bool bUndo(IsUndoEnabled());
1008 GetModel().EnableUndo(false);
1009 pObj->MakeNameUnique();
1010 GetModel().EnableUndo(bUndo);
1011 }
1012
1013 if (!(nOptions & SdrInsertFlags::DONTMARK)) {
1014 if (!(nOptions & SdrInsertFlags::ADDMARK)) UnmarkAllObj();
1015 MarkObj(pObj,&rPV);
1016 }
1017 return true;
1018}
1019
1020void SdrEditView::ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, bool bMark)
1021{
1022 if(IsTextEdit())
1023 {
1024#ifdef DBG_UTIL
1025 if(auto pTextObj = DynCastSdrTextObj(pOldObj))
1026 if (pTextObj->IsTextEditActive())
1027 OSL_ENSURE(false, "OldObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
1028
1029 if(auto pTextObj = DynCastSdrTextObj(pNewObj))
1030 if (pTextObj->IsTextEditActive())
1031 OSL_ENSURE(false, "NewObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
1032#endif
1033
1034 // #i123468# emergency repair situation, needs to cast up to a class derived from
1035 // this one; (aw080 has a mechanism for that and the view hierarchy is secured to
1036 // always be a SdrView)
1037 SdrView *pSdrView = dynamic_cast<SdrView*>(this);
1038 if (pSdrView)
1039 pSdrView->SdrEndTextEdit();
1040 }
1041
1043 const bool bUndo = IsUndoEnabled();
1044 if( bUndo )
1045 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoReplaceObject(*pOldObj,*pNewObj));
1046
1047 if( IsObjMarked( pOldObj ) )
1048 MarkObj( pOldObj, &rPV, true /*unmark!*/ );
1049
1050 pOL->ReplaceObject(pNewObj,pOldObj->GetOrdNum());
1051
1052 if (bMark) MarkObj(pNewObj,&rPV);
1053}
1054
1055
1057{
1058 return GetModel().IsUndoEnabled();
1059}
1060
1062{
1064 [](SfxListener* pListener)
1065 {
1066 SdrObjEditView* pView = dynamic_cast<SdrObjEditView*>(pListener);
1067 if (pView && pView->IsTextEdit())
1068 pView->SdrEndTextEdit();
1069 return false;
1070 });
1071}
1072
1073void SdrEditView::EndTextEditCurrentView(bool bDontDeleteReally)
1074{
1075 if (IsTextEdit())
1076 {
1077 SdrView* pSdrView = dynamic_cast<SdrView*>(this);
1078 if (pSdrView)
1079 pSdrView->SdrEndTextEdit(bDontDeleteReally);
1080 }
1081}
1082
1083/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AddPair(const SdrObject *pOriginal, SdrObject *pClone)
Definition: clonelist.cxx:28
void CopyConnections() const
Definition: clonelist.cxx:70
Helper for 3d object changes affecting 2d geometry.
Utility class SdrEdgeObj.
Definition: svdoedge.hxx:130
void DisconnectFromNode(bool bTail1) override
Definition: svdoedge.cxx:486
SdrObject * GetConnectedNode(bool bTail1) const override
Definition: svdoedge.cxx:495
void SetEdgeTrackDirty()
Definition: svdoedge.hxx:212
bool CheckNodeConnection(bool bTail1) const
Definition: svdoedge.cxx:508
virtual void CheckPossibilities()
Definition: svdedtv.cxx:475
bool IsEdgeRadiusAllowed() const
Definition: svdedtv.cxx:433
bool m_bContortionPossible
Definition: svdedtv.hxx:96
bool m_bGroupPossible
Definition: svdedtv.hxx:82
bool m_bToTopPossible
Definition: svdedtv.hxx:85
static bool ImpCanDismantle(const basegfx::B2DPolyPolygon &rPpolyPpolygon, bool bMakeLines)
Definition: svdedtv2.cxx:1463
bool IsResizeAllowed(bool bProp=false) const
Definition: svdedtv.cxx:383
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
Definition: svdedtv.cxx:1020
bool IsUndoEnabled() const
Definition: svdedtv.cxx:1056
void ImpDelLayerDelObjs(SdrObjList *pOL, SdrLayerID nDelID)
Definition: svdedtv.cxx:172
bool m_bResizeProtect
Definition: svdedtv.hxx:114
virtual void MarkListHasChanged() override
Definition: svdedtv.cxx:371
bool m_bCanConvToContour
Definition: svdedtv.hxx:112
bool m_bDismantleMakeLinesPossible
Definition: svdedtv.hxx:92
void ForceMarkedObjToAnotherPage()
Definition: svdedtv.cxx:683
bool m_bShearAllowed
Definition: svdedtv.hxx:105
bool m_bMoreThanOneNoMovRot
Definition: svdedtv.hxx:95
bool m_bCanConvToPath
Definition: svdedtv.hxx:110
bool m_bMoveAllowed
Definition: svdedtv.hxx:97
virtual ~SdrEditView() override
Definition: svdedtv.cxx:125
bool m_bMirror45Allowed
Definition: svdedtv.hxx:103
std::vector< rtl::Reference< SdrObject > > DeleteMarkedList(SdrMarkList const &rMark)
Definition: svdedtv.cxx:715
bool IsTransparenceAllowed() const
Definition: svdedtv.cxx:408
bool IsDismantlePossible(bool bMakeLines=false) const
Definition: svdedtv.cxx:468
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Definition: svdedtv.hxx:196
void BegUndo()
Definition: svdedtv.hxx:178
bool m_bCombineNoPolyPolyPossible
Definition: svdedtv.hxx:91
bool IsDistortAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:451
void EndTextEditCurrentView(bool bDontDeleteReally=false)
Definition: svdedtv.cxx:1073
bool IsCrookAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:439
bool IsGradientAllowed() const
Definition: svdedtv.cxx:420
std::vector< std::unique_ptr< SdrUndoAction > > CreateConnectorUndo(const SdrObject &rO)
Definition: svdedtv1.cxx:150
bool m_bImportMtfPossible
Definition: svdedtv.hxx:88
SVX_DLLPRIVATE void ImpResetPossibilityFlags()
Definition: svdedtv.cxx:44
bool IsCombinePossible(bool bNoPolyPoly=false) const
Definition: svdedtv.cxx:461
void ForcePossibilities() const
Definition: svdedtv.hxx:161
bool m_bMirrorFreeAllowed
Definition: svdedtv.hxx:102
void CopyMarkedObj()
Definition: svdedtv.cxx:902
SdrEditView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdedtv.cxx:85
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
Definition: svdedtv.cxx:978
virtual void ModelHasChanged() override
Definition: svdedtv.cxx:377
void DeleteMarkedObj()
Definition: svdedtv.cxx:794
void AddUndoActions(std::vector< std::unique_ptr< SdrUndoAction > >)
Definition: svdedtv1.cxx:177
bool m_bGrpEnterPossible
Definition: svdedtv.hxx:84
bool IsCropAllowed() const
Definition: svdedtv.cxx:414
void InsertNewLayer(const OUString &rName, sal_uInt16 nPos)
Definition: svdedtv.cxx:129
bool IsShearAllowed() const
Definition: svdedtv.cxx:426
bool m_bUnGroupPossible
Definition: svdedtv.hxx:83
bool m_bToBtmPossible
Definition: svdedtv.hxx:86
bool m_bOrthoDesiredOnMarked
Definition: svdedtv.hxx:93
bool m_bCombinePossible
Definition: svdedtv.hxx:89
bool m_bMirror90Allowed
Definition: svdedtv.hxx:104
void ImpCheckToTopBtmPossible()
Definition: svdedtv2.cxx:487
bool IsRotateAllowed(bool b90Deg=false) const
Definition: svdedtv.cxx:391
bool m_bRotate90Allowed
Definition: svdedtv.hxx:101
bool m_bResizeFreeAllowed
Definition: svdedtv.hxx:98
bool m_bRotateFreeAllowed
Definition: svdedtv.hxx:100
void DeleteLayer(const OUString &rName)
Definition: svdedtv.cxx:213
bool m_bResizePropAllowed
Definition: svdedtv.hxx:99
static bool ImpCanConvertForCombine(const SdrObject *pObj)
Definition: svdedtv2.cxx:592
bool m_bGradientAllowed
Definition: svdedtv.hxx:109
bool m_bReverseOrderPossible
Definition: svdedtv.hxx:87
bool m_bEdgeRadiusAllowed
Definition: svdedtv.hxx:106
void EndTextEditAllViews() const
Checks if this or other views have an active text edit, if true, end them.
Definition: svdedtv.cxx:1061
bool m_bPossibilitiesDirty
Definition: svdedtv.hxx:80
bool m_bReadOnly
Definition: svdedtv.hxx:81
void ImpBroadcastEdgesOfMarkedNodes()
Definition: svdedtv.cxx:311
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
Definition: svdedtv.cxx:399
bool m_bDismantlePossible
Definition: svdedtv.hxx:90
bool m_bCropAllowed
Definition: svdedtv.hxx:108
bool m_bTransparenceAllowed
Definition: svdedtv.hxx:107
bool ImpDelLayerCheck(SdrObjList const *pOL, SdrLayerID nDelID) const
Definition: svdedtv.cxx:142
bool m_bOneOrMoreMovable
Definition: svdedtv.hxx:94
bool m_bMoveProtect
Definition: svdedtv.hxx:113
void EndUndo()
Definition: svdedtv.cxx:295
bool m_bCanConvToPoly
Definition: svdedtv.hxx:111
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:68
bool IsEPS() const
Definition: svdograf.cxx:443
bool HasGDIMetaFile() const
Definition: svdograf.cxx:844
bool isEmbeddedVectorGraphicData() const
Definition: svdograf.cxx:849
void Clear()
Definition: svdhdl.cxx:2247
std::unique_ptr< SdrLayer > RemoveLayer(sal_uInt16 nPos)
Definition: svdlayer.cxx:171
SdrLayer * NewLayer(const OUString &rName, sal_uInt16 nPos=0xFFFF)
Definition: svdlayer.cxx:179
sal_uInt16 GetLayerCount() const
Definition: svdlayer.hxx:135
SdrLayerID GetLayerID(const OUString &rName) const
Definition: svdlayer.cxx:231
SdrLayer * GetLayer(sal_uInt16 i)
Definition: svdlayer.hxx:137
sal_uInt16 GetLayerPos(const SdrLayer *pLayer) const
Definition: svdlayer.cxx:192
bool IsSet(SdrLayerID a) const
Definition: svdsob.hxx:69
SdrLayerID GetID() const
Definition: svdlayer.hxx:94
void ForceSort() const
Definition: svdmark.cxx:142
size_t GetMarkCount() const
Definition: svdmark.hxx:178
void Clear()
Definition: svdmark.cxx:201
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
Definition: svdmark.cxx:260
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:230
const SdrMarkList & GetMarkedEdgesOfMarkedNodes() const
Definition: svdmrkv.hxx:274
const SdrMarkList & GetEdgesOfMarkedNodes() const
Definition: svdmrkv.hxx:273
bool IsObjMarked(SdrObject const *pObj) const
Definition: svdmrkv.cxx:2208
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:258
void SortMarkedObjects() const
Definition: svdmrkv.hxx:265
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
Definition: svdmrkv.hxx:263
SdrHdlList maHdlList
Definition: svdmrkv.hxx:107
SdrMarkList & GetMarkedObjectListWriteAccess()
Definition: svdmrkv.hxx:254
size_t GetMarkedObjectCount() const
Definition: svdmrkv.hxx:264
void CheckMarked()
Definition: svdmrkv.cxx:1839
SdrMark * GetSdrMarkByIndex(size_t nNum) const
Definition: svdmrkv.hxx:262
virtual void ModelHasChanged() override
Definition: svdmrkv.cxx:214
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2567
OUString const & GetDescriptionOfMarkedObjects() const
Definition: svdmrkv.hxx:267
virtual void BrkAction() override
Definition: svdmrkv.cxx:339
virtual void MarkListHasChanged()
Definition: svdmrkv.cxx:2708
const std::vector< SdrObject * > & GetTransitiveHullOfMarkedObjects() const
Definition: svdmrkv.hxx:275
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1941
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:45
void SetUser(sal_uInt16 nVal)
Definition: svdmark.hxx:100
SdrPageView * GetPageView() const
Definition: svdmark.hxx:70
void SetMarkedSdrObj(SdrObject *pNewObj)
Definition: svdmark.cxx:88
sal_uInt16 GetUser() const
Definition: svdmark.hxx:105
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
void SetPageView(SdrPageView *pNewPageView)
Definition: svdmark.hxx:75
virtual void SetChanged(bool bFlg=true)
Definition: svdmodel.cxx:1143
const SdrPage * GetMasterPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1884
void EnableUndo(bool bEnable)
enables (true) or disables (false) recording of undo actions If undo actions are added while undo is ...
Definition: svdmodel.cxx:535
bool IsUndoEnabled() const
returns true if undo is currently enabled This returns false if undo was disabled using EnableUndo( f...
Definition: svdmodel.cxx:547
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1860
const SdrLayerAdmin & GetLayerAdmin() const
Definition: svdmodel.hxx:315
void EndUndo()
Definition: svdmodel.cxx:453
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
Definition: svdedxv.cxx:1565
virtual bool IsTextEdit() const final override
Definition: svdedxv.cxx:1833
void InsertObjectThenMakeNameUnique(SdrObject *pObj)
Definition: svdpage.cxx:269
virtual rtl::Reference< SdrObject > ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
Replace existing object by different one.
Definition: svdpage.cxx:429
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:295
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:785
size_t GetObjCount() const
Definition: svdpage.cxx:779
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
Definition: svdpage.cxx:373
Provides information about various ZObject properties.
Definition: svdobj.hxx:196
Abstract DrawObject.
Definition: svdobj.hxx:260
sal_uInt32 GetOrdNumDirect() const
Definition: svdobj.hxx:844
bool IsResizeProtect() const
Definition: svdobj.hxx:758
virtual void NbcSetLayer(SdrLayerID nLayer)
Definition: svdobj.cxx:664
void MakeNameUnique()
Definition: svdobj.cxx:3093
bool isDiagram() const
Definition: svdobj.hxx:264
bool IsMoveProtect() const
Definition: svdobj.hxx:756
virtual OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdobj.cxx:1833
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:905
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:717
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
Definition: svdobj.cxx:1999
void NbcSetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
Definition: svdobj.cxx:2262
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:962
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:318
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:289
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const =0
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1974
bool IsInserted() const
Definition: svdobj.hxx:750
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:645
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:631
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
Definition: svdoole2.cxx:1856
const SdrLayerIDSet & GetVisibleLayers() const
Definition: svdpagv.hxx:210
tools::Rectangle GetPageRect() const
Definition: svdpagv.cxx:189
bool IsReadOnly() const
PV represents a RefPage or a SubList of a RefObj, or the Model is ReadOnly.
Definition: svdpagv.cxx:158
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:169
const SdrLayerIDSet & GetLockedLayers() const
Definition: svdpagv.hxx:214
SdrPage * GetPage() const
Definition: svdpagv.hxx:166
void LeaveOneGroup()
Leave an object group we entered previously.
Definition: svdpagv.cxx:778
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:379
const SdrLayerAdmin & GetLayerAdmin() const
changing the layers does not set the modified-flag!
Definition: svdpage.cxx:1726
void InvalidateAllWin()
Definition: svdpntv.cxx:824
SfxItemSet maDefaultAttr
Definition: svdpntv.hxx:141
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:299
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:163
SfxStyleSheet * mpDefaultStyleSheet
Definition: svdpntv.hxx:127
OUString maActualLayer
Definition: svdpntv.hxx:129
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:323
SdrModel & GetModel() const
Definition: svdpntv.hxx:282
void ForAllListeners(std::function< bool(SfxListener *)> f) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool Overlaps(const tools::Rectangle &rRect) const
int nCount
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
EmbeddedObjectRef * pObject
bool m_bReadOnly
uno_Any a
sal_uInt16 nPos
aStr
int i
SfxItemState
static SfxItemSet & rSet
static void lcl_LazyDelete(std::vector< rtl::Reference< SdrObject > > &rLazyDelete)
Definition: svdedtv.cxx:787
SdrInsertFlags
Definition: svdedtv.hxx:59
E3dObject * DynCastE3dObject(SdrObject *pObj)
Definition: svdobj.cxx:3205
SdrTextObj * DynCastSdrTextObj(SdrObject *pObj)
Definition: svdobj.cxx:3212
E3dScene * DynCastE3dScene(SdrObject *pObj)
Definition: svdobj.cxx:3198
o3tl::strong_int< sal_Int16, struct SdrLayerIDTag > SdrLayerID
Definition: svdtypes.hxx:56
constexpr SdrLayerID SDRLAYER_NOTFOUND(-1)
oslFileHandle & pOut
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)