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