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( auto pTextObj = dynamic_cast<const SdrTextObj*>(pHitObj) )
510  if( pTextObj->IsFontwork() )
511  aBoundRect = pHitObj->GetSnapRect();
512 
513  sal_Int32 nTolerance(mnHitTolLog);
514  bool bBoundRectHit(false);
515 
516  if(pOut)
517  {
518  nTolerance = pOut->PixelToLogic(Size(2, 0)).Width();
519  }
520 
521  if( (aLocalLogicPosition.X() >= aBoundRect.Left() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Left() + nTolerance)
522  || (aLocalLogicPosition.X() >= aBoundRect.Right() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Right() + nTolerance)
523  || (aLocalLogicPosition.Y() >= aBoundRect.Top() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Top() + nTolerance)
524  || (aLocalLogicPosition.Y() >= aBoundRect.Bottom() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Bottom() + nTolerance))
525  {
526  bBoundRectHit = true;
527  }
528 
529  if(!bBoundRectHit)
530  {
531  bool bTEHit(pPV &&
532  SdrObjectPrimitiveHit(*pHitObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
533 
534  // TextEdit attached to an object in a locked layer
535  if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer()))
536  {
537  bTEHit=false;
538  }
539 
540  if (bTEHit)
541  {
542  rVEvt.pRootObj=pObj;
543  pObj=pHitObj;
545  }
546  }
547  }
548  if (!bHitPassDirect && eHit==SdrHitKind::UnmarkedObject) {
549  eHit=SdrHitKind::NONE;
550  pObj=nullptr;
551  pPV=nullptr;
552  }
553  bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
554  bool bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
555  bool bMouseDown=rVEvt.bMouseDown;
556  bool bMouseUp=rVEvt.bMouseUp;
558  bool bIsAction=IsAction();
559 
560  if (bIsAction)
561  {
562  if (bMouseDown)
563  {
564  if (bMouseRight) eEvent=SdrEventKind::BackAction;
565  }
566  else if (bMouseUp)
567  {
568  if (bMouseLeft)
569  {
571  if (IsDragObj())
572  {
573  eEvent=SdrEventKind::EndDrag;
574  }
575  else if (IsCreateObj() || IsInsObjPoint())
576  {
578  }
579  else if (IsMarking())
580  {
581  eEvent=SdrEventKind::EndMark;
582  if (!maDragStat.IsMinMoved())
583  {
584  eEvent=SdrEventKind::BrkMark;
586  }
587  }
588  }
589  }
590  else
591  {
593  }
594  }
595  else if (eHit==SdrHitKind::TextEdit)
596  {
597  eEvent=SdrEventKind::TextEdit;
598  }
599  else if (bMouseDown && bMouseLeft)
600  {
601  if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=nullptr && pHitObj!=nullptr && pHitObj->HasTextEdit() && eHit==SdrHitKind::MarkedObject)
602  {
603  rVEvt.pRootObj=pObj;
604  pObj=pHitObj;
606  }
607  else if (MODKEY_ForceMark && eHit!=SdrHitKind::UrlField)
608  {
609  eEvent=SdrEventKind::BeginMark; // AddMark,Unmark */
610  }
611  else if (eHit==SdrHitKind::HelpLine)
612  {
613  eEvent=SdrEventKind::BeginDragHelpline; // nothing, actually
614  }
615  else if (eHit==SdrHitKind::Gluepoint)
616  {
617  eEvent=SdrEventKind::MarkGluePoint; // AddMark+Drag
618  rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
619  }
620  else if (eHit==SdrHitKind::Handle)
621  {
622  eEvent=SdrEventKind::BeginDragObj; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark
623  bool bGlue=pHdl->GetKind()==SdrHdlKind::Glue;
624  bool bPoly=!bGlue && IsPointMarkable(*pHdl);
625  bool bMarked=bGlue || (bPoly && pHdl->IsSelected());
626  if (bGlue || bPoly)
627  {
629  if (MODKEY_DeepMark)
630  {
631  rVEvt.bAddMark=true;
632  rVEvt.bPrevNextMark=true;
634  }
635  else if (MODKEY_MultiMark)
636  {
637  rVEvt.bAddMark=true;
638  rVEvt.bUnmark=bMarked; // Toggle
639  if (bGlue)
640  {
641  pObj=pHdl->GetObj();
642  nGlueId=static_cast<sal_uInt16>(pHdl->GetObjHdlNum());
643  }
644  }
645  else if (bMarked)
646  {
647  eEvent=SdrEventKind::BeginDragObj; // don't change MarkState, only change Drag
648  }
649  }
650  }
651  else if (bInsPolyPt && (MODKEY_PolyPoly || (!MODKEY_MultiMark && !MODKEY_DeepMark)))
652  {
654  }
655  else if (bInsGluePt && !MODKEY_MultiMark && !MODKEY_DeepMark)
656  {
658  }
659  else if (eHit==SdrHitKind::TextEditObj)
660  {
661  eEvent=SdrEventKind::BeginTextEdit; // AddMark+Drag,DeepMark+Drag,Unmark
663  { // if not hit with Deep
664  eEvent=SdrEventKind::MarkObj;
665  }
666  }
667  else if (eHit==SdrHitKind::Macro)
668  {
669  eEvent=SdrEventKind::BeginMacroObj; // AddMark+Drag
671  { // if not hit with Deep
672  eEvent=SdrEventKind::MarkObj;
673  }
674  }
675  else if (eHit==SdrHitKind::UrlField)
676  {
677  eEvent=SdrEventKind::ExecuteUrl; // AddMark+Drag
679  { // if not hit with Deep
680  eEvent=SdrEventKind::MarkObj;
681  }
682  }
683  else if (eHit==SdrHitKind::MarkedObject)
684  {
685  eEvent=SdrEventKind::BeginDragObj; // DeepMark+Drag,Unmark
686 
688  { // if not hit with Deep
689  eEvent=SdrEventKind::MarkObj;
690  }
691  }
692  else if (IsCreateMode())
693  {
694  eEvent=SdrEventKind::BeginCreateObj; // nothing, actually
695  }
696  else if (eHit==SdrHitKind::UnmarkedObject)
697  {
698  eEvent=SdrEventKind::MarkObj; // AddMark+Drag
699  }
700  else
701  {
703  }
704 
705  if (eEvent==SdrEventKind::MarkObj)
706  {
707  rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep
710  }
711  if (eEvent==SdrEventKind::BeginMark)
712  {
714  rVEvt.bUnmark=MODKEY_Unmark;
715  }
716  }
717  rVEvt.bIsAction=bIsAction;
718  rVEvt.bIsTextEdit=bIsTextEdit;
719  rVEvt.aLogicPos=aLocalLogicPosition;
720  rVEvt.pHdl=pHdl;
721  rVEvt.pObj=pObj;
722  if(rVEvt.pRootObj==nullptr)
723  rVEvt.pRootObj=pObj;
724  rVEvt.pPV=pPV;
725  rVEvt.nHlplIdx=nHlplIdx;
726  rVEvt.nGlueId=nGlueId;
727  rVEvt.eHit=eHit;
728  rVEvt.eEvent=eEvent;
729 #ifdef DGB_UTIL
730  if (rVEvt.pRootObj!=NULL) {
731  if (rVEvt.pRootObj->getParentSdrObjListFromSdrObject()!=rVEvt.pPV->GetObjList()) {
732  OSL_FAIL("SdrView::PickAnything(): pRootObj->getParentSdrObjListFromSdrObject()!=pPV->GetObjList() !");
733  }
734  }
735 #endif
736  return eHit;
737 }
738 
740 {
741  bool bRet=false;
742  SdrHitKind eHit=rVEvt.eHit;
743  Point aLogicPos(rVEvt.aLogicPos);
744 
745  bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
746  bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
747  bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
748  bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
749  bool bMouseDown=rVEvt.bMouseDown;
750  bool bMouseUp=rVEvt.bMouseUp;
751  if (bMouseDown) {
752  if (bMouseLeft) maDragStat.SetMouseDown(true);
753  } else if (bMouseUp) {
754  if (bMouseLeft) maDragStat.SetMouseDown(false);
755  } else { // else, MouseMove
756  maDragStat.SetMouseDown(bMouseLeft);
757  }
758 
759 #ifdef MODKEY_NoSnap
761 #endif
762 #ifdef MODKEY_Ortho
764 #endif
765 #ifdef MODKEY_AngleSnap
767 #endif
768 #ifdef MODKEY_CopyDrag
770 #endif
771 #ifdef MODKEY_Center
775 #endif
776  if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SdrHitKind::UnmarkedObject || eHit==SdrHitKind::NONE)) {
777  SdrEndTextEdit(); // User has clicked beneath object, exit edit mode.
778  // pHdl is invalid, then, that shouldn't matter, though, as we expect
779  // pHdl==NULL (because of eHit).
780  }
781  switch (rVEvt.eEvent) {
782  case SdrEventKind::NONE: bRet=false; break;
783  case SdrEventKind::TextEdit: bRet=false; break; // Events handled by the OutlinerView are not taken into account here.
784  case SdrEventKind::MoveAction: MovAction(aLogicPos); bRet=true; break;
785  case SdrEventKind::EndAction: EndAction(); bRet=true; break;
786  case SdrEventKind::BackAction: BckAction(); bRet=true; break;
787  case SdrEventKind::EndMark : EndAction(); bRet=true; break;
788  case SdrEventKind::BrkMark : {
789  BrkAction();
790  if (!MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark)) {
791  // No object hit. Do the following:
792  // 1. deselect any selected glue points
793  // 2. deselect any selected polygon points
794  // 3. deselect any selected objects
795  if (!rVEvt.bAddMark) UnmarkAll();
796  }
797  bRet=true;
798  } break;
799  case SdrEventKind::EndCreate: { // if necessary, MarkObj
802  if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd;
803  if (!EndCreateObj(eCmd)) { // Don't evaluate event for Create? -> Select
805  MarkObj(rVEvt.pRootObj,rVEvt.pPV);
806  if (eHit==SdrHitKind::TextEdit)
807  {
809  SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, static_cast<vcl::Window*>(mpActualOutDev.get())));
810 
811  if(bRet2)
812  {
813  MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos),
814  1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
815 
817  if (pOLV!=nullptr) {
818  pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
819  pOLV->MouseButtonUp(aMEvt); // event for the Outliner, but without double-click
820  }
821  }
822  }
823  bRet=true; // object is selected and (if necessary) TextEdit is started
824  } else bRet=false; // canceled Create, nothing else
825  } else bRet=true; // return true for EndCreate
826  } break;
827  case SdrEventKind::EndDrag: {
828  bRet=EndDragObj(IsDragWithCopy());
829  ForceMarkedObjToAnotherPage(); // TODO: Undo+bracing missing!
830  } break;
831  case SdrEventKind::MarkObj: { // + (if applicable) BegDrag
832  if (!rVEvt.bAddMark) UnmarkAllObj();
833  bool bUnmark=rVEvt.bUnmark;
834  if (rVEvt.bPrevNextMark) {
835  bRet=MarkNextObj(aLogicPos,mnHitTolLog,rVEvt.bMarkPrev);
836  } else {
838  const size_t nCount0=GetMarkedObjectCount();
839  bRet=MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark);
841  const size_t nCount1=GetMarkedObjectCount();
842  bUnmark=nCount1<nCount0;
843  }
844  if (!bUnmark) {
845  BegDragObj(aLogicPos,nullptr,nullptr,mnMinMovLog);
846  bRet=true;
847  }
848  } break;
849  case SdrEventKind::MarkPoint: { // + (if applicable) BegDrag
850  if (!rVEvt.bAddMark) UnmarkAllPoints();
851  if (rVEvt.bPrevNextMark) {
852  MarkNextPoint();
853  bRet=false;
854  } else {
855  bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
856  }
857  if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
858  BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog);
859  bRet=true;
860  }
861  } break;
862  case SdrEventKind::MarkGluePoint: { // + (if applicable) BegDrag
863  if (!rVEvt.bAddMark) UnmarkAllGluePoints();
864  if (rVEvt.bPrevNextMark) {
866  bRet=false;
867  } else {
868  bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.bUnmark);
869  }
870  if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
871  SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId);
872  BegDragObj(aLogicPos,nullptr,pHdl,mnMinMovLog);
873  bRet=true;
874  }
875  } break;
876  case SdrEventKind::BeginMark: bRet=BegMark(aLogicPos,rVEvt.bAddMark,rVEvt.bUnmark); break;
877  case SdrEventKind::BeginInsertObjPoint: bRet = BegInsObjPoint(aLogicPos, MODKEY_PolyPoly); break;
881  if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd;
882  EndInsObjPoint(eCmd);
883  bRet=true;
884  } break;
885  case SdrEventKind::BeginInsertGluePoint: bRet=BegInsGluePoint(aLogicPos); break;
886  case SdrEventKind::BeginDragHelpline: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
887  case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break;
891  bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
892  } else bRet=BegCreateObj(aLogicPos);
893  } break;
895  BegMacroObj(aLogicPos,mnHitTolLog,rVEvt.pObj,rVEvt.pPV,static_cast<vcl::Window*>(mpActualOutDev.get()));
896  bRet=false;
897  } break;
899  if (!IsObjMarked(rVEvt.pObj)) {
900  UnmarkAllObj();
901  MarkObj(rVEvt.pRootObj,rVEvt.pPV);
902  }
903 
905  SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, static_cast<vcl::Window*>(mpActualOutDev.get()));
906 
907  if(bRet)
908  {
909  MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos),
910  1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
912  if (pOLV!=nullptr) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
913  }
914  } break;
915  default: break;
916  } // switch
918  vcl::Window* pWin=static_cast<vcl::Window*>(mpActualOutDev.get());
919  // left mouse button pressed?
920  bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
921  // left mouse button released?
922  bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
923  // left mouse button pressed or held?
924  bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
925  pWin->SetPointer(GetPreferredPointer(rVEvt.aLogicPos,pWin,
926  rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1));
927  bool bAction=IsAction();
928  if (bLeftDown && bAction)
929  pWin->CaptureMouse();
930  else if (bLeftUp || (rVEvt.bIsAction && !bAction))
931  pWin->ReleaseMouse();
932  }
933  return bRet;
934 }
935 
936 PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier, bool bLeftDown) const
937 {
938  // Actions
939  if (IsCreateObj())
940  {
942  }
944  {
945  return mpCurrentSdrDragMethod->GetSdrDragPointer();
946  }
947  if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsSetPageOrg()) return PointerStyle::Arrow;
949  if (IsMacroObj()) {
950  SdrObjMacroHitRec aHitRec;
951  aHitRec.aPos=pOut->LogicToPixel(rMousePos);
952  aHitRec.nTol=nMacroTol;
954  aHitRec.pPageView=pMacroPV;
955  return pMacroObj->GetMacroPointer(aHitRec);
956  }
957 
958  // TextEdit, ObjEdit, Macro
959  if (IsTextEdit() && (IsTextEditInSelectionMode() || IsTextEditHit(rMousePos)))
960  {
961  if(!pOut || IsTextEditInSelectionMode())
962  {
963  if(pTextEditOutliner->IsVertical())
964  return PointerStyle::TextVertical;
965  else
966  return PointerStyle::Text;
967  }
968  // Outliner should return something here...
969  Point aPos(pOut->LogicToPixel(rMousePos));
971  if (aPointer==PointerStyle::Arrow)
972  {
973  if(pTextEditOutliner->IsVertical())
974  aPointer = PointerStyle::TextVertical;
975  else
976  aPointer = PointerStyle::Text;
977  }
978  return aPointer;
979  }
980 
981  SdrViewEvent aVEvt;
982  aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown
983  aVEvt.bMouseDown=!bLeftDown; // What if ..?
984  aVEvt.bMouseUp=bLeftDown; // What if ..?
985  if (pOut!=nullptr)
986  const_cast<SdrView*>(this)->SetActualWin(pOut);
987  SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
988  SdrEventKind eEvent=aVEvt.eEvent;
989  switch (eEvent)
990  {
992  return aCurrentCreatePointer;
994  return PointerStyle::Move;
996  return PointerStyle::Arrow;
999  return PointerStyle::MovePoint;
1002  return PointerStyle::Cross;
1004  return PointerStyle::RefHand;
1006  {
1007  SdrObjMacroHitRec aHitRec;
1008  aHitRec.aPos=aVEvt.aLogicPos;
1009  aHitRec.nTol=mnHitTolLog;
1010  aHitRec.pVisiLayer=&aVEvt.pPV->GetVisibleLayers();
1011  aHitRec.pPageView=aVEvt.pPV;
1012  return aVEvt.pObj->GetMacroPointer(aHitRec);
1013  }
1014  default: break;
1015  } // switch
1016 
1017  switch(eHit)
1018  {
1019  case SdrHitKind::Cell:
1020  return PointerStyle::Arrow;
1021  case SdrHitKind::HelpLine :
1022  return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer();
1023  case SdrHitKind::Gluepoint:
1024  return PointerStyle::MovePoint;
1025  case SdrHitKind::TextEdit :
1027  {
1028  SdrTextObj* pText = dynamic_cast< SdrTextObj* >( aVEvt.pObj );
1029  if(pText && pText->HasText())
1030  {
1031  OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
1032  if(pParaObj && pParaObj->IsVertical())
1033  return PointerStyle::TextVertical;
1034  }
1035  return PointerStyle::Text;
1036  }
1037  default: break;
1038  }
1039 
1040  bool bMarkHit=eHit==SdrHitKind::MarkedObject;
1041  SdrHdl* pHdl=aVEvt.pHdl;
1042  // now check the pointers for dragging
1043  if (pHdl!=nullptr || bMarkHit) {
1044  SdrHdlKind eHdl= pHdl!=nullptr ? pHdl->GetKind() : SdrHdlKind::Move;
1045  bool bCorner=pHdl!=nullptr && pHdl->IsCornerHdl();
1046  bool bVertex=pHdl!=nullptr && pHdl->IsVertexHdl();
1047  bool bMov=eHdl==SdrHdlKind::Move;
1049  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1050  return PointerStyle::Move;
1051  }
1052  switch (meDragMode) {
1053  case SdrDragMode::Rotate: {
1054  if ((bCorner || bMov) && !IsRotateAllowed(true))
1055  return PointerStyle::NotAllowed;
1056 
1057  // are 3D objects selected?
1058  bool b3DObjSelected = false;
1059  for (size_t a=0; !b3DObjSelected && a<GetMarkedObjectCount(); ++a) {
1061  if(dynamic_cast<const E3dObject* >(pObj) != nullptr)
1062  b3DObjSelected = true;
1063  }
1064  // If we have a 3D object, go on despite !IsShearAllowed,
1065  // because then we have a rotation instead of a shear.
1066  if (bVertex && !IsShearAllowed() && !b3DObjSelected)
1067  return PointerStyle::NotAllowed;
1068  if (bMov)
1069  return PointerStyle::Rotate;
1070  } break;
1071  case SdrDragMode::Shear: {
1072  if (bCorner) {
1073  if (!IsDistortAllowed(true) && !IsDistortAllowed()) return PointerStyle::NotAllowed;
1074  else return PointerStyle::RefHand;
1075  }
1076  if (bVertex && !IsShearAllowed()) return PointerStyle::NotAllowed;
1077  if (bMov) {
1078  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1079  return PointerStyle::Move;
1080  }
1081  } break;
1082  case SdrDragMode::Mirror: {
1083  if (bCorner || bVertex || bMov) {
1086  bool b90=false;
1087  bool b45=false;
1088  if (pH1!=nullptr && pH2!=nullptr) {
1089  Point aDif = pH2->GetPos()-pH1->GetPos();
1090  b90=(aDif.X()==0) || aDif.Y()==0;
1091  b45=b90 || (std::abs(aDif.X())==std::abs(aDif.Y()));
1092  }
1093  bool bNo=false;
1094  if (!IsMirrorAllowed(true,true)) bNo=true; // any mirroring is forbidden
1095  if (!IsMirrorAllowed() && !b45) bNo=true; // mirroring freely is forbidden
1096  if (!IsMirrorAllowed(true) && !b90) bNo=true; // mirroring horizontally/vertically is allowed
1097  if (bNo) return PointerStyle::NotAllowed;
1098  if (b90) {
1099  return PointerStyle::Mirror;
1100  }
1101  return PointerStyle::Mirror;
1102  }
1103  } break;
1104 
1106  {
1107  if(!IsTransparenceAllowed())
1108  return PointerStyle::NotAllowed;
1109 
1110  return PointerStyle::RefHand;
1111  }
1112 
1113  case SdrDragMode::Gradient:
1114  {
1115  if(!IsGradientAllowed())
1116  return PointerStyle::NotAllowed;
1117 
1118  return PointerStyle::RefHand;
1119  }
1120 
1121  case SdrDragMode::Crook: {
1122  if (bCorner || bVertex || bMov) {
1123  if (!IsCrookAllowed(true) && !IsCrookAllowed()) return PointerStyle::NotAllowed;
1124  return PointerStyle::Crook;
1125  }
1126  break;
1127  }
1128 
1129  case SdrDragMode::Crop:
1130  {
1131  return PointerStyle::Crop;
1132  }
1133 
1134  default: {
1135  if ((bCorner || bVertex) && !IsResizeAllowed(true)) return PointerStyle::NotAllowed;
1136  }
1137  }
1138  if (pHdl!=nullptr) return pHdl->GetPointer();
1139  if (bMov) {
1140  if (!IsMoveAllowed()) return PointerStyle::Arrow; // because double click or drag & drop is possible
1141  return PointerStyle::Move;
1142  }
1143  }
1145  return PointerStyle::Arrow;
1146 }
1147 
1148 #define STR_NOTHING "nothing"
1150 {
1151  OUString aName;
1152  OUString aStr = STR_NOTHING;
1153 
1154  if (pCurrentCreate!=nullptr)
1155  {
1157 
1158  if(aStr.isEmpty())
1159  {
1160  aName = pCurrentCreate->TakeObjNameSingul();
1161  aStr = SvxResId(STR_ViewCreateObj);
1162  }
1163  }
1164  else if (mpCurrentSdrDragMethod)
1165  {
1167  {
1168  aStr=maInsPointUndoStr;
1169  }
1170  else
1171  {
1172  if (maDragStat.IsMinMoved())
1173  {
1174  SAL_INFO(
1175  "svx.svdraw",
1176  "(" << this << ") " << mpCurrentSdrDragMethod.get());
1177  aStr = mpCurrentSdrDragMethod->GetSdrDragComment();
1178  }
1179  }
1180  }
1181  else if(IsMarkObj())
1182  {
1183  if(AreObjectsMarked())
1184  {
1185  aStr = SvxResId(STR_ViewMarkMoreObjs);
1186  }
1187  else
1188  {
1189  aStr = SvxResId(STR_ViewMarkObjs);
1190  }
1191  }
1192  else if(IsMarkPoints())
1193  {
1194  if(HasMarkedPoints())
1195  {
1196  aStr = SvxResId(STR_ViewMarkMorePoints);
1197  }
1198  else
1199  {
1200  aStr = SvxResId(STR_ViewMarkPoints);
1201  }
1202  } else if (IsMarkGluePoints())
1203  {
1204  if(HasMarkedGluePoints())
1205  {
1206  aStr = SvxResId(STR_ViewMarkMoreGluePoints);
1207  }
1208  else
1209  {
1210  aStr = SvxResId(STR_ViewMarkGluePoints);
1211  }
1212  }
1213  else if (IsTextEdit() && pTextEditOutlinerView!=nullptr) {
1214  aStr=SvxResId(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
1216  tools::Long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
1217  if (aSel.nEndPara>0) {
1218  for (sal_Int32 nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
1219  nLin+=pTextEditOutliner->GetLineCount(nParaNum);
1220  }
1221  }
1222  // A little imperfection:
1223  // At the end of a line of any multi-line paragraph, we display the
1224  // position of the next line of the same paragraph, if there is one.
1225  sal_uInt16 nParaLine = 0;
1226  sal_uLong nParaLineCount = pTextEditOutliner->GetLineCount(aSel.nEndPara);
1227  bool bBrk = false;
1228  while (!bBrk)
1229  {
1230  sal_uInt16 nLen = pTextEditOutliner->GetLineLen(aSel.nEndPara, nParaLine);
1231  bool bLastLine = (nParaLine == nParaLineCount - 1);
1232  if (nCol>nLen || (!bLastLine && nCol == nLen))
1233  {
1234  nCol -= nLen;
1235  nLin++;
1236  nParaLine++;
1237  }
1238  else
1239  bBrk = true;
1240 
1241  if (nLen == 0)
1242  bBrk = true; // to be sure
1243  }
1244 
1245  aStr = aStr.replaceFirst("%1", OUString::number(nPar + 1));
1246  aStr = aStr.replaceFirst("%2", OUString::number(nLin + 1));
1247  aStr = aStr.replaceFirst("%3", OUString::number(nCol + 1));
1248 
1249 #ifdef DBG_UTIL
1250  aStr += ", Level " + OUString::number( pTextEditOutliner->GetDepth( aSel.nEndPara ) );
1251 #endif
1252  }
1253 
1254  if(aStr == STR_NOTHING)
1255  {
1256  if (AreObjectsMarked()) {
1257  aStr = ImpGetDescriptionString(STR_ViewMarked);
1258  if (IsGluePointEditMode()) {
1259  if (HasMarkedGluePoints()) {
1261  }
1262  } else {
1263  if (HasMarkedPoints()) {
1265  }
1266  }
1267  } else {
1268  aStr.clear();
1269  }
1270  }
1271  else if(!aName.isEmpty())
1272  {
1273  aStr = aStr.replaceFirst("%1", aName);
1274  }
1275 
1276  if(!aStr.isEmpty())
1277  {
1278  // capitalize first letter
1279  aStr = aStr.replaceAt(0, 1, OUString(aStr[0]).toAsciiUpperCase());
1280  }
1281  return aStr;
1282 }
1283 
1285 {
1286  if( IsGluePointEditMode() )
1288 
1289  const size_t nMarkCount = GetMarkedObjectCount();
1290 
1291  if( HasMarkablePoints() && !IsFrameHandles() )
1292  {
1293  bool bPath=true;
1294  for( size_t nMarkNum = 0; nMarkNum < nMarkCount && bPath; ++nMarkNum )
1295  if (dynamic_cast<const SdrPathObj*>(GetMarkedObjectByIndex(nMarkNum)) == nullptr)
1296  bPath=false;
1297 
1298  if( bPath )
1300  }
1301 
1302  if( GetMarkedObjectCount() )
1303  {
1304  bool bGraf = true, bMedia = true, bTable = true;
1305 
1306  for( size_t nMarkNum = 0; nMarkNum < nMarkCount && ( bGraf || bMedia ); ++nMarkNum )
1307  {
1308  const SdrObject* pMarkObj = GetMarkedObjectByIndex( nMarkNum );
1309  DBG_ASSERT( pMarkObj, "SdrView::GetContext(), null pointer in mark list!" );
1310 
1311  if( !pMarkObj )
1312  continue;
1313 
1314  if( dynamic_cast<const SdrGrafObj*>( pMarkObj) == nullptr )
1315  bGraf = false;
1316 
1317  if( dynamic_cast<const SdrMediaObj*>( pMarkObj) == nullptr )
1318  bMedia = false;
1319 
1320  if( dynamic_cast<const sdr::table::SdrTableObj* >( pMarkObj ) == nullptr )
1321  bTable = false;
1322  }
1323 
1324  if( bGraf )
1325  return SdrViewContext::Graphic;
1326  else if( bMedia )
1327  return SdrViewContext::Media;
1328  else if( bTable )
1329  return SdrViewContext::Table;
1330  }
1331 
1332  return SdrViewContext::Standard;
1333 }
1334 
1336 {
1337  if (IsTextEdit()) {
1339  } else if (IsGluePointEditMode()) MarkAllGluePoints();
1340  else if (HasMarkablePoints()) MarkAllPoints();
1341  else MarkAllObj();
1342 }
1343 
1345 {
1346  if (IsTextEdit()) {
1348  eSel.nStartPara=eSel.nEndPara;
1349  eSel.nStartPos=eSel.nEndPos;
1351  } else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
1352  else if (HasMarkedPoints()) UnmarkAllPoints(); // Marked, not Markable!
1353  else UnmarkAllObj();
1354 }
1355 
1357 {
1359  return GetMarkedGluePointsRect();
1360  }
1361  if (HasMarkedPoints()) {
1362  return GetMarkedPointsRect();
1363  }
1364  return GetMarkedObjRect();
1365 }
1366 
1368 {
1369  if (IsTextEdit())
1370  {
1372  }
1373  else
1374  {
1375  if( mxSelectionController.is() && mxSelectionController->DeleteMarked() )
1376  {
1377  // action already performed by current selection controller, do nothing
1378  }
1379  else if (IsGluePointEditMode() && HasMarkedGluePoints())
1380  {
1382  }
1384  {
1386  }
1387  else
1388  {
1389  DeleteMarkedObj();
1390  }
1391  }
1392 }
1393 
1394 bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark)
1395 {
1396  if (bUnmark) bAddMark=true;
1397  if (IsGluePointEditMode()) {
1398  if (!bAddMark) UnmarkAllGluePoints();
1399  return BegMarkGluePoints(rPnt,bUnmark);
1400  } else if (HasMarkablePoints()) {
1401  if (!bAddMark) UnmarkAllPoints();
1402  return BegMarkPoints(rPnt,bUnmark);
1403  } else {
1404  if (!bAddMark) UnmarkAllObj();
1405  BegMarkObj(rPnt,bUnmark);
1406  return true;
1407  }
1408 }
1409 
1411 {
1414 }
1415 
1416 
1419 {
1420 }
1421 
1423 {
1424  if(mbMasterPagePaintCaching == bOn)
1425  return;
1426 
1428 
1429  // reset at all SdrPageWindows
1430  SdrPageView* pPageView = GetSdrPageView();
1431 
1432  if(!pPageView)
1433  return;
1434 
1435  for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++)
1436  {
1437  SdrPageWindow* pPageWindow = pPageView->GetPageWindow(b);
1438  assert(pPageWindow && "SdrView::SetMasterPagePaintCaching: Corrupt SdrPageWindow list (!)");
1439 
1440  // force deletion of ObjectContact, so at re-display all VOCs
1441  // will be re-created with updated flag setting
1442  pPageWindow->ResetObjectContact();
1443  }
1444 
1445  // force redraw of this view
1446  pPageView->InvalidateAllWin();
1447 }
1448 
1449 // Default ObjectContact is ObjectContactOfPageView
1451  SdrPageWindow& rPageWindow,
1452  const char* pDebugName) const
1453 {
1454  return new sdr::contact::ObjectContactOfPageView(rPageWindow, pDebugName);
1455 }
1456 
1457 /* 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:1701
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2327
OutDevType GetOutDevType() const
ConfigurationHints
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1070
bool IsTextEditInSelectionMode() const
Definition: svdedxv.cxx:2342
bool IsMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1817
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:936
PointerStyle GetDraggedHelpLinePointer() const
Definition: svdsnpv.cxx:548
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:857
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:1418
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:1149
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:1311
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:1284
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:1335
sal_uIntPtr sal_uLong
MouseEventModifiers GetMode() const
long Long
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:1021
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr) const
Definition: svdcrtv.cxx:861
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:416
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:2396
NONE
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1610
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:1410
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
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:25
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:208
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:1344
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:172
#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:1356
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:2347
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:2186
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:1394
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
connector object
Definition: svdobjkind.hxx:48
bool DoMouseEvent(const SdrViewEvent &rVEvt)
Definition: svdview.cxx:739
#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:1690
virtual bool HasMacro() const
Definition: svdobj.cxx:1775
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:1422
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:141
tools::Long Top() const
void SetActualWin(const OutputDevice *pWin)
Definition: svdsnpv.hxx:155
constexpr sal_uInt16 KEY_MOD2
bool IsTextTool() const
Definition: svdcrtv.cxx:316
Abstract DrawObject.
Definition: svdobj.hxx:261
bool IsCreateMode() const
Definition: svdmrkv.hxx:230
Point ScreenToOutputPixel(const Point &rPos) const
bool MarkNextObj(bool bPrev=false)
Definition: svdmrkv.cxx:1712
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:1450
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:1148
virtual bool IsAction() const override
Definition: svdcrtv.cxx:202
void SetAngleSnapEnabled(bool bOn)
Definition: svdsnpv.hxx:222
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 &)
SdrObjKind nCurrentIdent
Definition: svdcrtv.hxx:53
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:1790
#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:2416
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:246
bool IsLeft() const
virtual PointerStyle GetCreatePointer() const
get the cursor/pointer that signals creating this object
Definition: svdobj.cxx:1371
bool IsSetPageOrg() const
Definition: svdsnpv.hxx:191
bool BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView *pPV)
Definition: svdsnpv.cxx:509
virtual void DeleteMarked()
Definition: svdview.cxx:1367
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:1698
constexpr sal_uInt16 KEY_DELETE
sal_uInt16 nTol
Definition: svdobj.hxx:143
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:142
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:1965