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