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