LibreOffice Module svx (master)  1
svdpage.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 <memory>
21 #include <cassert>
22 #include <unordered_set>
23 
24 #include <svx/svdpage.hxx>
25 
26 #include <sot/storage.hxx>
27 #include <comphelper/classids.hxx>
28 #include <svx/svdview.hxx>
29 #include <string.h>
30 #include <vcl/svapp.hxx>
31 
32 #include <tools/debug.hxx>
33 #include <tools/diagnose_ex.h>
34 #include <tools/helpers.hxx>
35 
36 #include <svx/svdetc.hxx>
37 #include <svx/svdobj.hxx>
38 #include <svx/svdogrp.hxx>
39 #include <svx/svdograf.hxx>
40 #include <svx/svdoedge.hxx>
41 #include <svx/svdoole2.hxx>
42 #include <svx/svditer.hxx>
43 #include <svx/svdmodel.hxx>
44 #include <svx/svdlayer.hxx>
45 #include <svx/svdotext.hxx>
46 #include <svx/svdpagv.hxx>
47 #include <svx/svdundo.hxx>
48 #include <svx/fmglob.hxx>
49 #include <svx/xfillit0.hxx>
50 #include <svx/fmdpage.hxx>
51 
52 #include <sfx2/objsh.hxx>
56 #include <algorithm>
57 #include <svl/hint.hxx>
58 #include <rtl/strbuf.hxx>
59 #include <libxml/xmlwriter.h>
60 
61 #include <com/sun/star/lang/IllegalArgumentException.hpp>
62 
63 using namespace ::com::sun::star;
64 
66  : public ::std::vector<tools::WeakReference<SdrObject>>
67 {
68 public:
69  explicit WeakSdrObjectContainerType (const sal_Int32 nInitialSize)
70  : ::std::vector<tools::WeakReference<SdrObject>>(nInitialSize) {};
71 };
72 
73 static const sal_Int32 InitialObjectContainerCapacity (64);
74 
76 // helper to allow changing parent at SdrObject, but only from SdrObjList
77 
79 {
80  rSdrObject.setParentOfSdrObject(pNew);
81 }
82 
84 
86 : maList(),
87  maSdrObjListOutRect(),
88  maSdrObjListSnapRect(),
89  mbObjOrdNumsDirty(false),
90  mbRectsDirty(false),
91  mxNavigationOrder(),
92  mbIsNavigationOrderDirty(false)
93 {
95 }
96 
97 void SdrObjList::impClearSdrObjList(bool bBroadcast)
98 {
99  SdrModel* pSdrModelFromRemovedSdrObject(nullptr);
100 
101  while(!maList.empty())
102  {
103  // remove last object from list
104  SdrObject* pObj(maList.back());
106 
107  // flushViewObjectContacts() is done since SdrObject::Free is not guaranteed
108  // to delete the object and thus refresh visualisations
109  pObj->GetViewContact().flushViewObjectContacts();
110 
111  if(bBroadcast)
112  {
113  if(nullptr == pSdrModelFromRemovedSdrObject)
114  {
115  pSdrModelFromRemovedSdrObject = &pObj->getSdrModelFromSdrObject();
116  }
117 
118  // sent remove hint (after removal, see RemoveObject())
119  // TTTT SdrPage not needed, can be accessed using SdrObject
121  pObj->getSdrModelFromSdrObject().Broadcast(aHint);
122  }
123 
124  // delete the object itself
125  SdrObject::Free( pObj );
126  }
127 
128  if(bBroadcast && nullptr != pSdrModelFromRemovedSdrObject)
129  {
130  pSdrModelFromRemovedSdrObject->SetChanged();
131  }
132 }
133 
135 {
136  // clear SdrObjects with broadcasting
137  impClearSdrObjList(true);
138 }
139 
141 {
142  // clear SdrObjects without broadcasting
143  impClearSdrObjList(false);
144 }
145 
147 {
148  // default is no page and returns zero
149  return nullptr;
150 }
151 
153 {
154  // default is no SdrObject (SdrObjGroup)
155  return nullptr;
156 }
157 
158 void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
159 {
160  // clear SdrObjects with broadcasting
161  ClearSdrObjList();
162 
163  mbObjOrdNumsDirty = false;
164  mbRectsDirty = false;
165  size_t nCloneErrCnt(0);
166  const size_t nCount(rSrcList.GetObjCount());
167 
168  if(nullptr == getSdrObjectFromSdrObjList() && nullptr == getSdrPageFromSdrObjList())
169  {
170  OSL_ENSURE(false, "SdrObjList which is not part of SdrPage or SdrObject (!)");
171  return;
172  }
173 
174  SdrModel& rTargetSdrModel(nullptr == getSdrObjectFromSdrObjList()
175  ? getSdrPageFromSdrObjList()->getSdrModelFromSdrPage()
176  : getSdrObjectFromSdrObjList()->getSdrModelFromSdrObject());
177 
178  for (size_t no(0); no < nCount; ++no)
179  {
180  SdrObject* pSO(rSrcList.GetObj(no));
181  SdrObject* pDO(pSO->CloneSdrObject(rTargetSdrModel));
182 
183  if(nullptr != pDO)
184  {
185  NbcInsertObject(pDO, SAL_MAX_SIZE);
186  }
187  else
188  {
189  nCloneErrCnt++;
190  }
191  }
192 
193  // and now for the Connectors
194  // The new objects would be shown in the rSrcList
195  // and then the object connections are made.
196  // Similar implementation are setup as the following:
197  // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
198  // SdrModel* SdrExchangeView::CreateMarkedObjModel() const
199  // BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
200  // void SdrEditView::CopyMarked()
201  if (nCloneErrCnt==0) {
202  for (size_t no=0; no<nCount; ++no) {
203  const SdrObject* pSrcOb=rSrcList.GetObj(no);
204  const SdrEdgeObj* pSrcEdge=dynamic_cast<const SdrEdgeObj*>( pSrcOb );
205  if (pSrcEdge!=nullptr) {
206  SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(true);
207  SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(false);
208  if (pSrcNode1!=nullptr && pSrcNode1->getParentSdrObjListFromSdrObject()!=pSrcEdge->getParentSdrObjListFromSdrObject()) pSrcNode1=nullptr; // can't do this
209  if (pSrcNode2!=nullptr && pSrcNode2->getParentSdrObjListFromSdrObject()!=pSrcEdge->getParentSdrObjListFromSdrObject()) pSrcNode2=nullptr; // across all lists (yet)
210  if (pSrcNode1!=nullptr || pSrcNode2!=nullptr) {
211  SdrObject* pEdgeObjTmp=GetObj(no);
212  SdrEdgeObj* pDstEdge=dynamic_cast<SdrEdgeObj*>( pEdgeObjTmp );
213  if (pDstEdge!=nullptr) {
214  if (pSrcNode1!=nullptr) {
215  sal_uIntPtr nDstNode1=pSrcNode1->GetOrdNum();
216  SdrObject* pDstNode1=GetObj(nDstNode1);
217  if (pDstNode1!=nullptr) { // else we get an error!
218  pDstEdge->ConnectToNode(true,pDstNode1);
219  } else {
220  OSL_FAIL("SdrObjList::operator=(): pDstNode1==NULL!");
221  }
222  }
223  if (pSrcNode2!=nullptr) {
224  sal_uIntPtr nDstNode2=pSrcNode2->GetOrdNum();
225  SdrObject* pDstNode2=GetObj(nDstNode2);
226  if (pDstNode2!=nullptr) { // else the node was probably not selected
227  pDstEdge->ConnectToNode(false,pDstNode2);
228  } else {
229  OSL_FAIL("SdrObjList::operator=(): pDstNode2==NULL!");
230  }
231  }
232  } else {
233  OSL_FAIL("SdrObjList::operator=(): pDstEdge==NULL!");
234  }
235  }
236  }
237  }
238  } else {
239 #ifdef DBG_UTIL
240  OStringBuffer aStr("SdrObjList::operator=(): Error when cloning ");
241 
242  if(nCloneErrCnt == 1)
243  {
244  aStr.append("a drawing object.");
245  }
246  else
247  {
248  aStr.append(static_cast<sal_Int32>(nCloneErrCnt));
249  aStr.append(" drawing objects.");
250  }
251 
252  aStr.append(" Not copying connectors.");
253 
254  OSL_FAIL(aStr.getStr());
255 #endif
256  }
257 }
258 
260 {
261  const size_t nCount = GetObjCount();
262  for (size_t no=0; no<nCount; ++no) {
263  SdrObject* pObj=GetObj(no);
264  pObj->SetOrdNum(no);
265  }
266  mbObjOrdNumsDirty=false;
267 }
268 
270 {
273  const size_t nCount = GetObjCount();
274  for (size_t i=0; i<nCount; ++i) {
275  SdrObject* pObj=GetObj(i);
276  if (i==0) {
279  } else {
282  }
283  }
284 }
285 
287 {
288  mbRectsDirty=true;
289  SdrObject* pParentSdrObject(getSdrObjectFromSdrObjList());
290 
291  if(nullptr != pParentSdrObject)
292  {
293  pParentSdrObject->SetRectsDirty();
294  }
295 }
296 
298 {
300 
301  if(pParent)
302  {
303  pParent->ActionChildInserted(rChild.GetViewContact());
304  }
305 }
306 
307 void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos)
308 {
309  DBG_ASSERT(pObj!=nullptr,"SdrObjList::NbcInsertObject(NULL)");
310  if (pObj==nullptr)
311  return;
312 
313  DBG_ASSERT(!pObj->IsInserted(),"The object already has the status Inserted.");
314  const size_t nCount = GetObjCount();
315  if (nPos>nCount) nPos=nCount;
316  InsertObjectIntoContainer(*pObj,nPos);
317 
318  if (nPos<nCount) mbObjOrdNumsDirty=true;
319  pObj->SetOrdNum(nPos);
321 
322  // Inform the parent about change to allow invalidations at
323  // evtl. existing parent visualisations
324  impChildInserted(*pObj);
325 
326  if (!mbRectsDirty) {
327  mbRectsDirty = true;
328  }
329  pObj->InsertedStateChange(); // calls the UserCall (among others)
330 }
331 
333 {
334  std::unordered_set<rtl::OUString> aNameSet;
335  InsertObjectThenMakeNameUnique(pObj, aNameSet);
336 }
337 
338 void SdrObjList::InsertObjectThenMakeNameUnique(SdrObject* pObj, std::unordered_set<OUString>& rNameSet, size_t nPos)
339 {
340  InsertObject(pObj, nPos);
341  if (!pObj->GetName().isEmpty())
342  {
343  pObj->MakeNameUnique(rNameSet);
344  SdrObjList* pSdrObjList = pObj->GetSubList(); // group
345  if (pSdrObjList)
346  {
347  SdrObject* pListObj;
348  SdrObjListIter aIter(pSdrObjList, SdrIterMode::DeepWithGroups);
349  while (aIter.IsMore())
350  {
351  pListObj = aIter.Next();
352  pListObj->MakeNameUnique(rNameSet);
353  }
354  }
355  }
356 }
357 
358 void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos)
359 {
360  DBG_ASSERT(pObj!=nullptr,"SdrObjList::InsertObject(NULL)");
361 
362  if(pObj)
363  {
364  // if anchor is used, reset it before grouping
366  {
367  const Point& rAnchorPos = pObj->GetAnchorPos();
368  if(rAnchorPos.X() || rAnchorPos.Y())
369  pObj->NbcSetAnchorPos(Point());
370  }
371 
372  // do insert to new group
373  NbcInsertObject(pObj, nPos);
374 
375  // In case the object is inserted into a group and doesn't overlap with
376  // the group's other members, it needs an own repaint.
377  SdrObject* pParentSdrObject(getSdrObjectFromSdrObjList());
378 
379  if(pParentSdrObject)
380  {
381  // only repaint here
382  pParentSdrObject->ActionChanged();
383  }
384 
385  // TODO: We need a different broadcast here!
386  // Repaint from object number ... (heads-up: GroupObj)
387  if(pObj->getSdrPageFromSdrObject())
388  {
389  SdrHint aHint(SdrHintKind::ObjectInserted, *pObj);
390  pObj->getSdrModelFromSdrObject().Broadcast(aHint);
391  }
392 
394  }
395 }
396 
398 {
399  if (nObjNum >= maList.size())
400  {
401  OSL_ASSERT(nObjNum<maList.size());
402  return nullptr;
403  }
404 
405  const size_t nCount = GetObjCount();
406  SdrObject* pObj=maList[nObjNum];
407  RemoveObjectFromContainer(nObjNum);
408 
409  DBG_ASSERT(pObj!=nullptr,"Could not find object to remove.");
410  if (pObj!=nullptr)
411  {
412  // flushViewObjectContacts() clears the VOC's and those invalidate
414 
415  DBG_ASSERT(pObj->IsInserted(),"The object does not have the status Inserted.");
416 
417  // tdf#121022 Do first remove from SdrObjList - InsertedStateChange
418  // relies now on IsInserted which uses getParentSdrObjListFromSdrObject
419  SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr);
420 
421  // calls UserCall, among other
422  pObj->InsertedStateChange();
423 
424  if (!mbObjOrdNumsDirty)
425  {
426  // optimizing for the case that the last object has to be removed
427  if (nObjNum+1!=nCount) {
428  mbObjOrdNumsDirty=true;
429  }
430  }
432  }
433  return pObj;
434 }
435 
437 {
438  if (nObjNum >= maList.size())
439  {
440  OSL_ASSERT(nObjNum<maList.size());
441  return nullptr;
442  }
443 
444  const size_t nCount = GetObjCount();
445  SdrObject* pObj=maList[nObjNum];
446  RemoveObjectFromContainer(nObjNum);
447 
448  DBG_ASSERT(pObj!=nullptr,"Object to remove not found.");
449  if(pObj)
450  {
451  // flushViewObjectContacts() clears the VOC's and those invalidate
453  DBG_ASSERT(pObj->IsInserted(),"The object does not have the status Inserted.");
454 
455  // TODO: We need a different broadcast here.
456  if (pObj->getSdrPageFromSdrObject()!=nullptr)
457  {
458  SdrHint aHint(SdrHintKind::ObjectRemoved, *pObj);
459  pObj->getSdrModelFromSdrObject().Broadcast(aHint);
460  }
461 
463 
464  // tdf#121022 Do first remove from SdrObjList - InsertedStateChange
465  // relies now on IsInserted which uses getParentSdrObjListFromSdrObject
466  SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr);
467 
468  // calls, among other things, the UserCall
469  pObj->InsertedStateChange();
470 
471  if (!mbObjOrdNumsDirty)
472  {
473  // optimization for the case that the last object is removed
474  if (nObjNum+1!=nCount) {
475  mbObjOrdNumsDirty=true;
476  }
477  }
478 
480  SdrObject* pParentSdrObject(getSdrObjectFromSdrObjList());
481 
482  if(pParentSdrObject && !GetObjCount())
483  {
484  // empty group created; it needs to be repainted since it's
485  // visualization changes
486  pParentSdrObject->ActionChanged();
487  }
488  }
489  return pObj;
490 }
491 
493 {
494  if (nObjNum >= maList.size())
495  {
496  OSL_ASSERT(nObjNum<maList.size());
497  return nullptr;
498  }
499  if (pNewObj == nullptr)
500  {
501  OSL_ASSERT(pNewObj!=nullptr);
502  return nullptr;
503  }
504 
505  SdrObject* pObj=maList[nObjNum];
506  DBG_ASSERT(pObj!=nullptr,"SdrObjList::ReplaceObject: Could not find object to remove.");
507  if (pObj!=nullptr) {
508  DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: the object does not have status Inserted.");
509 
510  // TODO: We need a different broadcast here.
511  if (pObj->getSdrPageFromSdrObject()!=nullptr)
512  {
513  SdrHint aHint(SdrHintKind::ObjectRemoved, *pObj);
514  pObj->getSdrModelFromSdrObject().Broadcast(aHint);
515  }
516 
517  // Change parent and replace in SdrObjList
518  SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr);
519  ReplaceObjectInContainer(*pNewObj,nObjNum);
520 
521  // tdf#121022 InsertedStateChange uses the parent
522  // to detect if pObj is inserted or not, so have to call
523  // it *after* changing these settings, else an obviously wrong
524  // 'SdrUserCallType::Inserted' would be sent
525  pObj->InsertedStateChange();
526 
527  // flushViewObjectContacts() clears the VOC's and those
528  // trigger the evtl. needed invalidate(s)
530 
531  // Setup data at new SdrObject - it already *is* inserted to
532  // the SdrObjList due to 'ReplaceObjectInContainer' above
533  pNewObj->SetOrdNum(nObjNum);
534  SetParentAtSdrObjectFromSdrObjList(*pNewObj, this);
535 
536  // Inform the parent about change to allow invalidations at
537  // evtl. existing parent visualisations, but also react on
538  // newly inserted SdrObjects (as e.g. GraphCtrlUserCall does)
539  impChildInserted(*pNewObj);
540 
541  pNewObj->InsertedStateChange();
542 
543  // TODO: We need a different broadcast here.
544  if (pNewObj->getSdrPageFromSdrObject()!=nullptr) {
545  SdrHint aHint(SdrHintKind::ObjectInserted, *pNewObj);
546  pNewObj->getSdrModelFromSdrObject().Broadcast(aHint);
547  }
548 
550 
552  }
553  return pObj;
554 }
555 
556 SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
557 {
558  if (nOldObjNum >= maList.size() || nNewObjNum >= maList.size())
559  {
560  OSL_ASSERT(nOldObjNum<maList.size());
561  OSL_ASSERT(nNewObjNum<maList.size());
562  return nullptr;
563  }
564 
565  SdrObject* pObj=maList[nOldObjNum];
566  if (nOldObjNum==nNewObjNum) return pObj;
567  DBG_ASSERT(pObj!=nullptr,"SdrObjList::SetObjectOrdNum: Object not found.");
568  if (pObj!=nullptr) {
569  DBG_ASSERT(pObj->IsInserted(),"SdrObjList::SetObjectOrdNum: the object does not have status Inserted.");
570  RemoveObjectFromContainer(nOldObjNum);
571  InsertObjectIntoContainer(*pObj,nNewObjNum);
572 
573  // No need to delete visualisation data since same object
574  // gets inserted again. Also a single ActionChanged is enough
575  pObj->ActionChanged();
576 
577  pObj->SetOrdNum(nNewObjNum);
578  mbObjOrdNumsDirty=true;
579 
580  // TODO: We need a different broadcast here.
581  if (pObj->getSdrPageFromSdrObject()!=nullptr)
584  }
585  return pObj;
586 }
587 
588 void SdrObjList::sort( std::vector<sal_Int32>& sortOrder)
589 {
590  // no negative indexes and indexes larger than maList size are allowed
591  auto it = std::find_if( sortOrder.begin(), sortOrder.end(), [this](const sal_Int32& rIt)
592  { return ( rIt < 0 || static_cast<size_t>(rIt) >= maList.size() ); } );
593  if ( it != sortOrder.end())
594  throw css::lang::IllegalArgumentException("negative index of shape", nullptr, 1);
595 
596  // no duplicates
597  std::vector<bool> aNoDuplicates(sortOrder.size(), false);
598  for (size_t i = 0; i < sortOrder.size(); ++i )
599  {
600  size_t idx = static_cast<size_t>( sortOrder[i] );
601 
602  if ( aNoDuplicates[idx] )
603  throw css::lang::IllegalArgumentException("duplicate index of shape", nullptr, 2);
604 
605  aNoDuplicates[idx] = true;
606  }
607 
608  // example sortOrder [2 0 1]
609  // example maList [T T S T T] ( T T = shape with textbox, S = just a shape )
610  // (shapes at positions 0 and 2 have a textbox)
611 
612  std::vector<SdrObject*> aNewList(maList.size());
613  std::set<sal_Int32> aShapesWithTextbox;
614  std::vector<sal_Int32> aIncrements;
615  std::vector<sal_Int32> aDuplicates;
616 
617  if ( maList.size() > 1)
618  {
619  for (size_t i = 1; i< maList.size(); ++i)
620  {
621  // if this shape is a textbox, then look at its left neighbour
622  // (shape this textbox is in)
623  // and insert the number of textboxes to the left of it
624  if (maList[i]->IsTextBox())
625  aShapesWithTextbox.insert( i - 1 - aShapesWithTextbox.size() );
626  }
627  // example aShapesWithTextbox [0 2]
628  }
629 
630  if (aShapesWithTextbox.size() != maList.size() - sortOrder.size())
631  {
632  throw lang::IllegalArgumentException("mismatch of no. of shapes", nullptr, 0);
633  }
634 
635  for (size_t i = 0; i< sortOrder.size(); ++i)
636  {
637 
638  if (aShapesWithTextbox.count(sortOrder[i]) > 0)
639  aDuplicates.push_back(sortOrder[i]);
640 
641  aDuplicates.push_back(sortOrder[i]);
642 
643  // example aDuplicates [2 2 0 0 1]
644  }
645  assert(aDuplicates.size() == maList.size());
646 
647  aIncrements.push_back(0);
648  for (size_t i = 1; i< sortOrder.size(); ++i)
649  {
650  if (aShapesWithTextbox.count(i - 1))
651  aIncrements.push_back(aIncrements[i-1] + 1 );
652  else
653  aIncrements.push_back(aIncrements[i-1]);
654 
655  // example aIncrements [0 1 1]
656  }
657  assert(aIncrements.size() == sortOrder.size());
658 
659  std::vector<sal_Int32> aNewSortOrder(maList.size());
660  sal_Int32 nPrev = -1;
661  for (size_t i = 0; i< aDuplicates.size(); ++i)
662  {
663  if (nPrev != aDuplicates[i])
664  aNewSortOrder[i] = aDuplicates[i] + aIncrements[aDuplicates[i]];
665  else
666  aNewSortOrder[i] = aNewSortOrder[i-1] + 1;
667 
668  nPrev = aDuplicates[i];
669 
670  // example aNewSortOrder [3 4 0 1 2]
671  }
672  assert(aNewSortOrder.size() == maList.size());
673 
674 #ifndef NDEBUG
675  {
676  std::vector<sal_Int32> tmp(aNewSortOrder);
677  std::sort(tmp.begin(), tmp.end());
678  for (size_t i = 0; i < tmp.size(); ++i)
679  {
680  assert(size_t(tmp[i]) == i);
681  }
682  }
683 #endif
684 
685  for (size_t i = 0; i < aNewSortOrder.size(); ++i)
686  {
687  aNewList[i] = maList[ aNewSortOrder[i] ];
688  aNewList[i]->SetOrdNum(i);
689  }
690 
691  std::swap(aNewList, maList);
692 }
693 
695 {
696  if (mbRectsDirty) {
697  const_cast<SdrObjList*>(this)->RecalcRects();
698  const_cast<SdrObjList*>(this)->mbRectsDirty=false;
699  }
700  return maSdrObjListSnapRect;
701 }
702 
704 {
705  // #i106183# for deep group hierarchies like in chart2, the invalidates
706  // through the hierarchy are not correct; use a 2nd hint for the needed
707  // recalculation. Future versions will have no bool flag at all, but
708  // just maSdrObjListOutRect in empty state to represent an invalid state, thus
709  // it's a step in the right direction.
711  {
712  const_cast<SdrObjList*>(this)->RecalcRects();
713  const_cast<SdrObjList*>(this)->mbRectsDirty=false;
714  }
715  return maSdrObjListOutRect;
716 }
717 
719 {
720  size_t nCount=GetObjCount();
721  size_t nNum=0;
722 
723  while (nNum<nCount)
724  {
725  SdrObject* pObj = GetObj(nNum);
726 
727  pObj->NbcReformatText();
728  nCount=GetObjCount(); // ReformatText may delete an object
729  nNum++;
730  }
731 
732 }
733 
735 {
737 }
738 
744 {
745  // #i120437# go over whole hierarchy, not only over object level null (seen from grouping)
747 
748  while(aIter.IsMore())
749  {
750  SdrObject* pObj = aIter.Next();
751  if (pObj->GetObjIdentifier() != OBJ_EDGE)
752  continue;
753 
754  SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* >(pObj);
755  pSdrEdgeObj->Reformat();
756  }
757 }
758 
760 {
761  for(size_t a = 0; a < GetObjCount(); ++a)
762  {
764  }
765 }
766 
768 {
769  return maList.size();
770 }
771 
772 
773 SdrObject* SdrObjList::GetObj(size_t nNum) const
774 {
775  if (nNum >= maList.size())
776  {
777  OSL_ASSERT(nNum<maList.size());
778  return nullptr;
779  }
780  else
781  return maList[nNum];
782 }
783 
784 
786 {
787  bool bRet(false);
788  SdrObject* pParentSdrObject(getSdrObjectFromSdrObjList());
789 
790  if(nullptr != pParentSdrObject)
791  {
792  SdrPage* pSdrPage(pParentSdrObject->getSdrPageFromSdrObject());
793 
794  if(nullptr != pSdrPage)
795  {
796  bRet = pSdrPage->IsReadOnly();
797  }
798  }
799 
800  return bRet;
801 }
802 
804 {
805  const size_t nObj = GetObjCount();
806  for( size_t i = nObj; i>0; )
807  UnGroupObj(--i);
808 }
809 
810 void SdrObjList::UnGroupObj( size_t nObjNum )
811 {
812  // if the given object is no group, this method is a noop
813  SdrObject* pUngroupObj = GetObj( nObjNum );
814  if( pUngroupObj )
815  {
816  SdrObjList* pSrcLst = pUngroupObj->GetSubList();
817  if( dynamic_cast<const SdrObjGroup*>( pUngroupObj) != nullptr && pSrcLst )
818  {
819  SdrObjGroup* pUngroupGroup = static_cast< SdrObjGroup* > (pUngroupObj);
820 
821  // ungroup recursively (has to be head recursion,
822  // otherwise our indices will get trashed when doing it in
823  // the loop)
824  pSrcLst->FlattenGroups();
825 
826  // the position at which we insert the members of rUngroupGroup
827  size_t nInsertPos( pUngroupGroup->GetOrdNum() );
828 
829  const size_t nCount = pSrcLst->GetObjCount();
830  for( size_t i=0; i<nCount; ++i )
831  {
832  SdrObject* pObj = pSrcLst->RemoveObject(0);
833  InsertObject(pObj, nInsertPos);
834  ++nInsertPos;
835  }
836 
837  RemoveObject(nInsertPos);
838  }
839  }
840 #ifdef DBG_UTIL
841  else
842  OSL_FAIL("SdrObjList::UnGroupObj: object index invalid");
843 #endif
844 }
845 
846 bool SdrObjList::HasObjectNavigationOrder() const { return mxNavigationOrder != nullptr; }
847 
849  SdrObject& rObject,
850  const sal_uInt32 nNewPosition)
851 {
852  // When the navigation order container has not yet been created then
853  // create one now. It is initialized with the z-order taken from
854  // maList.
855  if (mxNavigationOrder == nullptr)
856  {
858  ::std::copy(
859  maList.begin(),
860  maList.end(),
861  mxNavigationOrder->begin());
862  }
863  OSL_ASSERT(mxNavigationOrder != nullptr);
864  OSL_ASSERT( mxNavigationOrder->size() == maList.size());
865 
866  tools::WeakReference<SdrObject> aReference (&rObject);
867 
868  // Look up the object whose navigation position is to be changed.
869  WeakSdrObjectContainerType::iterator iObject (::std::find(
870  mxNavigationOrder->begin(),
871  mxNavigationOrder->end(),
872  aReference));
873  if (iObject == mxNavigationOrder->end())
874  {
875  // The given object is not a member of the navigation order.
876  return;
877  }
878 
879  // Move the object to its new position.
880  const sal_uInt32 nOldPosition = ::std::distance(mxNavigationOrder->begin(), iObject);
881  if (nOldPosition != nNewPosition)
882  {
883  mxNavigationOrder->erase(iObject);
884  sal_uInt32 nInsertPosition (nNewPosition);
885  // Adapt insertion position for the just erased object.
886  if (nNewPosition >= nOldPosition)
887  nInsertPosition -= 1;
888  if (nInsertPosition >= mxNavigationOrder->size())
889  mxNavigationOrder->push_back(aReference);
890  else
891  mxNavigationOrder->insert(mxNavigationOrder->begin()+nInsertPosition, aReference);
892 
894 
895  // The navigation order is written out to file so mark the model as modified.
897  }
898 }
899 
900 
901 SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const
902 {
904  {
905  // There is a user defined navigation order. Make sure the object
906  // index is correct and look up the object in mxNavigationOrder.
907  if (nNavigationPosition >= mxNavigationOrder->size())
908  {
909  OSL_ASSERT(nNavigationPosition < mxNavigationOrder->size());
910  }
911  else
912  return (*mxNavigationOrder)[nNavigationPosition].get();
913  }
914  else
915  {
916  // There is no user defined navigation order. Use the z-order
917  // instead.
918  if (nNavigationPosition >= maList.size())
919  {
920  OSL_ASSERT(nNavigationPosition < maList.size());
921  }
922  else
923  return maList[nNavigationPosition];
924  }
925  return nullptr;
926 }
927 
928 
930 {
931  mxNavigationOrder.reset();
933 }
934 
935 
937 {
939  {
940  if (mxNavigationOrder != nullptr)
941  {
942  mbIsNavigationOrderDirty = false;
943 
944  sal_uInt32 nIndex (0);
945  for (auto& rpObject : *mxNavigationOrder)
946  {
947  rpObject->SetNavigationPosition(nIndex);
948  ++nIndex;
949  }
950  }
951  }
952 
953  return mxNavigationOrder != nullptr;
954 }
955 
956 
957 void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAccess>& rxOrder)
958 {
959  if (rxOrder.is())
960  {
961  const sal_Int32 nCount = rxOrder->getCount();
962  if (static_cast<sal_uInt32>(nCount) != maList.size())
963  return;
964 
965  if (mxNavigationOrder == nullptr)
967 
968  for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
969  {
970  uno::Reference<uno::XInterface> xShape (rxOrder->getByIndex(nIndex), uno::UNO_QUERY);
972  if (pObject == nullptr)
973  break;
974  (*mxNavigationOrder)[nIndex] = pObject;
975  }
976 
978  }
979  else
980  {
982  }
983 }
984 
985 
987  SdrObject& rObject,
988  const sal_uInt32 nInsertPosition)
989 {
990  OSL_ASSERT(nInsertPosition<=maList.size());
991 
992  // Update the navigation positions.
994  {
995  // The new object does not have a user defined position so append it
996  // to the list.
997  rObject.SetNavigationPosition(mxNavigationOrder->size());
998  mxNavigationOrder->push_back(&rObject);
999  }
1000 
1001  // Insert object into object list. Because the insert() method requires
1002  // a valid iterator as insertion position, we have to use push_back() to
1003  // insert at the end of the list.
1004  if (nInsertPosition >= maList.size())
1005  maList.push_back(&rObject);
1006  else
1007  maList.insert(maList.begin()+nInsertPosition, &rObject);
1008  mbObjOrdNumsDirty=true;
1009 }
1010 
1011 
1013  SdrObject& rNewObject,
1014  const sal_uInt32 nObjectPosition)
1015 {
1016  if (nObjectPosition >= maList.size())
1017  {
1018  OSL_ASSERT(nObjectPosition<maList.size());
1019  return;
1020  }
1021 
1022  // Update the navigation positions.
1024  {
1025  // A user defined position of the object that is to be replaced is
1026  // not transferred to the new object so erase the former and append
1027  // the later object from/to the navigation order.
1028  OSL_ASSERT(nObjectPosition < maList.size());
1029  tools::WeakReference<SdrObject> aReference (maList[nObjectPosition]);
1030  WeakSdrObjectContainerType::iterator iObject (::std::find(
1031  mxNavigationOrder->begin(),
1032  mxNavigationOrder->end(),
1033  aReference));
1034  if (iObject != mxNavigationOrder->end())
1035  mxNavigationOrder->erase(iObject);
1036 
1037  mxNavigationOrder->push_back(&rNewObject);
1038 
1039  mbIsNavigationOrderDirty = true;
1040  }
1041 
1042  maList[nObjectPosition] = &rNewObject;
1043  mbObjOrdNumsDirty=true;
1044 }
1045 
1046 
1048  const sal_uInt32 nObjectPosition)
1049 {
1050  if (nObjectPosition >= maList.size())
1051  {
1052  OSL_ASSERT(nObjectPosition<maList.size());
1053  return;
1054  }
1055 
1056  // Update the navigation positions.
1058  {
1059  tools::WeakReference<SdrObject> aReference (maList[nObjectPosition]);
1060  WeakSdrObjectContainerType::iterator iObject (::std::find(
1061  mxNavigationOrder->begin(),
1062  mxNavigationOrder->end(),
1063  aReference));
1064  if (iObject != mxNavigationOrder->end())
1065  mxNavigationOrder->erase(iObject);
1066  mbIsNavigationOrderDirty = true;
1067  }
1068 
1069  maList.erase(maList.begin()+nObjectPosition);
1070  mbObjOrdNumsDirty=true;
1071 }
1072 
1074 {
1075  xmlTextWriterStartElement(pWriter, BAD_CAST("SdrObjList"));
1076  xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
1077  xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s", BAD_CAST(typeid(*this).name()));
1078 
1079  size_t nObjCount = GetObjCount();
1080  for (size_t i = 0; i < nObjCount; ++i)
1081  {
1082  if (const SdrObject* pObject = GetObj(i))
1083  pObject->dumpAsXml(pWriter);
1084  }
1085 
1086  xmlTextWriterEndElement(pWriter);
1087 }
1088 
1089 
1091 {
1092  sal_uInt16 nCount=GetCount();
1093  for (sal_uInt16 i=0; i<nCount; i++) {
1094  delete GetObject(i);
1095  }
1096  aList.clear();
1097 }
1098 
1099 
1100 // PageUser section
1101 
1103 {
1104  maPageUsers.push_back(&rNewUser);
1105 }
1106 
1108 {
1109  const sdr::PageUserVector::iterator aFindResult = ::std::find(maPageUsers.begin(), maPageUsers.end(), &rOldUser);
1110  if(aFindResult != maPageUsers.end())
1111  {
1112  maPageUsers.erase(aFindResult);
1113  }
1114 }
1115 
1116 
1117 // DrawContact section
1118 
1119 std::unique_ptr<sdr::contact::ViewContact> SdrPage::CreateObjectSpecificViewContact()
1120 {
1121  return std::make_unique<sdr::contact::ViewContactOfSdrPage>(*this);
1122 }
1123 
1125 {
1126  if (!mpViewContact)
1127  const_cast<SdrPage*>(this)->mpViewContact =
1128  const_cast<SdrPage*>(this)->CreateObjectSpecificViewContact();
1129 
1130  return *mpViewContact;
1131 }
1132 
1134 {
1135  if (!mpViewContact)
1137 
1138  return *mpViewContact;
1139 }
1140 
1142 {
1143  if(mpStyleSheet)
1144  {
1146  maProperties.SetParent(nullptr);
1147  mpStyleSheet = nullptr;
1148  }
1149 }
1150 
1152 {
1153  if(mpStyleSheet != &rNewStyleSheet)
1154  {
1156  mpStyleSheet = &rNewStyleSheet;
1157  StartListening(rNewStyleSheet);
1158  maProperties.SetParent(&rNewStyleSheet.GetItemSet());
1159  }
1160 }
1161 
1162 static void ImpPageChange(SdrPage& rSdrPage)
1163 {
1164  rSdrPage.ActionChanged();
1165  rSdrPage.getSdrModelFromSdrPage().SetChanged();
1166  SdrHint aHint(SdrHintKind::PageOrderChange, &rSdrPage);
1167  rSdrPage.getSdrModelFromSdrPage().Broadcast(aHint);
1168 }
1169 
1171 : SfxListener(),
1172  mpSdrPage(&rSdrPage),
1173  mpStyleSheet(nullptr),
1174  maProperties(
1175  mpSdrPage->getSdrModelFromSdrPage().GetItemPool(),
1177 {
1178  if(!rSdrPage.IsMasterPage())
1179  {
1180  maProperties.Put(XFillStyleItem(drawing::FillStyle_NONE));
1181  }
1182 }
1183 
1185 {
1187 }
1188 
1190 {
1191  switch(rHint.GetId())
1192  {
1193  case SfxHintId::DataChanged :
1194  {
1195  // notify change, broadcast
1197  break;
1198  }
1199  case SfxHintId::Dying :
1200  {
1201  // Style needs to be forgotten
1203  break;
1204  }
1205  default: break;
1206  }
1207 }
1208 
1210 {
1211  assert(mpSdrPage);
1212  return mpSdrPage->IsInserted();
1213 }
1214 
1215 
1217 {
1218  OSL_ENSURE(!mpSdrPage->IsMasterPage(), "Item set at MasterPage Attributes (!)");
1219  maProperties.Put(rSet);
1221 }
1222 
1224 {
1225  OSL_ENSURE(!mpSdrPage->IsMasterPage(), "Item set at MasterPage Attributes (!)");
1226  maProperties.Put(rItem);
1228 }
1229 
1230 void SdrPageProperties::ClearItem(const sal_uInt16 nWhich)
1231 {
1232  maProperties.ClearItem(nWhich);
1234 }
1235 
1237 {
1238  if(pStyleSheet)
1239  {
1240  ImpAddStyleSheet(*pStyleSheet);
1241  }
1242  else
1243  {
1245  }
1246 
1248 }
1249 
1250 
1251 SdrPage::SdrPage(SdrModel& rModel, bool bMasterPage)
1252 : SdrObjList(),
1253  tools::WeakBase(),
1254  maPageUsers(),
1255  mrSdrModelFromSdrPage(rModel),
1256  mnWidth(10),
1257  mnHeight(10),
1258  mnBorderLeft(0),
1259  mnBorderUpper(0),
1260  mnBorderRight(0),
1261  mnBorderLower(0),
1262  mpLayerAdmin(new SdrLayerAdmin(&rModel.GetLayerAdmin())),
1263  mxUnoPage(),
1264  nPageNum(0),
1265  mbMaster(bMasterPage),
1266  mbInserted(false),
1267  mbObjectsNotPersistent(false),
1268  mbPageBorderOnlyLeftRight(false)
1269 {
1270  mpSdrPageProperties.reset(new SdrPageProperties(*this));
1271 }
1272 
1274 {
1275  if( mxUnoPage.is() ) try
1276  {
1277  uno::Reference< lang::XComponent > xPageComponent( mxUnoPage, uno::UNO_QUERY_THROW );
1278  mxUnoPage.clear();
1279  xPageComponent->dispose();
1280  }
1281  catch( const uno::Exception& )
1282  {
1283  DBG_UNHANDLED_EXCEPTION("svx");
1284  }
1285 
1286  // tell all the registered PageUsers that the page is in destruction
1287  // This causes some (all?) PageUsers to remove themselves from the list
1288  // of page users. Therefore we have to use a copy of the list for the
1289  // iteration.
1290  sdr::PageUserVector aListCopy (maPageUsers.begin(), maPageUsers.end());
1291  for(sdr::PageUser* pPageUser : aListCopy)
1292  {
1293  DBG_ASSERT(pPageUser, "SdrPage::~SdrPage: corrupt PageUser list (!)");
1294  pPageUser->PageInDestruction(*this);
1295  }
1296 
1297  // Clear the vector. This means that user do not need to call RemovePageUser()
1298  // when they get called from PageInDestruction().
1299  maPageUsers.clear();
1300 
1301  mpLayerAdmin.reset();
1302 
1304 
1305  mpViewContact.reset();
1306  mpSdrPageProperties.reset();
1307 }
1308 
1309 void SdrPage::lateInit(const SdrPage& rSrcPage)
1310 {
1311  assert(!mpViewContact);
1312  assert(!mxUnoPage.is());
1313 
1314  // copy all the local parameters to make this instance
1315  // a valid copy of source page before copying and inserting
1316  // the contained objects
1317  mbMaster = rSrcPage.mbMaster;
1319  mnWidth = rSrcPage.mnWidth;
1320  mnHeight = rSrcPage.mnHeight;
1321  mnBorderLeft = rSrcPage.mnBorderLeft;
1322  mnBorderUpper = rSrcPage.mnBorderUpper;
1323  mnBorderRight = rSrcPage.mnBorderRight;
1324  mnBorderLower = rSrcPage.mnBorderLower;
1325  nPageNum = rSrcPage.nPageNum;
1326 
1327  if(rSrcPage.TRG_HasMasterPage())
1328  {
1331  }
1332  else
1333  {
1335  }
1336 
1338 
1339  {
1340  mpSdrPageProperties.reset(new SdrPageProperties(*this));
1341 
1342  if(!IsMasterPage())
1343  {
1344  mpSdrPageProperties->PutItemSet(rSrcPage.getSdrPageProperties().GetItemSet());
1345  }
1346 
1347  mpSdrPageProperties->SetStyleSheet(rSrcPage.getSdrPageProperties().GetStyleSheet());
1348  }
1349 
1350  // Now copy the contained objects
1351  if(0 != rSrcPage.GetObjCount())
1352  {
1353  CopyObjects(rSrcPage);
1354  }
1355 }
1356 
1358 {
1359  SdrPage* pClonedPage(new SdrPage(rTargetModel));
1360  pClonedPage->lateInit(*this);
1361  return pClonedPage;
1362 }
1363 
1364 void SdrPage::SetSize(const Size& aSiz)
1365 {
1366  bool bChanged(false);
1367 
1368  if(aSiz.Width() != mnWidth)
1369  {
1370  mnWidth = aSiz.Width();
1371  bChanged = true;
1372  }
1373 
1374  if(aSiz.Height() != mnHeight)
1375  {
1376  mnHeight = aSiz.Height();
1377  bChanged = true;
1378  }
1379 
1380  if(bChanged)
1381  {
1382  SetChanged();
1383  }
1384 }
1385 
1387 {
1388  return Size(mnWidth,mnHeight);
1389 }
1390 
1391 sal_Int32 SdrPage::GetWidth() const
1392 {
1393  return mnWidth;
1394 }
1395 
1397 {
1398  // square: handle like portrait format
1399  Size aSiz(GetSize());
1400  if (aSiz.Width()!=aSiz.Height()) {
1401  if ((eOri==Orientation::Portrait) == (aSiz.Width()>aSiz.Height())) {
1402  // coverity[swapped_arguments : FALSE] - this is in the correct order
1403  SetSize(Size(aSiz.Height(),aSiz.Width()));
1404  }
1405  }
1406 }
1407 
1409 {
1410  // square: handle like portrait format
1411  Orientation eRet=Orientation::Portrait;
1412  Size aSiz(GetSize());
1413  if (aSiz.Width()>aSiz.Height()) eRet=Orientation::Landscape;
1414  return eRet;
1415 }
1416 
1417 sal_Int32 SdrPage::GetHeight() const
1418 {
1419  return mnHeight;
1420 }
1421 
1422 void SdrPage::SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 nLwr)
1423 {
1424  bool bChanged(false);
1425 
1426  if(mnBorderLeft != nLft)
1427  {
1428  mnBorderLeft = nLft;
1429  bChanged = true;
1430  }
1431 
1432  if(mnBorderUpper != nUpp)
1433  {
1434  mnBorderUpper = nUpp;
1435  bChanged = true;
1436  }
1437 
1438  if(mnBorderRight != nRgt)
1439  {
1440  mnBorderRight = nRgt;
1441  bChanged = true;
1442  }
1443 
1444  if(mnBorderLower != nLwr)
1445  {
1446  mnBorderLower = nLwr;
1447  bChanged = true;
1448  }
1449 
1450  if(bChanged)
1451  {
1452  SetChanged();
1453  }
1454 }
1455 
1456 void SdrPage::SetLeftBorder(sal_Int32 nBorder)
1457 {
1458  if(mnBorderLeft != nBorder)
1459  {
1460  mnBorderLeft = nBorder;
1461  SetChanged();
1462  }
1463 }
1464 
1465 void SdrPage::SetUpperBorder(sal_Int32 nBorder)
1466 {
1467  if(mnBorderUpper != nBorder)
1468  {
1469  mnBorderUpper = nBorder;
1470  SetChanged();
1471  }
1472 }
1473 
1474 void SdrPage::SetRightBorder(sal_Int32 nBorder)
1475 {
1476  if(mnBorderRight != nBorder)
1477  {
1478  mnBorderRight=nBorder;
1479  SetChanged();
1480  }
1481 }
1482 
1483 void SdrPage::SetLowerBorder(sal_Int32 nBorder)
1484 {
1485  if(mnBorderLower != nBorder)
1486  {
1487  mnBorderLower=nBorder;
1488  SetChanged();
1489  }
1490 }
1491 
1492 sal_Int32 SdrPage::GetLeftBorder() const
1493 {
1494  return mnBorderLeft;
1495 }
1496 
1497 sal_Int32 SdrPage::GetUpperBorder() const
1498 {
1499  return mnBorderUpper;
1500 }
1501 
1502 sal_Int32 SdrPage::GetRightBorder() const
1503 {
1504  return mnBorderRight;
1505 }
1506 
1507 sal_Int32 SdrPage::GetLowerBorder() const
1508 {
1509  return mnBorderLower;
1510 }
1511 
1512 // #i68775# React on PageNum changes (from Model in most cases)
1513 void SdrPage::SetPageNum(sal_uInt16 nNew)
1514 {
1515  if(nNew != nPageNum)
1516  {
1517  // change
1518  nPageNum = nNew;
1519 
1520  // notify visualisations, also notifies e.g. buffered MasterPages
1521  ActionChanged();
1522  }
1523 }
1524 
1525 sal_uInt16 SdrPage::GetPageNum() const
1526 {
1527  if (!mbInserted)
1528  return 0;
1529 
1530  if (mbMaster) {
1531  if (getSdrModelFromSdrPage().IsMPgNumsDirty())
1533  } else {
1534  if (getSdrModelFromSdrPage().IsPagNumsDirty())
1536  }
1537  return nPageNum;
1538 }
1539 
1541 {
1542  // For test purposes, use the new ViewContact for change
1543  // notification now.
1544  ActionChanged();
1546 }
1547 
1549 {
1550  return const_cast< SdrPage* >(this);
1551 }
1552 
1553 // MasterPage interface
1554 
1556 {
1557  if(mpMasterPageDescriptor && &(mpMasterPageDescriptor->GetUsedPage()) == &rNew)
1558  return;
1559 
1562 
1563  mpMasterPageDescriptor.reset(new sdr::MasterPageDescriptor(*this, rNew));
1565 }
1566 
1568 {
1570  {
1571  SetChanged();
1572 
1573  // the flushViewObjectContacts() will do needed invalidates by deleting the involved VOCs
1574  mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts();
1575 
1576  mpMasterPageDescriptor.reset();
1577  }
1578 }
1579 
1581 {
1582  DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPage(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
1583  return mpMasterPageDescriptor->GetUsedPage();
1584 }
1585 
1587 {
1588  DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
1589  return mpMasterPageDescriptor->GetVisibleLayers();
1590 }
1591 
1593 {
1594  DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_SetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
1595  mpMasterPageDescriptor->SetVisibleLayers(rNew);
1596 }
1597 
1599 {
1600  DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPageDescriptorViewContact(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
1601  return mpMasterPageDescriptor->GetViewContact();
1602 }
1603 
1604 // used from SdrModel::RemoveMasterPage
1606 {
1607  if(TRG_HasMasterPage())
1608  {
1609  if(&TRG_GetMasterPage() == &rRemovedPage)
1610  {
1612  }
1613  }
1614 }
1615 
1617 {
1618  std::unordered_set<OUString> aNameSet;
1619  for (size_t no(0); no < GetObjCount(); ++no)
1620  {
1621  SdrObject* pObj(GetObj(no));
1622  if(nullptr != pObj)
1623  {
1624  if (!pObj->GetName().isEmpty())
1625  {
1626  pObj->MakeNameUnique(aNameSet);
1627  SdrObjList* pSdrObjList = pObj->GetSubList(); // group
1628  if (pSdrObjList)
1629  {
1630  SdrObject* pListObj;
1631  SdrObjListIter aIter(pSdrObjList, SdrIterMode::DeepWithGroups);
1632  while (aIter.IsMore())
1633  {
1634  pListObj = aIter.Next();
1635  pListObj->MakeNameUnique(aNameSet);
1636  }
1637  }
1638  }
1639  }
1640  }
1641 }
1642 
1643 const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const tools::Rectangle* /*pRect*/) const
1644 {
1645  return nullptr;
1646 }
1647 
1649 {
1650  return *mpLayerAdmin;
1651 }
1652 
1654 {
1655  return *mpLayerAdmin;
1656 }
1657 
1658 OUString SdrPage::GetLayoutName() const
1659 {
1660  return OUString();
1661 }
1662 
1663 void SdrPage::SetInserted( bool bIns )
1664 {
1665  if( mbInserted != bIns )
1666  {
1667  mbInserted = bIns;
1668 
1669  // #i120437# go over whole hierarchy, not only over object level null (seen from grouping)
1671 
1672  while ( aIter.IsMore() )
1673  {
1674  SdrObject* pObj = aIter.Next();
1675  if ( dynamic_cast<const SdrOle2Obj* >(pObj) != nullptr )
1676  {
1677  if( mbInserted )
1678  static_cast<SdrOle2Obj*>(pObj)->Connect();
1679  else
1680  static_cast<SdrOle2Obj*>(pObj)->Disconnect();
1681  }
1682  }
1683  }
1684 }
1685 
1686 void SdrPage::SetUnoPage(uno::Reference<drawing::XDrawPage> const& xNewPage)
1687 {
1688  mxUnoPage = xNewPage;
1689 }
1690 
1691 uno::Reference< uno::XInterface > const & SdrPage::getUnoPage()
1692 {
1693  if( !mxUnoPage.is() )
1694  {
1695  // create one
1697  }
1698 
1699  return mxUnoPage;
1700 }
1701 
1702 uno::Reference< uno::XInterface > SdrPage::createUnoPage()
1703 {
1704  css::uno::Reference< css::uno::XInterface > xInt =
1705  static_cast<cppu::OWeakObject*>( new SvxFmDrawPage( this ) );
1706  return xInt;
1707 }
1708 
1710 {
1711  return pObj->GetStyleSheet();
1712 }
1713 
1715 // #i75566# GetBackgroundColor -> GetPageBackgroundColor and bScreenDisplay hint value
1716 Color SdrPage::GetPageBackgroundColor( SdrPageView const * pView, bool bScreenDisplay ) const
1717 {
1718  Color aColor;
1719 
1720  if(bScreenDisplay && (!pView || pView->GetApplicationDocumentColor() == COL_AUTO))
1721  {
1722  svtools::ColorConfig aColorConfig;
1723  aColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor;
1724  }
1725  else
1726  {
1727  aColor = pView->GetApplicationDocumentColor();
1728  }
1729 
1730  const SfxItemSet* pBackgroundFill = &getSdrPageProperties().GetItemSet();
1731 
1732  if(!IsMasterPage() && TRG_HasMasterPage())
1733  {
1734  if(drawing::FillStyle_NONE == pBackgroundFill->Get(XATTR_FILLSTYLE).GetValue())
1735  {
1736  pBackgroundFill = &TRG_GetMasterPage().getSdrPageProperties().GetItemSet();
1737  }
1738  }
1739 
1740  GetDraftFillColor(*pBackgroundFill, aColor);
1741 
1742  return aColor;
1743 }
1744 
1747 // #i75566# GetBackgroundColor -> GetPageBackgroundColor
1748 {
1749  return GetPageBackgroundColor( nullptr );
1750 }
1751 
1758  const sdr::contact::ViewObjectContact& /*rOriginal*/,
1759  const sdr::contact::DisplayInfo& /*rDisplayInfo*/,
1760  bool /*bEdit*/)
1761 {
1762  // this will be handled in the application if needed
1763  return true;
1764 }
1765 
1766 // DrawContact support: Methods for handling Page changes
1768 {
1769  // Do necessary ViewContact actions
1771 
1772  // #i48535# also handle MasterPage change
1773  if(TRG_HasMasterPage())
1774  {
1776  }
1777 }
1778 
1780 {
1781  return *mpSdrPageProperties;
1782 }
1783 
1785 {
1786  return *mpSdrPageProperties;
1787 }
1788 
1790 {
1792  {
1793  return mpMasterPageDescriptor->getCorrectSdrPageProperties();
1794  }
1795  else
1796  {
1797  return &getSdrPageProperties();
1798  }
1799 }
1800 
1801 
1802 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetUnoPage(css::uno::Reference< css::drawing::XDrawPage > const &)
Definition: svdpage.cxx:1686
SdrPage & TRG_GetMasterPage() const
Definition: svdpage.cxx:1580
long Width() const
void AddPageUser(sdr::PageUser &rNewUser)
Definition: svdpage.cxx:1102
double mnHeight
std::unique_ptr< sdr::MasterPageDescriptor > mpMasterPageDescriptor
Definition: svdpage.hxx:425
void SetNavigationPosition(const sal_uInt32 nPosition)
Definition: svdobj.cxx:871
::std::vector< PageUser * > PageUserVector
Definition: sdrpageuser.hxx:46
sal_Int32 mnWidth
Definition: svdpage.hxx:407
sal_Int32 nIndex
tools::Rectangle maSdrObjListOutRect
Definition: svdpage.hxx:69
Orientation
void UnGroupObj(size_t nObjNum)
Ungroup the object at the given index.
Definition: svdpage.cxx:810
virtual void SetSize(const Size &aSiz)
Definition: svdpage.cxx:1364
SdrPageProperties(SdrPage &rSdrPage)
Definition: svdpage.cxx:1170
void NbcReformatAllTextObjects()
reformat all text objects, e.g. when changing printer
Definition: svdpage.cxx:718
virtual ~SdrObjList()
Definition: svdpage.cxx:140
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:881
Color GetPageBackgroundColor() const
deprecated returns an averaged background color of this page
Definition: svdpage.cxx:1746
sdr::PageUserVector maPageUsers
Definition: svdpage.hxx:382
sal_Int32 GetHeight() const
Definition: svdpage.cxx:1417
void ClearItem(const sal_uInt16 nWhich=0)
Definition: svdpage.cxx:1230
void impClearSdrObjList(bool bBroadcast)
Definition: svdpage.cxx:97
virtual void SetOrientation(Orientation eOri)
Definition: svdpage.cxx:1396
void ReplaceObjectInContainer(SdrObject &rObject, const sal_uInt32 nObjectPosition)
Replace an object in the object list.
Definition: svdpage.cxx:1012
const tools::Rectangle & GetAllObjBoundRect() const
Definition: svdpage.cxx:703
long Height() const
virtual ViewContact * GetParentContact() const
virtual Orientation GetOrientation() const
Definition: svdpage.cxx:1408
bool mbObjOrdNumsDirty
Definition: svdpage.hxx:71
SdrPage(const SdrPage &)=delete
void PutItem(const SfxPoolItem &rItem)
Definition: svdpage.cxx:1223
void SetNavigationOrder(const css::uno::Reference< css::container::XIndexAccess > &rxOrder)
Set the navigation order to the one defined by the given list of XShape objects.
Definition: svdpage.cxx:957
sal_Int32 mnBorderRight
Definition: svdpage.hxx:411
virtual void SetLeftBorder(sal_Int32 nBorder)
Definition: svdpage.cxx:1456
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
Definition: unoshape.cxx:3969
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:307
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdpage.cxx:1189
sal_Int32 mnHeight
Definition: svdpage.hxx:408
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:773
sal_Int32 GetRightBorder() const
Definition: svdpage.cxx:1502
void RecalcObjOrdNums()
recalculate order numbers / ZIndex
Definition: svdpage.cxx:259
bool IsInserted() const
Definition: svdobj.hxx:792
void RecalcPageNums(bool bMaster)
Definition: svdmodel.cxx:1279
size_t GetObjCount() const
Definition: svdpage.cxx:767
void MakePageObjectsNamesUnique()
Definition: svdpage.cxx:1616
SdrObject * GetObjectForNavigationPosition(const sal_uInt32 nNavigationPosition) const
Return the object for the given navigation position.
Definition: svdpage.cxx:901
void CopyObjects(const SdrObjList &rSrcList)
Definition: svdpage.cxx:158
virtual bool isUsedByModel() const override
Definition: svdpage.cxx:1209
bool mbRectsDirty
Definition: svdpage.hxx:72
void TRG_ClearMasterPage()
Definition: svdpage.cxx:1567
OLE object.
Definition: svdobj.hxx:138
virtual SfxItemSet & GetItemSet()
static void Free(SdrObject *&_rpObject)
Definition: svdobj.cxx:423
sal_Int32 GetLowerBorder() const
Definition: svdpage.cxx:1507
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:358
virtual css::uno::Reference< css::uno::XInterface > createUnoPage()
Definition: svdpage.cxx:1702
EmbeddedObjectRef * pObject
struct _xmlTextWriter * xmlTextWriterPtr
SVX_DLLPRIVATE void setParentOfSdrObject(SdrObjList *pNew)
Definition: svdobj.cxx:304
virtual bool checkVisibility(const sdr::contact::ViewObjectContact &rOriginal, const sdr::contact::DisplayInfo &rDisplayInfo, bool bEdit)
this method returns true if the object from the ViewObjectContact should be visible on this page whil...
Definition: svdpage.cxx:1757
void ImpAddStyleSheet(SfxStyleSheet &rNewStyleSheet)
Definition: svdpage.cxx:1151
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:674
sal_Int32 GetLeftBorder() const
Definition: svdpage.cxx:1492
SfxHintId GetId() const
SfxStyleSheet * mpStyleSheet
Definition: svdpage.hxx:315
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:271
void ConnectToNode(bool bTail1, SdrObject *pObj) override
Definition: svdoedge.cxx:454
virtual ~SdrPage() override
Definition: svdpage.cxx:1273
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1624
bool IsEmpty() const
constexpr::Color COL_AUTO(0xFF, 0xFF, 0xFF, 0xFF)
virtual bool IsReadOnly() const
linked page or linked group object
Definition: svdpage.cxx:785
void RemoveObjectFromContainer(const sal_uInt32 nObjectPosition)
Remove an object from the object list.
Definition: svdpage.cxx:1047
#define XATTR_FILL_LAST
Definition: xdef.hxx:127
bool IsMore() const
Definition: svditer.hxx:62
SdrPage * getSdrPageFromSdrObject() const
Definition: svdobj.cxx:289
#define XATTR_FILL_FIRST
Definition: xdef.hxx:106
int nCount
css::uno::Reference< css::uno::XInterface > mxUnoPage
Definition: svdpage.hxx:416
bool mbInserted
Definition: svdpage.hxx:430
SfxStyleSheet * GetStyleSheet() const
Definition: svdobj.cxx:2162
virtual SdrPage * getSdrPageFromSdrObjList() const override
Definition: svdpage.cxx:1548
std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact()
Definition: svdpage.cxx:1119
void BurnInStyleSheetAttributes()
Definition: svdobj.cxx:1779
sal_Int32 mnBorderLeft
Definition: svdpage.hxx:409
sal_Int32 mnBorderUpper
Definition: svdpage.hxx:410
SvGenericNameContainerMapImpl maProperties
void ReformatAllTextObjects()
Definition: svdpage.cxx:734
void TRG_SetMasterPage(SdrPage &rNew)
Definition: svdpage.cxx:1555
virtual void SetChanged(bool bFlg=true)
Definition: svdmodel.cxx:1274
void RemovePageUser(sdr::PageUser &rOldUser)
Definition: svdpage.cxx:1107
const Color & GetApplicationDocumentColor() const
Definition: svdpagv.hxx:258
SdrObject * GetConnectedNode(bool bTail1) const override
Definition: svdoedge.cxx:478
void SetStyleSheet(SfxStyleSheet *pStyleSheet)
Definition: svdpage.cxx:1236
void ReformatAllEdgeObjects()
#103122# reformats all edge objects that are connected to other objects
Definition: svdpage.cxx:743
static const sal_Int32 InitialObjectContainerCapacity(64)
void SetPageNum(sal_uInt16 nNew)
Definition: svdpage.cxx:1513
#define DBG_UNHANDLED_EXCEPTION(...)
std::vector< SdrPageGridFrame * > aList
Definition: svdpage.hxx:293
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
virtual const SdrPageGridFrameList * GetGridFrameList(const SdrPageView *pPV, const tools::Rectangle *pRect) const
for snap-to-grid in Writer, also for AlignObjects if 1 object is marked if pRect != null...
Definition: svdpage.cxx:1643
std::unique_ptr< SdrLayerAdmin > mpLayerAdmin
Definition: svdpage.hxx:414
SdrPage * mpSdrPage
Definition: svdpage.hxx:314
#define DBG_ASSERT(sCon, aError)
uno_Any a
bool mbMaster
Definition: svdpage.hxx:429
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:585
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: svdpage.cxx:1073
virtual SfxStyleSheet * GetTextStyleSheetForObject(SdrObject *pObj) const
Definition: svdpage.cxx:1709
const SdrLayerIDSet & TRG_GetMasterPageVisibleLayers() const
Definition: svdpage.cxx:1586
Size GetSize() const
Definition: svdpage.cxx:1386
sal_Int32 GetUpperBorder() const
Definition: svdpage.cxx:1497
int i
void ActionChanged() const
Definition: svdobj.cxx:283
virtual void SetUpperBorder(sal_Int32 nBorder)
Definition: svdpage.cxx:1465
static void ImpPageChange(SdrPage &rSdrPage)
Definition: svdpage.cxx:1162
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:299
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:823
const SdrLayerAdmin & GetLayerAdmin() const
changing the layers does not set the modified-flag!
Definition: svdpage.cxx:1648
size
bool HasObjectNavigationOrder() const
Return whether there is an explicit, user defined, object navigation order.
Definition: svdpage.cxx:846
bool IsMasterPage() const
Definition: svdpage.hxx:451
::std::vector< SdrObject * > maList
Definition: svdpage.hxx:67
const SfxItemSet & GetItemSet() const
Definition: svdpage.hxx:335
void Reformat()
updates edges that are connected to the edges of this object as if the connected objects send a repai...
Definition: svdoedge.cxx:1634
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
virtual OUString GetLayoutName() const
Definition: svdpage.cxx:1658
SdrPageProperties & getSdrPageProperties()
Definition: svdpage.cxx:1779
void InsertObjectThenMakeNameUnique(SdrObject *pObj)
Definition: svdpage.cxx:332
#define XATTR_FILLSTYLE
Definition: xdef.hxx:107
bool TRG_HasMasterPage() const
Definition: svdpage.hxx:485
virtual SdrObject * NbcRemoveObject(size_t nObjNum)
remove from list without delete
Definition: svdpage.cxx:397
void flushViewObjectContacts(bool bWithHierarchy=true)
virtual ~SdrPageProperties() override
Definition: svdpage.cxx:1184
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual void ActionChanged()
virtual SdrObject * RemoveObject(size_t nObjNum)
Definition: svdpage.cxx:436
long X() const
OUString GetName() const
Definition: svdobj.cxx:725
void ActionChildInserted(ViewContact &rChild)
sal_uInt16 GetCount() const
Definition: svdpage.hxx:303
void SetObjectNavigationPosition(SdrObject &rObject, const sal_uInt32 nNewNavigationPosition)
Set the navigation position of the given object to the specified value.
Definition: svdpage.cxx:848
void SetParent(const SfxItemSet *pNew)
virtual void SetRightBorder(sal_Int32 nBorder)
Definition: svdpage.cxx:1474
void lateInit(const SdrPage &rSrcPage)
Definition: svdpage.cxx:1309
virtual SdrPage * CloneSdrPage(SdrModel &rTargetModel) const
Definition: svdpage.cxx:1357
SdrPageGridFrame * GetObject(sal_uInt16 i) const
Definition: svdpage.hxx:297
sal_Int32 mnBorderLower
Definition: svdpage.hxx:412
SdrModel & getSdrModelFromSdrPage() const
Definition: svdpage.hxx:391
virtual void NbcReformatText()
Definition: svdobj.cxx:1775
virtual void SetLowerBorder(sal_Int32 nBorder)
Definition: svdpage.cxx:1483
SdrObject * Next()
Definition: svditer.hxx:63
void ActionChanged()
Definition: svdpage.cxx:1767
void InsertedStateChange()
Definition: svdobj.cxx:2558
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void Broadcast(const SfxHint &rHint)
void SetInserted(bool bNew=true)
Definition: svdpage.cxx:1663
void sort(std::vector< sal_Int32 > &sortOrder)
Definition: svdpage.cxx:588
sdr::contact::ViewContact & TRG_GetMasterPageDescriptorViewContact() const
Definition: svdpage.cxx:1598
bool IsInserted() const
Definition: svdpage.hxx:453
void BurnInStyleSheetAttributes()
convert attributes of the style to hard formatting
Definition: svdpage.cxx:759
virtual SdrObject * ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
Replace existing object by different one.
Definition: svdpage.cxx:492
void TRG_ImpMasterPageRemoved(const SdrPage &rRemovedPage)
Definition: svdpage.cxx:1605
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
tools::Rectangle & Union(const tools::Rectangle &rRect)
const sdr::contact::ViewContact & GetViewContact() const
Definition: svdpage.cxx:1124
bool RecalcNavigationPositions()
Set the navigation position of all SdrObjects to their position in the mxNavigationOrder list...
Definition: svdpage.cxx:936
void ClearSdrObjList()
Definition: svdpage.cxx:134
void SetOrdNum(sal_uInt32 nNum)
Definition: svdobj.cxx:836
SfxStyleSheet * GetStyleSheet() const
Definition: svdpage.hxx:342
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
Definition: svdpage.cxx:1691
std::unique_ptr< sdr::contact::ViewContact > mpViewContact
Definition: svdpage.hxx:384
void ClearObjectNavigationOrder()
Restore the navigation order to that defined by the z-order.
Definition: svdpage.cxx:929
const SdrPageProperties * getCorrectSdrPageProperties() const
Definition: svdpage.cxx:1789
double mnWidth
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual SdrPage * getSdrPageFromSdrObjList() const
Definition: svdpage.cxx:146
std::unique_ptr< WeakSdrObjectContainerType > mxNavigationOrder
This list, if it exists, defines the navigation order.
Definition: svdpage.hxx:229
static void impChildInserted(SdrObject const &rChild)
simple ActionChildInserted forwarder to have it on a central place
Definition: svdpage.cxx:297
void SetSdrObjListRectsDirty()
Definition: svdpage.cxx:286
void TRG_SetMasterPageVisibleLayers(const SdrLayerIDSet &rNew)
Definition: svdpage.cxx:1592
const Point & GetAnchorPos() const
Definition: svdobj.cxx:1615
void InsertObjectIntoContainer(SdrObject &rObject, const sal_uInt32 nInsertPosition)
Insert an SdrObject into maList.
Definition: svdpage.cxx:986
virtual void SetRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:462
SdrObjList()
Definition: svdpage.cxx:85
virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr)
Definition: svdpage.cxx:1422
bool mbIsNavigationOrderDirty
This flag is when the mpNavigation list has been changed but the indices of the referenced Sdr...
Definition: svdpage.hxx:236
SfxItemSet maProperties
Definition: svdpage.hxx:316
bool mbObjectsNotPersistent
Definition: svdpage.hxx:431
virtual void NbcSetAnchorPos(const Point &rPnt)
Definition: svdobj.cxx:1597
void ImpRemoveStyleSheet()
Definition: svdpage.cxx:1141
bool mbPageBorderOnlyLeftRight
Definition: svdpage.hxx:434
virtual SdrObject * SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
Modify ZOrder of an SdrObject.
Definition: svdpage.cxx:556
WeakSdrObjectContainerType(const sal_Int32 nInitialSize)
Definition: svdpage.cxx:69
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
sal_Int32 GetWidth() const
Definition: svdpage.cxx:1391
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:325
std::unique_ptr< SdrPageProperties > mpSdrPageProperties
Definition: svdpage.hxx:415
tools::Rectangle maSdrObjListSnapRect
Definition: svdpage.hxx:70
bool GetDraftFillColor(const SfxItemSet &rSet, Color &rCol)
Returns a replacement for an XFillStyle.
Definition: svdetc.cxx:246
sal_uInt16 GetPageNum() const
Definition: svdpage.cxx:1525
sal_uInt16 nPageNum
Definition: svdpage.hxx:427
const tools::Rectangle & GetAllObjSnapRect() const
Definition: svdpage.cxx:694
virtual SdrObject * getSdrObjectFromSdrObjList() const
Definition: svdpage.cxx:152
void SetChanged()
Definition: svdpage.cxx:1540
aStr
void MakeNameUnique(std::unordered_set< OUString > &rNameSet)
Definition: svdobj.cxx:3021
void RecalcRects()
Definition: svdpage.cxx:269
long Y() const
void PutItemSet(const SfxItemSet &rSet)
Definition: svdpage.cxx:1216
void FlattenGroups()
Makes the object list flat, i.e.
Definition: svdpage.cxx:803
void SetParentAtSdrObjectFromSdrObjList(SdrObject &rSdrObject, SdrObjList *pNew)
Definition: svdpage.cxx:78
Utility class SdrEdgeObj.
Definition: svdoedge.hxx:128