LibreOffice Module svx (master)  1
svdview.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <editeng/eeitem.hxx>
21 #include <editeng/outlobj.hxx>
22 
23 #include <svx/strings.hrc>
24 #include <svx/dialmgr.hxx>
25 #include <svx/svdpagv.hxx>
26 #include <svx/svdmrkv.hxx>
27 #include <svx/svdedxv.hxx>
28 #include <svx/svdobj.hxx>
29 #include <svx/svdopath.hxx>
30 #include <svx/svdograf.hxx>
31 #include <svx/svdomedia.hxx>
32 #include <svx/svdetc.hxx>
33 
34 #include <svx/svdoutl.hxx>
35 #include <svx/svdview.hxx>
36 #include <editeng/editview.hxx>
37 #include <editeng/flditem.hxx>
38 #include <svx/obj3d.hxx>
39 #include <svx/svddrgmt.hxx>
40 #include <svx/svdotable.hxx>
41 #include <tools/debug.hxx>
42 #include <tools/tenccvt.hxx>
45 #include <svx/sdrpaintwindow.hxx>
46 #include <svx/sdrpagewindow.hxx>
47 #include <svx/sdrhittesthelper.hxx>
52 #include <sal/log.hxx>
53 #include <vcl/ptrstyle.hxx>
54 
55 
57 : pHdl(nullptr),
58  pObj(nullptr),
59  pRootObj(nullptr),
60  pPV(nullptr),
61  pURLField(nullptr),
62  eHit(SdrHitKind::NONE),
63  eEvent(SdrEventKind::NONE),
64  nMouseClicks(0),
65  nMouseMode(MouseEventModifiers::NONE),
66  nMouseCode(0),
67  nHlplIdx(0),
68  nGlueId(0),
69  bMouseDown(false),
70  bMouseUp(false),
71  bIsAction(false),
72  bIsTextEdit(false),
73  bAddMark(false),
74  bUnmark(false),
75  bPrevNextMark(false),
76  bMarkPrev(false)
77 {
78 }
79 
81 {
82 }
83 
84 
85 // helper class for all D&D overlays
86 
88  const SdrView& rView,
89  const basegfx::B2DPolyPolygon& rLinePolyPolygon)
90 {
91  for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
92  {
93  SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
94  const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
95 
96  if (xTargetOverlay.is())
97  {
98  std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
99  rLinePolyPolygon));
100 
101  xTargetOverlay->add(*pNew);
102  maObjects.append(std::move(pNew));
103  }
104  }
105 }
106 
108 {
110  rView,
111  rObject.TakeXorPoly());
112 }
113 
115 {
116  basegfx::B2DPolygon aB2DPolygon;
117 
118  aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Top()));
119  aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Top()));
120  aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Bottom()));
121  aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Bottom()));
122  aB2DPolygon.setClosed(true);
123 
125  rView,
126  basegfx::B2DPolyPolygon(aB2DPolygon));
127 }
128 
129 SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd)
130 {
131  basegfx::B2DPolygon aB2DPolygon;
132 
133  aB2DPolygon.append(basegfx::B2DPoint(rStart.X(), rStart.Y()));
134  aB2DPolygon.append(basegfx::B2DPoint(rEnd.X(), rEnd.Y()));
135  aB2DPolygon.setClosed(true);
136 
138  rView,
139  basegfx::B2DPolyPolygon(aB2DPolygon));
140 }
141 
143 {
144  // The OverlayObjects are cleared using the destructor of OverlayObjectList.
145  // That destructor calls clear() at the list which removes all objects from the
146  // OverlayManager and deletes them.
147 }
148 
150  SdrModel& rSdrModel,
151  OutputDevice* pOut)
152 : SdrCreateView(rSdrModel, pOut),
153  bNoExtendedMouseDispatcher(false),
154  bNoExtendedKeyDispatcher(false),
155  mbMasterPagePaintCaching(false)
156 {
157  maAccessibilityOptions.AddListener(this);
159 }
160 
162 {
163  maAccessibilityOptions.RemoveListener(this);
164 }
165 
166 bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
167 {
168  SetActualWin(pWin);
169  bool bRet = SdrCreateView::KeyInput(rKEvt,pWin);
170  if (!bRet && !IsExtendedKeyInputDispatcherEnabled()) {
171  bRet = true;
172  switch (rKEvt.GetKeyCode().GetFullFunction()) {
173  case KeyFuncType::DELETE: DeleteMarked(); break;
174  case KeyFuncType::UNDO: mpModel->Undo(); break;
175  case KeyFuncType::REDO: mpModel->Redo(); break;
176  case KeyFuncType::REPEAT: mpModel->Repeat(*this); break;
177  default: {
178  switch (rKEvt.GetKeyCode().GetFullCode()) {
179  case KEY_ESCAPE: {
180  if (IsTextEdit()) SdrEndTextEdit();
181  if (IsAction()) BrkAction();
182  if (pWin!=nullptr) pWin->ReleaseMouse();
183  } break;
184  case KEY_DELETE: DeleteMarked(); break;
185  case KEY_UNDO: case KEY_BACKSPACE+KEY_MOD2: mpModel->Undo(); break;
186  case KEY_BACKSPACE+KEY_MOD2+KEY_SHIFT: mpModel->Redo(); break;
187  case KEY_REPEAT: case KEY_BACKSPACE+KEY_MOD2+KEY_MOD1: mpModel->Repeat(*this); break;
188  case KEY_MOD1+KEY_A: MarkAll(); break;
189  default: bRet=false;
190  } // switch
191  }
192  } // switch
193  if (bRet && pWin!=nullptr) {
195  pWin->PixelToLogic(pWin->ScreenToOutputPixel( pWin->GetPointerPosPixel() ) ),
196  pWin,
197  rKEvt.GetKeyCode().GetModifier()));
198  }
199  }
200  return bRet;
201 }
202 
204 {
205  SetActualWin(pWin);
206  if (rMEvt.IsLeft()) maDragStat.SetMouseDown(true);
207  bool bRet = SdrCreateView::MouseButtonDown(rMEvt,pWin);
208  if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
209  SdrViewEvent aVEvt;
211  bRet = DoMouseEvent(aVEvt);
212  }
213  return bRet;
214 }
215 
217 {
218  SetActualWin(pWin);
219  if (rMEvt.IsLeft()) maDragStat.SetMouseDown(false);
220  bool bAction = IsAction();
221  bool bRet = !bAction && SdrCreateView::MouseButtonUp(rMEvt,pWin);
222  if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
223  SdrViewEvent aVEvt;
225  bRet = DoMouseEvent(aVEvt);
226  }
227  return bRet;
228 }
229 
230 bool SdrView::MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin)
231 {
232  SetActualWin(pWin);
233  maDragStat.SetMouseDown(rMEvt.IsLeft());
234  bool bRet = SdrCreateView::MouseMove(rMEvt,pWin);
236  SdrViewEvent aVEvt;
238  if (DoMouseEvent(aVEvt)) bRet=true;
239  }
240 
241  return bRet;
242 }
243 
244 bool SdrView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
245 {
246  SetActualWin(pWin);
247  bool bRet = SdrCreateView::Command(rCEvt,pWin);
248  return bRet;
249 }
250 
251 void SdrView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
252 {
253  SdrCreateView::GetAttributes(rTargetSet, bOnlyHardAttr);
254 }
255 
257 {
258  rVEvt.bMouseDown=nEventKind==SdrMouseEventKind::BUTTONDOWN;
259  rVEvt.bMouseUp=nEventKind==SdrMouseEventKind::BUTTONUP;
260  rVEvt.nMouseClicks=rMEvt.GetClicks();
261  rVEvt.nMouseMode=rMEvt.GetMode();
262  rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier();
264  if (pOut==nullptr)
265  {
266  pOut = GetFirstOutputDevice();
267  }
268  Point aPnt(rMEvt.GetPosPixel());
269  if (pOut!=nullptr) aPnt=pOut->PixelToLogic(aPnt);
270  rVEvt.aLogicPos=aPnt;
271  return PickAnything(aPnt,rVEvt);
272 }
273 
274 // Dragging with the Mouse (Move)
275 // Example when creating a rectangle: MouseDown has to happen without a ModKey,
276 // else we usually force a selection (see below).
277 // When pressing Shift, Ctrl and Alt at the same time while doing a MouseMove,
278 // a centered, not snapped square is created.
279 // The dual allocation of Ortho and Shift won't usually create a problem, as the
280 // two functions are in most cases mutually exclusive. Only shearing (the kind
281 // that happens when contorting, not when rotating) can use both functions at
282 // the same time. To get around this, the user can use e. g. help lines.
283 #define MODKEY_NoSnap bCtrl /* temporarily disable snapping */
284 #define MODKEY_Ortho bShift /* ortho */
285 #define MODKEY_Center bAlt /* create/resize centeredly */
286 #define MODKEY_AngleSnap bShift
287 #define MODKEY_CopyDrag bCtrl /* drag and copy */
288 
289 // click somewhere (MouseDown)
290 #define MODKEY_PolyPoly bAlt /* new Poly at InsPt and at Create */
291 #define MODKEY_MultiMark bShift /* MarkObj without doing UnmarkAll first */
292 #define MODKEY_Unmark bAlt /* deselect with a dragged frame */
293 #define MODKEY_ForceMark bCtrl /* force dragging a frame, even if there's an object at cursor position */
294 #define MODKEY_DeepMark bAlt /* MarkNextObj */
295 #define MODKEY_DeepBackw bShift /* MarkNextObj but backwards */
296 
297 SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const
298 {
300  if (pOut==nullptr)
301  {
302  pOut = GetFirstOutputDevice();
303  }
304 
305  // #i73628# Use a non-changeable copy of he logic position
306  const Point aLocalLogicPosition(rLogicPos);
307 
308  bool bEditMode=IsEditMode();
309  bool bPointMode=bEditMode && HasMarkablePoints();
310  bool bGluePointMode=IsGluePointEditMode();
311  bool bInsPolyPt=bPointMode && IsInsObjPointMode() && IsInsObjPointPossible();
312  bool bInsGluePt=bGluePointMode && IsInsGluePointMode() && IsInsGluePointPossible();
313  bool bIsTextEdit=IsTextEdit();
314  bool bTextEditHit=IsTextEditHit(aLocalLogicPosition);
315  bool bTextEditSel=IsTextEditInSelectionMode();
316  bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
317  bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
318  bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
320  SdrHdl* pHdl=pOut!=nullptr && !bTextEditSel ? PickHandle(aLocalLogicPosition) : nullptr;
321  SdrPageView* pPV=nullptr;
322  SdrObject* pObj=nullptr;
323  SdrObject* pHitObj=nullptr;
324  bool bHitPassDirect=true;
325  sal_uInt16 nHlplIdx=0;
326  sal_uInt16 nGlueId=0;
327  if (bTextEditHit || bTextEditSel)
328  {
330  }
331  else if (pHdl!=nullptr)
332  {
333  eHit=SdrHitKind::Handle; // handle is hit: highest priority
334  }
335  else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=nullptr && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
336  {
337  eHit=SdrHitKind::HelpLine; // help line in the foreground hit: can be moved now
338  }
339  else if (bGluePointMode && PickGluePoint(aLocalLogicPosition,pObj,nGlueId,pPV))
340  {
341  eHit=SdrHitKind::Gluepoint; // deselected glue point hit
342  }
343  else if ((pHitObj = PickObj(aLocalLogicPosition,mnHitTolLog,pPV,SdrSearchOptions::DEEP|SdrSearchOptions::MARKED,&pObj,&bHitPassDirect)))
344  {
346  sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( pObj );
347  if( pTableObj )
348  {
349  sal_Int32 nX = 0, nY = 0;
350  switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY ) )
351  {
353  eHit = SdrHitKind::Cell;
354  break;
357  break;
358  default:
359  break;
360  }
361  }
362  }
363  else if ((pHitObj = PickObj(aLocalLogicPosition,mnHitTolLog,pPV,SdrSearchOptions::DEEP|SdrSearchOptions::ALSOONMASTER|SdrSearchOptions::WHOLEPAGE,&pObj,&bHitPassDirect)))
364  {
365  // MasterPages and WholePage for Macro and URL
367  sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( pObj );
368  if( pTableObj )
369  {
370  sal_Int32 nX = 0, nY = 0;
371  switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY, mnHitTolLog ) )
372  {
374  eHit = SdrHitKind::Cell;
375  break;
377  // Keep state on UnmarkedObject to allow the below
378  // 'check for URL field' to be executed, else popups
379  // for e.g. URL links when hoovering and clicking
380  // them will not work. Tried several other changes,
381  // but this one safely keeps existing behaviour as-is.
383  break;
384  default:
385  break;
386  }
387  }
388  }
389  else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=nullptr && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
390  {
391  eHit=SdrHitKind::HelpLine; // help line in foreground hit: can be moved now
392  }
393  if (eHit==SdrHitKind::UnmarkedObject)
394  {
395  bool bRoot=pObj->HasMacro();
396  bool bDeep=pObj!=pHitObj && pHitObj->HasMacro();
397  bool bMid=false; // Have we hit upon a grouped group with a macro?
398  SdrObject* pMidObj=nullptr;
399  if (pObj!=pHitObj)
400  {
401  SdrObject* pObjTmp=pHitObj->getParentSdrObjectFromSdrObject();
402  if (pObjTmp==pObj) pObjTmp=nullptr;
403  while (pObjTmp!=nullptr)
404  {
405  if (pObjTmp->HasMacro())
406  {
407  bMid=true;
408  pMidObj=pObjTmp;
409  }
410  pObjTmp=pObjTmp->getParentSdrObjectFromSdrObject();
411  if (pObjTmp==pObj) pObjTmp=nullptr;
412  }
413  }
414 
415  if (bDeep || bMid || bRoot)
416  {
417  SdrObjMacroHitRec aHitRec;
418  aHitRec.aPos=aLocalLogicPosition;
419  aHitRec.nTol=mnHitTolLog;
420  aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
421  aHitRec.pPageView=pPV;
422  if (bDeep) bDeep=pHitObj->IsMacroHit(aHitRec);
423  if (bMid ) bMid =pMidObj->IsMacroHit(aHitRec);
424  if (bRoot) bRoot=pObj->IsMacroHit(aHitRec);
425  if (bRoot || bMid || bDeep)
426  {
427  // Priorities: 1. Root, 2. Mid, 3. Deep
428  rVEvt.pRootObj=pObj;
429  if (!bRoot) pObj=pMidObj;
430  if (!bRoot && !bMid) pObj=pHitObj;
431  eHit=SdrHitKind::Macro;
432  }
433  }
434  }
435  // check for URL field
436  if (eHit==SdrHitKind::UnmarkedObject)
437  {
438  SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( pHitObj );
439  if (pTextObj!=nullptr && pTextObj->HasText())
440  {
441  // use the primitive-based HitTest which is more accurate anyways. It
442  // will correctly handle rotated/mirrored/sheared/scaled text and can
443  // now return a HitContainer containing the primitive hierarchy of the
444  // primitive that triggered the hit. The first entry is that primitive,
445  // the others are the full stack of primitives leading to that one which
446  // includes grouping primitives (like TextHierarchyPrimitives we deed here)
447  // but also all decomposed ones which lead to the creation of that primitive
449  const bool bTEHit(pPV && SdrObjectPrimitiveHit(*pTextObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true, &aHitContainer));
450 
451  if (bTEHit && !aHitContainer.empty())
452  {
453  // search for TextHierarchyFieldPrimitive2D which contains the needed information
454  // about a possible URLField
455  const drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D* pTextHierarchyFieldPrimitive2D = nullptr;
456 
457  for (const drawinglayer::primitive2d::Primitive2DReference& xReference : aHitContainer)
458  {
459  if (xReference.is())
460  {
461  // try to cast to drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D implementation
462  pTextHierarchyFieldPrimitive2D = dynamic_cast<const drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D*>(xReference.get());
463 
464  if (pTextHierarchyFieldPrimitive2D)
465  {
466  break;
467  }
468  }
469  }
470 
471  if (nullptr != pTextHierarchyFieldPrimitive2D)
472  {
473  if (drawinglayer::primitive2d::FieldType::FIELD_TYPE_URL == pTextHierarchyFieldPrimitive2D->getType())
474  {
475  // problem with the old code is that a *pointer* to an instance of
476  // SvxURLField is set in the Event which is per se not good since that
477  // data comes from a temporary EditEngine's data and could vanish any
478  // moment. Have to replace for now with a static instance that gets
479  // filled/initialized from the original data held in the TextHierarchyField-
480  // Primitive2D (see impTextBreakupHandler::impCheckFieldPrimitive).
481  // Unfortunately things like 'TargetFrame' are still used in Calc, so this
482  // can currently not get replaced. For the future the Name/Value vector or
483  // the TextHierarchyFieldPrimitive2D itself should/will be used for handling
484  // that data
485  static SvxURLField aSvxURLField;
486 
487  aSvxURLField.SetURL(pTextHierarchyFieldPrimitive2D->getValue("URL"));
488  aSvxURLField.SetRepresentation(pTextHierarchyFieldPrimitive2D->getValue("Representation"));
489  aSvxURLField.SetTargetFrame(pTextHierarchyFieldPrimitive2D->getValue("TargetFrame"));
490  const OUString aFormat(pTextHierarchyFieldPrimitive2D->getValue("SvxURLFormat"));
491 
492  if (!aFormat.isEmpty())
493  {
494  aSvxURLField.SetFormat(static_cast<SvxURLFormat>(aFormat.toInt32()));
495  }
496 
497  // set HitKind and pointer to local static instance in the Event
498  // to comply to old stuff
499  eHit = SdrHitKind::UrlField;
500  rVEvt.pURLField = &aSvxURLField;
501  }
502  }
503  }
504  }
505  }
506 
507  if (bHitPassDirect &&
509  (IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit())
510  {
511  // Around the TextEditArea there's a border to select without going into text edit mode.
512  tools::Rectangle aBoundRect(pHitObj->GetCurrentBoundRect());
513 
514  // Force to SnapRect when Fontwork
515  if( dynamic_cast<const SdrTextObj*>( pHitObj) != nullptr && static_cast<SdrTextObj*>(pHitObj)->IsFontwork())
516  {
517  aBoundRect = pHitObj->GetSnapRect();
518  }
519 
520  sal_Int32 nTolerance(mnHitTolLog);
521  bool bBoundRectHit(false);
522 
523  if(pOut)
524  {
525  nTolerance = pOut->PixelToLogic(Size(2, 0)).Width();
526  }
527 
528  if( (aLocalLogicPosition.X() >= aBoundRect.Left() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Left() + nTolerance)
529  || (aLocalLogicPosition.X() >= aBoundRect.Right() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Right() + nTolerance)
530  || (aLocalLogicPosition.Y() >= aBoundRect.Top() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Top() + nTolerance)
531  || (aLocalLogicPosition.Y() >= aBoundRect.Bottom() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Bottom() + nTolerance))
532  {
533  bBoundRectHit = true;
534  }
535 
536  if(!bBoundRectHit)
537  {
538  bool bTEHit(pPV &&
539  SdrObjectPrimitiveHit(*pHitObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
540 
541  // TextEdit attached to an object in a locked layer
542  if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer()))
543  {
544  bTEHit=false;
545  }
546 
547  if (bTEHit)
548  {
549  rVEvt.pRootObj=pObj;
550  pObj=pHitObj;
552  }
553  }
554  }
555  if (!bHitPassDirect && eHit==SdrHitKind::UnmarkedObject) {
556  eHit=SdrHitKind::NONE;
557  pObj=nullptr;
558  pPV=nullptr;
559  }
560  bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
561  bool bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
562  bool bMouseDown=rVEvt.bMouseDown;
563  bool bMouseUp=rVEvt.bMouseUp;
565  bool bIsAction=IsAction();
566 
567  if (bIsAction)
568  {
569  if (bMouseDown)
570  {
571  if (bMouseRight) eEvent=SdrEventKind::BackAction;
572  }
573  else if (bMouseUp)
574  {
575  if (bMouseLeft)
576  {
578  if (IsDragObj())
579  {
580  eEvent=SdrEventKind::EndDrag;
581  }
582  else if (IsCreateObj() || IsInsObjPoint())
583  {
585  }
586  else if (IsMarking())
587  {
588  eEvent=SdrEventKind::EndMark;
589  if (!maDragStat.IsMinMoved())
590  {
591  eEvent=SdrEventKind::BrkMark;
593  }
594  }
595  }
596  }
597  else
598  {
600  }
601  }
602  else if (eHit==SdrHitKind::TextEdit)
603  {
604  eEvent=SdrEventKind::TextEdit;
605  }
606  else if (bMouseDown && bMouseLeft)
607  {
608  if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=nullptr && pHitObj!=nullptr && pHitObj->HasTextEdit() && eHit==SdrHitKind::MarkedObject)
609  {
610  rVEvt.pRootObj=pObj;
611  pObj=pHitObj;
613  }
614  else if (MODKEY_ForceMark && eHit!=SdrHitKind::UrlField)
615  {
616  eEvent=SdrEventKind::BeginMark; // AddMark,Unmark */
617  }
618  else if (eHit==SdrHitKind::HelpLine)
619  {
620  eEvent=SdrEventKind::BeginDragHelpline; // nothing, actually
621  }
622  else if (eHit==SdrHitKind::Gluepoint)
623  {
624  eEvent=SdrEventKind::MarkGluePoint; // AddMark+Drag
625  rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
626  }
627  else if (eHit==SdrHitKind::Handle)
628  {
629  eEvent=SdrEventKind::BeginDragObj; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark
630  bool bGlue=pHdl->GetKind()==SdrHdlKind::Glue;
631  bool bPoly=!bGlue && IsPointMarkable(*pHdl);
632  bool bMarked=bGlue || (bPoly && pHdl->IsSelected());
633  if (bGlue || bPoly)
634  {
636  if (MODKEY_DeepMark)
637  {
638  rVEvt.bAddMark=true;
639  rVEvt.bPrevNextMark=true;
641  }
642  else if (MODKEY_MultiMark)
643  {
644  rVEvt.bAddMark=true;
645  rVEvt.bUnmark=bMarked; // Toggle
646  if (bGlue)
647  {
648  pObj=pHdl->GetObj();
649  nGlueId=static_cast<sal_uInt16>(pHdl->GetObjHdlNum());
650  }
651  }
652  else if (bMarked)
653  {
654  eEvent=SdrEventKind::BeginDragObj; // don't change MarkState, only change Drag
655  }
656  }
657  }
658  else if (bInsPolyPt && (MODKEY_PolyPoly || (!MODKEY_MultiMark && !MODKEY_DeepMark)))
659  {
661  }
662  else if (bInsGluePt && !MODKEY_MultiMark && !MODKEY_DeepMark)
663  {
665  }
666  else if (eHit==SdrHitKind::TextEditObj)
667  {
668  eEvent=SdrEventKind::BeginTextEdit; // AddMark+Drag,DeepMark+Drag,Unmark
670  { // if not hit with Deep
671  eEvent=SdrEventKind::MarkObj;
672  }
673  }
674  else if (eHit==SdrHitKind::Macro)
675  {
676  eEvent=SdrEventKind::BeginMacroObj; // AddMark+Drag
678  { // if not hit with Deep
679  eEvent=SdrEventKind::MarkObj;
680  }
681  }
682  else if (eHit==SdrHitKind::UrlField)
683  {
684  eEvent=SdrEventKind::ExecuteUrl; // AddMark+Drag
686  { // if not hit with Deep
687  eEvent=SdrEventKind::MarkObj;
688  }
689  }
690  else if (eHit==SdrHitKind::MarkedObject)
691  {
692  eEvent=SdrEventKind::BeginDragObj; // DeepMark+Drag,Unmark
693 
695  { // if not hit with Deep
696  eEvent=SdrEventKind::MarkObj;
697  }
698  }
699  else if (IsCreateMode())
700  {
701  eEvent=SdrEventKind::BeginCreateObj; // nothing, actually
702  }
703  else if (eHit==SdrHitKind::UnmarkedObject)
704  {
705  eEvent=SdrEventKind::MarkObj; // AddMark+Drag
706  }
707  else
708  {
710  }
711 
712  if (eEvent==SdrEventKind::MarkObj)
713  {
714  rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
717  }
718  if (eEvent==SdrEventKind::BeginMark)
719  {
721  rVEvt.bUnmark=MODKEY_Unmark;
722  }
723  }
724  rVEvt.bIsAction=bIsAction;
725  rVEvt.bIsTextEdit=bIsTextEdit;
726  rVEvt.aLogicPos=aLocalLogicPosition;
727  rVEvt.pHdl=pHdl;
728  rVEvt.pObj=pObj;
729  if(rVEvt.pRootObj==nullptr)
730  rVEvt.pRootObj=pObj;
731  rVEvt.pPV=pPV;
732  rVEvt.nHlplIdx=nHlplIdx;
733  rVEvt.nGlueId=nGlueId;
734  rVEvt.eHit=eHit;
735  rVEvt.eEvent=eEvent;
736 #ifdef DGB_UTIL
737  if (rVEvt.pRootObj!=NULL) {
738  if (rVEvt.pRootObj->getParentSdrObjListFromSdrObject()!=rVEvt.pPV->GetObjList()) {
739  OSL_FAIL("SdrView::PickAnything(): pRootObj->getParentSdrObjListFromSdrObject()!=pPV->GetObjList() !");
740  }
741  }
742 #endif
743  return eHit;
744 }
745 
747 {
748  bool bRet=false;
749  SdrHitKind eHit=rVEvt.eHit;
750  Point aLogicPos(rVEvt.aLogicPos);
751 
752  bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
753  bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
754  bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
755  bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
756  bool bMouseDown=rVEvt.bMouseDown;
757  bool bMouseUp=rVEvt.bMouseUp;
758  if (bMouseDown) {
759  if (bMouseLeft) maDragStat.SetMouseDown(true);
760  } else if (bMouseUp) {
761  if (bMouseLeft) maDragStat.SetMouseDown(false);
762  } else { // else, MouseMove
763  maDragStat.SetMouseDown(bMouseLeft);
764  }
765 
766 #ifdef MODKEY_NoSnap
768 #endif
769 #ifdef MODKEY_Ortho
771 #endif
772 #ifdef MODKEY_AngleSnap
774 #endif
775 #ifdef MODKEY_CopyDrag
777 #endif
778 #ifdef MODKEY_Center
782 #endif
783  if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SdrHitKind::UnmarkedObject || eHit==SdrHitKind::NONE)) {
784  SdrEndTextEdit(); // User has clicked beneath object, exit edit mode.
785  // pHdl is invalid, then, that shouldn't matter, though, as we expect
786  // pHdl==NULL (because of eHit).
787  }
788  switch (rVEvt.eEvent) {
789  case SdrEventKind::NONE: bRet=false; break;
790  case SdrEventKind::TextEdit: bRet=false; break; // Events handled by the OutlinerView are not taken into account here.
791  case SdrEventKind::MoveAction: MovAction(aLogicPos); bRet=true; break;
792  case SdrEventKind::EndAction: EndAction(); bRet=true; break;
793  case SdrEventKind::BackAction: BckAction(); bRet=true; break;
794  case SdrEventKind::EndMark : EndAction(); bRet=true; break;
795  case SdrEventKind::BrkMark : {
796  BrkAction();
797  if (!MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark)) {
798  // No object hit. Do the following:
799  // 1. deselect any selected glue points
800  // 2. deselect any selected polygon points
801  // 3. deselect any selected objects
802  if (!rVEvt.bAddMark) UnmarkAll();
803  }
804  bRet=true;
805  } break;
806  case SdrEventKind::EndCreate: { // if necessary, MarkObj
809  if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd;
810  if (!EndCreateObj(eCmd)) { // Don't evaluate event for Create? -> Select
812  MarkObj(rVEvt.pRootObj,rVEvt.pPV);
813  if (eHit==SdrHitKind::TextEdit)
814  {
816  SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, static_cast<vcl::Window*>(mpActualOutDev.get())));
817 
818  if(bRet2)
819  {
820  MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos),
821  1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
822 
824  if (pOLV!=nullptr) {
825  pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
826  pOLV->MouseButtonUp(aMEvt); // event for the Outliner, but without double-click
827  }
828  }
829  }
830  bRet=true; // object is selected and (if necessary) TextEdit is started
831  } else bRet=false; // canceled Create, nothing else
832  } else bRet=true; // return true for EndCreate
833  } break;
834  case SdrEventKind::EndDrag: {
835  bRet=EndDragObj(IsDragWithCopy());
836  ForceMarkedObjToAnotherPage(); // TODO: Undo+bracing missing!
837  } break;
838  case SdrEventKind::MarkObj: { // + (if applicable) BegDrag
839  if (!rVEvt.bAddMark) UnmarkAllObj();
840  bool bUnmark=rVEvt.bUnmark;
841  if (rVEvt.bPrevNextMark) {
842  bRet=MarkNextObj(aLogicPos,mnHitTolLog,rVEvt.bMarkPrev);
843  } else {
845  const size_t nCount0=GetMarkedObjectCount();
846  bRet=MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark);
848  const size_t nCount1=GetMarkedObjectCount();
849  bUnmark=nCount1<nCount0;
850  }
851  if (!bUnmark) {
852  BegDragObj(aLogicPos,nullptr,nullptr,mnMinMovLog);
853  bRet=true;
854  }
855  } break;
856  case SdrEventKind::MarkPoint: { // + (if applicable) BegDrag
857  if (!rVEvt.bAddMark) UnmarkAllPoints();
858  if (rVEvt.bPrevNextMark) {
859  MarkNextPoint();
860  bRet=false;
861  } else {
862  bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
863  }
864  if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
865  BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog);
866  bRet=true;
867  }
868  } break;
869  case SdrEventKind::MarkGluePoint: { // + (if applicable) BegDrag
870  if (!rVEvt.bAddMark) UnmarkAllGluePoints();
871  if (rVEvt.bPrevNextMark) {
873  bRet=false;
874  } else {
875  bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.bUnmark);
876  }
877  if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
878  SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId);
879  BegDragObj(aLogicPos,nullptr,pHdl,mnMinMovLog);
880  bRet=true;
881  }
882  } break;
883  case SdrEventKind::BeginMark: bRet=BegMark(aLogicPos,rVEvt.bAddMark,rVEvt.bUnmark); break;
884  case SdrEventKind::BeginInsertObjPoint: bRet = BegInsObjPoint(aLogicPos, MODKEY_PolyPoly); break;
888  if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd;
889  EndInsObjPoint(eCmd);
890  bRet=true;
891  } break;
892  case SdrEventKind::BeginInsertGluePoint: bRet=BegInsGluePoint(aLogicPos); break;
893  case SdrEventKind::BeginDragHelpline: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
894  case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break;
898  bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
899  } else bRet=BegCreateObj(aLogicPos);
900  } break;
902  BegMacroObj(aLogicPos,mnHitTolLog,rVEvt.pObj,rVEvt.pPV,static_cast<vcl::Window*>(mpActualOutDev.get()));
903  bRet=false;
904  } break;
906  if (!IsObjMarked(rVEvt.pObj)) {
907  UnmarkAllObj();
908  MarkObj(rVEvt.pRootObj,rVEvt.pPV);
909  }
910 
912  SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, static_cast<vcl::Window*>(mpActualOutDev.get()));
913 
914  if(bRet)
915  {
916  MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos),
917  1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
919  if (pOLV!=nullptr) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
920  }
921  } break;
922  default: break;
923  } // switch
925  vcl::Window* pWin=static_cast<vcl::Window*>(mpActualOutDev.get());
926  // left mouse button pressed?
927  bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
928  // left mouse button released?
929  bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
930  // left mouse button pressed or held?
931  bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
932  pWin->SetPointer(GetPreferredPointer(rVEvt.aLogicPos,pWin,
933  rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1));
934  bool bAction=IsAction();
935  if (bLeftDown && bAction)
936  pWin->CaptureMouse();
937  else if (bLeftUp || (rVEvt.bIsAction && !bAction))
938  pWin->ReleaseMouse();
939  }
940  return bRet;
941 }
942 
943 PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier, bool bLeftDown) const
944 {
945  // Actions
946  if (IsCreateObj())
947  {
949  }
951  {
952  return mpCurrentSdrDragMethod->GetSdrDragPointer();
953  }
954  if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsSetPageOrg()) return PointerStyle::Arrow;
956  if (IsMacroObj()) {
957  SdrObjMacroHitRec aHitRec;
958  aHitRec.aPos=pOut->LogicToPixel(rMousePos);
959  aHitRec.nTol=nMacroTol;
961  aHitRec.pPageView=pMacroPV;
962  return pMacroObj->GetMacroPointer(aHitRec);
963  }
964 
965  // TextEdit, ObjEdit, Macro
966  if (IsTextEdit() && (IsTextEditInSelectionMode() || IsTextEditHit(rMousePos)))
967  {
968  if(!pOut || IsTextEditInSelectionMode())
969  {
970  if(pTextEditOutliner->IsVertical())
971  return PointerStyle::TextVertical;
972  else
973  return PointerStyle::Text;
974  }
975  // Outliner should return something here...
976  Point aPos(pOut->LogicToPixel(rMousePos));
978  if (aPointer==PointerStyle::Arrow)
979  {
980  if(pTextEditOutliner->IsVertical())
981  aPointer = PointerStyle::TextVertical;
982  else
983  aPointer = PointerStyle::Text;
984  }
985  return aPointer;
986  }
987 
988  SdrViewEvent aVEvt;
989  aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown
990  aVEvt.bMouseDown=!bLeftDown; // What if ..?
991  aVEvt.bMouseUp=bLeftDown; // What if ..?
992  if (pOut!=nullptr)
993  const_cast<SdrView*>(this)->SetActualWin(pOut);
994  SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
995  SdrEventKind eEvent=aVEvt.eEvent;
996  switch (eEvent)
997  {
999  return aCurrentCreatePointer;
1000  case SdrEventKind::MarkObj:
1001  return PointerStyle::Move;
1003  return PointerStyle::Arrow;
1006  return PointerStyle::MovePoint;
1009  return PointerStyle::Cross;
1011  return PointerStyle::RefHand;
1013  {
1014  SdrObjMacroHitRec aHitRec;
1015  aHitRec.aPos=aVEvt.aLogicPos;
1016  aHitRec.nTol=mnHitTolLog;
1017  aHitRec.pVisiLayer=&aVEvt.pPV->GetVisibleLayers();
1018  aHitRec.pPageView=aVEvt.pPV;
1019  return aVEvt.pObj->GetMacroPointer(aHitRec);
1020  }
1021  default: break;
1022  } // switch
1023 
1024  switch(eHit)
1025  {
1026  case SdrHitKind::Cell:
1027  return PointerStyle::Arrow;
1028  case SdrHitKind::HelpLine :
1029  return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer();
1030  case SdrHitKind::Gluepoint:
1031  return PointerStyle::MovePoint;
1032  case SdrHitKind::TextEdit :
1034  {
1035  SdrTextObj* pText = dynamic_cast< SdrTextObj* >( aVEvt.pObj );
1036  if(pText && pText->HasText())
1037  {
1038  OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
1039  if(pParaObj && pParaObj->IsVertical())
1040  return PointerStyle::TextVertical;
1041  }
1042  return PointerStyle::Text;
1043  }
1044  default: break;
1045  }
1046 
1047  bool bMarkHit=eHit==SdrHitKind::MarkedObject;
1048  SdrHdl* pHdl=aVEvt.pHdl;
1049  // now check the pointers for dragging
1050  if (pHdl!=nullptr || bMarkHit) {
1051  SdrHdlKind eHdl= pHdl!=nullptr ? pHdl->GetKind() : SdrHdlKind::Move;
1052  bool bCorner=pHdl!=nullptr && pHdl->IsCornerHdl();
1053  bool bVertex=pHdl!=nullptr && pHdl->IsVertexHdl();
1054  bool bMov=eHdl==SdrHdlKind::Move;
1056  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1057  return PointerStyle::Move;
1058  }
1059  switch (meDragMode) {
1060  case SdrDragMode::Rotate: {
1061  if ((bCorner || bMov) && !IsRotateAllowed(true))
1062  return PointerStyle::NotAllowed;
1063 
1064  // are 3D objects selected?
1065  bool b3DObjSelected = false;
1066  for (size_t a=0; !b3DObjSelected && a<GetMarkedObjectCount(); ++a) {
1068  if(dynamic_cast<const E3dObject* >(pObj) != nullptr)
1069  b3DObjSelected = true;
1070  }
1071  // If we have a 3D object, go on despite !IsShearAllowed,
1072  // because then we have a rotation instead of a shear.
1073  if (bVertex && !IsShearAllowed() && !b3DObjSelected)
1074  return PointerStyle::NotAllowed;
1075  if (bMov)
1076  return PointerStyle::Rotate;
1077  } break;
1078  case SdrDragMode::Shear: {
1079  if (bCorner) {
1080  if (!IsDistortAllowed(true) && !IsDistortAllowed()) return PointerStyle::NotAllowed;
1081  else return PointerStyle::RefHand;
1082  }
1083  if (bVertex && !IsShearAllowed()) return PointerStyle::NotAllowed;
1084  if (bMov) {
1085  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1086  return PointerStyle::Move;
1087  }
1088  } break;
1089  case SdrDragMode::Mirror: {
1090  if (bCorner || bVertex || bMov) {
1093  bool b90=false;
1094  bool b45=false;
1095  Point aDif;
1096  if (pH1!=nullptr && pH2!=nullptr) {
1097  aDif=pH2->GetPos()-pH1->GetPos();
1098  b90=(aDif.X()==0) || aDif.Y()==0;
1099  b45=b90 || (std::abs(aDif.X())==std::abs(aDif.Y()));
1100  }
1101  bool bNo=false;
1102  if (!IsMirrorAllowed(true,true)) bNo=true; // any mirroring is forbidden
1103  if (!IsMirrorAllowed() && !b45) bNo=true; // mirroring freely is forbidden
1104  if (!IsMirrorAllowed(true) && !b90) bNo=true; // mirroring horizontally/vertically is allowed
1105  if (bNo) return PointerStyle::NotAllowed;
1106  if (b90) {
1107  return PointerStyle::Mirror;
1108  }
1109  return PointerStyle::Mirror;
1110  }
1111  } break;
1112 
1114  {
1115  if(!IsTransparenceAllowed())
1116  return PointerStyle::NotAllowed;
1117 
1118  return PointerStyle::RefHand;
1119  }
1120 
1121  case SdrDragMode::Gradient:
1122  {
1123  if(!IsGradientAllowed())
1124  return PointerStyle::NotAllowed;
1125 
1126  return PointerStyle::RefHand;
1127  }
1128 
1129  case SdrDragMode::Crook: {
1130  if (bCorner || bVertex || bMov) {
1131  if (!IsCrookAllowed(true) && !IsCrookAllowed()) return PointerStyle::NotAllowed;
1132  return PointerStyle::Crook;
1133  }
1134  break;
1135  }
1136 
1137  case SdrDragMode::Crop:
1138  {
1139  return PointerStyle::Crop;
1140  }
1141 
1142  default: {
1143  if ((bCorner || bVertex) && !IsResizeAllowed(true)) return PointerStyle::NotAllowed;
1144  }
1145  }
1146  if (pHdl!=nullptr) return pHdl->GetPointer();
1147  if (bMov) {
1148  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1149  return PointerStyle::Move;
1150  }
1151  }
1153  return PointerStyle::Arrow;
1154 }
1155 
1156 #define STR_NOTHING "nothing"
1158 {
1159  OUString aName;
1160  OUString aStr = STR_NOTHING;
1161 
1162  if (pCurrentCreate!=nullptr)
1163  {
1165 
1166  if(aStr.isEmpty())
1167  {
1168  aName = pCurrentCreate->TakeObjNameSingul();
1169  aStr = SvxResId(STR_ViewCreateObj);
1170  }
1171  }
1172  else if (mpCurrentSdrDragMethod)
1173  {
1175  {
1176  aStr=maInsPointUndoStr;
1177  }
1178  else
1179  {
1180  if (maDragStat.IsMinMoved())
1181  {
1182  SAL_INFO(
1183  "svx.svdraw",
1184  "(" << this << ") " << mpCurrentSdrDragMethod.get());
1185  aStr = mpCurrentSdrDragMethod->GetSdrDragComment();
1186  }
1187  }
1188  }
1189  else if(IsMarkObj())
1190  {
1191  if(AreObjectsMarked())
1192  {
1193  aStr = SvxResId(STR_ViewMarkMoreObjs);
1194  }
1195  else
1196  {
1197  aStr = SvxResId(STR_ViewMarkObjs);
1198  }
1199  }
1200  else if(IsMarkPoints())
1201  {
1202  if(HasMarkedPoints())
1203  {
1204  aStr = SvxResId(STR_ViewMarkMorePoints);
1205  }
1206  else
1207  {
1208  aStr = SvxResId(STR_ViewMarkPoints);
1209  }
1210  } else if (IsMarkGluePoints())
1211  {
1212  if(HasMarkedGluePoints())
1213  {
1214  aStr = SvxResId(STR_ViewMarkMoreGluePoints);
1215  }
1216  else
1217  {
1218  aStr = SvxResId(STR_ViewMarkGluePoints);
1219  }
1220  }
1221  else if (IsTextEdit() && pTextEditOutlinerView!=nullptr) {
1222  aStr=SvxResId(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
1224  long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
1225  if (aSel.nEndPara>0) {
1226  for (sal_Int32 nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
1227  nLin+=pTextEditOutliner->GetLineCount(nParaNum);
1228  }
1229  }
1230  // A little imperfection:
1231  // At the end of a line of any multi-line paragraph, we display the
1232  // position of the next line of the same paragraph, if there is one.
1233  sal_uInt16 nParaLine = 0;
1234  sal_uLong nParaLineCount = pTextEditOutliner->GetLineCount(aSel.nEndPara);
1235  bool bBrk = false;
1236  while (!bBrk)
1237  {
1238  sal_uInt16 nLen = pTextEditOutliner->GetLineLen(aSel.nEndPara, nParaLine);
1239  bool bLastLine = (nParaLine == nParaLineCount - 1);
1240  if (nCol>nLen || (!bLastLine && nCol == nLen))
1241  {
1242  nCol -= nLen;
1243  nLin++;
1244  nParaLine++;
1245  }
1246  else
1247  bBrk = true;
1248 
1249  if (nLen == 0)
1250  bBrk = true; // to be sure
1251  }
1252 
1253  aStr = aStr.replaceFirst("%1", OUString::number(nPar + 1));
1254  aStr = aStr.replaceFirst("%2", OUString::number(nLin + 1));
1255  aStr = aStr.replaceFirst("%3", OUString::number(nCol + 1));
1256 
1257 #ifdef DBG_UTIL
1258  aStr += ", Level " + OUString::number( pTextEditOutliner->GetDepth( aSel.nEndPara ) );
1259 #endif
1260  }
1261 
1262  if(aStr == STR_NOTHING)
1263  {
1264  if (AreObjectsMarked()) {
1265  aStr = ImpGetDescriptionString(STR_ViewMarked);
1266  if (IsGluePointEditMode()) {
1267  if (HasMarkedGluePoints()) {
1269  }
1270  } else {
1271  if (HasMarkedPoints()) {
1273  }
1274  }
1275  } else {
1276  aStr.clear();
1277  }
1278  }
1279  else if(!aName.isEmpty())
1280  {
1281  aStr = aStr.replaceFirst("%1", aName);
1282  }
1283 
1284  if(!aStr.isEmpty())
1285  {
1286  // capitalize first letter
1287  aStr = aStr.replaceAt(0, 1, OUString(aStr[0]).toAsciiUpperCase());
1288  }
1289  return aStr;
1290 }
1291 
1293 {
1294  if( IsGluePointEditMode() )
1296 
1297  const size_t nMarkCount = GetMarkedObjectCount();
1298 
1299  if( HasMarkablePoints() && !IsFrameHandles() )
1300  {
1301  bool bPath=true;
1302  for( size_t nMarkNum = 0; nMarkNum < nMarkCount && bPath; ++nMarkNum )
1303  if (dynamic_cast<const SdrPathObj*>(GetMarkedObjectByIndex(nMarkNum)) == nullptr)
1304  bPath=false;
1305 
1306  if( bPath )
1308  }
1309 
1310  if( GetMarkedObjectCount() )
1311  {
1312  bool bGraf = true, bMedia = true, bTable = true;
1313 
1314  for( size_t nMarkNum = 0; nMarkNum < nMarkCount && ( bGraf || bMedia ); ++nMarkNum )
1315  {
1316  const SdrObject* pMarkObj = GetMarkedObjectByIndex( nMarkNum );
1317  DBG_ASSERT( pMarkObj, "SdrView::GetContext(), null pointer in mark list!" );
1318 
1319  if( !pMarkObj )
1320  continue;
1321 
1322  if( dynamic_cast<const SdrGrafObj*>( pMarkObj) == nullptr )
1323  bGraf = false;
1324 
1325  if( dynamic_cast<const SdrMediaObj*>( pMarkObj) == nullptr )
1326  bMedia = false;
1327 
1328  if( dynamic_cast<const sdr::table::SdrTableObj* >( pMarkObj ) == nullptr )
1329  bTable = false;
1330  }
1331 
1332  if( bGraf )
1333  return SdrViewContext::Graphic;
1334  else if( bMedia )
1335  return SdrViewContext::Media;
1336  else if( bTable )
1337  return SdrViewContext::Table;
1338  }
1339 
1340  return SdrViewContext::Standard;
1341 }
1342 
1344 {
1345  if (IsTextEdit()) {
1347  } else if (IsGluePointEditMode()) MarkAllGluePoints();
1348  else if (HasMarkablePoints()) MarkAllPoints();
1349  else MarkAllObj();
1350 }
1351 
1353 {
1354  if (IsTextEdit()) {
1356  eSel.nStartPara=eSel.nEndPara;
1357  eSel.nStartPos=eSel.nEndPos;
1359  } else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
1360  else if (HasMarkedPoints()) UnmarkAllPoints(); // Marked, not Markable!
1361  else UnmarkAllObj();
1362 }
1363 
1365 {
1367  return GetMarkedGluePointsRect();
1368  }
1369  if (HasMarkedPoints()) {
1370  return GetMarkedPointsRect();
1371  }
1372  return GetMarkedObjRect();
1373 }
1374 
1376 {
1377  if (IsTextEdit())
1378  {
1380  }
1381  else
1382  {
1383  if( mxSelectionController.is() && mxSelectionController->DeleteMarked() )
1384  {
1385  // action already performed by current selection controller, do nothing
1386  }
1387  else if (IsGluePointEditMode() && HasMarkedGluePoints())
1388  {
1390  }
1392  {
1394  }
1395  else
1396  {
1397  DeleteMarkedObj();
1398  }
1399  }
1400 }
1401 
1402 bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark)
1403 {
1404  if (bUnmark) bAddMark=true;
1405  if (IsGluePointEditMode()) {
1406  if (!bAddMark) UnmarkAllGluePoints();
1407  return BegMarkGluePoints(rPnt,bUnmark);
1408  } else if (HasMarkablePoints()) {
1409  if (!bAddMark) UnmarkAllPoints();
1410  return BegMarkPoints(rPnt,bUnmark);
1411  } else {
1412  if (!bAddMark) UnmarkAllObj();
1413  BegMarkObj(rPnt,bUnmark);
1414  return true;
1415  }
1416 }
1417 
1419 {
1422 }
1423 
1424 
1427 {
1428 }
1429 
1431 {
1432  if(mbMasterPagePaintCaching != bOn)
1433  {
1435 
1436  // reset at all SdrPageWindows
1437  SdrPageView* pPageView = GetSdrPageView();
1438 
1439  if(pPageView)
1440  {
1441  for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++)
1442  {
1443  SdrPageWindow* pPageWindow = pPageView->GetPageWindow(b);
1444  assert(pPageWindow && "SdrView::SetMasterPagePaintCaching: Corrupt SdrPageWindow list (!)");
1445 
1446  // force deletion of ObjectContact, so at re-display all VOCs
1447  // will be re-created with updated flag setting
1448  pPageWindow->ResetObjectContact();
1449  }
1450 
1451  // force redraw of this view
1452  pPageView->InvalidateAllWin();
1453  }
1454  }
1455 }
1456 
1457 // Default ObjectContact is ObjectContactOfPageView
1459  SdrPageWindow& rPageWindow,
1460  const char* pDebugName) const
1461 {
1462  return new sdr::contact::ObjectContactOfPageView(rPageWindow, pDebugName);
1463 }
1464 
1465 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bIsAction
Definition: svdview.hxx:118
sal_uInt16 mnMinMovLog
Definition: svdpntv.hxx:157
virtual bool HasTextEdit() const
Definition: svdobj.cxx:1712
sal_uInt16 nCurrentIdent
Definition: svdcrtv.hxx:53
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2301
OutDevType GetOutDevType() const
ConfigurationHints
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1091
bool IsTextEditInSelectionMode() const
Definition: svdedxv.cxx:2338
bool IsMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1823
OUString maInsPointUndoStr
Definition: svddrgv.hxx:45
void CaptureMouse()
Point GetPointerPosPixel()
void SetTargetFrame(const OUString &rFrm)
sal_Int32 nStartPara
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr)
Definition: svddrgv.cxx:199
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
bool EndCreateObj(SdrCreateCmd eCmd)
Definition: svdcrtv.cxx:601
PointerStyle GetPreferredPointer(const Point &rMousePos, const OutputDevice *pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const
Definition: svdview.cxx:943
PointerStyle GetDraggedHelpLinePointer() const
Definition: svdsnpv.cxx:550
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:878
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
Definition: svdedxv.cxx:1399
virtual void onAccessibilityOptionsChanged()
method is called whenever the global SvtAccessibilityOptions is changed
Definition: svdview.cxx:1426
constexpr sal_uInt16 KEY_MOD1
void SortMarkedObjects() const
Definition: svdmrkv.hxx:250
std::unique_ptr< SdrDragMethod > mpCurrentSdrDragMethod
Definition: svddrgv.hxx:42
OUString GetStatusText()
Definition: svdview.cxx:1157
bool mbMarkedHitMovesAlways
Definition: svddrgv.hxx:49
bool IsHlplVisible() const
Draw Help line of the Page or not.
Definition: svdpntv.hxx:383
bool UnmarkAllGluePoints()
Definition: svdmrkv.hxx:382
bool IsResizeAllowed(bool bProp=false) const
Definition: svdedtv.cxx:366
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1332
std::unique_ptr< SdrOutliner > pTextEditOutliner
Definition: svdedxv.hxx:81
bool mbInsPolyPoint
Definition: svdmrkv.hxx:119
virtual bool MouseButtonDown(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdview.cxx:203
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const
bool IsMacroObj() const
Definition: svdedxv.hxx:268
bool BegCreateObj(const Point &rPnt, OutputDevice *pOut=nullptr, short nMinMov=-3)
Definition: svdcrtv.cxx:508
void DeleteMarkedPoints() override
Definition: svdpoev.cxx:286
virtual SdrViewContext GetContext() const
Definition: svdview.cxx:1292
bool bAddMark
Definition: svdview.hxx:120
SdrHdlKind
Definition: svdhdl.hxx:52
KeyFuncType GetFullFunction() const
bool IsVertical() const
bool AreObjectsMarked() const
Definition: svdmrkv.hxx:251
void MarkAll()
Definition: svdview.cxx:1343
sal_uIntPtr sal_uLong
MouseEventModifiers GetMode() const
SdrMouseEventKind
Definition: svdview.hxx:90
constexpr sal_uInt16 KEY_A
bool EndDragObj(bool bCopy=false)
Definition: svddrgv.cxx:543
sal_uInt16 nMouseClicks
Definition: svdview.hxx:110
SdrPageView * pPV
Definition: svdview.hxx:103
SdrViewContext
Definition: svdview.hxx:55
bool IsInsObjPoint() const
Definition: svddrgv.hxx:126
bool IsTransparenceAllowed() const
Definition: svdedtv.cxx:391
const tools::Rectangle & GetMarkedGluePointsRect() const
Definition: svdmrkv1.cxx:542
bool IsInsObjPointMode() const
Definition: svddrgv.hxx:131
SdrObject * GetObj() const
Definition: svdhdl.hxx:203
SdrDragStat maDragStat
Definition: svdpntv.hxx:147
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1042
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr) const
Definition: svdcrtv.cxx:876
void append(std::unique_ptr< OverlayObject > pOverlayObject)
SdrEventKind
Definition: svdview.hxx:64
const Point & GetPos() const
Definition: svdhdl.hxx:197
bool HasMarkedGluePoints() const
Definition: svdmrkv1.cxx:381
bool IsExtendedKeyInputDispatcherEnabled() const
Definition: svdview.hxx:179
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
Definition: svdview.cxx:256
SdrObject * pRootObj
Definition: svdview.hxx:102
void SetMouseDown(bool bDown)
Definition: svddrag.hxx:141
const SdrHelpLineList & GetHelpLines() const
Definition: svdpagv.hxx:221
bool IsMoveAllowed() const
Definition: svdedtv.hxx:235
#define MODKEY_Unmark
Definition: svdview.cxx:292
virtual bool HasText() const override
Definition: svdotxat.cxx:429
MouseEventModifiers
virtual PointerStyle GetPointer() const
Definition: svdhdl.cxx:957
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:415
const tools::Rectangle & GetMarkedObjRect() const
Definition: svdmrkv.cxx:2369
NONE
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1621
virtual bool MouseButtonUp(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdedxv.cxx:1865
SdrModel * mpModel
Definition: svdpntv.hxx:132
bool MarkGluePoint(const SdrObject *pObj, sal_uInt16 nId, bool bUnmark)
Definition: svdmrkv1.cxx:480
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: svdview.cxx:1418
sal_uInt16 nMouseCode
Definition: svdview.hxx:112
sal_uInt16 GetClicks() const
SdrDropMarkerOverlay(const SdrView &rView, const SdrObject &rObject)
Definition: svdview.cxx:107
bool MarkAllPoints()
Definition: svdmrkv.hxx:331
sal_uInt16 mnHitTolLog
Definition: svdpntv.hxx:156
return NULL
constexpr sal_uInt16 KEY_REPEAT
SdrPageWindow * GetPageWindow(sal_uInt32 nIndex) const
Definition: svdpagv.cxx:93
long Right() const
connector object
Definition: svdobj.hxx:139
void ImplCreateOverlays(const SdrView &rView, const basegfx::B2DPolyPolygon &rLinePolyPolygon)
Definition: svdview.cxx:87
SvtAccessibilityOptions maAccessibilityOptions
Definition: svdview.hxx:156
bool IsEditMode() const
Definition: svdmrkv.hxx:220
sal_uInt16 GetButtons() const
void Undo()
Definition: svdmodel.cxx:334
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
OUTDEV_WINDOW
void MarkNextPoint()
Definition: svdmrkv1.cxx:233
Point aLogicPos
Definition: svdview.hxx:106
void SetDragWithCopy(bool bOn)
Definition: svddrgv.hxx:115
bool IsDragHelpLine() const
Definition: svdsnpv.hxx:207
constexpr sal_uInt16 KEY_UNDO
void SetResizeAtCenter(bool bOn)
Definition: svddrgv.hxx:193
oslFileHandle & pOut
MouseEventModifiers nMouseMode
Definition: svdview.hxx:111
const SvxURLField * pURLField
Definition: svdview.hxx:104
SdrObject * SdrObjectPrimitiveHit(const SdrObject &rObject, const Point &rPnt, sal_uInt16 nTol, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly, drawinglayer::primitive2d::Primitive2DContainer *pHitContainer)
#define MODKEY_PolyPoly
Definition: svdview.cxx:290
sal_uInt16 GetModifier() const
bool bMouseDown
Definition: svdview.hxx:116
sal_uInt16 nHlplIdx
Definition: svdview.hxx:113
long Top() const
bool IsRotateAllowed(bool b90Deg=false) const
Definition: svdedtv.cxx:374
OutputDevice * GetFirstOutputDevice() const
Definition: svdpntv.cxx:93
bool IsMarkGluePoints() const
Definition: svdmrkv.hxx:398
sal_Int32 nEndPos
bool BegMarkGluePoints(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:480
void UnmarkAll()
Definition: svdview.cxx:1352
void BegMacroObj(const Point &rPnt, short nTol, SdrObject *pObj, SdrPageView *pPV, vcl::Window *pWin)
Definition: svdedxv.cxx:2345
bool MarkAllGluePoints()
Definition: svdmrkv.hxx:381
PointerStyle GetPointer(const Point &rPosPixel)
void SetSnapEnabled(bool bOn)
Definition: svdsnpv.hxx:171
#define MODKEY_AngleSnap
Definition: svdview.cxx:286
bool IsInsObjPointPossible() const
Definition: svddrgv.cxx:644
#define MOUSE_LEFT
bool IsMinMoved() const
Definition: svddrag.hxx:108
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:228
void ResetObjectContact()
const tools::Rectangle & GetMarkedRect() const
Definition: svdview.cxx:1364
virtual bool HasMarkedPoints() const
Definition: svdmrkv1.cxx:68
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:174
#define MODKEY_DeepBackw
Definition: svdview.cxx:295
SdrHitKind
Definition: svdmrkv.hxx:56
virtual bool MouseMove(const MouseEvent &rMEvt, OutputDevice *pWin) override
handle mouse over effects for handles
Definition: svdcrtv.cxx:312
void MarkAllObj(SdrPageView *pPV=nullptr)
Definition: svdmrkv.cxx:2320
void MarkNextGluePoint()
Definition: svdmrkv1.cxx:536
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
Definition: svdmrkv.cxx:2160
SdrDragMode meDragMode
Definition: svdmrkv.hxx:112
const SdrLayerIDSet & GetVisibleLayers() const
Definition: svdpagv.hxx:215
bool IsShearAllowed() const
Definition: svdedtv.cxx:409
sal_Int32 nEndPara
bool IsHlplFront() const
Draw Help line in front of the objects or behind them.
Definition: svdpntv.hxx:386
VclPtr< vcl::Window > pTextEditWin
Definition: svdedxv.hxx:83
bool BegMark(const Point &rPnt, bool bAddMark, bool bUnmark)
Definition: svdview.cxx:1402
void InvalidateAllWin()
Invalidates the Page's whole area.
Definition: svdpagv.cxx:205
#define DBG_ASSERT(sCon, aError)
void Repeat(SfxRepeatTarget &)
Definition: svdmodel.cxx:382
bool IsInsGluePointPossible() const
Definition: svddrgv.cxx:723
#define MODKEY_CopyDrag
Definition: svdview.cxx:287
uno_Any a
#define EE_PARA_ALL
bool bMouseUp
Definition: svdview.hxx:117
void SetRepresentation(const OUString &rRep)
bool IsMarkObj() const
Definition: svdmrkv.hxx:203
size_t GetMarkedObjectCount() const
Definition: svdmrkv.hxx:249
virtual bool MouseButtonUp(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdview.cxx:216
bool IsSelected() const
Definition: svdhdl.hxx:206
SdrEventKind eEvent
Definition: svdview.hxx:108
bool DoMouseEvent(const SdrViewEvent &rVEvt)
Definition: svdview.cxx:746
#define MODKEY_MultiMark
Definition: svdview.cxx:291
#define MODKEY_DeepMark
Definition: svdview.cxx:294
virtual bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
Definition: svdedxv.cxx:1786
bool IsTextEditHit(const Point &rHit) const
Definition: svdedxv.cxx:1705
virtual bool SdrBeginTextEdit(SdrObject *pObj, SdrPageView *pPV=nullptr, vcl::Window *pWin=nullptr, bool bIsNewObj=false, SdrOutliner *pGivenOutliner=nullptr, OutlinerView *pGivenOutlinerView=nullptr, bool bDontDeleteOutliner=false, bool bOnlyOneView=false, bool bGrabFocus=true)
Definition: svdedxv.cxx:1052
bool BegInsGluePoint(const Point &rPnt)
Definition: svddrgv.cxx:745
SdrObject * pCurrentCreate
Definition: svdcrtv.hxx:40
bool IsGluePointEditMode() const
Definition: svdmrkv.hxx:224
#define MODKEY_ForceMark
Definition: svdview.cxx:293
PointerStyle aCurrentCreatePointer
Definition: svdcrtv.hxx:48
SdrHdl * PickHandle(const Point &rPnt) const
Definition: svdmrkv.cxx:1669
long Bottom() const
virtual bool HasMacro() const
Definition: svdobj.cxx:1781
const OutlinerView * GetTextEditOutlinerView() const
Definition: svdedxv.hxx:235
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
Definition: svdmrkv.cxx:358
sdr::overlay::OverlayObjectList maObjects
Definition: svdview.hxx:134
void SetMasterPagePaintCaching(bool bOn)
Definition: svdview.cxx:1430
void SetCrookAtCenter(bool bOn)
Definition: svddrgv.hxx:198
void DeleteMarkedGluePoints()
Definition: svdglev.cxx:222
#define MODKEY_Center
Definition: svdview.cxx:285
sal_uInt16 GetModifier() const
const SdrLayerIDSet * pVisiLayer
Definition: svdobj.hxx:192
void SetActualWin(const OutputDevice *pWin)
Definition: svdsnpv.hxx:154
constexpr sal_uInt16 KEY_MOD2
bool IsTextTool() const
Definition: svdcrtv.cxx:331
Abstract DrawObject.
Definition: svdobj.hxx:312
bool IsCreateMode() const
Definition: svdmrkv.hxx:222
Point ScreenToOutputPixel(const Point &rPos) const
bool MarkNextObj(bool bPrev=false)
Definition: svdmrkv.cxx:1691
bool PickGluePoint(const Point &rPnt, SdrObject *&rpObj, sal_uInt16 &rnId, SdrPageView *&rpPV) const
Definition: svdmrkv1.cxx:444
TableHitKind CheckTableHit(const Point &rPos, sal_Int32 &rnX, sal_Int32 &rnY, const sal_uInt16 aTol=0) const
Definition: svdotable.cxx:1163
long X() const
void SetFormat(SvxURLFormat eFmt)
bool bIsTextEdit
Definition: svdview.hxx:119
virtual bool MouseButtonDown(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdedxv.cxx:1821
sal_uInt16 nMacroTol
Definition: svdedxv.hxx:94
virtual sdr::contact::ObjectContact * createViewSpecificObjectContact(SdrPageWindow &rPageWindow, const char *pDebugName) const
Definition: svdview.cxx:1458
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:601
bool IsCreateObj() const
Definition: svdcrtv.hxx:118
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
void ConfigurationChanged(::utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: svdpntv.cxx:248
void ReleaseMouse()
ESelection GetSelection() const
const SdrLayerIDSet & GetLockedLayers() const
Definition: svdpagv.hxx:219
#define STR_NOTHING
Definition: svdview.cxx:1156
virtual bool IsAction() const override
Definition: svdcrtv.cxx:217
void SetAngleSnapEnabled(bool bOn)
Definition: svdsnpv.hxx:221
bool IsSet(SdrLayerID a) const
Definition: svdsob.hxx:66
bool IsInsGluePointMode() const
Definition: svddrgv.hxx:140
SdrInventor nCurrentInvent
Definition: svdcrtv.hxx:52
SdrViewEditMode meEditMode
Definition: svdmrkv.hxx:113
bool mbMasterPagePaintCaching
Definition: svdview.hxx:154
void SetPointer(PointerStyle)
SdrHdl * GetHdl(size_t nNum) const
Definition: svdhdl.hxx:462
void setClosed(bool bNew)
const vcl::KeyCode & GetKeyCode() const
void ForceMarkedObjToAnotherPage()
Definition: svdedtv.cxx:658
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
void SetSelection(const ESelection &)
bool IsMarkPoints() const
Definition: svdmrkv.hxx:352
bool IsFrameHandles() const
Definition: svdmrkv.hxx:211
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
Definition: svdedtv.cxx:382
sal_uInt32 GetObjHdlNum() const
Definition: svdhdl.hxx:216
bool UnmarkAllPoints()
Definition: svdmrkv.hxx:332
virtual bool IsTextEdit() const final override
Definition: svdedxv.cxx:1663
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1796
#define MODKEY_NoSnap
Definition: svdview.cxx:283
size_t GetFontHeight()
Definition: svdetc.hxx:73
virtual OutlinerParaObject * GetOutlinerParaObject() const override
Definition: svdotext.cxx:1371
OUString ImpGetDescriptionString(const char *pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const
Definition: svdmrkv.cxx:2389
constexpr sal_uInt16 KEY_ESCAPE
void DeleteMarkedObj()
Definition: svdedtv.cxx:772
OUString getValue(const OUString &rName) const
#define SAL_INFO(area, stream)
OUString aName
OutlinerView * pTextEditOutlinerView
Definition: svdedxv.hxx:82
virtual bool Command(const CommandEvent &rCEvt, vcl::Window *pWin) override
Definition: svdedxv.cxx:1946
virtual bool Command(const CommandEvent &rCEvt, vcl::Window *pWin) override
Definition: svdview.cxx:244
virtual ~SdrView() override
Definition: svdview.cxx:161
bool IsQuickTextEditMode() const
Definition: svdedxv.hxx:185
SdrPageView * pMacroPV
Definition: svdedxv.hxx:86
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
Definition: svdview.cxx:251
void SetOrtho(bool bOn)
Definition: svdsnpv.hxx:245
bool IsLeft() const
virtual PointerStyle GetCreatePointer() const
get the cursor/pointer that signals creating this object
Definition: svdobj.cxx:1392
bool IsSetPageOrg() const
Definition: svdsnpv.hxx:190
bool BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView *pPV)
Definition: svdsnpv.cxx:511
virtual void DeleteMarked()
Definition: svdview.cxx:1375
bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
Definition: svdview.cxx:166
bool IsVertexHdl() const
Definition: svdhdl.hxx:213
SdrHdl * GetGluePointHdl(const SdrObject *pObj, sal_uInt16 nId) const
Definition: svdmrkv1.cxx:523
bool IsGradientAllowed() const
Definition: svdedtv.cxx:403
const Point & GetPosPixel() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
Definition: svdmrkv.hxx:248
SdrObject * pObj
Definition: svdview.hxx:101
long Left() const
constexpr sal_uInt16 KEY_BACKSPACE
PointerStyle
bool IsCrookAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:422
sal_uInt16 GetFullCode() const
SdrObject * getParentSdrObjectFromSdrObject() const
Definition: svdobj.cxx:676
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:310
SdrHdl * pHdl
Definition: svdview.hxx:100
void Redo()
Definition: svdmodel.cxx:358
bool bUnmark
Definition: svdview.hxx:121
bool BegCreateCaptionObj(const Point &rPnt, const Size &rObjSiz, OutputDevice *pOut=nullptr, short nMinMov=-3)
Definition: svdcrtv.cxx:527
SdrView(SdrModel &rSdrModel, OutputDevice *pOut=nullptr)
Definition: svdview.cxx:149
const tools::Rectangle & GetMarkedPointsRect() const
Definition: svdmrkv1.cxx:239
bool bMarkPrev
Definition: svdview.hxx:123
bool IsDragObj() const
Definition: svddrgv.hxx:106
OutputDevice * get() const
bool BegInsObjPoint(const Point &rPnt, bool bNewObj)
Definition: svddrgv.hxx:123
virtual void MovAction(const Point &rPnt) override
Definition: svdcrtv.cxx:222
virtual bool MouseMove(const MouseEvent &rMEvt, OutputDevice *pWin) override
handle mouse over effects for handles
Definition: svdview.cxx:230
SdrHdlList maHdlList
Definition: svdmrkv.hxx:103
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1677
constexpr sal_uInt16 KEY_DELETE
sal_uInt16 nTol
Definition: svdobj.hxx:194
bool IsCornerHdl() const
Definition: svdhdl.hxx:212
bool IsPointMarkable(const SdrHdl &rHdl) const
Definition: svdmrkv1.cxx:85
bool PickHelpLine(const Point &rPnt, short nTol, const OutputDevice &rOut, sal_uInt16 &rnHelpLineNum, SdrPageView *&rpPV) const
Definition: svdsnpv.cxx:491
#define MODKEY_Ortho
Definition: svdview.cxx:284
sal_uInt16 nGlueId
Definition: svdview.hxx:114
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:323
void SetURL(const OUString &rURL)
virtual void BrkAction() override
Definition: svdcrtv.cxx:242
SdrCreateCmd
Definition: svdtypes.hxx:27
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
Definition: svdmrkv1.cxx:170
constexpr sal_uInt16 KEY_SHIFT
bool bPrevNextMark
Definition: svdview.hxx:122
void SetCreate1stPointAsCenter(bool bOn)
Definition: svdcrtv.hxx:133
bool IsInsertGluePoint() const
Definition: svddrgv.hxx:119
bool IsDragWithCopy() const
Definition: svddrgv.hxx:116
bool IsMarking() const
Definition: svdmrkv.hxx:196
rtl::Reference< sdr::SelectionController > mxSelectionController
Definition: svdedxv.hxx:102
#define MOUSE_RIGHT
#define EE_TEXTPOS_ALL
SdrObject * pMacroObj
Definition: svdedxv.hxx:85
virtual void BckAction() override
Definition: svdcrtv.cxx:236
SdrHitKind eHit
Definition: svdview.hxx:107
aStr
bool IsExtendedMouseEventDispatcherEnabled() const
Definition: svdview.hxx:176
VclPtr< OutputDevice > mpActualOutDev
Definition: svdpntv.hxx:133
bool EndInsObjPoint(SdrCreateCmd eCmd)
Definition: svddrgv.cxx:707
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:77
const SdrPageView * pPageView
Definition: svdobj.hxx:193
long Y() const
SdrHdlKind GetKind() const
Definition: svdhdl.hxx:194
bool IsDistortAllowed(bool bNoContortion=false) const
Definition: svdedtv.cxx:434
virtual void EndAction() override
Definition: svdcrtv.cxx:230
bool IsOrthoDesired() const
Definition: svddrgv.cxx:897
virtual bool HasMarkablePoints() const
Definition: svdmrkv1.cxx:32
sal_Int32 nStartPos
sal_uInt32 PageWindowCount() const
Definition: svdpagv.hxx:94
bool IsObjMarked(SdrObject const *pObj) const
Definition: svdmrkv.cxx:1939