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