LibreOffice Module svx (master)  1
svdmark.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 <sal/config.h>
21 
22 #include <osl/time.h>
23 #include <svx/svdmark.hxx>
24 #include <svx/svdetc.hxx>
25 #include <svx/svdobj.hxx>
26 #include <svx/svdpage.hxx>
27 #include <svx/svditer.hxx>
28 #include <svx/svdpagv.hxx>
29 #include <svx/svdopath.hxx>
30 #include <svx/svdogrp.hxx>
31 #include <svx/svdorect.hxx>
32 #include <svx/strings.hrc>
33 #include <svx/dialmgr.hxx>
34 
35 
36 #include <svx/obj3d.hxx>
37 #include <svx/scene3d.hxx>
38 #include <svl/SfxBroadcaster.hxx>
39 #include <svx/svdoedge.hxx>
40 
41 #include <cassert>
42 
44 {
45  TimeValue aNow;
46  osl_getSystemTime(&aNow);
47  mnTimeStamp = sal_Int64(aNow.Seconds) * 1000000000L + aNow.Nanosec;
48 }
49 
50 SdrMark::SdrMark(SdrObject* pNewObj, SdrPageView* pNewPageView)
51 : mpSelectedSdrObject(pNewObj),
52  mpPageView(pNewPageView),
53  mbCon1(false),
54  mbCon2(false),
55  mnUser(0)
56 {
58  {
60  }
61  setTime();
62 }
63 
65 : ObjectUser(),
66  mnTimeStamp(0),
67  mpSelectedSdrObject(nullptr),
68  mpPageView(nullptr),
69  mbCon1(false),
70  mbCon2(false),
71  mnUser(0)
72 {
73  *this = rMark;
74 }
75 
77 {
79  {
81  }
82 }
83 
85 {
86  (void) rObject; // avoid warnings
87  OSL_ENSURE(mpSelectedSdrObject && mpSelectedSdrObject == &rObject, "SdrMark::ObjectInDestruction: called from object different from hosted one (!)");
88  OSL_ENSURE(mpSelectedSdrObject, "SdrMark::ObjectInDestruction: still selected SdrObject is deleted, deselect first (!)");
89  mpSelectedSdrObject = nullptr;
90 }
91 
93 {
95  {
97  }
98 
99  mpSelectedSdrObject = pNewObj;
100 
102  {
104  }
105 }
106 
108 {
110 
111  mnTimeStamp = rMark.mnTimeStamp;
112  mpPageView = rMark.mpPageView;
113  mbCon1 = rMark.mbCon1;
114  mbCon2 = rMark.mbCon2;
115  mnUser = rMark.mnUser;
116  maPoints = rMark.maPoints;
117  maGluePoints = rMark.maGluePoints;
118 
119  return *this;
120 }
121 
122 static bool ImpSdrMarkListSorter(std::unique_ptr<SdrMark> const& lhs, std::unique_ptr<SdrMark> const& rhs)
123 {
124  SdrObject* pObj1 = lhs->GetMarkedSdrObj();
125  SdrObject* pObj2 = rhs->GetMarkedSdrObj();
126  SdrObjList* pOL1 = pObj1 ? pObj1->getParentSdrObjListFromSdrObject() : nullptr;
127  SdrObjList* pOL2 = pObj2 ? pObj2->getParentSdrObjListFromSdrObject() : nullptr;
128 
129  if (pOL1 == pOL2)
130  {
131  // AF: Note that I reverted a change from sal_uInt32 to sal_uLong (made
132  // for 64bit compliance, #i78198#) because internally in SdrObject
133  // both nOrdNum and mnNavigationPosition are stored as sal_uInt32.
134  sal_uInt32 nObjOrd1(pObj1 ? pObj1->GetNavigationPosition() : 0);
135  sal_uInt32 nObjOrd2(pObj2 ? pObj2->GetNavigationPosition() : 0);
136 
137  return nObjOrd1 < nObjOrd2;
138  }
139  else
140  {
141  return pOL1 < pOL2;
142  }
143 }
144 
145 
147 {
148  if(!mbSorted)
149  {
150  const_cast<SdrMarkList*>(this)->ImpForceSort();
151  }
152 }
153 
155 {
156  if(!mbSorted)
157  {
158  mbSorted = true;
159  size_t nCount = maList.size();
160 
161  // remove invalid
162  if(nCount > 0 )
163  {
164  maList.erase(std::remove_if(maList.begin(), maList.end(),
165  [](std::unique_ptr<SdrMark>& rItem) { return rItem->GetMarkedSdrObj() == nullptr; }),
166  maList.end());
167  nCount = maList.size();
168  }
169 
170  if(nCount > 1)
171  {
172  std::sort(maList.begin(), maList.end(), ImpSdrMarkListSorter);
173 
174  // remove duplicates
175  if(maList.size() > 1)
176  {
177  SdrMark* pCurrent = maList.back().get();
178  for (size_t count = maList.size() - 1; count; --count)
179  {
180  size_t i = count - 1;
181  SdrMark* pCmp = maList[i].get();
182  assert(pCurrent->GetMarkedSdrObj());
183  if(pCurrent->GetMarkedSdrObj() == pCmp->GetMarkedSdrObj())
184  {
185  // Con1/Con2 Merging
186  if(pCmp->IsCon1())
187  pCurrent->SetCon1(true);
188 
189  if(pCmp->IsCon2())
190  pCurrent->SetCon2(true);
191 
192  // delete pCmp
193  maList.erase(maList.begin() + i);
194  }
195  else
196  {
197  pCurrent = pCmp;
198  }
199  }
200  }
201  }
202  }
203 }
204 
206 {
207  maList.clear();
208  mbSorted = true; //we're empty, so can be considered sorted
209  SetNameDirty();
210 }
211 
213 {
214  if (this != &rLst)
215  {
216  Clear();
217 
218  for(size_t i = 0; i < rLst.GetMarkCount(); ++i)
219  {
220  SdrMark* pMark = rLst.GetMark(i);
221  maList.emplace_back(new SdrMark(*pMark));
222  }
223 
224  maMarkName = rLst.maMarkName;
225  mbNameOk = rLst.mbNameOk;
226  maPointName = rLst.maPointName;
229  mbSorted = rLst.mbSorted;
230  }
231  return *this;
232 }
233 
234 SdrMark* SdrMarkList::GetMark(size_t nNum) const
235 {
236  return (nNum < maList.size()) ? maList[nNum].get() : nullptr;
237 }
238 
239 size_t SdrMarkList::FindObject(const SdrObject* pObj) const
240 {
241  // Since relying on OrdNums is not allowed for the selection because objects in the
242  // selection may not be inserted in a list if they are e.g. modified ATM, i changed
243  // this loop to just look if the object pointer is in the selection.
244 
245  // Problem is that GetOrdNum() which is const, internally casts to non-const and
246  // hardly sets the OrdNum member of the object (nOrdNum) to 0 (ZERO) if the object
247  // is not inserted in an object list.
248  // Since this may be by purpose and necessary somewhere else i decided that it is
249  // less dangerous to change this method then changing SdrObject::GetOrdNum().
250  if(pObj)
251  {
252  for(size_t a = 0; a < maList.size(); ++a)
253  {
254  if(maList[a]->GetMarkedSdrObj() == pObj)
255  {
256  return a;
257  }
258  }
259  }
260 
261  return SAL_MAX_SIZE;
262 }
263 
264 void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort)
265 {
266  SetNameDirty();
267  const size_t nCount(maList.size());
268 
269  if(!bChkSort || !mbSorted || nCount == 0)
270  {
271  if(!bChkSort)
272  mbSorted = false;
273 
274  maList.emplace_back(new SdrMark(rMark));
275  }
276  else
277  {
278  SdrMark* pLast = GetMark(nCount - 1);
279  const SdrObject* pLastObj = pLast->GetMarkedSdrObj();
280  const SdrObject* pNewObj = rMark.GetMarkedSdrObj();
281 
282  if(pLastObj == pNewObj)
283  {
284  // This one already exists.
285  // Con1/Con2 Merging
286  if(rMark.IsCon1())
287  pLast->SetCon1(true);
288 
289  if(rMark.IsCon2())
290  pLast->SetCon2(true);
291  }
292  else
293  {
294  maList.emplace_back(new SdrMark(rMark));
295 
296  // now check if the sort is ok
297  const SdrObjList* pLastOL = pLastObj!=nullptr ? pLastObj->getParentSdrObjListFromSdrObject() : nullptr;
298  const SdrObjList* pNewOL = pNewObj !=nullptr ? pNewObj->getParentSdrObjListFromSdrObject() : nullptr;
299 
300  if(pLastOL == pNewOL)
301  {
302  const sal_uLong nLastNum(pLastObj!=nullptr ? pLastObj->GetOrdNum() : 0);
303  const sal_uLong nNewNum(pNewObj !=nullptr ? pNewObj ->GetOrdNum() : 0);
304 
305  if(nNewNum < nLastNum)
306  {
307  // at some point, we have to sort
308  mbSorted = false;
309  }
310  }
311  else
312  {
313  // at some point, we have to sort
314  mbSorted = false;
315  }
316  }
317  }
318 }
319 
320 void SdrMarkList::DeleteMark(size_t nNum)
321 {
322  SdrMark* pMark = GetMark(nNum);
323  DBG_ASSERT(pMark!=nullptr,"DeleteMark: MarkEntry not found.");
324 
325  if(pMark)
326  {
327  maList.erase(maList.begin() + nNum);
328  if (maList.empty())
329  mbSorted = true; //we're empty, so can be considered sorted
330  SetNameDirty();
331  }
332 }
333 
334 void SdrMarkList::ReplaceMark(const SdrMark& rNewMark, size_t nNum)
335 {
336  SdrMark* pMark = GetMark(nNum);
337  DBG_ASSERT(pMark!=nullptr,"ReplaceMark: MarkEntry not found.");
338 
339  if(pMark)
340  {
341  SetNameDirty();
342  maList[nNum].reset(new SdrMark(rNewMark));
343  mbSorted = false;
344  }
345 }
346 
347 void SdrMarkList::Merge(const SdrMarkList& rSrcList, bool bReverse)
348 {
349  const size_t nCount(rSrcList.maList.size());
350 
351  if(rSrcList.mbSorted)
352  {
353  // merge without forcing a Sort in rSrcList
354  bReverse = false;
355  }
356 
357  if(!bReverse)
358  {
359  for(size_t i = 0; i < nCount; ++i)
360  {
361  SdrMark* pM = rSrcList.maList[i].get();
362  InsertEntry(*pM);
363  }
364  }
365  else
366  {
367  for(size_t i = nCount; i > 0;)
368  {
369  --i;
370  SdrMark* pM = rSrcList.maList[i].get();
371  InsertEntry(*pM);
372  }
373  }
374 }
375 
377 {
378  bool bChgd(false);
379 
380  for(auto it = maList.begin(); it != maList.end(); )
381  {
382  SdrMark* pMark = it->get();
383 
384  if(pMark->GetPageView()==&rPV)
385  {
386  it = maList.erase(it);
387  SetNameDirty();
388  bChgd = true;
389  }
390  else
391  ++it;
392  }
393 
394  return bChgd;
395 }
396 
398 {
399  bool bChgd(false);
400  DeletePageView(rPV); // delete all of them, then append the entire page
401  const SdrObjList* pOL = rPV.GetObjList();
402  const size_t nObjCount(pOL->GetObjCount());
403 
404  for(size_t nO = 0; nO < nObjCount; ++nO)
405  {
406  SdrObject* pObj = pOL->GetObj(nO);
407  bool bDoIt(rPV.IsObjMarkable(pObj));
408 
409  if(bDoIt)
410  {
411  maList.emplace_back(new SdrMark(pObj, const_cast<SdrPageView*>(&rPV)));
412  SetNameDirty();
413  bChgd = true;
414  }
415  }
416 
417  return bChgd;
418 }
419 
420 const OUString& SdrMarkList::GetMarkDescription() const
421 {
422  const size_t nCount(GetMarkCount());
423 
424  if(mbNameOk && 1 == nCount)
425  {
426  // if it's a single selection, cache only text frame
427  const SdrObject* pObj = GetMark(0)->GetMarkedSdrObj();
428  const SdrTextObj* pTextObj = dynamic_cast<const SdrTextObj*>( pObj );
429 
430  if(!pTextObj || !pTextObj->IsTextFrame())
431  {
432  const_cast<SdrMarkList*>(this)->mbNameOk = false;
433  }
434  }
435 
436  if(!mbNameOk)
437  {
438  SdrMark* pMark = GetMark(0);
439  OUString aNam;
440 
441  if(!nCount)
442  {
443  const_cast<SdrMarkList*>(this)->maMarkName = SvxResId(STR_ObjNameNoObj);
444  }
445  else if(1 == nCount)
446  {
447  if(pMark->GetMarkedSdrObj())
448  {
449  aNam = pMark->GetMarkedSdrObj()->TakeObjNameSingul();
450  }
451  }
452  else
453  {
454  if(pMark->GetMarkedSdrObj())
455  {
456  aNam = pMark->GetMarkedSdrObj()->TakeObjNamePlural();
457  bool bEq(true);
458 
459  for(size_t i = 1; i < GetMarkCount() && bEq; ++i)
460  {
461  SdrMark* pMark2 = GetMark(i);
462  OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural());
463  bEq = aNam == aStr1;
464  }
465 
466  if(!bEq)
467  {
468  aNam = SvxResId(STR_ObjNamePlural);
469  }
470  }
471 
472  aNam = OUString::number( nCount ) + " " + aNam;
473  }
474 
475  const_cast<SdrMarkList*>(this)->maMarkName = aNam;
476  const_cast<SdrMarkList*>(this)->mbNameOk = true;
477  }
478 
479  return maMarkName;
480 }
481 
482 const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const
483 {
484  bool& rNameOk = const_cast<bool&>(bGlue ? mbGluePointNameOk : mbPointNameOk);
485  OUString& rName = const_cast<OUString&>(bGlue ? maGluePointName : maPointName);
486  const size_t nMarkCount(GetMarkCount());
487  size_t nMarkPtCnt(0);
488  size_t nMarkPtObjCnt(0);
489  size_t n1stMarkNum(SAL_MAX_SIZE);
490 
491  for(size_t nMarkNum = 0; nMarkNum < nMarkCount; ++nMarkNum)
492  {
493  const SdrMark* pMark = GetMark(nMarkNum);
494  const SdrUShortCont& rPts = bGlue ? pMark->GetMarkedGluePoints() : pMark->GetMarkedPoints();
495 
496  if (!rPts.empty())
497  {
498  if(n1stMarkNum == SAL_MAX_SIZE)
499  {
500  n1stMarkNum = nMarkNum;
501  }
502 
503  nMarkPtCnt += rPts.size();
504  nMarkPtObjCnt++;
505  }
506 
507  if(nMarkPtObjCnt > 1 && rNameOk)
508  {
509  // preliminary decision
510  return rName;
511  }
512  }
513 
514  if(rNameOk && 1 == nMarkPtObjCnt)
515  {
516  // if it's a single selection, cache only text frame
517  const SdrObject* pObj = GetMark(0)->GetMarkedSdrObj();
518  const SdrTextObj* pTextObj = dynamic_cast<const SdrTextObj*>( pObj );
519 
520  if(!pTextObj || !pTextObj->IsTextFrame())
521  {
522  rNameOk = false;
523  }
524  }
525 
526  if(!nMarkPtObjCnt)
527  {
528  rName.clear();
529  rNameOk = true;
530  }
531  else if(!rNameOk)
532  {
533  const SdrMark* pMark = GetMark(n1stMarkNum);
534  OUString aNam;
535 
536  if(1 == nMarkPtObjCnt)
537  {
538  if(pMark->GetMarkedSdrObj())
539  {
540  aNam = pMark->GetMarkedSdrObj()->TakeObjNameSingul();
541  }
542  }
543  else
544  {
545  if(pMark->GetMarkedSdrObj())
546  {
547  aNam = pMark->GetMarkedSdrObj()->TakeObjNamePlural();
548  }
549 
550  bool bEq(true);
551 
552  for(size_t i = n1stMarkNum + 1; i < GetMarkCount() && bEq; ++i)
553  {
554  const SdrMark* pMark2 = GetMark(i);
555  const SdrUShortCont& rPts = bGlue ? pMark2->GetMarkedGluePoints() : pMark2->GetMarkedPoints();
556 
557  if (!rPts.empty() && pMark2->GetMarkedSdrObj())
558  {
559  OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural());
560  bEq = aNam == aStr1;
561  }
562  }
563 
564  if(!bEq)
565  {
566  aNam = SvxResId(STR_ObjNamePlural);
567  }
568 
569  aNam = OUString::number( nMarkPtObjCnt ) + " " + aNam;
570  }
571 
572  OUString aStr1;
573 
574  if(1 == nMarkPtCnt)
575  {
576  aStr1 = SvxResId(bGlue ? STR_ViewMarkedGluePoint : STR_ViewMarkedPoint);
577  }
578  else
579  {
580  aStr1 = SvxResId(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints);
581  aStr1 = aStr1.replaceFirst("%2", OUString::number( nMarkPtCnt ));
582  }
583 
584  aStr1 = aStr1.replaceFirst("%1", aNam);
585  rName = aStr1;
586  rNameOk = true;
587  }
588 
589  return rName;
590 }
591 
593 {
594  bool bFnd(false);
595  tools::Rectangle aR;
596 
597  for(size_t i = 0; i < GetMarkCount(); ++i)
598  {
599  SdrMark* pMark = GetMark(i);
600 
601  if(!pPV || pMark->GetPageView() == pPV)
602  {
603  if(pMark->GetMarkedSdrObj())
604  {
605  aR = pMark->GetMarkedSdrObj()->GetCurrentBoundRect();
606 
607  if(bFnd)
608  {
609  rRect.Union(aR);
610  }
611  else
612  {
613  rRect = aR;
614  bFnd = true;
615  }
616  }
617  }
618  }
619 
620  return bFnd;
621 }
622 
624 {
625  bool bFnd(false);
626 
627  for(size_t i = 0; i < GetMarkCount(); ++i)
628  {
629  SdrMark* pMark = GetMark(i);
630 
631  if(!pPV || pMark->GetPageView() == pPV)
632  {
633  if(pMark->GetMarkedSdrObj())
634  {
636 
637  if(bFnd)
638  {
639  rRect.Union(aR);
640  }
641  else
642  {
643  rRect = aR;
644  bFnd = true;
645  }
646  }
647  }
648  }
649 
650  return bFnd;
651 }
652 
653 
654 namespace sdr
655 {
657  : mbEdgesOfMarkedNodesDirty(false)
658  {
659  }
660 
662  {
664  {
668  maAllMarkedObjects.clear();
669  }
670  }
671 
673  {
675  {
676  const_cast<ViewSelection*>(this)->ImpForceEdgesOfMarkedNodes();
677  }
678 
679  return maEdgesOfMarkedNodes;
680  }
681 
683  {
685  {
686  const_cast<ViewSelection*>(this)->ImpForceEdgesOfMarkedNodes();
687  }
688 
690  }
691 
692  const std::vector<SdrObject*>& ViewSelection::GetAllMarkedObjects() const
693  {
695  const_cast<ViewSelection*>(this)->ImpForceEdgesOfMarkedNodes();
696 
697  return maAllMarkedObjects;
698  }
699 
701  {
702  if(pObj)
703  {
704  bool bIsGroup(pObj->IsGroupObject());
705 
706  if(bIsGroup && dynamic_cast< const E3dObject* >(pObj) != nullptr && dynamic_cast< const E3dScene* >(pObj) == nullptr)
707  {
708  bIsGroup = false;
709  }
710 
711  if(bIsGroup)
712  {
713  SdrObjList* pList = pObj->GetSubList();
714 
715  for(size_t a = 0; a < pList->GetObjCount(); ++a)
716  {
717  SdrObject* pObj2 = pList->GetObj(a);
719  }
720  }
721 
722  maAllMarkedObjects.push_back(pObj);
723  }
724  }
725 
727  {
729  {
734  maAllMarkedObjects.clear();
735 
736  // GetMarkCount after ForceSort
737  const size_t nMarkCount(maMarkedObjectList.GetMarkCount());
738 
739  for(size_t a = 0; a < nMarkCount; ++a)
740  {
742 
743  if(pCandidate)
744  {
745  // build transitive hull
746  ImplCollectCompleteSelection(pCandidate);
747 
748  // travel over broadcaster/listener to access edges connected to the selected object
749  const SfxBroadcaster* pBC = pCandidate->GetBroadcaster();
750 
751  if(pBC)
752  {
753  const size_t nLstCnt(pBC->GetSizeOfVector());
754 
755  for(size_t nl=0; nl < nLstCnt; ++nl)
756  {
757  SfxListener* pLst = pBC->GetListener(nl);
758  SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( pLst );
759 
760  if(pEdge && pEdge->IsInserted() && pEdge->getSdrPageFromSdrObject() == pCandidate->getSdrPageFromSdrObject())
761  {
763 
764  if(pEdge->GetConnectedNode(true) == pCandidate)
765  {
766  aM.SetCon1(true);
767  }
768 
769  if(pEdge->GetConnectedNode(false) == pCandidate)
770  {
771  aM.SetCon2(true);
772  }
773 
774  if(SAL_MAX_SIZE == maMarkedObjectList.FindObject(pEdge))
775  {
776  // check if it itself is selected
778  }
779  else
780  {
782  }
783  }
784  }
785  }
786  }
787  }
788 
791  }
792  }
793 } // end of namespace sdr
794 
795 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbCon2
Definition: svdmark.hxx:51
SVX_DLLPRIVATE void ImplCollectCompleteSelection(SdrObject *pObj)
Definition: svdmark.cxx:700
const SdrUShortCont & GetMarkedGluePoints() const
Definition: svdmark.hxx:114
const size_t count(pCandidateA->getBorderLines().size())
void setTime()
Definition: svdmark.cxx:43
size_t GetMarkCount() const
Definition: svdmark.hxx:179
virtual void ObjectInDestruction(const SdrObject &rObject) override
Definition: svdmark.cxx:84
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:881
bool mbCon1
Definition: svdmark.hxx:50
const SdrUShortCont & GetMarkedPoints() const
Definition: svdmark.hxx:109
SdrUShortCont maGluePoints
Definition: svdmark.hxx:49
SdrUShortCont maPoints
Definition: svdmark.hxx:48
void RemoveObjectUser(sdr::ObjectUser &rOldUser)
Definition: svdobj.cxx:253
sal_uIntPtr sal_uLong
bool IsCon1() const
Definition: svdmark.hxx:84
bool IsTextFrame() const
Definition: svdotext.hxx:343
bool mbEdgesOfMarkedNodesDirty
Definition: svdmark.hxx:234
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:773
bool IsInserted() const
Definition: svdobj.hxx:792
size_t GetObjCount() const
Definition: svdpage.cxx:767
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1045
const SfxBroadcaster * GetBroadcaster() const
Definition: svdobj.cxx:654
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:234
SdrPageView * mpPageView
Definition: svdmark.hxx:47
std::set< sal_uInt16 > SdrUShortCont
Definition: svdmark.hxx:35
void ReplaceMark(const SdrMark &rNewMark, size_t nNum)
Definition: svdmark.cxx:334
void Clear()
Definition: svdmark.cxx:205
void DeleteMark(size_t nNum)
Definition: svdmark.cxx:320
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:674
bool TakeSnapRect(SdrPageView const *pPageView, tools::Rectangle &rRect) const
Definition: svdmark.cxx:623
OUString maPointName
Definition: svdmark.hxx:140
void AddObjectUser(sdr::ObjectUser &rNewUser)
Definition: svdobj.cxx:248
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1624
const SdrMarkList & GetMarkedEdgesOfMarkedNodes() const
Definition: svdmark.cxx:682
bool InsertPageView(const SdrPageView &rPV)
Definition: svdmark.cxx:397
sal_Int64 mnTimeStamp
Definition: svdmark.hxx:45
SVX_DLLPRIVATE void ImpForceEdgesOfMarkedNodes()
Definition: svdmark.cxx:726
void SetNameDirty()
Definition: svdmark.hxx:194
SdrPage * getSdrPageFromSdrObject() const
Definition: svdobj.cxx:289
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
static bool ImpSdrMarkListSorter(std::unique_ptr< SdrMark > const &lhs, std::unique_ptr< SdrMark > const &rhs)
Definition: svdmark.cxx:122
int nCount
size_t GetSizeOfVector() const
bool mbNameOk
Definition: svdmark.hxx:145
SVX_DLLPRIVATE void ImpForceSort()
Definition: svdmark.cxx:154
OUString maMarkName
Definition: svdmark.hxx:139
const SdrMarkList & GetEdgesOfMarkedNodes() const
Definition: svdmark.cxx:672
bool TakeBoundRect(SdrPageView const *pPageView, tools::Rectangle &rRect) const
Definition: svdmark.cxx:592
SdrObject * GetConnectedNode(bool bTail1) const override
Definition: svdoedge.cxx:478
SdrObject * mpSelectedSdrObject
Definition: svdmark.hxx:46
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:176
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:67
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:43
SfxListener * GetListener(size_t nNo) const
#define DBG_ASSERT(sCon, aError)
uno_Any a
void Merge(const SdrMarkList &rSrcList, bool bReverse=false)
Definition: svdmark.cxx:347
const std::vector< SdrObject * > & GetAllMarkedObjects() const
Definition: svdmark.cxx:692
int i
SdrPageView * GetPageView() const
Definition: svdmark.hxx:69
void SetCon1(bool bOn)
Definition: svdmark.hxx:79
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
bool IsGroupObject() const
Definition: svdobj.cxx:669
Abstract DrawObject.
Definition: svdobj.hxx:312
bool mbPointNameOk
Definition: svdmark.hxx:143
void SetMarkedSdrObj(SdrObject *pNewObj)
Definition: svdmark.cxx:92
void ForceSort() const
Definition: svdmark.cxx:146
bool mbSorted
Definition: svdmark.hxx:146
tools::Rectangle & Union(const tools::Rectangle &rRect)
virtual ~SdrMark()
Definition: svdmark.cxx:76
SdrMarkList maMarkedEdgesOfMarkedNodes
Definition: svdmark.hxx:231
std::vector< std::unique_ptr< SdrMark > > maList
Definition: svdmark.hxx:137
SdrMark & operator=(const SdrMark &rMark)
Definition: svdmark.cxx:107
std::vector< SdrObject * > maAllMarkedObjects
Definition: svdmark.hxx:232
sal_uInt32 GetNavigationPosition() const
Definition: svdobj.cxx:860
const OUString & GetPointMarkDescription() const
Definition: svdmark.hxx:204
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1060
OUString maGluePointName
Definition: svdmark.hxx:141
void SetEdgesOfMarkedNodesDirty()
Definition: svdmark.cxx:661
SdrMarkList maMarkedObjectList
Definition: svdmark.hxx:229
SdrMark(SdrObject *pNewObj=nullptr, SdrPageView *pNewPageView=nullptr)
Definition: svdmark.cxx:50
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:325
bool IsCon2() const
Definition: svdmark.hxx:94
bool mbGluePointNameOk
Definition: svdmark.hxx:144
const OUString & GetMarkDescription() const
Definition: svdmark.cxx:420
SdrMarkList & operator=(const SdrMarkList &rLst)
Definition: svdmark.cxx:212
sal_uInt16 mnUser
Definition: svdmark.hxx:52
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
Definition: svdmark.cxx:264
size_t FindObject(const SdrObject *pObj) const
Definition: svdmark.cxx:239
SdrMarkList maEdgesOfMarkedNodes
Definition: svdmark.hxx:230
bool IsObjMarkable(SdrObject const *pObj) const
At least one member must be visible for the Group object and it must not be locked.
Definition: svdpagv.cxx:596
Utility class SdrEdgeObj.
Definition: svdoedge.hxx:128
void SetCon2(bool bOn)
Definition: svdmark.hxx:89
bool DeletePageView(const SdrPageView &rPV)
Definition: svdmark.cxx:376
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo