LibreOffice Module sw (master)  1
edtdd.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 
22 #include <svx/svdview.hxx>
23 #include <editeng/outliner.hxx>
24 #include <svx/svdobj.hxx>
25 #include <sot/exchange.hxx>
26 #include <sot/formats.hxx>
27 #include <sfx2/bindings.hxx>
28 #include <vcl/commandevent.hxx>
29 
30 #include <sfx2/viewfrm.hxx>
31 #include <fmturl.hxx>
32 #include <frmfmt.hxx>
33 #include <wrtsh.hxx>
34 #include <edtdd.hxx>
35 #include <edtwin.hxx>
36 #include <view.hxx>
37 #include <viewopt.hxx>
38 #include <swdtflvr.hxx>
39 #include <swmodule.hxx>
40 #include <docsh.hxx>
41 #include <wdocsh.hxx>
42 #include <swundo.hxx>
43 
44 using namespace ::com::sun::star;
45 
46 // no include "dbgoutsw.hxx" here!!!!!!
47 
48 bool g_bExecuteDrag = false;
49 
51 {
52  m_aTimer.SetInvokeHandler(LINK(this, SwEditWin, DDHandler));
53  m_aTimer.SetTimeout(480);
54  m_aTimer.Start();
55  g_bDDTimerStarted = true;
56 }
57 
58 void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt)
59 {
60  m_aTimer.Stop();
61  g_bDDTimerStarted = false;
62  if(!pSh->IsSelFrameMode())
63  pSh->CallSetCursor(&rPt, false);
64  m_aTimer.SetInvokeHandler(LINK(this,SwEditWin, TimerHandler));
65 }
66 
67 void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
68 {
70  return;
71 
73  if( rSh.GetDrawView() )
74  {
75  CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true );
76  if( rSh.GetDrawView()->Command( aDragEvent, this ) )
77  {
79  return; // Event evaluated by SdrView
80  }
81  }
82 
83  if ( !m_pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
84  {
85  bool bStart = false, bDelSelect = false;
86  SdrObject *pObj = nullptr;
87  Point aDocPos( PixelToLogic( rPosPixel ) );
88  if ( !rSh.IsInSelect() && rSh.TestCurrPam( aDocPos, true))
89  //We are not selecting and aren't at a selection
90  bStart = true;
91  else if ( !g_bFrameDrag && rSh.IsSelFrameMode() &&
92  rSh.IsInsideSelectedObj( aDocPos ) &&
93  nullptr == m_pAnchorMarker)
94  {
95  //We are not dragging internally and are not at an
96  //object (frame, draw object)
97 
98  // #i106131# *and* AnchorDrag is *not* active: When active,
99  // entering global drag mode will destroy the AnchorHdl but
100  // keep the now invalid ptr in place, next access will crash.
101  // It is indeed wrong to enter drag mode when AnchorDrag is
102  // already active
103  bStart = true;
104  }
105  else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() &&
106  OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj ))
107  {
108  rSh.LockPaint();
109  if( rSh.SelectObj( aDocPos, 0, pObj ))
110  bStart = bDelSelect = true;
111  else
112  rSh.UnlockPaint();
113  }
114  else
115  {
116  SwContentAtPos aSwContentAtPos( IsAttrAtPos::InetAttr );
117  bStart = rSh.GetContentAtPos( aDocPos,
118  aSwContentAtPos );
119  }
120 
121  if ( bStart && !m_bIsInDrag )
122  {
123  m_bMBPressed = false;
124  ReleaseMouse();
125  g_bFrameDrag = false;
126  g_bExecuteDrag = true;
127  SwEditWin::m_nDDStartPosY = aDocPos.Y();
128  SwEditWin::m_nDDStartPosX = aDocPos.X();
129  m_aMovePos = aDocPos;
131  if( bDelSelect )
132  {
133  rSh.UnSelectFrame();
134  rSh.UnlockPaint();
135  }
136  }
137  }
138 }
139 
141 {
142  if( !g_bExecuteDrag || m_bIsInDrag )
143  return;
144 
145  m_bIsInDrag = true;
146 
148 
149  pTransfer->StartDrag( this, m_aMovePos );
150 }
151 
153 {
154  DropCleanup();
155  m_aTimer.SetInvokeHandler( LINK(this,SwEditWin, TimerHandler) );
156  m_bIsInDrag = false;
157 }
158 
160 {
161  SwWrtShell &rSh = m_rView.GetWrtShell();
162 
163  // reset statuses
164  g_bNoInterrupt = false;
165  if ( m_bOldIdleSet )
166  {
168  m_bOldIdleSet = false;
169  }
170  if ( m_pUserMarker )
172  else
173  rSh.UnSetVisibleCursor();
174 
175 }
176 
178 {
179  if ( m_pUserMarker )
180  {
181  m_pUserMarker.reset();
182  m_pUserMarkerObj = nullptr;
183  }
184 }
185 
186 //exhibition hack (MA,MBA)
188 {
189  if ( !GetCurShell() )
190  SelectShell();
191 }
192 
194 {
196  DropCleanup();
197  sal_Int8 nRet = DND_ACTION_NONE;
198 
199  //A Drop to an open OutlinerView doesn't concern us (also see QueryDrop)
200  SwWrtShell &rSh = m_rView.GetWrtShell();
201  const Point aDocPt( PixelToLogic( rEvt.maPosPixel ));
202  SdrObject *pObj = nullptr;
203  OutlinerView* pOLV;
204  rSh.GetObjCntType( aDocPt, pObj );
205 
206  if( pObj && nullptr != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() ))
207  {
208  tools::Rectangle aRect( pOLV->GetOutputArea() );
209  aRect.Union( pObj->GetLogicRect() );
210  const Point aPos = pOLV->GetWindow()->PixelToLogic(rEvt.maPosPixel);
211  if ( aRect.IsInside(aPos) )
212  {
213  rSh.StartAllAction();
214  rSh.EndAllAction();
215  return nRet;
216  }
217  }
218 
219  // There's a special treatment for file lists with a single
220  // element, that depends on the actual content of the
221  // Transferable to be accessible. Since the transferable
222  // may only be accessed after the drop has been accepted
223  // (according to KA due to Java D&D), we'll have to
224  // reevaluate the drop action once more _with_ the
225  // Transferable.
226  sal_uInt8 nEventAction;
227  sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
228  : rEvt.mnAction;
229  SotExchangeActionFlags nActionFlags;
233  rEvt.mnAction,
234  nUserOpt, m_nDropFormat, nEventAction, SotClipboardFormatId::NONE,
235  &rEvt.maDropEvent.Transferable,
236  &nActionFlags );
237 
238  TransferableDataHelper aData( rEvt.maDropEvent.Transferable );
239  nRet = rEvt.mnAction;
240  if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, nActionFlags, m_nDropFormat,
241  m_nDropDestination, false, rEvt.mbDefault, &aDocPt, nRet))
242  nRet = DND_ACTION_NONE;
243  else if ( SW_MOD()->m_pDragDrop )
244  //Don't clean up anymore at internal D&D!
245  SW_MOD()->m_pDragDrop->SetCleanUp( false );
246 
247  return nRet;
248 }
249 
251 {
252  SwWrtShell &rSh = m_rView.GetWrtShell();
253  const Point aDocPt( PixelToLogic( rPixPnt ) );
254  if( rSh.TestCurrPam( aDocPt )
255  || rSh.IsOverReadOnlyPos( aDocPt )
256  || rSh.DocPtInsideInputField( aDocPt ) )
257  return SotExchangeDest::NONE;
258 
259  SdrObject *pObj = nullptr;
260  const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
261 
262  //Drop to OutlinerView (TextEdit in Drawing) should decide it on its own!
263  if( pObj )
264  {
266  if ( pOLV )
267  {
268  tools::Rectangle aRect( pOLV->GetOutputArea() );
269  aRect.Union( pObj->GetLogicRect() );
270  const Point aPos = pOLV->GetWindow()->PixelToLogic( rPixPnt );
271  if( aRect.IsInside( aPos ) )
272  return SotExchangeDest::NONE;
273  }
274  }
275 
276  //What do we want to drop on now?
277  SotExchangeDest nDropDestination = SotExchangeDest::NONE;
278 
279  //Did anything else arrive from the DrawingEngine?
280  if( OBJCNT_NONE != eType )
281  {
282  switch ( eType )
283  {
284  case OBJCNT_GRF:
285  {
286  bool bLink,
287  bIMap = nullptr != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap();
288  OUString aDummy;
289  rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
290  if ( bLink && bIMap )
291  nDropDestination = SotExchangeDest::DOC_LNKD_GRAPH_W_IMAP;
292  else if ( bLink )
293  nDropDestination = SotExchangeDest::DOC_LNKD_GRAPHOBJ;
294  else if ( bIMap )
295  nDropDestination = SotExchangeDest::DOC_GRAPH_W_IMAP;
296  else
297  nDropDestination = SotExchangeDest::DOC_GRAPHOBJ;
298  }
299  break;
300  case OBJCNT_FLY:
301  if( dynamic_cast< const SwWebDocShell *>( rSh.GetView().GetDocShell() ) != nullptr )
302  nDropDestination = SotExchangeDest::DOC_TEXTFRAME_WEB;
303  else
304  nDropDestination = SotExchangeDest::DOC_TEXTFRAME;
305  break;
306  case OBJCNT_OLE: nDropDestination = SotExchangeDest::DOC_OLEOBJ; break;
307  case OBJCNT_CONTROL: /* no Action avail */
308  case OBJCNT_SIMPLE: nDropDestination = SotExchangeDest::DOC_DRAWOBJ; break;
309  case OBJCNT_URLBUTTON: nDropDestination = SotExchangeDest::DOC_URLBUTTON; break;
310  case OBJCNT_GROUPOBJ: nDropDestination = SotExchangeDest::DOC_GROUPOBJ; break;
311 
312  default: OSL_ENSURE( false, "new ObjectType?" );
313  }
314  }
315  if ( !bool(nDropDestination) )
316  {
317  if( dynamic_cast< const SwWebDocShell *>( rSh.GetView().GetDocShell() ) != nullptr )
318  nDropDestination = SotExchangeDest::SWDOC_FREE_AREA_WEB;
319  else
320  nDropDestination = SotExchangeDest::SWDOC_FREE_AREA;
321  }
322  if( ppObj )
323  *ppObj = pObj;
324  return nDropDestination;
325 }
326 
328 {
329  if( rEvt.mbLeaving )
330  {
331  DropCleanup();
332  return rEvt.mnAction;
333  }
334 
335  if( m_rView.GetDocShell()->IsReadOnly() )
336  return DND_ACTION_NONE;
337 
338  SwWrtShell &rSh = m_rView.GetWrtShell();
339 
340  Point aPixPt( rEvt.maPosPixel );
341 
342  // If the cursor is near the inner boundary
343  // we attempt to scroll towards the desired direction.
345  const int nMargin = 10;
346  aWin.AdjustLeft(nMargin );
347  aWin.AdjustTop(nMargin );
348  aWin.AdjustRight( -nMargin );
349  aWin.AdjustBottom( -nMargin );
350  if(!aWin.IsInside(aPixPt)) {
351  static sal_uInt64 last_tick = 0;
352  sal_uInt64 current_tick = tools::Time::GetSystemTicks();
353  if((current_tick-last_tick) > 500) {
354  last_tick = current_tick;
355  if(!m_bOldIdleSet) {
356  m_bOldIdle = rSh.GetViewOptions()->IsIdle();
357  rSh.GetViewOptions()->SetIdle(false);
358  m_bOldIdleSet = true;
359  }
361  if(aPixPt.X() > aWin.Right()) aPixPt.AdjustX(nMargin );
362  if(aPixPt.X() < aWin.Left()) aPixPt.AdjustX( -nMargin );
363  if(aPixPt.Y() > aWin.Bottom()) aPixPt.AdjustY(nMargin );
364  if(aPixPt.Y() < aWin.Top()) aPixPt.AdjustY( -nMargin );
365  Point aDocPt(PixelToLogic(aPixPt));
366  SwRect rect(aDocPt,Size(1,1));
367  rSh.MakeVisible(rect);
368  }
369  }
370 
371  if(m_bOldIdleSet) {
373  m_bOldIdleSet = false;
374  }
375 
376  SdrObject *pObj = nullptr;
377  m_nDropDestination = GetDropDestination( aPixPt, &pObj );
378  if( !bool(m_nDropDestination) )
379  return DND_ACTION_NONE;
380 
381  sal_uInt8 nEventAction;
382  sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
383  : rEvt.mnAction;
384 
388  rEvt.mnAction,
389  nUserOpt, m_nDropFormat, nEventAction );
390 
392  {
393  const Point aDocPt( PixelToLogic( aPixPt ) );
394 
395  //With the default action we still want to have a say.
396  SwModule *pMod = SW_MOD();
397  if( pMod->m_pDragDrop )
398  {
399  bool bCleanup = false;
400  //Drawing objects in Headers/Footers are not allowed
401 
402  SwWrtShell *pSrcSh = pMod->m_pDragDrop->GetShell();
403  if( (pSrcSh->GetSelFrameType() == FrameTypeFlags::DRAWOBJ) &&
404  pSrcSh->IsSelContainsControl() &&
405  (rSh.GetFrameType( &aDocPt, false ) & (FrameTypeFlags::HEADER|FrameTypeFlags::FOOTER)) )
406  {
407  bCleanup = true;
408  }
409  // don't more position protected objects!
410  else if( DND_ACTION_MOVE == rEvt.mnAction &&
412  {
413  bCleanup = true;
414  }
415  else if( rEvt.mbDefault )
416  {
417  // internal Drag&Drop: within same Doc a Move
418  // otherwise a Copy - Task 54974
419  nEventAction = pSrcSh->GetDoc() == rSh.GetDoc()
421  : DND_ACTION_COPY;
422  }
423  if ( bCleanup )
424  {
426  rSh.UnSetVisibleCursor();
427  return DND_ACTION_NONE;
428  }
429  }
430  else
431  {
432  //D&D from outside of SW should be a Copy per default.
433  if( EXCHG_IN_ACTION_DEFAULT == nEventAction &&
434  DND_ACTION_MOVE == rEvt.mnAction )
435  nEventAction = DND_ACTION_COPY;
436 
437  if( (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE == m_nDropFormat &&
439  SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == m_nDropFormat )
440  {
441  SdrMarkView* pMView = rSh.GetDrawView();
442  if( pMView && !pMView->IsDesignMode() )
443  return DND_ACTION_NONE;
444  }
445  }
446 
447  if ( EXCHG_IN_ACTION_DEFAULT != nEventAction )
448  nUserOpt = static_cast<sal_Int8>(nEventAction);
449 
450  // show DropCursor or UserMarker ?
451  if( SotExchangeDest::SWDOC_FREE_AREA_WEB == m_nDropDestination ||
452  SotExchangeDest::SWDOC_FREE_AREA == m_nDropDestination )
453  {
456  if(rSh.GetContentAtPos(aDocPt, aCont))
457  rSh.SwCursorShell::SetVisibleCursor( aDocPt );
458  }
459  else
460  {
461  rSh.UnSetVisibleCursor();
462 
463  if ( m_pUserMarkerObj != pObj )
464  {
466  m_pUserMarkerObj = pObj;
467 
468  if(m_pUserMarkerObj)
469  {
471  }
472  }
473  }
474  return nUserOpt;
475  }
476 
478  rSh.UnSetVisibleCursor();
479  return DND_ACTION_NONE;
480 }
481 
482 IMPL_LINK_NOARG(SwEditWin, DDHandler, Timer *, void)
483 {
484  g_bDDTimerStarted = false;
485  m_aTimer.Stop();
486  m_aTimer.SetTimeout(240);
487  m_bMBPressed = false;
488  ReleaseMouse();
489  g_bFrameDrag = false;
490 
491  if ( m_rView.GetViewFrame() )
492  {
493  g_bExecuteDrag = true;
494  StartExecuteDrag();
495  }
496 }
497 
498 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
SwWrtShell * GetShell()
Definition: swdtflvr.hxx:213
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
SdrView * GetDrawView()
Definition: vnew.cxx:375
void StartDDTimer()
Definition: edtdd.cxx:50
#define DND_ACTION_COPY
long AdjustX(long nHorzMove)
bool g_bExecuteDrag
Definition: edtdd.cxx:48
signed char sal_Int8
const Graphic * GetGrfAtPos(const Point &rDocPos, OUString &rName, bool &rbLink) const
Deliver graphic in rName besides graphic name.
Definition: fefly1.cxx:1537
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: edtdd.cxx:327
const SwView & GetView() const
Definition: edtwin.hxx:241
static sal_uInt8 GetExchangeAction(const DataFlavorExVector &rDataFlavorExVector, SotExchangeDest nDestination, sal_uInt16 nSourceOptions, sal_uInt8 nUserAction, SotClipboardFormatId &rFormat, sal_uInt8 &rDefaultAction, SotClipboardFormatId nOnlyTestFormat=SotClipboardFormatId::NONE, const css::uno::Reference< css::datatransfer::XTransferable > *pxTransferable=nullptr, SotExchangeActionFlags *pActionFlags=nullptr)
tools::Rectangle const & GetOutputArea() const
long AdjustLeft(long nHorzMoveDelta)
AutoTimer m_aTimer
Definition: edtwin.hxx:75
bool IsDesignMode() const
SdrObject * m_pUserMarkerObj
Definition: edtwin.hxx:93
bool IsInsideSelectedObj(const Point &rPt)
returns enum values
Definition: feshview.cxx:1276
ObjCntType
Definition: fesh.hxx:120
SotExchangeDest
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void EndAllAction()
Definition: edws.cxx:96
Point m_aMovePos
Definition: edtwin.hxx:82
SfxShell * GetCurShell()
Definition: view.hxx:562
static long m_nDDStartPosY
Definition: edtwin.hxx:64
std::unique_ptr< SdrDropMarkerOverlay > m_pUserMarker
Definition: edtwin.hxx:92
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
long AdjustBottom(long nVertMoveDelta)
void StartExecuteDrag()
Definition: edtdd.cxx:140
#define DND_ACTION_MOVE
SotExchangeDest GetDropDestination(const Point &rPixPnt, SdrObject **ppObj=nullptr)
Definition: edtdd.cxx:250
#define EXCHG_IN_ACTION_DEFAULT
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
static long m_nDDStartPosX
Definition: edtwin.hxx:63
std::unique_ptr< SwAnchorMarker > m_pAnchorMarker
Definition: edtwin.hxx:90
sal_uInt8 m_nDropAction
Definition: edtwin.hxx:102
long Right() const
const SwView & GetView() const
Definition: wrtsh.hxx:428
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: edtdd.cxx:193
virtual void SelectShell()
Definition: view.cxx:260
#define EXCHG_INOUT_ACTION_NONE
const DataFlavorExVector & GetDataFlavorExVector() const
#define DND_ACTION_NONE
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
long Top() const
static bool PasteData(TransferableDataHelper &rData, SwWrtShell &rSh, sal_uInt8 nAction, SotExchangeActionFlags nActionFlags, SotClipboardFormatId nFormat, SotExchangeDest nDestination, bool bIsPasteFormat, bool bIsDefault, const Point *pDDPos=nullptr, sal_Int8 nDropAction=0, bool bPasteSelection=false, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA, bool bIgnoreComments=false, SwPasteContext *pContext=nullptr)
Definition: swdtflvr.cxx:1532
std::unique_ptr< SwApplyTemplate > m_pApplyTempl
Definition: edtwin.hxx:89
void MakeVisible(const SwRect &)
Definition: viewsh.cxx:578
IMPL_LINK_NOARG(SwEditWin, DDHandler, Timer *, void)
Definition: edtdd.cxx:482
SotClipboardFormatId m_nDropFormat
Definition: edtwin.hxx:101
#define SW_MOD()
Definition: swmodule.hxx:256
bool m_bOldIdle
Definition: edtwin.hxx:108
long AdjustY(long nVertMove)
bool IsOverReadOnlyPos(const Point &rPt) const
Definition: crsrsh.cxx:2687
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
SotExchangeActionFlags
bool IsSelContainsControl() const
check whether selected frame contains a control; companion method to GetSelFrameType, used for preventing drag&drop of controls into header
Definition: feshview.cxx:633
SfxBindings & GetBindings()
void CleanupDropUserMarker()
Definition: edtdd.cxx:177
bool IsIdle() const
Definition: viewopt.hxx:202
SotExchangeDest m_nDropDestination
Definition: edtwin.hxx:103
const SwFormatURL & GetURL(bool=true) const
Definition: fmturl.hxx:78
long Bottom() const
virtual void Start() override
const OutlinerView * GetTextEditOutlinerView() const
bool IsInside(const Point &rPOINT) const
void LockPaint()
Definition: viewsh.hxx:604
Size GetOutputSizePixel() const
GUIDCNamePair const aData
void DragFinished()
Definition: edtdd.cxx:152
DocumentType const eType
bool isContentExtractionLocked()
void SetTimeout(sal_uInt64 nTimeoutMs)
bool IsInSelect() const
Definition: wrtsh.hxx:138
long X() const
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2604
SwDocShell * GetDocShell()
Definition: view.cxx:1128
bool IsReadOnly() const
void DropCleanup()
Definition: edtdd.cxx:159
Point PixelToLogic(const Point &rDevicePt) const
const ImageMap * GetMap() const
Definition: fmturl.hxx:68
void ReleaseMouse()
bool DocPtInsideInputField(const Point &rDocPt) const
Definition: crstrvl.cxx:963
const SwFrameFormat * GetFormatFromObj(const Point &rPt, SwRect **pRectToFill=nullptr) const
Definition: fefly1.cxx:1575
long AdjustRight(long nHorzMoveDelta)
void Stop()
bool TestCurrPam(const Point &rPt, bool bTstHit=false)
Search in the selected area for a Selection that covers the given point.
Definition: crsrsh.cxx:978
tools::Rectangle & Union(const tools::Rectangle &rRect)
unsigned char sal_uInt8
bool m_bMBPressed
Definition: edtwin.hxx:108
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:426
bool m_bIsInDrag
Definition: edtwin.hxx:108
void SetIdle(bool b) const
Definition: viewopt.hxx:209
virtual bool Command(const CommandEvent &rCEvt, vcl::Window *pWin) override
bool g_bDDTimerStarted
Definition: edtwin.cxx:184
vcl::Window * GetWindow() const
long AdjustTop(long nVertMoveDelta)
void UnSelectFrame()
Definition: select.cxx:327
void SetInvokeHandler(const Link< Timer *, void > &rLink)
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
static sal_uInt64 GetSystemTicks()
long Left() const
SwView & m_rView
Definition: edtwin.hxx:97
void StopDDTimer(SwWrtShell *, const Point &)
Definition: edtdd.cxx:58
void UnSetVisibleCursor()
Definition: crsrsh.hxx:918
#define EXCHG_IN_ACTION_LINK
bool m_bOldIdleSet
Definition: edtwin.hxx:108
void InvalidateAll(bool bWithMsg)
bool g_bNoInterrupt
Definition: swmodule.cxx:137
long CallSetCursor(const Point *pPt, bool bProp)
Definition: wrtsh.hxx:117
virtual const tools::Rectangle & GetLogicRect() const
SwTransferable * m_pDragDrop
Definition: swmodule.hxx:129
void SelectShellForDrop()
Definition: edtdd.cxx:187
bool GetContentAtPos(const Point &rPt, SwContentAtPos &rContentAtPos, bool bSetCursor=false, SwRect *pFieldRect=nullptr)
Definition: crstrvl.cxx:1268
static ObjCntType GetObjCntType(const SdrObject &rObj)
Definition: fefly1.cxx:1622
bool g_bFrameDrag
Definition: edtwin.cxx:181
bool IsDrawAction() const
Definition: edtwin.hxx:205
sal_Int8 mnAction
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
bool IsDrawCreate() const
Definition: feshview.cxx:2139
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:236
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
Definition: edtdd.cxx:67
long Y() const
void UnlockPaint(bool bVirDev=false)
Definition: viewsh.hxx:609
bool IsSelFrameMode() const
Definition: wrtsh.hxx:170
FrameTypeFlags GetSelFrameType() const
Definition: feshview.cxx:600