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