LibreOffice Module sw (master)  1
drawbase.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 <hintids.hxx>
21 #include <comphelper/lok.hxx>
22 #include <svx/svdview.hxx>
23 #include <svx/svdobj.hxx>
24 #include <svl/ptitem.hxx>
25 #include <editeng/sizeitem.hxx>
26 #include <sfx2/request.hxx>
27 #include <sfx2/bindings.hxx>
28 #include <sfx2/viewfrm.hxx>
29 #include <fmtclds.hxx>
30 #include <frmfmt.hxx>
31 #include <cmdid.h>
32 #include <view.hxx>
33 #include <wrtsh.hxx>
34 #include <drawbase.hxx>
35 #include <edtwin.hxx>
36 #include <swmodule.hxx>
37 #include <swundo.hxx>
38 #include <SwCapObjType.hxx>
39 #include <SwRewriter.hxx>
40 #include <strings.hrc>
41 
42 using namespace ::com::sun::star;
43 
44 SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwView) :
45  m_pView(pSwView),
46  m_pSh(pSwWrtShell),
47  m_pWin(pWindow),
48  m_nSlotId(USHRT_MAX),
49  m_bCreateObj(true),
50  m_bInsForm(false)
51 {
52  if ( !m_pSh->HasDrawView() )
54 }
55 
57 {
58  if (m_pView->GetWrtShellPtr()) // In the view-dtor could the wrtsh already been deleted...
60 }
61 
63 {
64  bool bReturn = false;
65 
66  SdrView *pSdrView = m_pSh->GetDrawView();
67 
68  // #i33136#
69  pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
70  pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
71 
72  if (rMEvt.IsMod2())
73  {
74  pSdrView->SetCreate1stPointAsCenter(true);
75  pSdrView->SetResizeAtCenter(true);
76  }
77  else
78  {
79  pSdrView->SetCreate1stPointAsCenter(false);
80  pSdrView->SetResizeAtCenter(false);
81  }
82 
83  SdrViewEvent aVEvt;
84  SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
85 
86  // Only new object, if not in the basic mode (or pure selection mode).
87  if (rMEvt.IsLeft() && !m_pWin->IsDrawAction())
88  {
89  if (IsCreateObj() && (eHit == SdrHitKind::UnmarkedObject || eHit == SdrHitKind::NONE || m_pSh->IsDrawCreate()))
90  {
91  g_bNoInterrupt = true;
93 
95 
96  bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
97 
99 
100  if ( bReturn )
101  m_pWin->SetDrawAction(true);
102  }
103  else if (!pSdrView->IsAction())
104  {
105  // BEZIER-EDITOR
106  m_pWin->CaptureMouse();
108  sal_uInt16 nEditMode = m_pWin->GetBezierMode();
109 
110  if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == SdrHdlKind::BezierWeight)
111  {
112  // Drag handle
113  g_bNoInterrupt = true;
114  bReturn = pSdrView->BegDragObj(m_aStartPos, nullptr, aVEvt.pHdl);
115  m_pWin->SetDrawAction(true);
116  }
117  else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT)
118  {
119  // Insert gluepoint
120  g_bNoInterrupt = true;
121  bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
122  m_pWin->SetDrawAction(true);
123  }
124  else if (eHit == SdrHitKind::MarkedObject && rMEvt.IsMod1())
125  {
126  // Select gluepoint
127  if (!rMEvt.IsShift())
128  pSdrView->UnmarkAllPoints();
129 
130  bReturn = pSdrView->BegMarkPoints(m_aStartPos);
131  m_pWin->SetDrawAction(true);
132  }
133  else if (eHit == SdrHitKind::MarkedObject && !rMEvt.IsShift() && !rMEvt.IsMod2())
134  {
135  // Move object
136  return false;
137  }
138  else if (eHit == SdrHitKind::Handle)
139  {
140  // Select gluepoint
141  if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()))
142  {
143  SdrHdl* pHdl = nullptr;
144 
145  if (!rMEvt.IsShift())
146  {
147  pSdrView->UnmarkAllPoints();
148  pHdl = pSdrView->PickHandle(m_aStartPos);
149  }
150  else
151  {
152  if (pSdrView->IsPointMarked(*aVEvt.pHdl))
153  {
154  bReturn = pSdrView->UnmarkPoint(*aVEvt.pHdl);
155  pHdl = nullptr;
156  }
157  else
158  {
159  pHdl = pSdrView->PickHandle(m_aStartPos);
160  }
161  }
162 
163  if (pHdl)
164  {
165  g_bNoInterrupt = true;
166  pSdrView->MarkPoint(*pHdl);
167  }
168  }
169  }
170  else
171  {
172  // Select or drag object
173  if (m_pSh->IsObjSelectable(m_aStartPos) && eHit == SdrHitKind::UnmarkedObject)
174  {
175  if (pSdrView->HasMarkablePoints())
176  pSdrView->UnmarkAllPoints();
177 
178  g_bNoInterrupt = false;
179  // Use drag in edtwin
180  return false;
181  }
182 
183  g_bNoInterrupt = true;
184 
185  if (m_pSh->IsObjSelected())
186  {
187  if (!rMEvt.IsShift())
188  {
189  if (!pSdrView->HasMarkablePoints())
190  {
191  bool bUnlockView = !m_pSh->IsViewLocked();
192  m_pSh->LockView( true ); //lock visible section
193  m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
194  if( bUnlockView )
195  m_pSh->LockView( false );
196  }
197  else
198  pSdrView->UnmarkAllPoints();
199  }
200  }
201  if (!m_pSh->IsSelFrameMode())
203 
204  bReturn = m_pSh->BeginMark(m_aStartPos);
205  if( bReturn )
206  m_pWin->SetDrawAction(true);
207 
208  SetDrawPointer();
209  }
210  }
211  }
212  return bReturn;
213 }
214 
216 {
217  SdrView *pSdrView = m_pSh->GetDrawView();
218  Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
219  bool bRet = false;
220 
221  if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
222  {
223  // #i33136#
224  pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
225  pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
226 
227  m_pSh->MoveCreate(aPnt);
228  bRet = true;
229  }
230  else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints())
231  {
232  m_pSh->MoveMark(aPnt);
233  bRet = true;
234  }
235 
236  return bRet;
237 }
238 
240 {
241  bool bReturn = false;
242  bool bCheckShell = false;
243  bool bAutoCap = false;
244 
245  Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
246 
248  {
249  const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
250  //objects with multiple point may end at the start position
251  bool bMultiPoint = OBJ_PLIN == nDrawMode ||
252  OBJ_POLY == nDrawMode ||
253  OBJ_PATHLINE == nDrawMode ||
254  OBJ_PATHFILL == nDrawMode ||
255  OBJ_FREELINE == nDrawMode ||
256  OBJ_FREEFILL == nDrawMode;
257  if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
258  {
259  m_pSh->BreakCreate();
261  }
262  else
263  {
264  if (OBJ_NONE == nDrawMode)
265  {
266  SwRewriter aRewriter;
267 
268  aRewriter.AddRule(UndoArg1, SwResId(STR_FRAME));
269  m_pSh->StartUndo(SwUndoId::INSERT, &aRewriter);
270  }
271 
272  m_pSh->EndCreate(SdrCreateCmd::ForceEnd);
273  if (OBJ_NONE == nDrawMode) // Text border inserted
274  {
275  uno::Reference< frame::XDispatchRecorder > xRecorder =
277  if ( xRecorder.is() )
278  {
281  static_cast<sal_uInt16>(RndStdIds::FLY_AT_PARA) ));
282  aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
283  aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
284  aReq.Done();
285  }
286  bAutoCap = true;
287  if(m_pWin->GetFrameColCount() > 1)
288  {
290  SwFormatCol aCol(aSet.Get(RES_COL));
291  aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
292  aSet.Put(aCol);
293  // Template AutoUpdate
295  if(pFormat && pFormat->IsAutoUpdateFormat())
296  m_pSh->AutoUpdateFrame(pFormat, aSet);
297  else
298  m_pSh->SetFlyFrameAttr( aSet );
299  }
300  }
301  if (m_pWin->GetSdrDrawMode() == OBJ_NONE)
302  {
303  m_pSh->EndUndo();
304  }
305  }
306 
307  bReturn = true;
308 
309  EnterSelectMode(rMEvt);
310  }
311  else
312  {
313  SdrView *pSdrView = m_pSh->GetDrawView();
314 
315  if (!pSdrView->HasMarkablePoints())
316  {
317  // NO BEZIER_EDITOR
319  && rMEvt.IsLeft())
320  {
321  bReturn = m_pSh->EndMark();
322 
323  m_pWin->SetDrawAction(false);
324 
325  if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt))
326  {
327  m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() &&
329 
330  if (!m_pSh->IsObjSelected())
331  {
332  m_pView->LeaveDrawCreate(); // Switch to selection mode
333 
334  m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
335 
336  if (m_pSh->IsSelFrameMode())
338  }
339  m_pView->NoRotate();
340 
341  bCheckShell = true; // if necessary turn on BezierShell
342  }
343  else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
344  {
345  if (m_pSh->IsObjSelectable(aPnt))
346  m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() &&
347  m_pSh->IsSelFrameMode() ) ? SW_ADD_SELECT : 0 );
348  else
349  {
351  if (m_pSh->IsSelFrameMode())
353  }
354  m_pView->NoRotate();
355 
356  bReturn = true;
357  }
358  }
359  }
360  else
361  {
362  // BEZIER_EDITOR
363  if ( pSdrView->IsAction() )
364  {
365  if ( pSdrView->IsInsObjPoint() )
366  bReturn = pSdrView->EndInsObjPoint(SdrCreateCmd::ForceEnd);
367  else if (pSdrView->IsMarkPoints() )
368  bReturn = pSdrView->EndMarkPoints();
369  else
370  {
371  pSdrView->EndAction();
372  bReturn = true;
373  }
374  m_pWin->SetDrawAction(false);
375 
376  if (aPnt == m_aStartPos)
377  {
378  if (!m_pSh->IsObjSelectable(aPnt))
380  else if (!bReturn)
381  {
382  if (!rMEvt.IsShift())
383  pSdrView->UnmarkAllPoints();
384  m_pSh->SelectObj(aPnt, (rMEvt.IsShift() &&
386  }
387 
388  if (!m_pSh->IsObjSelected())
389  {
390  m_pView->LeaveDrawCreate(); // Switch to selection mode
391 
392  m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
393 
394  if (m_pSh->IsSelFrameMode())
396  }
397  m_pView->NoRotate();
398 
399  bCheckShell = true; // if necessary turn on BezierShell
400  }
401  }
402 
403  SetDrawPointer();
404 
405  if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
406  {
408  if (m_pSh->IsSelFrameMode())
410 
411  m_pView->NoRotate();
412  bReturn = true;
413  }
414  }
415  }
416 
417  if (bCheckShell)
418  m_pView->AttrChangedNotify(nullptr); // if necessary turn on BezierShell
419 
421  if ( bAutoCap )
422  m_pView->AutoCaption(FRAME_CAP); //Can currently only be FRAME, otherwise convert
423  // to enums
424  return bReturn;
425 }
426 
427 void SwDrawBase::Activate(const sal_uInt16 nSlot)
428 {
429  SetSlotId(nSlot);
430  SdrView *pSdrView = m_pSh->GetDrawView();
431 
432  pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) );
433  pSdrView->SetEditMode(false);
434 
435  SetDrawPointer();
436  m_pSh->NoEdit();
437 }
438 
440 {
441  SdrView *pSdrView = m_pSh->GetDrawView();
442  pSdrView->SetOrtho(false);
443  pSdrView->SetAngleSnapEnabled(false);
444 
445  if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate())
446  m_pSh->BreakCreate();
447 
448  m_pWin->SetDrawAction(false);
449 
450  if (m_pWin->IsMouseCaptured())
451  m_pWin->ReleaseMouse();
452  g_bNoInterrupt = false;
453 
454  if (m_pWin->GetApplyTemplate())
456  m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
457 }
458 
459 // Process keyboard events
460 
461 // If a KeyEvent is processed then the return value is true, otherwise
462 // false.
463 
465 {
466  m_pSh->BreakCreate();
467  m_pWin->SetDrawAction(false);
468  m_pWin->ReleaseMouse();
469 
470  Deactivate();
471 }
472 
474 {
475  SdrView *pSdrView = m_pSh->GetDrawView();
478  PointerStyle aPointTyp = pSdrView->GetPreferredPointer(aPnt, m_pSh->GetOut());
479  m_pWin->SetPointer(aPointTyp);
480 }
481 
482 // If necessary switch into selection mode
483 
485 {
486  m_pWin->SetDrawAction(false);
487 
488  if (m_pSh->IsObjSelected() || m_pWin->IsDrawAction())
489  return;
490 
491  Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
492 
493  if (m_pSh->IsObjSelectable(aPnt))
494  {
495  m_pSh->SelectObj(aPnt);
496  if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected())
497  {
498  m_pView->LeaveDrawCreate(); // Switch to selection mode
499 
500  m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
501  }
502  }
503  else
504  {
506  if (m_pSh->IsSelFrameMode())
508  }
509  m_pView->NoRotate();
510 }
511 
513 {
514  Point aStartPos = GetDefaultCenterPos();
515  Point aEndPos(aStartPos);
516  aStartPos.AdjustX( -(6 * MM50) );
517  aStartPos.AdjustY( -(6 * MM50) );
518  aEndPos.AdjustX(6 * MM50 );
519  aEndPos.AdjustY(6 * MM50 );
520  tools::Rectangle aRect(aStartPos, aEndPos);
521  m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
522 }
523 
525 {
526  Size aDocSz(m_pSh->GetDocSize());
527 
528  SwRect aVisArea(m_pSh->VisArea());
530  {
531  aVisArea = m_pSh->getLOKVisibleArea();
532  aVisArea.Intersection(SwRect(Point(), aDocSz));
533  }
534 
535  Point aCenter = aVisArea.Center();
536  if (aVisArea.Width() > aDocSz.Width())
537  aCenter.setX(aDocSz.Width() / 2 + aVisArea.Left());
538  if (aVisArea.Height() > aDocSz.Height())
539  aCenter.setY(aDocSz.Height() / 2 + aVisArea.Top());
540 
541  return aCenter;
542 }
543 
544 // #i33136#
546 {
547  return ( m_nSlotId == SID_DRAW_XPOLYGON || m_nSlotId == SID_DRAW_XPOLYGON_NOFILL || m_nSlotId == SID_DRAW_XLINE );
548 }
549 
550 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:338
SfxViewFrame * GetViewFrame() const
bool UnmarkPoint(SdrHdl &rHdl)
void CaptureMouse()
Point GetPointerPosPixel()
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr)
PointerStyle GetPreferredPointer(const Point &rMousePos, const OutputDevice *pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const
SdrView * GetDrawView()
Definition: vnew.cxx:375
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
Definition: viewdlg2.cxx:179
tools::Rectangle & Intersection(const tools::Rectangle &rRect)
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
Point GetDefaultCenterPos() const
Definition: drawbase.cxx:524
Size GetObjSize() const
Definition: feshview.cxx:2293
bool IsDrawSelMode() const
Definition: edtwin.cxx:5314
sal_uInt16 m_nSlotId
Definition: drawbase.hxx:39
bool IsInsObjPoint() const
void CreateDefaultShape(sal_uInt16 eSdrObjectKind, const tools::Rectangle &rRect, sal_uInt16 nSlotId)
Definition: feshview.cxx:2941
bool IsShift() const
bool HasDrawView() const
Definition: vnew.cxx:360
void EnterSelectMode(const MouseEvent &rMEvt)
Definition: drawbase.cxx:484
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
SwWrtShell * m_pSh
Definition: drawbase.hxx:36
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
OBJ_POLY
void Invalidate(sal_uInt16 nId)
OBJ_FREEFILL
bool EndMark()
Definition: feshview.cxx:2175
void SetApplyTemplate(const SwApplyTemplate &)
Apply template.
Definition: edtwin.cxx:5102
OBJ_PLIN
sal_uInt16 GetBezierMode() const
Definition: edtwin.hxx:218
void NoEdit(bool bHideCursor=true)
Definition: wrtsh1.cxx:146
virtual bool MouseButtonUp(const MouseEvent &rMEvt)
Definition: drawbase.cxx:239
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
void BreakCreate()
Definition: drawbase.cxx:464
const SwView & GetView() const
Definition: wrtsh.hxx:428
void SetDrawPointer()
Definition: drawbase.cxx:473
virtual ~SwDrawBase()
Definition: drawbase.cxx:56
void SetResizeAtCenter(bool bOn)
Point GetAnchorObjDiff() const
Methods for status line.
Definition: feshview.cxx:2306
OBJ_PATHLINE
void SetEditMode(SdrViewEditMode eMode)
Point m_aStartPos
Definition: drawbase.hxx:38
virtual void Activate(const sal_uInt16 nSlotId)
Definition: drawbase.cxx:427
virtual void Deactivate()
Definition: drawbase.cxx:439
VclPtr< SwEditWin > m_pWin
Definition: drawbase.hxx:37
SfxItemPool & GetPool() const
sal_uInt16 GetFrameColCount() const
Definition: edtwin.hxx:223
SdrHitKind
Style of a layout element.
Definition: frmfmt.hxx:57
void NoRotate()
Definition: viewdraw.cxx:430
SwApplyTemplate * GetApplyTemplate() const
Definition: edtwin.hxx:232
const SwRect & VisArea() const
Definition: viewsh.cxx:560
virtual void CreateDefaultObject()
Definition: drawbase.cxx:512
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
bool IsMarkObj() const
bool IsMod2() const
OBJ_NONE
SfxBindings & GetBindings()
Size GetDocSize() const
Definition: viewsh.cxx:2100
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1081
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
SdrHdl * PickHandle(const Point &rPnt) const
SwDrawBase(SwWrtShell *pSh, SwEditWin *pWin, SwView *pView)
Definition: drawbase.cxx:44
virtual bool MouseButtonDown(const MouseEvent &rMEvt)
Definition: drawbase.cxx:62
bool IsMouseCaptured() const
#define SW_ADD_SELECT
Definition: fesh.hxx:165
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
void BreakCreate()
Definition: feshview.cxx:2124
bool IsAutoUpdateFormat() const
Query / set bAutoUpdateFormat-flag.
Definition: format.hxx:168
void MoveMark(const Point &rPos)
Definition: feshview.cxx:2157
sal_uInt16 GetModifier() const
void LeaveDrawCreate()
Definition: view.hxx:523
Point ScreenToOutputPixel(const Point &rPos) const
const long LONG_MAX
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1191
SdrObjKind GetSdrDrawMode() const
Definition: edtwin.hxx:213
bool IsCreateObj() const
Point PixelToLogic(const Point &rDevicePt) const
void ReleaseMouse()
virtual bool IsAction() const override
void SetAngleSnapEnabled(bool bOn)
OBJ_FREELINE
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
Definition: viewsh.hxx:252
void SetPointer(PointerStyle)
#define FN_INSERT_FRAME
Definition: cmdid.h:217
void MoveCreate(const Point &rPos)
Definition: feshview.cxx:1721
bool IsMarkPoints() const
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:399
bool UnmarkAllPoints()
void SetSlotId(sal_uInt16 nSlot)
Definition: drawbase.hxx:59
void MakeDrawView()
Definition: vnew.cxx:365
#define MM50
Definition: swtypes.hxx:59
SdrObjKind
void SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent=SdrInventor::Default)
void LockView(bool b)
Definition: viewsh.hxx:462
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
SwView * m_pView
Definition: drawbase.hxx:35
void SetOrtho(bool bOn)
bool IsLeft() const
virtual bool doConstructOrthogonal() const
Definition: drawbase.cxx:545
size_t IsObjSelected() const
Definition: feshview.cxx:1149
bool IsPointMarked(const SdrHdl &rHdl) const
bool EndMarkPoints()
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position)...
Definition: feshview.cxx:176
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1626
const Point & GetPosPixel() const
bool BeginCreate(sal_uInt16 eSdrObjectKind, const Point &rPos)
Process of creating draw objects.
Definition: feshview.cxx:1679
PointerStyle
SdrHdl * pHdl
void LeaveSelFrameMode()
Definition: select.cxx:719
bool IsCreateObj() const
Definition: drawbase.hxx:51
void SetDrawAction(bool bFlag)
Definition: edtwin.hxx:208
bool BegInsObjPoint(const Point &rPnt, bool bNewObj)
bool BeginMark(const Point &rPos)
Functions for Rubberbox, ti select Draw-Objects.
Definition: feshview.cxx:2136
bool g_bNoInterrupt
Definition: swmodule.cxx:114
void AppendItem(const SfxPoolItem &)
bool IsRight() const
bool MouseMove(const MouseEvent &rMEvt)
Definition: drawbase.cxx:215
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:701
Point OutputToScreenPixel(const Point &rPos) const
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
Definition: feshview.cxx:1282
bool IsDrawAction() const
Definition: edtwin.hxx:207
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
constexpr sal_uInt16 KEY_SHIFT
void SetCreate1stPointAsCenter(bool bOn)
void Init(sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct)
This function allows to (repeatedly) initialize the columns.
Definition: atrfrm.cxx:984
bool IsDrawCreate() const
Definition: feshview.cxx:2131
bool EndInsObjPoint(SdrCreateCmd eCmd)
OBJ_PATHFILL
bool IsViewLocked() const
Definition: viewsh.hxx:461
Definition: view.hxx:144
bool IsSelFrameMode() const
Definition: wrtsh.hxx:170
SdrHdlKind GetKind() const
virtual void EndAction() override
virtual bool HasMarkablePoints() const
bool IsMod1() const
bool EndCreate(SdrCreateCmd eSdrCreateCmd)
Definition: feshview.cxx:1732