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