LibreOffice Module svx (master)  1
svdmrkv.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 
21 #include <svx/svdmrkv.hxx>
22 #include <svx/svdview.hxx>
23 #include <svx/svdpagv.hxx>
24 #include <svx/svdpage.hxx>
25 #include <svx/svdotable.hxx>
26 
27 #include <osl/thread.h>
28 #include <rtl/strbuf.hxx>
29 #include <svx/svdoole2.hxx>
30 #include <svx/xgrad.hxx>
31 #include <svx/xfillit0.hxx>
32 #include <svx/xflgrit.hxx>
33 #include "gradtrns.hxx"
34 #include <svx/xflftrit.hxx>
35 #include <svx/dialmgr.hxx>
36 #include <svx/strings.hrc>
37 #include <svx/svdundo.hxx>
38 #include <svx/svdopath.hxx>
39 #include <svx/scene3d.hxx>
40 #include <svx/svdovirt.hxx>
47 #include <svx/sdrpaintwindow.hxx>
48 #include <svx/sdrpagewindow.hxx>
49 #include <svx/sdrhittesthelper.hxx>
50 #include <vcl/uitest/logger.hxx>
52 
53 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
54 #include <comphelper/lok.hxx>
55 #include <sfx2/lokhelper.hxx>
56 #include <sfx2/lokcharthelper.hxx>
57 #include <sfx2/viewsh.hxx>
58 
59 #include <array>
60 
61 #include <com/sun/star/frame/XController.hpp>
62 #include <com/sun/star/view/XSelectionSupplier.hpp>
63 
64 #include <boost/property_tree/json_parser.hpp>
65 
66 using namespace com::sun::star;
67 
68 // Migrate Marking of Objects, Points and GluePoints
69 
71 {
72  // The OverlayObjects
74 
75  // The remembered second position in logical coordinates
77 
78  // A flag to remember if the action is for unmarking.
79  bool mbUnmarking : 1;
80 
81 public:
82  ImplMarkingOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos, bool bUnmarking);
83 
84  // The OverlayObjects are cleared using the destructor of OverlayObjectList.
85  // That destructor calls clear() at the list which removes all objects from the
86  // OverlayManager and deletes them.
87 
88  void SetSecondPosition(const basegfx::B2DPoint& rNewPosition);
89  bool IsUnmarking() const { return mbUnmarking; }
90 };
91 
92 ImplMarkingOverlay::ImplMarkingOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos, bool bUnmarking)
93 : maSecondPosition(rStartPos),
94  mbUnmarking(bUnmarking)
95 {
97  return; // We do client-side object manipulation with the Kit API
98 
99  for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
100  {
101  SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
102  const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
103 
104  if (xTargetOverlay.is())
105  {
106  std::unique_ptr<sdr::overlay::OverlayRollingRectangleStriped> pNew(new sdr::overlay::OverlayRollingRectangleStriped(
107  rStartPos, rStartPos, false));
108  xTargetOverlay->add(*pNew);
109  maObjects.append(std::move(pNew));
110  }
111  }
112 }
113 
115 {
116  if(rNewPosition != maSecondPosition)
117  {
118  // apply to OverlayObjects
119  for(sal_uInt32 a(0); a < maObjects.count(); a++)
120  {
122  rCandidate.setSecondPosition(rNewPosition);
123  }
124 
125  // remember new position
126  maSecondPosition = rNewPosition;
127  }
128 }
129 
131 {
133 
134 public:
135  MarkingSubSelectionOverlay(const SdrPaintView& rView, std::vector<basegfx::B2DRectangle> const & rSelections)
136  {
138  return; // We do client-side object manipulation with the Kit API
139 
140  for (sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
141  {
142  SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
143  const rtl::Reference<sdr::overlay::OverlayManager>& xTargetOverlay = pCandidate->GetOverlayManager();
144 
145  if (xTargetOverlay.is())
146  {
147  const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
148  const Color aHighlightColor = aSvtOptionsDrawinglayer.getHilightColor();
149 
150  std::unique_ptr<sdr::overlay::OverlaySelection> pNew =
151  std::make_unique<sdr::overlay::OverlaySelection>(
153  aHighlightColor, rSelections, false);
154 
155  xTargetOverlay->add(*pNew);
156  maObjects.append(std::move(pNew));
157  }
158  }
159  }
160 };
161 
163  : SdrSnapView(rSdrModel, pOut)
164  , mpMarkedObj(nullptr)
165  , mpMarkedPV(nullptr)
166  , maHdlList(this)
167  , meDragMode(SdrDragMode::Move)
168  , meEditMode(SdrViewEditMode::Edit)
169  , meEditMode0(SdrViewEditMode::Edit)
170  , mbDesignMode(false)
171  , mbForceFrameHandles(false)
172  , mbPlusHdlAlways(false)
173  , mbInsPolyPoint(false)
174  , mbMarkedObjRectDirty(false)
175  , mbMrkPntDirty(false)
176  , mbMarkedPointsRectsDirty(false)
177  , mbMarkHandlesHidden(false)
178 {
179 
180  BrkMarkObj();
181  BrkMarkPoints();
183 
184  StartListening(rSdrModel);
185 }
186 
188 {
189  // Migrate selections
190  BrkMarkObj();
191  BrkMarkPoints();
193 }
194 
196 {
197  if (rHint.GetId() == SfxHintId::ThisIsAnSdrHint)
198  {
199  const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint);
200  SdrHintKind eKind=pSdrHint->GetKind();
202  {
205  }
206  }
207  SdrSnapView::Notify(rBC,rHint);
208 }
209 
211 {
216  // Example: Obj is selected and maMarkedObjectList is sorted.
217  // In another View 2, the ObjOrder is changed (e. g. MovToTop())
218  // Then we need to re-sort MarkList.
221  mbMrkPntDirty=true;
222  UndirtyMrkPnt();
223  SdrView* pV=static_cast<SdrView*>(this);
224  if (pV!=nullptr && !pV->IsDragObj() && !pV->IsInsObjPoint()) {
225  AdjustMarkHdl();
226  }
227 
229  return;
230 
231  //TODO: Is MarkedObjRect valid at this point?
232  tools::Rectangle aSelection(GetMarkedObjRect());
233  OString sSelection;
234  if (aSelection.IsEmpty())
235  sSelection = "EMPTY";
236  else
237  {
238  sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
239  if (nTotalPaintWindows == 1)
240  {
241  const vcl::Window* pWin = dynamic_cast<const vcl::Window*>(this->GetFirstOutputDevice());
242  if (pWin && pWin->IsChart())
243  {
244  const vcl::Window* pViewShellWindow = GetSfxViewShell()->GetEditWindowForActiveOLEObj();
245  if (pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin))
246  {
247  Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow);
248  Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
249  aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY());
250  }
251  }
252  }
253 
254  // In case the map mode is in 100th MM, then need to convert the coordinates over to twips for LOK.
255  if (mpMarkedPV)
256  {
257  if (OutputDevice* pOutputDevice = mpMarkedPV->GetView().GetFirstOutputDevice())
258  {
259  if (pOutputDevice->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
260  aSelection = OutputDevice::LogicToLogic(aSelection, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
261  }
262  }
263 
264  sSelection = aSelection.toString();
265  }
266 
267  if(SfxViewShell* pViewShell = GetSfxViewShell())
268  SfxLokHelper::notifyInvalidation(pViewShell, sSelection);
269 }
270 
271 
273 {
275 }
276 
277 void SdrMarkView::MovAction(const Point& rPnt)
278 {
280 
281  if(IsMarkObj())
282  {
283  MovMarkObj(rPnt);
284  }
285  else if(IsMarkPoints())
286  {
287  MovMarkPoints(rPnt);
288  }
289  else if(IsMarkGluePoints())
290  {
291  MovMarkGluePoints(rPnt);
292  }
293 }
294 
296 {
297  if(IsMarkObj())
298  {
299  EndMarkObj();
300  }
301  else if(IsMarkPoints())
302  {
303  EndMarkPoints();
304  }
305  else if(IsMarkGluePoints())
306  {
308  }
309 
311 }
312 
314 {
316  BrkMarkObj();
317  BrkMarkPoints();
319 }
320 
322 {
324  BrkMarkObj();
325  BrkMarkPoints();
327 }
328 
330 {
331  if(IsMarkObj() || IsMarkPoints() || IsMarkGluePoints())
332  {
334  }
335  else
336  {
338  }
339 }
340 
341 
343 {
344  UnmarkAllObj();
346 }
347 
349 {
350  bool bMrkChg(false);
351 
352  SdrPageView* pPageView = GetSdrPageView();
353  if (pPageView)
354  {
355  // break all creation actions when hiding page (#75081#)
356  BrkAction();
357 
358  // Discard all selections on this page
359  bMrkChg = GetMarkedObjectListWriteAccess().DeletePageView(*pPageView);
360  }
361 
363 
364  if(bMrkChg)
365  {
367  AdjustMarkHdl();
368  }
369 }
370 
371 
372 void SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark)
373 {
374  BrkAction();
375 
376  DBG_ASSERT(!mpMarkObjOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkObjOverlay (!)");
377 
378  basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
379  mpMarkObjOverlay.reset(new ImplMarkingOverlay(*this, aStartPos, bUnmark));
380 
381  maDragStat.Reset(rPnt);
384 }
385 
386 void SdrMarkView::MovMarkObj(const Point& rPnt)
387 {
388  if(IsMarkObj() && maDragStat.CheckMinMoved(rPnt))
389  {
390  maDragStat.NextMove(rPnt);
391  DBG_ASSERT(mpMarkObjOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
392  basegfx::B2DPoint aNewPos(rPnt.X(), rPnt.Y());
393  mpMarkObjOverlay->SetSecondPosition(aNewPos);
394  }
395 }
396 
398 {
399  bool bRetval(false);
400 
401  if(IsMarkObj())
402  {
403  if(maDragStat.IsMinMoved())
404  {
406  aRect.Justify();
407  MarkObj(aRect, mpMarkObjOverlay->IsUnmarking());
408  bRetval = true;
409  }
410 
411  // cleanup
412  BrkMarkObj();
413  }
414 
415  return bRetval;
416 }
417 
419 {
420  if(IsMarkObj())
421  {
422  DBG_ASSERT(mpMarkObjOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
423  mpMarkObjOverlay.reset();
424  }
425 }
426 
427 
428 bool SdrMarkView::BegMarkPoints(const Point& rPnt, bool bUnmark)
429 {
430  if(HasMarkablePoints())
431  {
432  BrkAction();
433 
434  DBG_ASSERT(!mpMarkPointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkPointsOverlay (!)");
435  basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
436  mpMarkPointsOverlay.reset(new ImplMarkingOverlay(*this, aStartPos, bUnmark));
437 
438  maDragStat.Reset(rPnt);
441 
442  return true;
443  }
444 
445  return false;
446 }
447 
448 void SdrMarkView::MovMarkPoints(const Point& rPnt)
449 {
450  if(IsMarkPoints() && maDragStat.CheckMinMoved(rPnt))
451  {
452  maDragStat.NextMove(rPnt);
453 
454  DBG_ASSERT(mpMarkPointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
455  basegfx::B2DPoint aNewPos(rPnt.X(), rPnt.Y());
456  mpMarkPointsOverlay->SetSecondPosition(aNewPos);
457  }
458 }
459 
461 {
462  bool bRetval(false);
463 
464  if(IsMarkPoints())
465  {
466  if(maDragStat.IsMinMoved())
467  {
469  aRect.Justify();
470  MarkPoints(&aRect, mpMarkPointsOverlay->IsUnmarking());
471 
472  bRetval = true;
473  }
474 
475  // cleanup
476  BrkMarkPoints();
477  }
478 
479  return bRetval;
480 }
481 
483 {
484  if(IsMarkPoints())
485  {
486  DBG_ASSERT(mpMarkPointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
487  mpMarkPointsOverlay.reset();
488  }
489 }
490 
491 
492 bool SdrMarkView::BegMarkGluePoints(const Point& rPnt, bool bUnmark)
493 {
495  {
496  BrkAction();
497 
498  DBG_ASSERT(!mpMarkGluePointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkGluePointsOverlay (!)");
499 
500  basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
501  mpMarkGluePointsOverlay.reset(new ImplMarkingOverlay(*this, aStartPos, bUnmark));
502  maDragStat.Reset(rPnt);
505 
506  return true;
507  }
508 
509  return false;
510 }
511 
512 void SdrMarkView::MovMarkGluePoints(const Point& rPnt)
513 {
515  {
516  maDragStat.NextMove(rPnt);
517 
518  DBG_ASSERT(mpMarkGluePointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
519  basegfx::B2DPoint aNewPos(rPnt.X(), rPnt.Y());
520  mpMarkGluePointsOverlay->SetSecondPosition(aNewPos);
521  }
522 }
523 
525 {
526  if(IsMarkGluePoints())
527  {
528  if(maDragStat.IsMinMoved())
529  {
531  aRect.Justify();
532  MarkGluePoints(&aRect, mpMarkGluePointsOverlay->IsUnmarking());
533  }
534 
535  // cleanup
537  }
538 }
539 
541 {
542  if(IsMarkGluePoints())
543  {
544  DBG_ASSERT(mpMarkGluePointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
545  mpMarkGluePointsOverlay.reset();
546  }
547 }
548 
550 {
551  SdrPageView* pPV = GetSdrPageView();
552  if (!pPV)
553  return false;
554 
555  SdrObjList* pOL=pPV->GetObjList();
556  const size_t nObjCount = pOL->GetObjCount();
557  for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
558  SdrObject* pObj=pOL->GetObj(nObjNum);
559  if (IsObjMarkable(pObj,pPV) && --n<0)
560  return true;
561  }
562 
563  return false;
564 }
565 
567 {
569  {
570  mbMarkHandlesHidden = true;
571  AdjustMarkHdl();
572  }
573 }
574 
576 {
578  {
579  mbMarkHandlesHidden = false;
580  AdjustMarkHdl();
581  }
582 }
583 
585 {
586  const size_t nMarkCount=GetMarkedObjectCount();
587  bool bFrmHdl=nMarkCount>static_cast<size_t>(mnFrameHandlesLimit) || mbForceFrameHandles;
588  bool bStdDrag=meDragMode==SdrDragMode::Move;
589  if (nMarkCount==1 && bStdDrag && bFrmHdl)
590  {
591  const SdrObject* pObj=GetMarkedObjectByIndex(0);
593  {
594  sal_uInt16 nIdent=pObj->GetObjIdentifier();
595  if (nIdent==OBJ_LINE || nIdent==OBJ_EDGE || nIdent==OBJ_CAPTION || nIdent==OBJ_MEASURE || nIdent==OBJ_CUSTOMSHAPE || nIdent==OBJ_TABLE )
596  {
597  bFrmHdl=false;
598  }
599  }
600  }
601  if (!bStdDrag && !bFrmHdl) {
602  // all other drag modes only with FrameHandles
603  bFrmHdl=true;
605  // when rotating, use ObjOwn drag, if there's at least 1 PolyObj
606  for (size_t nMarkNum=0; nMarkNum<nMarkCount && bFrmHdl; ++nMarkNum) {
607  const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
608  const SdrObject* pObj=pM->GetMarkedSdrObj();
609  bFrmHdl=!pObj->IsPolyObj();
610  }
611  }
612  }
613  if (!bFrmHdl) {
614  // FrameHandles, if at least 1 Obj can't do SpecialDrag
615  for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bFrmHdl; ++nMarkNum) {
616  const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
617  const SdrObject* pObj=pM->GetMarkedSdrObj();
618  bFrmHdl=!pObj->hasSpecialDrag();
619  }
620  }
621 
622  // no FrameHdl for crop
623  if(bFrmHdl && SdrDragMode::Crop == meDragMode)
624  {
625  bFrmHdl = false;
626  }
627 
628  return bFrmHdl;
629 }
630 
631 namespace
632 {
633 OUString lcl_getDragMethodServiceName( const OUString& rCID )
634 {
635  OUString aRet;
636 
637  sal_Int32 nIndexStart = rCID.indexOf( "DragMethod=" );
638  if( nIndexStart != -1 )
639  {
640  nIndexStart = rCID.indexOf( '=', nIndexStart );
641  if( nIndexStart != -1 )
642  {
643  nIndexStart++;
644  sal_Int32 nNextSlash = rCID.indexOf( '/', nIndexStart );
645  if( nNextSlash != -1 )
646  {
647  sal_Int32 nIndexEnd = nNextSlash;
648  sal_Int32 nNextColon = rCID.indexOf( ':', nIndexStart );
649  if( nNextColon < nNextSlash )
650  nIndexEnd = nNextColon;
651  aRet = rCID.copy(nIndexStart,nIndexEnd-nIndexStart);
652  }
653  }
654  }
655  return aRet;
656 }
657 
658 OUString lcl_getDragParameterString( const OUString& rCID )
659 {
660  OUString aRet;
661 
662  sal_Int32 nIndexStart = rCID.indexOf( "DragParameter=" );
663  if( nIndexStart != -1 )
664  {
665  nIndexStart = rCID.indexOf( '=', nIndexStart );
666  if( nIndexStart != -1 )
667  {
668  nIndexStart++;
669  sal_Int32 nNextSlash = rCID.indexOf( '/', nIndexStart );
670  if( nNextSlash != -1 )
671  {
672  sal_Int32 nIndexEnd = nNextSlash;
673  sal_Int32 nNextColon = rCID.indexOf( ':', nIndexStart );
674  if( nNextColon < nNextSlash )
675  nIndexEnd = nNextColon;
676  aRet = rCID.copy(nIndexStart,nIndexEnd-nIndexStart);
677  }
678  }
679  }
680  return aRet;
681 }
682 } // anonymous namespace
683 
685 {
686  SfxViewShell* pViewShell = GetSfxViewShell();
687 
688  tools::Rectangle aSelection(rRect);
689  bool bIsChart = false;
690 
691  if (!rRect.IsEmpty())
692  {
693  sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
694  if (nTotalPaintWindows == 1)
695  {
696  const vcl::Window* pWin = dynamic_cast<const vcl::Window*>(this->GetFirstOutputDevice());
697  if (pWin && pWin->IsChart())
698  {
699  bIsChart = true;
700  const vcl::Window* pViewShellWindow = GetSfxViewShell()->GetEditWindowForActiveOLEObj();
701  if (pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin))
702  {
703  Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow);
704  Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
705  aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY());
706  }
707  }
708  }
709  }
710 
711  if (!aSelection.IsEmpty())
712  {
713  // In case the map mode is in 100th MM, then need to convert the coordinates over to twips for LOK.
714  if (mpMarkedPV)
715  {
716  if (OutputDevice* pOutputDevice = mpMarkedPV->GetView().GetFirstOutputDevice())
717  {
718  if (pOutputDevice->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
719  aSelection = OutputDevice::LogicToLogic(aSelection, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
720  }
721  }
722 
723  // hide the text selection too
724  pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, "");
725  }
726 
727  {
728  OString sSelectionText;
729  boost::property_tree::ptree aTableJsonTree;
730  bool bTableSelection = false;
731 
733  {
734  auto& rTableObject = dynamic_cast<sdr::table::SdrTableObj&>(*mpMarkedObj);
735  bTableSelection = rTableObject.createTableEdgesJson(aTableJsonTree);
736  }
737  if (GetMarkedObjectCount())
738  {
739  SdrMark* pM = GetSdrMarkByIndex(0);
740  SdrObject* pO = pM->GetMarkedSdrObj();
741  Degree100 nRotAngle = pO->GetRotateAngle();
742  // true if we are dealing with a RotGrfFlyFrame
743  // (SwVirtFlyDrawObj with a SwGrfNode)
744  bool bWriterGraphic = pO->HasLimitedRotation();
745 
746  OStringBuffer aExtraInfo;
747 
748  aExtraInfo.append("{\"id\":\"");
749  aExtraInfo.append(OString::number(reinterpret_cast<sal_IntPtr>(pO)));
750  aExtraInfo.append("\",\"type\":");
751  aExtraInfo.append(OString::number(pO->GetObjIdentifier()));
752 
753  if (bWriterGraphic)
754  {
755  aExtraInfo.append(", \"isWriterGraphic\": true");
756  }
757  else if (bIsChart)
758  {
759  LokChartHelper aChartHelper(pViewShell);
760  css::uno::Reference<css::frame::XController>& xChartController = aChartHelper.GetXController();
761  css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier( xChartController, uno::UNO_QUERY);
762  if (xSelectionSupplier.is())
763  {
764  uno::Any aSel = xSelectionSupplier->getSelection();
765  OUString aValue;
766  if (aSel >>= aValue)
767  {
768  OString aObjectCID(aValue.getStr(), aValue.getLength(), osl_getThreadTextEncoding());
769  const std::vector<OString> aProps{"Draggable", "Resizable", "Rotatable"};
770  for (const auto& rProp: aProps)
771  {
772  sal_Int32 nPos = aObjectCID.indexOf(rProp);
773  if (nPos == -1) continue;
774  nPos += rProp.getLength() + 1; // '='
775  if (aExtraInfo.getLength() > 2) // != "{ "
776  aExtraInfo.append(", ");
777  aExtraInfo.append("\"is");
778  aExtraInfo.append(rProp);
779  aExtraInfo.append("\": ");
780  aExtraInfo.append(OString::boolean(aObjectCID[nPos] == '1'));
781  }
782 
783  OUString sDragMethod = lcl_getDragMethodServiceName(aValue);
784  if (sDragMethod == "PieSegmentDragging")
785  {
786  // old initial offset inside the CID returned by xSelectionSupplier->getSelection()
787  // after a pie segment dragging; using SdrObject::GetName for getting a CID with the updated offset
788  aValue = pO->GetName();
789  OUString sDragParameters = lcl_getDragParameterString(aValue);
790  if (!sDragParameters.isEmpty())
791  {
792  aExtraInfo.append(", \"dragInfo\": { ");
793  aExtraInfo.append("\"dragMethod\": \"");
794  aExtraInfo.append(sDragMethod.toUtf8());
795  aExtraInfo.append("\"");
796 
797  OUString sParam;
798  sal_Int32 nStartIndex = 0;
799  std::array<int, 5> aDragParameters;
800  for (auto& rParam : aDragParameters)
801  {
802  sParam = sDragParameters.getToken(0, ',', nStartIndex);
803  if (sParam.isEmpty())
804  break;
805  rParam = sParam.toInt32();
806  }
807 
808  // initial offset in %
809  if (aDragParameters[0] < 0)
810  aDragParameters[0] = 0;
811  else if (aDragParameters[0] > 100)
812  aDragParameters[0] = 100;
813 
814  aExtraInfo.append(", \"initialOffset\": ");
815  aExtraInfo.append(OString::number(aDragParameters[0]));
816 
817  // drag direction constraint
818  Point aMinPos(aDragParameters[1], aDragParameters[2]);
819  Point aMaxPos(aDragParameters[3], aDragParameters[4]);
820  Point aDragDirection = aMaxPos - aMinPos;
821  aDragDirection = OutputDevice::LogicToLogic(aDragDirection, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
822 
823  aExtraInfo.append(", \"dragDirection\": [");
824  aExtraInfo.append(aDragDirection.toString());
825  aExtraInfo.append("]");
826 
827  // polygon approximating the pie segment or donut segment
828  if (pO->GetObjIdentifier() == OBJ_PATHFILL)
829  {
830  const basegfx::B2DPolyPolygon aPolyPolygon(pO->TakeXorPoly());
831  if (aPolyPolygon.count() == 1)
832  {
833  const basegfx::B2DPolygon aPolygon = aPolyPolygon.getB2DPolygon(0);
834  if (sal_uInt32 nPolySize = aPolygon.count())
835  {
836  const vcl::Window* pWin = dynamic_cast<const vcl::Window*>(this->GetFirstOutputDevice());
837  const vcl::Window* pViewShellWindow = pViewShell->GetEditWindowForActiveOLEObj();
838  if (pWin && pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin))
839  {
840  // in the following code escaping sequences used inside raw literal strings
841  // are for making them understandable by the JSON parser
842 
843  Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow);
844  Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
845  OString sPolygonElem("<polygon points=\\\"");
846  for (sal_uInt32 nIndex = 0; nIndex < nPolySize; ++nIndex)
847  {
848  const basegfx::B2DPoint aB2Point = aPolygon.getB2DPoint(nIndex);
849  Point aPoint(aB2Point.getX(), aB2Point.getY());
850  aPoint.Move(aLogicOffset.getX(), aLogicOffset.getY());
851  if (nIndex > 0)
852  sPolygonElem += " ";
853  sPolygonElem += aPoint.toString();
854  }
855  sPolygonElem += R"elem(\" style=\"stroke: none; fill: rgb(114,159,207); fill-opacity: 0.8\"/>)elem";
856 
857  aSelection = OutputDevice::LogicToLogic(aSelection, MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM));
858 
859  OString sSVGElem = R"elem(<svg version=\"1.2\" width=\")elem" +
860  OString::number(aSelection.GetWidth() / 100.0) +
861  R"elem(mm\" height=\")elem" +
862  OString::number(aSelection.GetHeight() / 100.0) +
863  R"elem(mm\" viewBox=\")elem" +
864  aSelection.toString() +
865  R"elem(\" preserveAspectRatio=\"xMidYMid\" xmlns=\"http://www.w3.org/2000/svg\">)elem";
866 
867  aExtraInfo.append(", \"svg\": \"");
868  aExtraInfo.append(sSVGElem);
869  aExtraInfo.append("\\n ");
870  aExtraInfo.append(sPolygonElem);
871  aExtraInfo.append("\\n</svg>");
872  aExtraInfo.append("\""); // svg
873  }
874  }
875  }
876  }
877  aExtraInfo.append("}"); // dragInfo
878  }
879  }
880  }
881  }
882  }
883  aExtraInfo.append("}");
884 
885  sSelectionText = aSelection.toString() +
886  ", " + OString::number(nRotAngle.get());
887  if (!aExtraInfo.isEmpty())
888  {
889  sSelectionText += ", " + aExtraInfo.makeStringAndClear();
890  }
891  }
892 
893  if (sSelectionText.isEmpty())
894  sSelectionText = "EMPTY";
895 
896  if (bTableSelection)
897  {
898  boost::property_tree::ptree aTableRectangle;
899  aTableRectangle.put("x", aSelection.Left());
900  aTableRectangle.put("y", aSelection.Top());
901  aTableRectangle.put("width", aSelection.GetWidth());
902  aTableRectangle.put("height", aSelection.GetHeight());
903  aTableJsonTree.push_back(std::make_pair("rectangle", aTableRectangle));
904 
905  std::stringstream aStream;
906  boost::property_tree::write_json(aStream, aTableJsonTree);
907  pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, aStream.str().c_str());
908  }
909  else
910  {
911  pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, "{}");
912  }
913 
914  if (pOtherShell)
915  {
916  // Another shell wants to know about our existing
917  // selection.
918  if (pViewShell != pOtherShell)
919  SfxLokHelper::notifyOtherView(pViewShell, pOtherShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelectionText);
920  }
921  else
922  {
923  // We have a new selection, so both pViewShell and the
924  // other views want to know about it.
925  pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelectionText.getStr());
926  SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelectionText);
927  }
928  }
929 }
930 
932 {
933  // remember old focus handle values to search for it again
934  const SdrHdl* pSaveOldFocusHdl = maHdlList.GetFocusHdl();
935  bool bSaveOldFocus(false);
936  sal_uInt32 nSavePolyNum(0), nSavePointNum(0);
937  SdrHdlKind eSaveKind(SdrHdlKind::Move);
938  SdrObject* pSaveObj = nullptr;
939 
941 
942  if(pSaveOldFocusHdl
943  && pSaveOldFocusHdl->GetObj()
944  && dynamic_cast<const SdrPathObj*>(pSaveOldFocusHdl->GetObj()) != nullptr
945  && (pSaveOldFocusHdl->GetKind() == SdrHdlKind::Poly || pSaveOldFocusHdl->GetKind() == SdrHdlKind::BezierWeight))
946  {
947  bSaveOldFocus = true;
948  nSavePolyNum = pSaveOldFocusHdl->GetPolyNum();
949  nSavePointNum = pSaveOldFocusHdl->GetPointNum();
950  pSaveObj = pSaveOldFocusHdl->GetObj();
951  eSaveKind = pSaveOldFocusHdl->GetKind();
952  }
953 
954  // delete/clear all handles. This will always be done, even with areMarkHandlesHidden()
955  maHdlList.Clear();
958  mpMarkedObj=nullptr;
959  mpMarkedPV=nullptr;
960 
961  // are handles enabled at all? Create only then
963  return;
964 
965  // There can be multiple mark views, but we're only interested in the one that has a window associated.
967 
968  const size_t nMarkCount=GetMarkedObjectCount();
969  bool bStdDrag=meDragMode==SdrDragMode::Move;
970  bool bSingleTextObjMark=false;
971  bool bLimitedRotation(false);
972 
973  if (nMarkCount==1)
974  {
976 
977  if(nullptr != mpMarkedObj)
978  {
979  bSingleTextObjMark =
980  dynamic_cast<const SdrTextObj*>( mpMarkedObj) != nullptr &&
981  static_cast<SdrTextObj*>(mpMarkedObj)->IsTextFrame();
982 
983  // RotGrfFlyFrame: we may have limited rotation
984  bLimitedRotation = SdrDragMode::Rotate == meDragMode && mpMarkedObj->HasLimitedRotation();
985  }
986  }
987 
988  bool bFrmHdl=ImpIsFrameHandles();
989 
990  if (nMarkCount>0)
991  {
993 
994  for (size_t nMarkNum=0; nMarkNum<nMarkCount && (mpMarkedPV!=nullptr || !bFrmHdl); ++nMarkNum)
995  {
996  const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
997 
998  if (mpMarkedPV!=pM->GetPageView())
999  {
1000  mpMarkedPV=nullptr;
1001  }
1002  }
1003  }
1004 
1005  SfxViewShell* pViewShell = GetSfxViewShell();
1006 
1007  // check if text edit or ole is active and handles need to be suppressed. This may be the case
1008  // when a single object is selected
1009  // Using a strict return statement is okay here; no handles means *no* handles.
1010  if(mpMarkedObj)
1011  {
1012  // formerly #i33755#: If TextEdit is active the EditEngine will directly paint
1013  // to the window, so suppress Overlay and handles completely; a text frame for
1014  // the active text edit will be painted by the repaint mechanism in
1015  // SdrObjEditView::ImpPaintOutlinerView in this case. This needs to be reworked
1016  // in the future
1017  // Also formerly #122142#: Pretty much the same for SdrCaptionObj's in calc.
1018  if(static_cast<SdrView*>(this)->IsTextEdit())
1019  {
1020  const SdrTextObj* pSdrTextObj = dynamic_cast< const SdrTextObj* >(mpMarkedObj);
1021 
1022  if (pSdrTextObj && pSdrTextObj->IsInEditMode())
1023  {
1024  if (!bTiledRendering)
1025  return;
1026  }
1027  }
1028 
1029  // formerly #i118524#: if inplace activated OLE is selected, suppress handles
1030  const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(mpMarkedObj);
1031 
1032  if(pSdrOle2Obj && (pSdrOle2Obj->isInplaceActive() || pSdrOle2Obj->isUiActive()))
1033  {
1034  return;
1035  }
1036 
1037  if (!maSubSelectionList.empty())
1038  {
1039  mpMarkingSubSelectionOverlay = std::make_unique<MarkingSubSelectionOverlay>(*this, maSubSelectionList);
1040  }
1041  }
1042 
1044 
1045  if (bTiledRendering && pViewShell)
1046  {
1047  SetMarkHandlesForLOKit(aRect, pOtherShell);
1048  }
1049 
1050  if (bFrmHdl)
1051  {
1052  if(!aRect.IsEmpty())
1053  {
1054  // otherwise nothing is found
1055  const size_t nSiz0(maHdlList.GetHdlCount());
1056 
1057  if( bSingleTextObjMark )
1058  {
1060  }
1061  else
1062  {
1063  const bool bWdt0(aRect.Left() == aRect.Right());
1064  const bool bHgt0(aRect.Top() == aRect.Bottom());
1065 
1066  if (bWdt0 && bHgt0)
1067  {
1068  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.TopLeft(), SdrHdlKind::UpperLeft));
1069  }
1070  else if (!bStdDrag && (bWdt0 || bHgt0))
1071  {
1072  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.TopLeft(), SdrHdlKind::UpperLeft));
1073  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.BottomRight(), SdrHdlKind::LowerRight));
1074  }
1075  else
1076  {
1077  if (!bWdt0 && !bHgt0)
1078  {
1079  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.TopLeft(), SdrHdlKind::UpperLeft));
1080  }
1081 
1082  if (!bLimitedRotation && !bHgt0)
1083  {
1084  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.TopCenter(), SdrHdlKind::Upper));
1085  }
1086 
1087  if (!bWdt0 && !bHgt0)
1088  {
1089  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.TopRight(), SdrHdlKind::UpperRight));
1090  }
1091 
1092  if (!bLimitedRotation && !bWdt0)
1093  {
1094  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.LeftCenter(), SdrHdlKind::Left ));
1095  }
1096 
1097  if (!bLimitedRotation && !bWdt0)
1098  {
1099  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.RightCenter(), SdrHdlKind::Right));
1100  }
1101 
1102  if (!bWdt0 && !bHgt0)
1103  {
1104  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.BottomLeft(), SdrHdlKind::LowerLeft));
1105  }
1106 
1107  if (!bLimitedRotation && !bHgt0)
1108  {
1109  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.BottomCenter(), SdrHdlKind::Lower));
1110  }
1111 
1112  if (!bWdt0 && !bHgt0)
1113  {
1114  maHdlList.AddHdl(std::make_unique<SdrHdl>(aRect.BottomRight(), SdrHdlKind::LowerRight));
1115  }
1116  }
1117  }
1118 
1119  const size_t nSiz1(maHdlList.GetHdlCount());
1120 
1121  // moved setting the missing parameters at SdrHdl here from the
1122  // single loop above (bSingleTextObjMark), this was missing all
1123  // the time. Setting SdrObject is now required to correctly get
1124  // the View-Dependent evtl. GridOffset adapted
1125  for (size_t i=nSiz0; i<nSiz1; ++i)
1126  {
1127  SdrHdl* pHdl=maHdlList.GetHdl(i);
1128  pHdl->SetObj(mpMarkedObj);
1129  pHdl->SetPageView(mpMarkedPV);
1130  pHdl->SetObjHdlNum(sal_uInt16(i-nSiz0));
1131  }
1132  }
1133  }
1134  else
1135  {
1136  bool bDone(false);
1137 
1138  // moved crop handling to non-frame part and the handle creation to SdrGrafObj
1139  if(1 == nMarkCount && mpMarkedObj && SdrDragMode::Crop == meDragMode)
1140  {
1141  // Default addCropHandles from SdrObject does nothing. When pMarkedObj is SdrGrafObj, previous
1142  // behaviour occurs (code in svx/source/svdraw/svdograf.cxx). When pMarkedObj is SwVirtFlyDrawObj
1143  // writer takes the responsibility of adding handles (code in sw/source/core/draw/dflyobj.cxx)
1144  const size_t nSiz0(maHdlList.GetHdlCount());
1146  const size_t nSiz1(maHdlList.GetHdlCount());
1147 
1148  // Was missing: Set infos at SdrCropHdl
1149  for (size_t i=nSiz0; i<nSiz1; ++i)
1150  {
1151  SdrHdl* pHdl=maHdlList.GetHdl(i);
1152  pHdl->SetObj(mpMarkedObj);
1153  pHdl->SetPageView(mpMarkedPV);
1154  pHdl->SetObjHdlNum(sal_uInt16(i-nSiz0));
1155  }
1156 
1157  bDone = true;
1158  }
1159 
1160  if(!bDone)
1161  {
1162  for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum)
1163  {
1164  const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
1165  SdrObject* pObj=pM->GetMarkedSdrObj();
1166  SdrPageView* pPV=pM->GetPageView();
1167  const size_t nSiz0=maHdlList.GetHdlCount();
1168  pObj->AddToHdlList(maHdlList);
1169  const size_t nSiz1=maHdlList.GetHdlCount();
1170  bool bPoly=pObj->IsPolyObj();
1171  const SdrUShortCont& rMrkPnts = pM->GetMarkedPoints();
1172  for (size_t i=nSiz0; i<nSiz1; ++i)
1173  {
1174  SdrHdl* pHdl=maHdlList.GetHdl(i);
1175  pHdl->SetObj(pObj);
1176  pHdl->SetPageView(pPV);
1177  pHdl->SetObjHdlNum(sal_uInt16(i-nSiz0));
1178 
1179  if (bPoly)
1180  {
1181  bool bSelected= rMrkPnts.find( sal_uInt16(i-nSiz0) ) != rMrkPnts.end();
1182  pHdl->SetSelected(bSelected);
1183  if (mbPlusHdlAlways || bSelected)
1184  {
1185  SdrHdlList plusList(nullptr);
1186  pObj->AddToPlusHdlList(plusList, *pHdl);
1187  sal_uInt32 nPlusHdlCnt=plusList.GetHdlCount();
1188  for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusHdlCnt; nPlusNum++)
1189  {
1190  SdrHdl* pPlusHdl=plusList.GetHdl(nPlusNum);
1191  pPlusHdl->SetObj(pObj);
1192  pPlusHdl->SetPageView(pPV);
1193  pPlusHdl->SetPlusHdl(true);
1194  }
1195  plusList.MoveTo(maHdlList);
1196  }
1197  }
1198  }
1199  }
1200  }
1201  }
1202 
1203  // GluePoint handles
1204  for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum)
1205  {
1206  const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
1207  SdrObject* pObj=pM->GetMarkedSdrObj();
1208  const SdrGluePointList* pGPL=pObj->GetGluePointList();
1209  if (!pGPL)
1210  continue;
1211 
1212  SdrPageView* pPV=pM->GetPageView();
1213  const SdrUShortCont& rMrkGlue=pM->GetMarkedGluePoints();
1214  for (sal_uInt16 nId : rMrkGlue)
1215  {
1216  //nNum changed to nNumGP because already used in for loop
1217  sal_uInt16 nNumGP=pGPL->FindGluePoint(nId);
1218  if (nNumGP!=SDRGLUEPOINT_NOTFOUND)
1219  {
1220  const SdrGluePoint& rGP=(*pGPL)[nNumGP];
1221  Point aPos(rGP.GetAbsolutePos(*pObj));
1222  std::unique_ptr<SdrHdl> pGlueHdl(new SdrHdl(aPos,SdrHdlKind::Glue));
1223  pGlueHdl->SetObj(pObj);
1224  pGlueHdl->SetPageView(pPV);
1225  pGlueHdl->SetObjHdlNum(nId);
1226  maHdlList.AddHdl(std::move(pGlueHdl));
1227  }
1228  }
1229  }
1230 
1231  // rotation point/axis of reflection
1232  if(!bLimitedRotation)
1233  {
1235  }
1236 
1237  // sort handles
1238  maHdlList.Sort();
1239 
1240  // add custom handles (used by other apps, e.g. AnchorPos)
1241  AddCustomHdl();
1242 
1243  // try to restore focus handle index from remembered values
1244  if(!bSaveOldFocus)
1245  return;
1246 
1247  for(size_t a = 0; a < maHdlList.GetHdlCount(); ++a)
1248  {
1249  SdrHdl* pCandidate = maHdlList.GetHdl(a);
1250 
1251  if(pCandidate->GetObj()
1252  && pCandidate->GetObj() == pSaveObj
1253  && pCandidate->GetKind() == eSaveKind
1254  && pCandidate->GetPolyNum() == nSavePolyNum
1255  && pCandidate->GetPointNum() == nSavePointNum)
1256  {
1257  maHdlList.SetFocusHdl(pCandidate);
1258  break;
1259  }
1260  }
1261 }
1262 
1264 {
1265  // add custom handles (used by other apps, e.g. AnchorPos)
1266 }
1267 
1269 {
1270  SdrDragMode eMode0=meDragMode;
1271  meDragMode=eMode;
1273  if (meDragMode!=eMode0) {
1274  ForceRefToMarked();
1275  SetMarkHandles(nullptr);
1276  {
1278  }
1279  }
1280 }
1281 
1283 {
1284  switch(eMode)
1285  {
1286  case SdrDragMode::Rotate:
1287  {
1288  // add rotation center
1289  maHdlList.AddHdl(std::make_unique<SdrHdl>(maRef1, SdrHdlKind::Ref1));
1290  break;
1291  }
1292  case SdrDragMode::Mirror:
1293  {
1294  // add axis of reflection
1295  std::unique_ptr<SdrHdl> pHdl3(new SdrHdl(maRef2, SdrHdlKind::Ref2));
1296  std::unique_ptr<SdrHdl> pHdl2(new SdrHdl(maRef1, SdrHdlKind::Ref1));
1297  std::unique_ptr<SdrHdl> pHdl1(new SdrHdlLine(*pHdl2, *pHdl3, SdrHdlKind::MirrorAxis));
1298 
1299  pHdl1->SetObjHdlNum(1); // for sorting
1300  pHdl2->SetObjHdlNum(2); // for sorting
1301  pHdl3->SetObjHdlNum(3); // for sorting
1302 
1303  maHdlList.AddHdl(std::move(pHdl1)); // line comes first, so it is the last in HitTest
1304  maHdlList.AddHdl(std::move(pHdl2));
1305  maHdlList.AddHdl(std::move(pHdl3));
1306 
1307  break;
1308  }
1310  {
1311  // add interactive transparency handle
1312  const size_t nMarkCount = GetMarkedObjectCount();
1313  if(nMarkCount == 1)
1314  {
1315  SdrObject* pObj = GetMarkedObjectByIndex(0);
1316  SdrModel* pModel = GetModel();
1317  const SfxItemSet& rSet = pObj->GetMergedItemSet();
1318 
1319  if(SfxItemState::SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false))
1320  {
1321  // add this item, it's not yet there
1323  XGradient aGrad = aNewItem.GetGradientValue();
1324 
1325  aNewItem.SetEnabled(true);
1326  aGrad.SetStartIntens(100);
1327  aGrad.SetEndIntens(100);
1328  aNewItem.SetGradientValue(aGrad);
1329 
1330  // add undo to allow user to take back this step
1331  if( pModel->IsUndoEnabled() )
1332  {
1333  pModel->BegUndo(SvxResId(SIP_XA_FILLTRANSPARENCE));
1334  pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
1335  pModel->EndUndo();
1336  }
1337 
1338  SfxItemSet aNewSet(pModel->GetItemPool());
1339  aNewSet.Put(aNewItem);
1340  pObj->SetMergedItemSetAndBroadcast(aNewSet);
1341  }
1342 
1343  // set values and transform to vector set
1344  GradTransVector aGradTransVector;
1345  GradTransGradient aGradTransGradient;
1346 
1347  aGradTransGradient.aGradient = rSet.Get(XATTR_FILLFLOATTRANSPARENCE).GetGradientValue();
1348  GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj);
1349 
1350  // build handles
1351  const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY()));
1352  const Point aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), basegfx::fround(aGradTransVector.maPositionB.getY()));
1353  std::unique_ptr<SdrHdlColor> pColHdl1(new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, SDR_HANDLE_COLOR_SIZE_NORMAL, true));
1354  std::unique_ptr<SdrHdlColor> pColHdl2(new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, SDR_HANDLE_COLOR_SIZE_NORMAL, true));
1355  std::unique_ptr<SdrHdlGradient> pGradHdl(new SdrHdlGradient(aTmpPos1, aTmpPos2, false));
1356  DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Could not get all necessary handles!");
1357 
1358  // link them
1359  pGradHdl->SetColorHandles(pColHdl1.get(), pColHdl2.get());
1360  pGradHdl->SetObj(pObj);
1361  pColHdl1->SetColorChangeHdl(LINK(pGradHdl.get(), SdrHdlGradient, ColorChangeHdl));
1362  pColHdl2->SetColorChangeHdl(LINK(pGradHdl.get(), SdrHdlGradient, ColorChangeHdl));
1363 
1364  // insert them
1365  maHdlList.AddHdl(std::move(pColHdl1));
1366  maHdlList.AddHdl(std::move(pColHdl2));
1367  maHdlList.AddHdl(std::move(pGradHdl));
1368  }
1369  break;
1370  }
1371  case SdrDragMode::Gradient:
1372  {
1373  // add interactive gradient handle
1374  const size_t nMarkCount = GetMarkedObjectCount();
1375  if(nMarkCount == 1)
1376  {
1377  SdrObject* pObj = GetMarkedObjectByIndex(0);
1378  const SfxItemSet& rSet = pObj->GetMergedItemSet();
1379  drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
1380 
1381  if(eFillStyle == drawing::FillStyle_GRADIENT)
1382  {
1383  // set values and transform to vector set
1384  GradTransVector aGradTransVector;
1385  GradTransGradient aGradTransGradient;
1386  Size aHdlSize(15, 15);
1387 
1388  aGradTransGradient.aGradient = rSet.Get(XATTR_FILLGRADIENT).GetGradientValue();
1389  GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj);
1390 
1391  // build handles
1392  const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY()));
1393  const Point aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), basegfx::fround(aGradTransVector.maPositionB.getY()));
1394  std::unique_ptr<SdrHdlColor> pColHdl1(new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, aHdlSize, false));
1395  std::unique_ptr<SdrHdlColor> pColHdl2(new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, aHdlSize, false));
1396  std::unique_ptr<SdrHdlGradient> pGradHdl(new SdrHdlGradient(aTmpPos1, aTmpPos2, true));
1397  DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Could not get all necessary handles!");
1398 
1399  // link them
1400  pGradHdl->SetColorHandles(pColHdl1.get(), pColHdl2.get());
1401  pGradHdl->SetObj(pObj);
1402  pColHdl1->SetColorChangeHdl(LINK(pGradHdl.get(), SdrHdlGradient, ColorChangeHdl));
1403  pColHdl2->SetColorChangeHdl(LINK(pGradHdl.get(), SdrHdlGradient, ColorChangeHdl));
1404 
1405  // insert them
1406  maHdlList.AddHdl(std::move(pColHdl1));
1407  maHdlList.AddHdl(std::move(pColHdl2));
1408  maHdlList.AddHdl(std::move(pGradHdl));
1409  }
1410  }
1411  break;
1412  }
1413  case SdrDragMode::Crop:
1414  {
1415  // TODO
1416  break;
1417  }
1418  default: break;
1419  }
1420 }
1421 
1424 {
1425  if(maHdlList.GetHdlCount())
1426  {
1427  SdrHdl* pMouseOverHdl = nullptr;
1428  if( !rMEvt.IsLeaveWindow() && pWin )
1429  {
1430  Point aMDPos( pWin->PixelToLogic( rMEvt.GetPosPixel() ) );
1431  pMouseOverHdl = PickHandle(aMDPos);
1432  }
1433 
1434  // notify last mouse over handle that he lost the mouse
1435  const size_t nHdlCount = maHdlList.GetHdlCount();
1436 
1437  for(size_t nHdl = 0; nHdl < nHdlCount; ++nHdl)
1438  {
1439  SdrHdl* pCurrentHdl = GetHdl(nHdl);
1440  if( pCurrentHdl->mbMouseOver )
1441  {
1442  if( pCurrentHdl != pMouseOverHdl )
1443  {
1444  pCurrentHdl->mbMouseOver = false;
1445  pCurrentHdl->onMouseLeave();
1446  }
1447  break;
1448  }
1449  }
1450 
1451  // notify current mouse over handle
1452  if( pMouseOverHdl )
1453  {
1454  pMouseOverHdl->mbMouseOver = true;
1455  pMouseOverHdl->onMouseEnter(rMEvt);
1456  }
1457  }
1458  return SdrSnapView::MouseMove(rMEvt, pWin);
1459 }
1460 
1462 {
1463  if (maHdlList.GetHdlCount())
1464  {
1465  const size_t nHdlCount = maHdlList.GetHdlCount();
1466 
1467  for (size_t nHdl = 0; nHdl < nHdlCount; ++nHdl)
1468  {
1469  SdrHdl* pCurrentHdl = GetHdl(nHdl);
1470  if (pCurrentHdl->mbMouseOver)
1471  {
1472  pCurrentHdl->onHelpRequest();
1473  return true;
1474  }
1475  }
1476  }
1477  return SdrSnapView::RequestHelp(rHEvt);
1478 }
1479 
1481 {
1482  switch(meDragMode)
1483  {
1484  case SdrDragMode::Rotate:
1485  {
1487  maRef1 = aR.Center();
1488 
1489  break;
1490  }
1491 
1492  case SdrDragMode::Mirror:
1493  {
1494  // first calculate the length of the axis of reflection
1495  tools::Long nOutMin=0;
1496  tools::Long nOutMax=0;
1497  tools::Long nMinLen=0;
1498  tools::Long nObjDst=0;
1499  tools::Long nOutHgt=0;
1501  if (pOut!=nullptr) {
1502  // minimum length: 50 pixels
1503  nMinLen=pOut->PixelToLogic(Size(0,50)).Height();
1504  // 20 pixels distance to the Obj for the reference point
1505  nObjDst=pOut->PixelToLogic(Size(0,20)).Height();
1506  // MinY/MaxY
1507  // margin = minimum length = 10 pixels
1508  tools::Long nDst=pOut->PixelToLogic(Size(0,10)).Height();
1509  nOutMin=-pOut->GetMapMode().GetOrigin().Y();
1510  nOutMax=pOut->GetOutputSize().Height()-1+nOutMin;
1511  nOutMin+=nDst;
1512  nOutMax-=nDst;
1513  // absolute minimum length, however, is 10 pixels
1514  if (nOutMax-nOutMin<nDst) {
1515  nOutMin+=nOutMax+1;
1516  nOutMin/=2;
1517  nOutMin-=(nDst+1)/2;
1518  nOutMax=nOutMin+nDst;
1519  }
1520  nOutHgt=nOutMax-nOutMin;
1521  // otherwise minimum length = 1/4 OutHgt
1522  tools::Long nTemp=nOutHgt/4;
1523  if (nTemp>nMinLen) nMinLen=nTemp;
1524  }
1525 
1527  Point aCenter(aR.Center());
1528  tools::Long nMarkHgt=aR.GetHeight()-1;
1529  tools::Long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below
1530  if (nHgt<nMinLen) nHgt=nMinLen; // minimum length 50 pixels or 1/4 OutHgt, respectively
1531 
1532  tools::Long nY1=aCenter.Y()-(nHgt+1)/2;
1533  tools::Long nY2=nY1+nHgt;
1534 
1535  if (pOut!=nullptr && nMinLen>nOutHgt) nMinLen=nOutHgt; // TODO: maybe shorten this a little
1536 
1537  if (pOut!=nullptr) { // now move completely into the visible area
1538  if (nY1<nOutMin) {
1539  nY1=nOutMin;
1540  if (nY2<nY1+nMinLen) nY2=nY1+nMinLen;
1541  }
1542  if (nY2>nOutMax) {
1543  nY2=nOutMax;
1544  if (nY1>nY2-nMinLen) nY1=nY2-nMinLen;
1545  }
1546  }
1547 
1548  maRef1.setX(aCenter.X() );
1549  maRef1.setY(nY1 );
1550  maRef2.setX(aCenter.X() );
1551  maRef2.setY(nY2 );
1552 
1553  break;
1554  }
1555 
1557  case SdrDragMode::Gradient:
1558  case SdrDragMode::Crop:
1559  {
1561  maRef1 = aRect.TopLeft();
1562  maRef2 = aRect.BottomRight();
1563  break;
1564  }
1565  default: break;
1566  }
1567 }
1568 
1569 void SdrMarkView::SetRef1(const Point& rPt)
1570 {
1572  {
1573  maRef1 = rPt;
1575  if(pH)
1576  pH->SetPos(rPt);
1577  }
1578 }
1579 
1580 void SdrMarkView::SetRef2(const Point& rPt)
1581 {
1583  {
1584  maRef2 = rPt;
1586  if(pH)
1587  pH->SetPos(rPt);
1588  }
1589 }
1590 
1592 {
1593  return SfxViewShell::Current();
1594 }
1595 
1597 {
1598  for (size_t nm=GetMarkedObjectCount(); nm>0;) {
1599  --nm;
1600  SdrMark* pM = GetSdrMarkByIndex(nm);
1601  SdrObject* pObj = pM->GetMarkedSdrObj();
1602  SdrPageView* pPV = pM->GetPageView();
1603  bool bRaus = !pObj || !pPV->IsObjMarkable(pObj);
1604  if (bRaus)
1605  {
1607  }
1608  else
1609  {
1610  if (!IsGluePointEditMode()) { // selected glue points only in GlueEditMode
1611  SdrUShortCont& rPts = pM->GetMarkedGluePoints();
1612  rPts.clear();
1613  }
1614  }
1615  }
1616 
1617  // at least reset the remembered BoundRect to prevent handle
1618  // generation if bForceFrameHandles is TRUE.
1619  mbMarkedObjRectDirty = true;
1620 }
1621 
1623 {
1624  SdrPageView* pPV = GetSdrPageView();
1625 
1626  if(pPV)
1627  {
1628  pPV->SetHasMarkedObj(GetMarkedObjectList().TakeSnapRect(pPV, pPV->MarkSnap()));
1630  }
1631 }
1632 
1634 {
1635  if (bOn!=mbForceFrameHandles) {
1636  bool bOld=ImpIsFrameHandles();
1637  mbForceFrameHandles=bOn;
1638  bool bNew=ImpIsFrameHandles();
1639  if (bNew!=bOld) {
1640  AdjustMarkHdl();
1642  }
1643  }
1644 }
1645 
1647 {
1648  if (eMode==meEditMode) return;
1649 
1651  bool bEdge0=static_cast<SdrCreateView*>(this)->IsEdgeTool();
1653  meEditMode=eMode;
1655  bool bEdge1=static_cast<SdrCreateView*>(this)->IsEdgeTool();
1656  // avoid flickering when switching between GlueEdit and EdgeTool
1657  if (bGlue1 && !bGlue0) ImpSetGlueVisible2(bGlue1);
1658  if (bEdge1!=bEdge0) ImpSetGlueVisible3(bEdge1);
1659  if (!bGlue1 && bGlue0) ImpSetGlueVisible2(bGlue1);
1660  if (bGlue0 && !bGlue1) UnmarkAllGluePoints();
1661 }
1662 
1663 
1664 bool SdrMarkView::IsObjMarkable(SdrObject const * pObj, SdrPageView const * pPV) const
1665 {
1666  if (pObj)
1667  {
1668  if (pObj->IsMarkProtect() ||
1669  (!mbDesignMode && pObj->IsUnoObj()))
1670  {
1671  // object not selectable or
1672  // SdrUnoObj not in DesignMode
1673  return false;
1674  }
1675  }
1676  return pPV==nullptr || pPV->IsObjMarkable(pObj);
1677 }
1678 
1679 bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
1680 {
1681  bool bRet=false;
1682  nTol=ImpGetHitTolLogic(nTol,nullptr);
1683  for (size_t nm=0; nm<GetMarkedObjectCount() && !bRet; ++nm) {
1684  SdrMark* pM=GetSdrMarkByIndex(nm);
1685  bRet = nullptr != CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,nullptr);
1686  }
1687  return bRet;
1688 }
1689 
1690 SdrHdl* SdrMarkView::PickHandle(const Point& rPnt) const
1691 {
1692  if (mbSomeObjChgdFlag) { // recalculate handles, if necessary
1694  }
1695  return maHdlList.IsHdlListHit(rPnt);
1696 }
1697 
1698 bool SdrMarkView::MarkObj(const Point& rPnt, short nTol, bool bToggle, bool bDeep)
1699 {
1700  SdrPageView* pPV;
1701  nTol=ImpGetHitTolLogic(nTol,nullptr);
1703  if (bDeep) nOptions=nOptions|SdrSearchOptions::DEEP;
1704  SdrObject* pObj = PickObj(rPnt, static_cast<sal_uInt16>(nTol), pPV, nOptions);
1705  if (pObj) {
1706  bool bUnmark=bToggle && IsObjMarked(pObj);
1707  MarkObj(pObj,pPV,bUnmark);
1708  }
1709  return pObj != nullptr;
1710 }
1711 
1713 {
1714  SdrPageView* pPageView = GetSdrPageView();
1715 
1716  if(!pPageView)
1717  {
1718  return false;
1719  }
1720 
1722  const size_t nMarkCount=GetMarkedObjectCount();
1723  size_t nChgMarkNum = SAL_MAX_SIZE; // number of the MarkEntry we want to replace
1724  size_t nSearchObjNum = bPrev ? 0 : SAL_MAX_SIZE;
1725  if (nMarkCount!=0) {
1726  nChgMarkNum=bPrev ? 0 : nMarkCount-1;
1727  SdrMark* pM=GetSdrMarkByIndex(nChgMarkNum);
1728  OSL_ASSERT(pM!=nullptr);
1729  if (pM->GetMarkedSdrObj() != nullptr)
1730  nSearchObjNum = pM->GetMarkedSdrObj()->GetNavigationPosition();
1731  }
1732 
1733  SdrObject* pMarkObj=nullptr;
1734  SdrObjList* pSearchObjList=pPageView->GetObjList();
1735  const size_t nObjCount = pSearchObjList->GetObjCount();
1736  if (nObjCount!=0) {
1737  if (nSearchObjNum>nObjCount) nSearchObjNum=nObjCount;
1738  while (pMarkObj==nullptr && ((!bPrev && nSearchObjNum>0) || (bPrev && nSearchObjNum<nObjCount)))
1739  {
1740  if (!bPrev)
1741  nSearchObjNum--;
1742  SdrObject* pSearchObj = pSearchObjList->GetObjectForNavigationPosition(nSearchObjNum);
1743  if (IsObjMarkable(pSearchObj,pPageView))
1744  {
1745  if (TryToFindMarkedObject(pSearchObj)==SAL_MAX_SIZE)
1746  {
1747  pMarkObj=pSearchObj;
1748  }
1749  }
1750  if (bPrev) nSearchObjNum++;
1751  }
1752  }
1753 
1754  if(!pMarkObj)
1755  {
1756  return false;
1757  }
1758 
1759  if (nChgMarkNum!=SAL_MAX_SIZE)
1760  {
1762  }
1763  MarkObj(pMarkObj,pPageView); // also calls MarkListHasChanged(), AdjustMarkHdl()
1764  return true;
1765 }
1766 
1767 bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
1768 {
1770  nTol=ImpGetHitTolLogic(nTol,nullptr);
1771  SdrMark* pTopMarkHit=nullptr;
1772  SdrMark* pBtmMarkHit=nullptr;
1773  size_t nTopMarkHit=0;
1774  size_t nBtmMarkHit=0;
1775  // find topmost of the selected objects that is hit by rPnt
1776  const size_t nMarkCount=GetMarkedObjectCount();
1777  for (size_t nm=nMarkCount; nm>0 && pTopMarkHit==nullptr;) {
1778  --nm;
1779  SdrMark* pM=GetSdrMarkByIndex(nm);
1780  if(CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,nullptr))
1781  {
1782  pTopMarkHit=pM;
1783  nTopMarkHit=nm;
1784  }
1785  }
1786  // nothing found, in this case, just select an object
1787  if (pTopMarkHit==nullptr) return MarkObj(rPnt,sal_uInt16(nTol));
1788 
1789  SdrObject* pTopObjHit=pTopMarkHit->GetMarkedSdrObj();
1790  SdrObjList* pObjList=pTopObjHit->getParentSdrObjListFromSdrObject();
1791  SdrPageView* pPV=pTopMarkHit->GetPageView();
1792  // find lowermost of the selected objects that is hit by rPnt
1793  // and is placed on the same PageView as pTopMarkHit
1794  for (size_t nm=0; nm<nMarkCount && pBtmMarkHit==nullptr; ++nm) {
1795  SdrMark* pM=GetSdrMarkByIndex(nm);
1796  SdrPageView* pPV2=pM->GetPageView();
1797  if (pPV2==pPV && CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pPV2,SdrSearchOptions::NONE,nullptr))
1798  {
1799  pBtmMarkHit=pM;
1800  nBtmMarkHit=nm;
1801  }
1802  }
1803  if (pBtmMarkHit==nullptr) { pBtmMarkHit=pTopMarkHit; nBtmMarkHit=nTopMarkHit; }
1804  SdrObject* pBtmObjHit=pBtmMarkHit->GetMarkedSdrObj();
1805  const size_t nObjCount = pObjList->GetObjCount();
1806 
1807  size_t nSearchBeg(0);
1808  E3dScene* pScene(nullptr);
1809  SdrObject* pObjHit(bPrev ? pBtmObjHit : pTopObjHit);
1810  bool bRemap =
1811  nullptr != dynamic_cast< const E3dCompoundObject* >(pObjHit);
1812  if (bRemap)
1813  {
1814  pScene = dynamic_cast< E3dScene* >(pObjHit->getParentSdrObjectFromSdrObject());
1815  bRemap = nullptr != pScene;
1816  }
1817 
1818  if(bPrev)
1819  {
1820  sal_uInt32 nOrdNumBtm(pBtmObjHit->GetOrdNum());
1821 
1822  if(bRemap)
1823  {
1824  nOrdNumBtm = pScene->RemapOrdNum(nOrdNumBtm);
1825  }
1826 
1827  nSearchBeg = nOrdNumBtm + 1;
1828  }
1829  else
1830  {
1831  sal_uInt32 nOrdNumTop(pTopObjHit->GetOrdNum());
1832 
1833  if(bRemap)
1834  {
1835  nOrdNumTop = pScene->RemapOrdNum(nOrdNumTop);
1836  }
1837 
1838  nSearchBeg = nOrdNumTop;
1839  }
1840 
1841  size_t no=nSearchBeg;
1842  SdrObject* pFndObj=nullptr;
1843  while (pFndObj==nullptr && ((!bPrev && no>0) || (bPrev && no<nObjCount))) {
1844  if (!bPrev) no--;
1845  SdrObject* pObj;
1846 
1847  if(bRemap)
1848  {
1849  pObj = pObjList->GetObj(pScene->RemapOrdNum(no));
1850  }
1851  else
1852  {
1853  pObj = pObjList->GetObj(no);
1854  }
1855 
1856  if (CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr))
1857  {
1858  if (TryToFindMarkedObject(pObj)==SAL_MAX_SIZE) {
1859  pFndObj=pObj;
1860  } else {
1861  // TODO: for performance reasons set on to Top or Btm, if necessary
1862  }
1863  }
1864  if (bPrev) no++;
1865  }
1866  if (pFndObj!=nullptr)
1867  {
1868  GetMarkedObjectListWriteAccess().DeleteMark(bPrev?nBtmMarkHit:nTopMarkHit);
1871  AdjustMarkHdl();
1872  }
1873  return pFndObj!=nullptr;
1874 }
1875 
1876 void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark)
1877 {
1878  bool bFnd=false;
1879  tools::Rectangle aR(rRect);
1880  SdrObjList* pObjList;
1881  BrkAction();
1882  SdrPageView* pPV = GetSdrPageView();
1883 
1884  if(pPV)
1885  {
1886  pObjList=pPV->GetObjList();
1887  tools::Rectangle aFrm1(aR);
1888  const size_t nObjCount = pObjList->GetObjCount();
1889  for (size_t nO=0; nO<nObjCount; ++nO) {
1890  SdrObject* pObj=pObjList->GetObj(nO);
1891  tools::Rectangle aRect(pObj->GetCurrentBoundRect());
1892  if (aFrm1.IsInside(aRect)) {
1893  if (!bUnmark) {
1894  if (IsObjMarkable(pObj,pPV))
1895  {
1897  bFnd=true;
1898  }
1899  } else {
1900  const size_t nPos=TryToFindMarkedObject(pObj);
1901  if (nPos!=SAL_MAX_SIZE)
1902  {
1904  bFnd=true;
1905  }
1906  }
1907  }
1908  }
1909  }
1910  if (bFnd) {
1913  AdjustMarkHdl();
1914  }
1915 }
1916 
1917 namespace {
1918 
1919 void collectUIInformation(const SdrObject* pObj)
1920 {
1921  EventDescription aDescription;
1922  aDescription.aAction = "SELECT";
1923  aDescription.aParent = "MainWindow";
1924  aDescription.aKeyWord = "CurrentApp";
1925 
1926  if (!pObj->GetName().isEmpty())
1927  aDescription.aParameters = {{"OBJECT", pObj->GetName()}};
1928  else
1929  aDescription.aParameters = {{"OBJECT", "Unnamed_Obj_" + OUString::number(pObj->GetOrdNum())}};
1930 
1931  UITestLogger::getInstance().logEvent(aDescription);
1932 }
1933 
1934 }
1935 
1936  void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark, bool bDoNoSetMarkHdl,
1937  std::vector<basegfx::B2DRectangle> const & rSubSelections)
1938 {
1939  if (!(pObj!=nullptr && pPV!=nullptr && IsObjMarkable(pObj, pPV)))
1940  return;
1941 
1942  BrkAction();
1943  if (!bUnmark)
1944  {
1946  collectUIInformation(pObj);
1947  }
1948  else
1949  {
1950  const size_t nPos=TryToFindMarkedObject(pObj);
1951  if (nPos!=SAL_MAX_SIZE)
1952  {
1954  }
1955  }
1956 
1957  maSubSelectionList = rSubSelections;
1958 
1959  if (!bDoNoSetMarkHdl) {
1961  AdjustMarkHdl();
1962  }
1963 }
1964 
1965 bool SdrMarkView::IsObjMarked(SdrObject const * pObj) const
1966 {
1967  return TryToFindMarkedObject(pObj)!=SAL_MAX_SIZE;
1968 }
1969 
1971 {
1972  return maHdlList.GetHdlSize()*2+1;
1973 }
1974 
1976 {
1977  if (nSiz<3) nSiz=3;
1978  nSiz/=2;
1979  if (nSiz!=maHdlList.GetHdlSize()) {
1980  maHdlList.SetHdlSize(nSiz);
1981  }
1982 }
1983 
1985  basegfx::B2DVector& rOffset,
1986  const SdrObject* pObj,
1987  const SdrPageView* pPV) const
1988 {
1989  if(nullptr == pObj || nullptr == pPV)
1990  {
1991  return false;
1992  }
1993 
1994  const OutputDevice* pOutputDevice(GetFirstOutputDevice());
1995 
1996  if(nullptr == pOutputDevice)
1997  {
1998  return false;
1999  }
2000 
2001  const SdrPageWindow* pSdrPageWindow(pPV->FindPageWindow(*pOutputDevice));
2002 
2003  if(nullptr == pSdrPageWindow)
2004  {
2005  return false;
2006  }
2007 
2008  const sdr::contact::ObjectContact& rObjectContact(pSdrPageWindow->GetObjectContact());
2009 
2010  if(!rObjectContact.supportsGridOffsets())
2011  {
2012  return false;
2013  }
2014 
2016  const_cast<sdr::contact::ObjectContact&>(rObjectContact)));
2017 
2018  rOffset = rVOC.getGridOffset();
2019 
2020  return !rOffset.equalZero();
2021 }
2022 
2024  basegfx::B2DVector& rOffset,
2025  const basegfx::B2DPoint& rPoint,
2026  const SdrPageView* pPV) const
2027 {
2028  if(nullptr == pPV)
2029  {
2030  return false;
2031  }
2032 
2033  const OutputDevice* pOutputDevice(GetFirstOutputDevice());
2034 
2035  if(nullptr == pOutputDevice)
2036  {
2037  return false;
2038  }
2039 
2040  const SdrPageWindow* pSdrPageWindow(pPV->FindPageWindow(*pOutputDevice));
2041 
2042  if(nullptr == pSdrPageWindow)
2043  {
2044  return false;
2045  }
2046 
2047  const sdr::contact::ObjectContact& rObjectContact(pSdrPageWindow->GetObjectContact());
2048 
2049  if(!rObjectContact.supportsGridOffsets())
2050  {
2051  return false;
2052  }
2053 
2054  rObjectContact.calculateGridOffsetForB2DRange(rOffset, basegfx::B2DRange(rPoint));
2055 
2056  return !rOffset.equalZero();
2057 }
2058 
2059 SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const
2060 {
2061  if(((nOptions & SdrSearchOptions::IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
2062  {
2063  return nullptr;
2064  }
2065 
2066  const bool bCheckIfMarkable(nOptions & SdrSearchOptions::TESTMARKABLE);
2067  const bool bDeep(nOptions & SdrSearchOptions::DEEP);
2068  const bool bOLE(dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr);
2069  const bool bTXT(dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsTextFrame());
2070  SdrObject* pRet=nullptr;
2071  tools::Rectangle aRect(pObj->GetCurrentBoundRect());
2072 
2073  // add possible GridOffset to up-to-now view-independent BoundRect data
2074  basegfx::B2DVector aGridOffset(0.0, 0.0);
2075  if(getPossibleGridOffsetForSdrObject(aGridOffset, pObj, pPV))
2076  {
2077  aRect += Point(
2078  basegfx::fround(aGridOffset.getX()),
2079  basegfx::fround(aGridOffset.getY()));
2080  }
2081 
2082  sal_uInt16 nTol2(nTol);
2083 
2084  // double tolerance for OLE, text frames and objects in
2085  // active text edit
2086  if(bOLE || bTXT || pObj==static_cast<const SdrObjEditView*>(this)->GetTextEditObject())
2087  {
2088  nTol2*=2;
2089  }
2090 
2091  aRect.AdjustLeft( -nTol2 ); // add 1 tolerance for all objects
2092  aRect.AdjustTop( -nTol2 );
2093  aRect.AdjustRight(nTol2 );
2094  aRect.AdjustBottom(nTol2 );
2095 
2096  if (aRect.IsInside(rPnt))
2097  {
2098  if (!bCheckIfMarkable || IsObjMarkable(pObj,pPV))
2099  {
2100  SdrObjList* pOL=pObj->GetSubList();
2101 
2102  if (pOL!=nullptr && pOL->GetObjCount()!=0)
2103  {
2104  SdrObject* pTmpObj;
2105  // adjustment hit point for virtual objects
2106  Point aPnt( rPnt );
2107 
2108  if ( auto pVirtObj = dynamic_cast<const SdrVirtObj*>( pObj) )
2109  {
2110  Point aOffset = pVirtObj->GetOffset();
2111  aPnt.Move( -aOffset.X(), -aOffset.Y() );
2112  }
2113 
2114  pRet=CheckSingleSdrObjectHit(aPnt,nTol,pOL,pPV,nOptions,pMVisLay,pTmpObj);
2115  }
2116  else
2117  {
2118  if(!pMVisLay || pMVisLay->IsSet(pObj->GetLayer()))
2119  {
2120  pRet = SdrObjectPrimitiveHit(*pObj, rPnt, nTol2, *pPV, &pPV->GetVisibleLayers(), false);
2121  }
2122  }
2123  }
2124  }
2125 
2126  if (!bDeep && pRet!=nullptr)
2127  {
2128  pRet=pObj;
2129  }
2130 
2131  return pRet;
2132 }
2133 
2134 SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj) const
2135 {
2136  return (*this).CheckSingleSdrObjectHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,rpRootObj,nullptr);
2137 }
2138 SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const
2139 {
2140  SdrObject* pRet=nullptr;
2141  rpRootObj=nullptr;
2142  if (pOL!=nullptr)
2143  {
2144  const bool bRemap(
2145  nullptr != pOL->getSdrObjectFromSdrObjList()
2146  && nullptr != dynamic_cast< const E3dScene* >(pOL->getSdrObjectFromSdrObjList()));
2147  const E3dScene* pRemapScene(bRemap ? static_cast< E3dScene* >(pOL->getSdrObjectFromSdrObjList()) : nullptr);
2148  const size_t nObjCount(pOL->GetObjCount());
2149  size_t nObjNum(nObjCount);
2150 
2151  while (pRet==nullptr && nObjNum>0)
2152  {
2153  nObjNum--;
2154  SdrObject* pObj;
2155 
2156  if(bRemap)
2157  {
2158  pObj = pOL->GetObj(pRemapScene->RemapOrdNum(nObjNum));
2159  }
2160  else
2161  {
2162  pObj = pOL->GetObj(nObjNum);
2163  }
2164  if (nOptions & SdrSearchOptions::BEFOREMARK)
2165  {
2166  if (pMarkList!=nullptr)
2167  {
2168  if ((*pMarkList).FindObject(pObj)!=SAL_MAX_SIZE)
2169  {
2170  return nullptr;
2171  }
2172  }
2173  }
2174  pRet=CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
2175  if (pRet!=nullptr) rpRootObj=pObj;
2176  }
2177  }
2178  return pRet;
2179 }
2180 
2181 SdrObject* SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
2182 {
2183  return PickObj(rPnt, nTol, rpPV, nOptions, nullptr);
2184 }
2185 
2186 SdrObject* SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, bool* pbHitPassDirect) const
2187 { // TODO: lacks a Pass2,Pass3
2189  if (ppRootObj!=nullptr) *ppRootObj=nullptr;
2190  if (pbHitPassDirect!=nullptr) *pbHitPassDirect=true;
2191  SdrObject* pRet = nullptr;
2192  rpPV=nullptr;
2193  bool bMarked(nOptions & SdrSearchOptions::MARKED);
2194  bool bMasters=!bMarked && bool(nOptions & SdrSearchOptions::ALSOONMASTER);
2195  // nOptions & SdrSearchOptions::NEXT: n.i.
2196  // nOptions & SdrSearchOptions::PASS2BOUND: n.i.
2197  // nOptions & SdrSearchOptions::PASS3NEAREST// n.i.
2198  if (nTol<0) nTol=ImpGetHitTolLogic(nTol,nullptr);
2199  SdrObject* pObj=nullptr;
2200  SdrObject* pHitObj=nullptr;
2201  SdrPageView* pPV=nullptr;
2202  if (static_cast<const SdrObjEditView*>(this)->IsTextEditFrameHit(rPnt)) {
2203  pObj=static_cast<const SdrObjEditView*>(this)->GetTextEditObject();
2204  pHitObj=pObj;
2205  pPV=static_cast<const SdrObjEditView*>(this)->GetTextEditPageView();
2206  }
2207  if (bMarked) {
2208  const size_t nMrkCnt=GetMarkedObjectCount();
2209  size_t nMrkNum=nMrkCnt;
2210  while (pHitObj==nullptr && nMrkNum>0) {
2211  nMrkNum--;
2212  SdrMark* pM=GetSdrMarkByIndex(nMrkNum);
2213  pObj=pM->GetMarkedSdrObj();
2214  pPV=pM->GetPageView();
2215  pHitObj=CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,nOptions,nullptr);
2216  }
2217  }
2218  else
2219  {
2220  pPV = GetSdrPageView();
2221 
2222  if(pPV)
2223  {
2224  SdrPage* pPage=pPV->GetPage();
2225  sal_uInt16 nPgCount=1;
2226 
2227  if(bMasters && pPage->TRG_HasMasterPage())
2228  {
2229  nPgCount++;
2230  }
2231  bool bWholePage(nOptions & SdrSearchOptions::WHOLEPAGE);
2232  bool bExtraPassForWholePage=bWholePage && pPage!=pPV->GetObjList();
2233  if (bExtraPassForWholePage) nPgCount++; // First search in AktObjList, then on the entire page
2234  sal_uInt16 nPgNum=nPgCount;
2235  while (pHitObj==nullptr && nPgNum>0) {
2236  SdrSearchOptions nTmpOptions=nOptions;
2237  nPgNum--;
2238  const SdrLayerIDSet* pMVisLay=nullptr;
2239  SdrObjList* pObjList=nullptr;
2240  if (pbHitPassDirect!=nullptr) *pbHitPassDirect = true;
2241  if (nPgNum>=nPgCount-1 || (bExtraPassForWholePage && nPgNum>=nPgCount-2))
2242  {
2243  pObjList=pPV->GetObjList();
2244  if (bExtraPassForWholePage && nPgNum==nPgCount-2) {
2245  pObjList=pPage;
2246  if (pbHitPassDirect!=nullptr) *pbHitPassDirect = false;
2247  }
2248  }
2249  else
2250  {
2251  // otherwise MasterPage
2252  SdrPage& rMasterPage = pPage->TRG_GetMasterPage();
2253  pMVisLay = &pPage->TRG_GetMasterPageVisibleLayers();
2254  pObjList = &rMasterPage;
2255 
2256  if (pbHitPassDirect!=nullptr) *pbHitPassDirect = false;
2257  nTmpOptions=nTmpOptions | SdrSearchOptions::IMPISMASTER;
2258  }
2259  pHitObj=CheckSingleSdrObjectHit(rPnt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj,&(GetMarkedObjectList()));
2260  }
2261  }
2262  }
2263  if (pHitObj!=nullptr) {
2264  if (ppRootObj!=nullptr) *ppRootObj=pObj;
2265  if (nOptions & SdrSearchOptions::DEEP) pObj=pHitObj;
2266  if (nOptions & SdrSearchOptions::TESTTEXTEDIT) {
2267  if (!pObj->HasTextEdit() || pPV->GetLockedLayers().IsSet(pObj->GetLayer())) {
2268  pObj=nullptr;
2269  }
2270  }
2271  if (pObj!=nullptr && (nOptions & SdrSearchOptions::TESTMACRO)) {
2272  SdrObjMacroHitRec aHitRec;
2273  aHitRec.aPos=rPnt;
2274  aHitRec.nTol=nTol;
2275  aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
2276  aHitRec.pPageView=pPV;
2277  if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=nullptr;
2278  }
2279  if (pObj!=nullptr) {
2280  pRet=pObj;
2281  rpPV=pPV;
2282  }
2283  }
2284  return pRet;
2285 }
2286 
2287 bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
2288 {
2290  const bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND);
2291  rpObj=nullptr;
2292  rpPV=nullptr;
2293  const size_t nMarkCount=GetMarkedObjectCount();
2294  for (size_t nMarkNum=nMarkCount; nMarkNum>0;) {
2295  --nMarkNum;
2296  SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
2297  SdrPageView* pPV=pM->GetPageView();
2298  SdrObject* pObj=pM->GetMarkedSdrObj();
2300  rpObj=pObj;
2301  rpPV=pPV;
2302  return true;
2303  }
2304  }
2305  if (bBoundCheckOn2ndPass) {
2306  for (size_t nMarkNum=nMarkCount; nMarkNum>0;) {
2307  --nMarkNum;
2308  SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
2309  SdrPageView* pPV=pM->GetPageView();
2310  SdrObject* pObj=pM->GetMarkedSdrObj();
2311  tools::Rectangle aRect(pObj->GetCurrentBoundRect());
2312  aRect.AdjustLeft( -mnHitTolLog );
2313  aRect.AdjustTop( -mnHitTolLog );
2314  aRect.AdjustRight(mnHitTolLog );
2315  aRect.AdjustBottom(mnHitTolLog );
2316  if (aRect.IsInside(rPnt)) {
2317  rpObj=pObj;
2318  rpPV=pPV;
2319  return true;
2320  }
2321  }
2322  }
2323  return false;
2324 }
2325 
2326 
2328 {
2329  if (GetMarkedObjectCount()==0)
2330  return;
2331 
2332  BrkAction();
2333  if (pPV!=nullptr)
2334  {
2336  }
2337  else
2338  {
2340  }
2341  mpMarkedObj=nullptr;
2342  mpMarkedPV=nullptr;
2344  AdjustMarkHdl();
2345 }
2346 
2348 {
2349  BrkAction();
2350 
2351  if(!pPV)
2352  {
2353  pPV = GetSdrPageView();
2354  }
2355 
2356  // #i69171# pPV may still be NULL if there is no SDrPageView (!), e.g. when inserting
2357  // other files
2358  if(pPV)
2359  {
2360  const bool bMarkChg(GetMarkedObjectListWriteAccess().InsertPageView(*pPV));
2361 
2362  if(bMarkChg)
2363  {
2365  }
2366  }
2367 
2368  if(GetMarkedObjectCount())
2369  {
2370  AdjustMarkHdl();
2371  }
2372 }
2373 
2375 {
2376  CheckMarked();
2377  SetMarkRects();
2378  SetMarkHandles(pOtherShell);
2379 }
2380 
2381 // BoundRect in model coordinates, no GridOffset added
2383 {
2384  tools::Rectangle aRect;
2385  for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
2386  SdrMark* pM=GetSdrMarkByIndex(nm);
2387  SdrObject* pO=pM->GetMarkedSdrObj();
2389  if (aRect.IsEmpty()) aRect=aR1;
2390  else aRect.Union(aR1);
2391  }
2392  return aRect;
2393 }
2394 
2395 // ObjRect in model coordinates, no GridOffset added
2397 {
2398  if (mbMarkedObjRectDirty) {
2399  const_cast<SdrMarkView*>(this)->mbMarkedObjRectDirty=false;
2400  tools::Rectangle aRect;
2401  for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
2402  SdrMark* pM=GetSdrMarkByIndex(nm);
2403  SdrObject* pO = pM->GetMarkedSdrObj();
2404  if (!pO)
2405  continue;
2406  tools::Rectangle aR1(pO->GetSnapRect());
2407  if (aRect.IsEmpty()) aRect=aR1;
2408  else aRect.Union(aR1);
2409  }
2410  const_cast<SdrMarkView*>(this)->maMarkedObjRect=aRect;
2411  }
2412  return maMarkedObjRect;
2413 }
2414 
2415 
2416 OUString SdrMarkView::ImpGetDescriptionString(const char* pStrCacheID, ImpGetDescriptionOptions nOpt) const
2417 {
2418  OUString sStr = SvxResId(pStrCacheID);
2419  const sal_Int32 nPos = sStr.indexOf("%1");
2420 
2421  if(nPos != -1)
2422  {
2424  {
2425  sStr = sStr.replaceAt(nPos, 2, GetDescriptionOfMarkedPoints());
2426  }
2427  else if(nOpt == ImpGetDescriptionOptions::GLUEPOINTS)
2428  {
2429  sStr = sStr.replaceAt(nPos, 2, GetDescriptionOfMarkedGluePoints());
2430  }
2431  else
2432  {
2433  sStr = sStr.replaceAt(nPos, 2, GetDescriptionOfMarkedObjects());
2434  }
2435  }
2436 
2437  return sStr.replaceFirst("%2", "0");
2438 }
2439 
2440 
2442 {
2443  // We enter only the first group found (in only one PageView), because
2444  // PageView::EnterGroup calls an AdjustMarkHdl.
2445  // TODO: I'll have to prevent that via a flag.
2446  SdrPageView* pPV = GetSdrPageView();
2447 
2448  if(!pPV)
2449  return;
2450 
2451  bool bEnter=false;
2452  for (size_t nm = GetMarkedObjectCount(); nm > 0 && !bEnter;)
2453  {
2454  --nm;
2455  SdrMark* pM=GetSdrMarkByIndex(nm);
2456  if (pM->GetPageView()==pPV) {
2457  SdrObject* pObj=pM->GetMarkedSdrObj();
2458  if (pObj->IsGroupObject()) {
2459  if (pPV->EnterGroup(pObj)) {
2460  bEnter=true;
2461  }
2462  }
2463  }
2464  }
2465 }
2466 
2467 
2469 {
2471  maSdrViewSelection.SetEdgesOfMarkedNodesDirty();
2472 
2473  mbMarkedObjRectDirty=true;
2475  bool bOneEdgeMarked=false;
2476  if (GetMarkedObjectCount()==1) {
2477  const SdrObject* pObj=GetMarkedObjectByIndex(0);
2478  if (pObj->GetObjInventor()==SdrInventor::Default) {
2479  sal_uInt16 nIdent=pObj->GetObjIdentifier();
2480  bOneEdgeMarked=nIdent==OBJ_EDGE;
2481  }
2482  }
2483  ImpSetGlueVisible4(bOneEdgeMarked);
2484 }
2485 
2486 
2488 {
2490 }
2491 
2493 {
2494  if ( mbDesignMode != bOn )
2495  {
2496  mbDesignMode = bOn;
2497  SdrPageView* pPageView = GetSdrPageView();
2498  if ( pPageView )
2499  pPageView->SetDesignMode( bOn );
2500  }
2501 }
2502 
2503 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 mnMinMovLog
Definition: svdpntv.hxx:151
Point TopLeft() const
void EndMarkGluePoints()
Definition: svdmrkv.cxx:524
SdrPage & TRG_GetMasterPage() const
Definition: svdpage.cxx:1555
virtual bool HasTextEdit() const
Definition: svdobj.cxx:1701
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2327
OutDevType GetOutDevType() const
virtual void HideSdrPage()
Definition: svdpntv.cxx:371
void SetEditMode(SdrViewEditMode eMode)
Definition: svdmrkv.cxx:1646
const SdrUShortCont & GetMarkedGluePoints() const
Definition: svdmark.hxx:115
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1070
bool IsMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1817
void SetMinMove(sal_uInt16 nDist)
Definition: svddrag.hxx:111
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
sal_Int32 nIndex
void Reset()
Definition: svddrag.cxx:36
const tools::Rectangle & MarkSnap() const
Definition: svdpagv.hxx:186
void BrkMarkGluePoints()
Definition: svdmrkv.cxx:540
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:295
bool IsNotVisibleAsMaster() const
Definition: svdobj.hxx:834
SdrHintKind GetKind() const
Definition: svdmodel.hxx:124
sal_uInt32 GetPolyNum() const
Definition: svdhdl.hxx:219
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:857
XGradient aGradient
Definition: gradtrns.hxx:40
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:341
virtual void SetMarkHandles(SfxViewShell *pOtherShell)
Definition: svdmrkv.cxx:931
void SortMarkedObjects() const
Definition: svdmrkv.hxx:258
void SetDesignMode(bool bOn=true)
Definition: svdmrkv.cxx:2492
void UndirtyMrkPnt() const
Definition: svdmrkv1.cxx:286
bool mbMarkHandlesHidden
Definition: svdmrkv.hxx:132
bool UnmarkAllGluePoints()
Definition: svdmrkv.hxx:391
std::unique_ptr< ImplMarkingOverlay > mpMarkObjOverlay
Definition: svdmrkv.hxx:96
const SdrUShortCont & GetMarkedPoints() const
Definition: svdmark.hxx:110
basegfx::B2DPoint maPositionB
Definition: gradtrns.hxx:32
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const
virtual void ModelHasChanged()
Definition: svdpntv.cxx:252
void SetSecondPosition(const basegfx::B2DPoint &rNewPosition)
Definition: svdmrkv.cxx:114
sdr::overlay::OverlayObjectList maObjects
Definition: svdmrkv.cxx:73
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
bool IsObjMarkable(SdrObject const *pObj, SdrPageView const *pPV) const
Definition: svdmrkv.cxx:1664
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1673
const Point & GetStart() const
Definition: svddrag.hxx:92
Point BottomLeft() const
SdrView & GetView()
Definition: svdpagv.hxx:135
SdrHdlKind
Definition: svdhdl.hxx:52
bool isInplaceActive() const
Definition: svdoole2.cxx:769
bool AreObjectsMarked() const
Definition: svdmrkv.hxx:259
SdrSearchOptions
Definition: svdmrkv.hxx:35
long Long
bool CheckMinMoved(const Point &rPnt)
Definition: svddrag.cxx:86
bool ImpIsFrameHandles() const
Definition: svdmrkv.cxx:584
object group
Definition: svdobjkind.hxx:28
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
sdr::ViewSelection maSdrViewSelection
Definition: svdmrkv.hxx:110
void FlushComeBackTimer() const
Definition: svdpntv.cxx:243
bool IsTextFrame() const
Definition: svdotext.hxx:343
virtual ~SdrMarkView() override
Definition: svdmrkv.cxx:187
bool IsInsObjPoint() const
Definition: svddrgv.hxx:123
bool isUiActive() const
Definition: svdoole2.cxx:774
double getX() const
SdrViewEditMode
Definition: svdmrkv.hxx:74
SdrHintKind
Definition: svdmodel.hxx:93
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:758
virtual void BckAction() override
Definition: svdmrkv.cxx:313
size_t GetObjCount() const
Definition: svdpage.cxx:752
sal_uInt32 GetPointNum() const
Definition: svdhdl.hxx:222
bool IsInEditMode() const
Definition: svdotext.hxx:323
void SetSelected(bool bJa=true)
Definition: svdhdl.cxx:353
bool mbPlusHdlAlways
Definition: svdmrkv.hxx:125
virtual void addCropHandles(SdrHdlList &rTarget) const
Definition: svdobj.cxx:1196
sal_Int16 nId
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1272
SdrObject * GetObjectForNavigationPosition(const sal_uInt32 nNavigationPosition) const
Return the object for the given navigation position.
Definition: svdpage.cxx:876
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdpntv.cxx:192
OUString const & GetDescriptionOfMarkedGluePoints() const
Definition: svdmrkv.hxx:262
const_iterator find(const Value &x) const
ViewObjectContact & GetViewObjectContact(ObjectContact &rObjectContact)
Definition: viewcontact.cxx:68
const MapMode & GetMapMode() const
OUString const & GetDescriptionOfMarkedPoints() const
Definition: svdmrkv.hxx:261
SdrObject * GetObj() const
Definition: svdhdl.hxx:203
double getY() const
tools::Long GetWidth() const
SdrDragStat maDragStat
Definition: svdpntv.hxx:141
SdrPageView * GetSdrPageViewOfMarkedByIndex(size_t nNum) const
Definition: svdmrkv.hxx:254
void append(std::unique_ptr< OverlayObject > pOverlayObject)
void SetUnsorted()
Definition: svdmark.hxx:175
void Clear()
Definition: svdmark.cxx:200
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1172
bool HasMarkableGluePoints() const
Definition: svdmrkv1.cxx:350
virtual void BrkAction() override
Definition: svdmrkv.cxx:321
size_t TryToFindMarkedObject(const SdrObject *pObj) const
Definition: svdmrkv.hxx:253
void ImpSetGlueVisible4(bool bOn)
Definition: svdpntv.hxx:240
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:558
bool MarkGluePoints(const tools::Rectangle *pRect, bool bUnmark)
Definition: svdmrkv1.cxx:390
media shape
Definition: svdobjkind.hxx:57
bool mbDesignMode
Definition: svdmrkv.hxx:123
void DeleteMark(size_t nNum)
Definition: svdmark.cxx:315
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:647
void BegUndo()
Definition: svdmodel.cxx:412
SfxHintId GetId() const
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1192
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:245
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:428
const tools::Rectangle & GetMarkedObjRect() const
Definition: svdmrkv.cxx:2396
Point RightCenter() const
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1610
virtual void BrkAction() override
Definition: svdsnpv.cxx:237
virtual bool MouseMove(const MouseEvent &rMEvt, OutputDevice *pWin) override
handle mouse over effects for handles
Definition: svdmrkv.cxx:1423
bool IsVisible() const
Definition: svdobj.hxx:756
void EnterMarkedGroup()
Definition: svdmrkv.cxx:2441
virtual void MarkListHasChanged()
Definition: svdmrkv.cxx:2468
bool IsEmpty() const
SdrPageWindow * FindPageWindow(SdrPaintWindow &rPaintWindow) const
Definition: svdpagv.cxx:42
static UITestLogger & getInstance()
SdrMarkView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdmrkv.cxx:162
void logEvent(const EventDescription &rDescription)
sal_uInt16 mnHitTolLog
Definition: svdpntv.hxx:150
void SetNameDirty()
Definition: svdmark.hxx:195
bool IsUnmarking() const
Definition: svdmrkv.cxx:89
static void notifyInvalidation(SfxViewShell const *pThisView, const OString &rPayload)
tools::Long Left() const
sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice *pOut) const
Definition: svdpntv.cxx:314
bool IsAncestorOf(const vcl::Window &rWindow) const
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:25
OUTDEV_WINDOW
virtual void TakeActionRect(tools::Rectangle &rRect) const override
Definition: svdsnpv.cxx:244
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Definition: svdmodel.cxx:546
Point BottomCenter() const
SdrHdl * GetHdl(size_t nHdlNum) const
Definition: svdmrkv.hxx:352
virtual bool MouseMove(const MouseEvent &, OutputDevice *)
Definition: svdpntv.hxx:454
tools::Long Bottom() const
static SfxViewShell * Current()
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
oslFileHandle & pOut
SdrObject * SdrObjectPrimitiveHit(const SdrObject &rObject, const Point &rPnt, sal_uInt16 nTol, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly, drawinglayer::primitive2d::Primitive2DContainer *pHitContainer)
void MovMarkObj(const Point &rPnt)
Definition: svdmrkv.cxx:386
void Clear()
Definition: svdhdl.cxx:2245
virtual bool RequestHelp(const HelpEvent &)
Definition: svdpntv.hxx:455
sdr::overlay::OverlayObjectList maObjects
Definition: svdmrkv.cxx:132
OutputDevice * GetFirstOutputDevice() const
Definition: svdpntv.cxx:87
bool IsMarkGluePoints() const
Definition: svdmrkv.hxx:407
sal_uInt16 GetHdlSize() const
Definition: svdhdl.hxx:465
bool BegMarkGluePoints(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:492
Point LeftCenter() const
void showMarkHandles()
Definition: svdmrkv.cxx:575
Point maRef1
Definition: svdmrkv.hxx:106
virtual SdrObject * CheckSingleSdrObjectHit(const Point &rPnt, sal_uInt16 nTol, SdrObject *pObj, SdrPageView *pPV, SdrSearchOptions nOptions, const SdrLayerIDSet *pMVisLay) const
Definition: svdmrkv.cxx:2059
void AddDragModeHdl(SdrDragMode eMode)
Definition: svdmrkv.cxx:1282
void SetDistortShear(bool bOn)
Definition: svdhdl.cxx:2225
B2IRange fround(const B2DRange &rRange)
Point maRef2
Definition: svdmrkv.hxx:107
bool TakeBoundRect(SdrPageView const *pPageView, tools::Rectangle &rRect) const
Definition: svdmark.cxx:587
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:971
bool mbMarkedObjRectDirty
Definition: svdmrkv.hxx:127
bool IsMinMoved() const
Definition: svddrag.hxx:108
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:222
SdrHdl * IsHdlListHit(const Point &rPnt) const
Definition: svdhdl.cxx:2296
bool PickMarkedObj(const Point &rPnt, SdrObject *&rpObj, SdrPageView *&rpPV, SdrSearchOptions nOptions) const
Definition: svdmrkv.cxx:2287
void Sort()
Definition: svdhdl.cxx:2253
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:174
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
void SetMoveOutside(bool bOn)
Definition: svdmrkv.cxx:2487
Point BottomRight() const
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:44
void MarkAllObj(SdrPageView *pPV=nullptr)
Definition: svdmrkv.cxx:2347
virtual void ClearPageView()
Definition: svdpntv.cxx:343
bool mbMrkPntDirty
Definition: svdmrkv.hxx:128
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
Definition: svdmrkv.cxx:2186
bool getPossibleGridOffsetForPosition(basegfx::B2DVector &rOffset, const basegfx::B2DPoint &rPoint, const SdrPageView *pPV) const
Definition: svdmrkv.cxx:2023
SdrDragMode meDragMode
Definition: svdmrkv.hxx:119
const SdrLayerIDSet & GetVisibleLayers() const
Definition: svdpagv.hxx:215
void ImpSetGlueVisible3(bool bOn)
Definition: svdpntv.hxx:239
open Bezier-curve
Definition: svdobjkind.hxx:37
UNDERLYING_TYPE get() const
virtual const SdrGluePointList * GetGluePointList() const
Definition: svdobj.cxx:2212
sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const
Definition: scene3d.cxx:247
void SetObj(SdrObject *pNewObj)
Definition: svdhdl.cxx:377
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
bool IsLeaveWindow() const
int i
uno_Any a
#define SDRGLUEPOINT_NOTFOUND
Definition: svdglue.hxx:117
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2323
const tools::Rectangle & MarkBound() const
Definition: svdpagv.hxx:185
bool IsUndoEnabled() const
returns true if undo is currently enabled This returns false if undo was disabled using EnableUndo( f...
Definition: svdmodel.cxx:577
void SetObjHdlNum(sal_uInt32 nNum)
Definition: svdhdl.hxx:215
virtual void MovAction(const Point &rPnt) override
Definition: svdmrkv.cxx:277
basegfx::B2DPoint maPositionA
Definition: gradtrns.hxx:31
bool IsMarkObj() const
Definition: svdmrkv.hxx:211
std::vector< basegfx::B2DRectangle > maSubSelectionList
Definition: svdmrkv.hxx:112
size_t GetMarkedObjectCount() const
Definition: svdmrkv.hxx:257
virtual void EndAction() override
Definition: svdmrkv.cxx:295
const SdrLayerIDSet & TRG_GetMasterPageVisibleLayers() const
Definition: svdpage.cxx:1561
bool MarkableObjectsExceed(int n) const
Definition: svdmrkv.cxx:549
bool IsMarkedObjHit(const Point &rPnt, short nTol=-2) const
Definition: svdmrkv.cxx:1679
OUString const & GetDescriptionOfMarkedObjects() const
Definition: svdmrkv.hxx:260
void ForceRefToMarked()
Definition: svdmrkv.cxx:1480
void hideMarkHandles()
Definition: svdmrkv.cxx:566
virtual bool IsAction() const override
Definition: svdmrkv.cxx:272
connector object
Definition: svdobjkind.hxx:48
virtual void onHelpRequest()
is called when help is requested for the area of this handle
Definition: svdhdl.cxx:1064
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:251
Size GetOutputSize() const
SdrPageView * GetPageView() const
Definition: svdmark.hxx:70
void SetHasMarkedObj(bool bOn)
Definition: svdpagv.hxx:183
virtual bool IsAction() const override
Definition: svdsnpv.cxx:203
void ImpSetGlueVisible2(bool bOn)
Definition: svdpntv.hxx:238
bool mbMouseOver
Definition: svdhdl.hxx:165
bool IsGluePointEditMode() const
Definition: svdmrkv.hxx:232
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
Definition: svdobj.cxx:1942
void MovMarkGluePoints(const Point &rPnt)
Definition: svdmrkv.cxx:512
SdrHdl * PickHandle(const Point &rPnt) const
Definition: svdmrkv.cxx:1690
void setSecondPosition(const basegfx::B2DPoint &rNew)
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:799
void BrkMarkObj()
Definition: svdmrkv.cxx:418
#define SDR_HANDLE_COLOR_SIZE_NORMAL
Definition: svdhdl.hxx:252
void SetMarkHandlesForLOKit(tools::Rectangle const &rRect, const SfxViewShell *pOtherShell)
Definition: svdmrkv.cxx:684
virtual bool HasMacro() const
Definition: svdobj.cxx:1775
void SetMoveOutside(bool bOn)
Definition: svdhdl.cxx:2204
bool IsGroupObject() const
Definition: svdobj.cxx:642
void NextMove(const Point &rPnt)
Definition: svddrag.cxx:66
virtual void calculateGridOffsetForB2DRange(basegfx::B2DVector &rTarget, const basegfx::B2DRange &rB2DRange) const
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:372
bool IsInside(const Point &rPOINT) const
void NextPoint()
Definition: svddrag.cxx:73
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:168
SdrPageView * mpMarkedPV
Definition: svdmrkv.hxx:104
static constexpr sal_uInt16 mnFrameHandlesLimit
Definition: svdmrkv.hxx:117
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
const_iterator end() const
void SetHdlSize(sal_uInt16 nSiz)
Definition: svdhdl.cxx:2188
bool TRG_HasMasterPage() const
Definition: svdpage.hxx:484
tools::Rectangle GetMarkedObjBoundRect() const
Definition: svdmrkv.cxx:2382
const SdrLayerIDSet * pVisiLayer
Definition: svdobj.hxx:141
tools::Long Top() const
Abstract DrawObject.
Definition: svdobj.hxx:261
Point GetOffsetPixelFrom(const vcl::Window &rWindow) const
virtual SfxViewShell * GetSfxViewShell() const
Get access to the view shell owning this draw view, if any.
Definition: svdmrkv.cxx:1591
bool getPossibleGridOffsetForSdrObject(basegfx::B2DVector &rOffset, const SdrObject *pObj, const SdrPageView *pPV) const
Definition: svdmrkv.cxx:1984
bool MarkNextObj(bool bPrev=false)
Definition: svdmrkv.cxx:1712
SdrUndoFactory & GetSdrUndoFactory() const
returns the models undo factory.
Definition: svdmodel.cxx:1961
Point GetAbsolutePos(const SdrObject &rObj) const
Definition: svdglue.cxx:47
OUString GetName() const
Definition: svdobj.cxx:701
virtual bool IsChart() const
virtual void AddCustomHdl()
Definition: svdmrkv.cxx:1263
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:553
sal_uInt16 FindGluePoint(sal_uInt16 nId) const
Definition: svdglue.cxx:331
void MovMarkPoints(const Point &rPnt)
Definition: svdmrkv.cxx:448
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:577
SdrObject * mpMarkedObj
Definition: svdmrkv.hxx:103
bool IsMarkProtect() const
Definition: svdobj.hxx:758
virtual void ClearPageView() override
Definition: svdmrkv.cxx:342
Point PixelToLogic(const Point &rDevicePt) const
void EndUndo()
Definition: svdmodel.cxx:483
const SdrLayerIDSet & GetLockedLayers() const
Definition: svdpagv.hxx:219
void SetStartIntens(sal_uInt16 nNewIntens)
Definition: xgrad.hxx:64
SdrHdl * GetFocusHdl() const
Definition: svdhdl.cxx:2127
void SetRef1(const Point &rPt)
Definition: svdmrkv.cxx:1569
bool IsSet(SdrLayerID a) const
Definition: svdsob.hxx:66
SdrViewEditMode meEditMode
Definition: svdmrkv.hxx:120
size_t GetHdlCount() const
Definition: svdhdl.hxx:461
SdrHdl * GetHdl(size_t nNum) const
Definition: svdhdl.hxx:462
SdrViewEditMode meEditMode0
Definition: svdmrkv.hxx:121
bool IsUnoObj() const
Definition: svdobj.hxx:748
bool IsMarkPoints() const
Definition: svdmrkv.hxx:361
void SetMarkRects()
Definition: svdmrkv.cxx:1622
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
bool mbMarkedPointsRectsDirty
Definition: svdmrkv.hxx:129
OverlayObject & getOverlayObject(sal_uInt32 nIndex) const
bool EndMarkObj()
Definition: svdmrkv.cxx:397
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdmrkv.cxx:195
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool equalZero() const
basegfx::B2DPoint maSecondPosition
tools::Rectangle & Union(const tools::Rectangle &rRect)
SdrDragMode
Definition: svdtypes.hxx:34
SdrPage * GetPage() const
Definition: svdpagv.hxx:171
OUString ImpGetDescriptionString(const char *pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const
Definition: svdmrkv.cxx:2416
object that represents a SdrPage
Definition: svdobjkind.hxx:52
ImplMarkingOverlay(const SdrPaintView &rView, const basegfx::B2DPoint &rStartPos, bool bUnmarking)
Definition: svdmrkv.cxx:92
virtual void MovAction(const Point &rPnt) override
Definition: svdsnpv.cxx:208
virtual void TakeActionRect(tools::Rectangle &rRect) const override
Definition: svdmrkv.cxx:329
void SetPageView(SdrPageView *pNewPV)
Definition: svdhdl.hxx:201
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1902
std::unique_ptr< MarkingSubSelectionOverlay > mpMarkingSubSelectionOverlay
Definition: svdmrkv.hxx:100
virtual void BckAction() override
Definition: svdsnpv.cxx:230
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
Definition: svdmrkv.cxx:2374
MarkingSubSelectionOverlay(const SdrPaintView &rView, std::vector< basegfx::B2DRectangle > const &rSelections)
Definition: svdmrkv.cxx:135
void SetFocusHdl(SdrHdl *pNew)
Definition: svdhdl.cxx:2135
tools::Long Height() const
virtual void EndAction() override
Definition: svdsnpv.cxx:219
void SetDesignMode(bool _bDesignMode) const
Sets all elements in the view which support a design and an alive mode into the given mode...
Definition: svdpagv.cxx:339
void SetDragMode(SdrDragMode eMode)
Definition: svdmrkv.cxx:1268
sal_uInt32 GetNavigationPosition() const
Definition: svdobj.cxx:836
bool EndMarkPoints()
Definition: svdmrkv.cxx:460
bool areMarkHandlesHidden() const
Definition: svdmrkv.hxx:276
const Point & GetPosPixel() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
Definition: svdmrkv.hxx:256
const Point & GetOrigin() const
void SetFrameHandles(bool bOn)
Definition: svdmrkv.cxx:1633
const Point & GetNow() const
Definition: svddrag.hxx:95
SdrObject * getParentSdrObjectFromSdrObject() const
Definition: svdobj.cxx:652
ImpGetDescriptionOptions
options for ImpGetDescriptionString()
Definition: svdmrkv.hxx:81
virtual bool MarkPoints(const tools::Rectangle *pRect, bool bUnmark)
Definition: svdmrkv1.cxx:185
void BrkMarkPoints()
Definition: svdmrkv.cxx:482
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:303
Universal Network Object packed into SvDraw object.
Definition: svdobjkind.hxx:55
bool EnterGroup(SdrObject *pObj)
Entering (editing) an object group After that, we have direct access to all member objects of the gro...
Definition: svdpagv.cxx:726
tools::Long GetHeight() const
void SetPlusHdl(bool bOn)
Definition: svdhdl.hxx:224
sal_uInt16 GetMarkHdlSizePixel() const
Definition: svdmrkv.cxx:1970
virtual void ModelHasChanged() override
Definition: svdmrkv.cxx:210
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
bool IsDragObj() const
Definition: svddrgv.hxx:103
SdrHdlList maHdlList
Definition: svdmrkv.hxx:108
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
std::unique_ptr< ImplMarkingOverlay > mpMarkGluePointsOverlay
Definition: svdmrkv.hxx:98
virtual void onMouseEnter(const MouseEvent &rMEvt)
is called when the mouse enters the area of this handle.
Definition: svdhdl.cxx:1060
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:314
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1653
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1698
sal_uInt16 nTol
Definition: svdobj.hxx:143
basegfx::B2DPoint maSecondPosition
Definition: svdmrkv.cxx:76
SdrMark * GetSdrMarkByIndex(size_t nNum) const
Definition: svdmrkv.hxx:255
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365
OLE object.
Definition: svdobjkind.hxx:47
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:299
tools::Rectangle maMarkedObjRect
Definition: svdmrkv.hxx:113
std::map< OUString, OUString > aParameters
virtual void onMouseLeave()
is called when the mouse leaves the area of this handle.
Definition: svdhdl.cxx:1068
virtual std::unique_ptr< SdrUndoAction > CreateUndoAttrObject(SdrObject &rObject, bool bStyleSheet1=false, bool bSaveText=false)
Definition: svdundo.cxx:1649
rtl::OString toString() const
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
Definition: svdmark.cxx:259
void SetMarkHdlSizePixel(sal_uInt16 nSiz)
Definition: svdmrkv.cxx:1975
virtual void HideSdrPage() override
Definition: svdmrkv.cxx:348
static void GradToVec(GradTransGradient const &rG, GradTransVector &rV, const SdrObject *pObj)
Definition: gradtrns.cxx:30
css::uno::Reference< css::frame::XController > & GetXController()
SdrMarkList & GetMarkedObjectListWriteAccess()
Definition: svdmrkv.hxx:247
SdrModel * GetModel() const
Definition: svdpntv.hxx:264
void SetRef2(const Point &rPt)
Definition: svdmrkv.cxx:1580
virtual SdrObject * getSdrObjectFromSdrObjList() const
Definition: svdpage.cxx:137
std::unique_ptr< ImplMarkingOverlay > mpMarkPointsOverlay
Definition: svdmrkv.hxx:97
void CheckMarked()
Definition: svdmrkv.cxx:1596
bool mbForceFrameHandles
Definition: svdmrkv.hxx:124
Point TopRight() const
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:71
virtual vcl::Window * GetEditWindowForActiveOLEObj() const override
tools::Long Right() const
const SdrPageView * pPageView
Definition: svdobj.hxx:142
void SetRotateShear(bool bOn)
Definition: svdhdl.cxx:2220
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:590
Point Center() const
void AddHdl(std::unique_ptr< SdrHdl > pHdl)
Definition: svdhdl.cxx:2289
sal_uInt16 nPos
Point TopCenter() const
static void notifyOtherView(const SfxViewShell *pThisView, SfxViewShell const *pOtherView, int nType, std::string_view rKey, const OString &rPayload)
SdrHdlKind GetKind() const
Definition: svdhdl.hxx:194
virtual bool HasMarkablePoints() const
Definition: svdmrkv1.cxx:28
sal_uInt32 count() const
bool DeletePageView(const SdrPageView &rPV)
Definition: svdmark.cxx:371
bool createTableEdgesJson(boost::property_tree::ptree &rJsonRoot)
Definition: svdotable.cxx:2467
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
Color getHilightColor() const
bool IsObjMarked(SdrObject const *pObj) const
Definition: svdmrkv.cxx:1965
virtual bool RequestHelp(const HelpEvent &rHEvt) override
Definition: svdmrkv.cxx:1461