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