LibreOffice Module sc (master)  1
fusel.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/flditem.hxx>
21 #include <svx/svddrgmt.hxx>
22 #include <svx/svdoole2.hxx>
23 #include <svx/svdotext.hxx>
24 #include <sfx2/dispatch.hxx>
25 #include <vcl/imapobj.hxx>
26 #include <svx/svdouno.hxx>
27 #include <svx/svdomedia.hxx>
28 #include <svx/svdpagv.hxx>
29 #include <svx/ImageMapInfo.hxx>
30 #include <editeng/outlobj.hxx>
31 #include <sfx2/app.hxx>
32 #include <sfx2/ipclient.hxx>
33 #include <sfx2/viewfrm.hxx>
34 
35 #include <fusel.hxx>
36 #include <sc.hrc>
37 #include <fudraw.hxx>
38 #include <futext.hxx>
39 #include <drawview.hxx>
40 #include <tabvwsh.hxx>
41 #include <drwlayer.hxx>
42 #include <userdat.hxx>
43 #include <scmod.hxx>
44 #include <charthelper.hxx>
45 #include <docuno.hxx>
46 #include <docsh.hxx>
47 
48 // maximal permitted mouse movement to start Drag&Drop
50 #define SC_MAXDRAGMOVE 3
51 // Min necessary mouse motion for normal dragging
52 #define SC_MINDRAGMOVE 2
53 
54 using namespace com::sun::star;
55 
57  SdrModel* pDoc, const SfxRequest& rReq)
58  : FuDraw(rViewSh, pWin, pViewP, pDoc, rReq)
59 {
60 }
61 
63 {
64 }
65 
67 {
68  // remember button state for creation of own MouseEvents
70  const bool bSelectionOnly = rMEvt.IsRight();
71  if ( pView->IsAction() )
72  {
73  if ( bSelectionOnly )
74  pView->BckAction();
75  return true;
76  }
77 
78  bIsInDragMode = false; // somewhere it has to be reset (#50033#)
79 
80  bool bReturn = FuDraw::MouseButtonDown(rMEvt);
81  auto aLogicPosition = rMEvt.getLogicPosition();
82  if (aLogicPosition)
83  aMDPos = *aLogicPosition;
84  else
86 
87  if ( rMEvt.IsLeft() )
88  {
89  SdrHdl* pHdl = pView->PickHandle(aMDPos);
90 
91  if ( pHdl!=nullptr || pView->IsMarkedHit(aMDPos) )
92  {
93  // Determine if this is the tail of a SdrCaptionObj i.e.
94  // we need to disable the drag option on the tail of a note
95  // object. Also, disable the ability to use the circular
96  // drag of a note object.
97  bool bDrag = false;
98  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
99  if( rMarkList.GetMarkCount() == 1 )
100  {
101  SdrObject* pMarkedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
102  if( ScDrawLayer::IsNoteCaption( pMarkedObj ) )
103  {
104  // move using the valid caption handles for note text box.
105  if(pHdl && (pHdl->GetKind() != SdrHdlKind::Poly && pHdl->GetKind() != SdrHdlKind::Circle))
106  bDrag = true;
107  // move the complete note box.
108  else if(!pHdl)
109  bDrag = true;
110  }
111  else
112  bDrag = true; // different object
113  }
114  else
115  bDrag = true; // several objects
116 
117  if ( bDrag )
118  {
119  aDragTimer.Start();
120  if (pView->BegDragObj(aMDPos, nullptr, pHdl))
122  bReturn = true;
123  }
124  }
125  else
126  {
127  SdrPageView* pPV = nullptr;
128  bool bAlt = rMEvt.IsMod2();
129  SdrObject* pObj = !bAlt ? pView->PickObj(aMDPos, pView->getHitTolLog(), pPV, SdrSearchOptions::PICKMACRO) : nullptr;
130  if (pObj)
131  {
132  pView->BegMacroObj(aMDPos, pObj, pPV, pWindow);
133  bReturn = true;
134  }
135  else
136  {
137  OUString sURL, sTarget;
138  pObj = !bAlt ? pView->PickObj(aMDPos, pView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER) : nullptr;
139  if (pObj)
140  {
141  // Support for imported Excel docs
142  // Excel is of course not consistent and allows
143  // a hyperlink to be assigned for an object group
144  // and even though the hyperlink is exported in the Escher layer
145  // its never used, when dealing with a group object the link
146  // associated with the clicked object is used only
147 
148  // additionally you can also select a macro in Excel for a grouped
149  // objects and this *usually* results in the macro being set
150  // for the elements in the group and no macro is exported
151  // for the group itself ( this however is not always true )
152  // if a macro and hlink are defined favour the hlink
153  // If a group object has no hyperlink use the hyperlink of the
154  // object clicked
155 
156  if ( pObj->IsGroupObject() )
157  {
158  ScMacroInfo* pTmpInfo = ScDrawLayer::GetMacroInfo( pObj );
159  if ( !pTmpInfo || pTmpInfo->GetMacro().isEmpty() )
160  {
161  SdrObject* pHit = pView->PickObj(aMDPos, pView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
162  if (pHit)
163  pObj = pHit;
164  }
165  }
166 
167  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
168  // For interoperability favour links over macros if both are defined
169  if ( !pInfo->GetHlink().isEmpty() )
170  {
171  sURL = pInfo->GetHlink();
172  }
173  else if ( !pInfo->GetMacro().isEmpty() )
174  {
176  if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) )
177  {
178  uno::Reference< beans::XPropertySet > xProps( pObj->getUnoShape(), uno::UNO_QUERY );
179  uno::Any aCaller;
180  if ( xProps.is() )
181  {
182  try
183  {
184  aCaller = xProps->getPropertyValue("Name");
185  }
186  catch( uno::Exception& ) {}
187  }
188  uno::Any aRet;
189  uno::Sequence< sal_Int16 > aOutArgsIndex;
190  uno::Sequence< uno::Any > aOutArgs;
191  uno::Sequence< uno::Any > aInArgs;
192  pObjSh->CallXScript( pInfo->GetMacro(),
193  aInArgs, aRet, aOutArgsIndex, aOutArgs, true, &aCaller );
195  return true; // no CaptureMouse etc.
196  }
197  }
198  }
199 
200  // URL / ImageMap
201 
202  SdrViewEvent aVEvt;
203  if ( !bAlt &&
204  pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) != SdrHitKind::NONE &&
205  aVEvt.pObj != nullptr )
206  {
207  if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) ) // ImageMap
208  {
209  const IMapObject* pIMapObj =
211  if ( pIMapObj && !pIMapObj->GetURL().isEmpty() )
212  {
213  sURL = pIMapObj->GetURL();
214  sTarget = pIMapObj->GetTarget();
215  }
216  }
217  if ( aVEvt.eEvent == SdrEventKind::ExecuteUrl && aVEvt.pURLField ) // URL
218  {
219  sURL = aVEvt.pURLField->GetURL();
220  sTarget = aVEvt.pURLField->GetTargetFrame();
221  }
222  }
223 
224  // open hyperlink, if found at object or in object's text
225  if ( !sURL.isEmpty() && ScGlobal::ShouldOpenURL() )
226  {
227  ScGlobal::OpenURL( sURL, sTarget );
229  return true; // no CaptureMouse etc.
230  }
231 
232  // Is another object being edited in this view?
233  // (Editing is ended in MarkListHasChanged - test before UnmarkAll)
235  bool bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
236 
237  // Selection
238 
239  // do not allow multiselection with note caption
240  bool bCaptionClicked = IsNoteCaptionClicked( aMDPos );
241  if ( !rMEvt.IsShift() || bCaptionClicked || IsNoteCaptionMarked() )
242  pView->UnmarkAll();
243 
244  /* Unlock internal layer, if a note caption is clicked. The
245  layer will be relocked in ScDrawView::MarkListHasChanged(). */
246  if( bCaptionClicked )
248 
249  // try to select the clicked object
250  if ( pView->MarkObj( aMDPos, -2, false, rMEvt.IsMod1() ) )
251  {
252 
253  // move object
254 
255  if (pView->IsMarkedHit(aMDPos))
256  {
257  // Don't start drag timer if inplace editing of an OLE object
258  // was just ended with this mouse click - the view will be moved
259  // (different tool bars) and the object that was clicked on would
260  // be moved unintentionally.
261  if ( !bWasOleActive )
262  aDragTimer.Start();
263 
264  pHdl=pView->PickHandle(aMDPos);
265  pView->BegDragObj(aMDPos, nullptr, pHdl);
266  bReturn = true;
267  }
268  else // object at the edge
270  bReturn = true;
271  }
272  else
273  {
275  {
276 
277  // select object
278 
280  bReturn = true;
281  }
282  }
283  }
284  }
285 
286  }
287 
288  if (!bIsInDragMode)
289  {
290  // VC calls CaptureMouse itself
292  ForcePointer(&rMEvt);
293  }
294 
295  return bReturn;
296 }
297 
299 {
300  bool bReturn = FuDraw::MouseMove(rMEvt);
301 
302  if (aDragTimer.IsActive() )
303  {
304  Point aOldPixel = pWindow->LogicToPixel( aMDPos );
305  Point aNewPixel = rMEvt.GetPosPixel();
306  if ( std::abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
307  std::abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
308  aDragTimer.Stop();
309  }
310 
311  if ( pView->IsAction() )
312  {
313  Point aPix(rMEvt.GetPosPixel());
314  Point aPnt(pWindow->PixelToLogic(aPix));
315 
316  ForceScroll(aPix);
317  pView->MovAction(aPnt);
318  bReturn = true;
319  }
320 
321  ForcePointer(&rMEvt);
322 
323  return bReturn;
324 }
325 
327 {
328  // remember button state for creation of own MouseEvents
330 
331  bool bReturn = FuDraw::MouseButtonUp(rMEvt);
332  bool bOle = rViewShell.GetViewFrame()->GetFrame().IsInPlace();
333 
334  SdrObject* pObj = nullptr;
335  if (aDragTimer.IsActive() )
336  {
337  aDragTimer.Stop();
338  }
339 
340  sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(SC_MINDRAGMOVE,0)).Width() );
341  auto aLogicPosition = rMEvt.getLogicPosition();
342  Point aPnt(aLogicPosition ? *aLogicPosition : pWindow->PixelToLogic(rMEvt.GetPosPixel()));
343 
344  bool bCopy = false;
345  ScViewData& rViewData = rViewShell.GetViewData();
346  ScDocument& rDocument = rViewData.GetDocument();
347  SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : nullptr );
348  SdrPage* pPage = ( pPageView ? pPageView->GetPage() : nullptr );
349  ::std::vector< OUString > aExcludedChartNames;
350  ScRangeListVector aProtectedChartRangesVector;
351 
352  if (pView && rMEvt.IsLeft())
353  {
354  if ( pView->IsDragObj() )
355  {
356  // object was moved
357  if ( rMEvt.IsMod1() )
358  {
359  if ( pPage )
360  {
361  ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
362  }
363  if ( pView )
364  {
365  const SdrMarkList& rSdrMarkList = pView->GetMarkedObjectList();
366  const size_t nMarkCount = rSdrMarkList.GetMarkCount();
367  for ( size_t i = 0; i < nMarkCount; ++i )
368  {
369  SdrMark* pMark = rSdrMarkList.GetMark( i );
370  pObj = ( pMark ? pMark->GetMarkedSdrObj() : nullptr );
371  if ( pObj )
372  {
373  ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, rDocument, pObj );
374  }
375  }
376  }
377  bCopy = true;
378  }
379 
380  if (!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() &&
381  std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
382  std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
383  {
384  /* If a user wants to click on an object in front of a marked
385  one, he releases the mouse button immediately */
386  SdrPageView* pPV = nullptr;
387  pObj = pView->PickObj(aMDPos, pView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK);
388  if (pObj)
389  {
390  pView->UnmarkAllObj();
391  pView->MarkObj(pObj,pPV);
392  return true;
393  }
394  }
395  pView->EndDragObj( rMEvt.IsMod1() );
397 
398  bReturn = true;
399  }
400  else if (pView->IsAction() )
401  {
402  // unlock internal layer to include note captions
404  pView->EndAction();
405  if ( pView->AreObjectsMarked() )
406  {
407  bReturn = true;
408 
409  /* if multi-selection contains a note caption object, remove
410  all other objects from selection. */
411  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
412  const size_t nCount = rMarkList.GetMarkCount();
413  if( nCount > 1 )
414  {
415  bool bFound = false;
416  for( size_t nIdx = 0; !bFound && (nIdx < nCount); ++nIdx )
417  {
418  pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj();
419  bFound = ScDrawLayer::IsNoteCaption( pObj );
420  if( bFound )
421  {
422  pView->UnMarkAll();
423  pView->MarkObj( pObj, pView->GetSdrPageView() );
424  }
425  }
426  }
427  }
428  }
429  }
430 
431  // maybe consider OLE object
432  SfxInPlaceClient* pIPClient = rViewShell.GetIPClient();
433 
434  if (pIPClient)
435  {
436  ScModule* pScMod = SC_MOD();
437  bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
438 
439  if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog )
440  pIPClient->DeactivateObject();
441  }
442 
443  sal_uInt16 nClicks = rMEvt.GetClicks();
444  if (pView && nClicks == 2 && rMEvt.IsLeft())
445  {
446  if ( pView->AreObjectsMarked() )
447  {
448  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
449  if (rMarkList.GetMarkCount() == 1)
450  {
451  SdrMark* pMark = rMarkList.GetMark(0);
452  pObj = pMark->GetMarkedSdrObj();
453 
454  // only activate, when the mouse also is over the selected object
455 
456  SdrViewEvent aVEvt;
457  SdrHitKind eHit = pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt );
458  if (eHit != SdrHitKind::NONE && aVEvt.pObj == pObj)
459  {
460  sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
461 
462  // OLE: activate
463 
464  if (nSdrObjKind == OBJ_OLE2)
465  {
466  if (!bOle)
467  {
468  if (static_cast<SdrOle2Obj*>(pObj)->GetObjRef().is())
469  {
470  rViewShell.ActivateObject( static_cast<SdrOle2Obj*>(pObj), 0 );
471  }
472  }
473  }
474 
475  // Edit text
476  // not in UNO controls
477  // #i32352# not in media objects
478 
479  else if ( dynamic_cast<const SdrTextObj*>( pObj) != nullptr && dynamic_cast<const SdrUnoObj*>( pObj) == nullptr && dynamic_cast<const SdrMediaObj*>( pObj) == nullptr )
480  {
482  bool bVertical = ( pOPO && pOPO->IsVertical() );
483  sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
484 
486  Execute(nTextSlotId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
487 
488  // Get the created FuText now and change into EditMode
490  if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // has no RTTI
491  {
492  FuText* pText = static_cast<FuText*>(pPoor);
493  Point aMousePixel = rMEvt.GetPosPixel();
494  pText->SetInEditMode( pObj, &aMousePixel );
495  }
496  bReturn = true;
497  }
498  }
499  }
500  }
501  else if ( TestDetective( pView->GetSdrPageView(), aPnt ) )
502  bReturn = true;
503  }
504 
505  ForcePointer(&rMEvt);
506 
507  if (pWindow->IsMouseCaptured())
509 
510  // command handler for context menu follows after MouseButtonUp,
511  // therefore here the hard IsLeft call
512  if ( !bReturn && rMEvt.IsLeft() )
515  Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD);
516 
517  if ( bCopy && pPage )
518  {
519  ScDocShell* pDocShell = rViewData.GetDocShell();
520  ScModelObj* pModelObj = ( pDocShell ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocShell->GetModel() ) : nullptr );
521  if ( pModelObj )
522  {
523  SCTAB nTab = rViewData.GetTabNo();
524  ScChartHelper::CreateProtectedChartListenersAndNotify( rDocument, pPage, pModelObj, nTab,
525  aProtectedChartRangesVector, aExcludedChartNames );
526  }
527  }
528 
529  return bReturn;
530 }
531 
532 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
const OUString & GetTarget() const
static bool IsXScriptURL(const OUString &rScriptURL)
void CaptureMouse()
bool IsDrawSelMode() const
Definition: tabview.hxx:315
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
size_t GetMarkCount() const
bool bIsInDragMode
Definition: fupoor.hxx:57
void ActivateObject(SdrOle2Obj *pObj, tools::Long nVerb)
Definition: tabvwshb.cxx:144
void SetShiftPressed(bool bShiftPressed)
OBJ_OLE2
const OUString & GetMacro() const
Definition: userdat.hxx:84
bool IsObjectInPlaceActive() const
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: fusel.cxx:298
virtual ~FuSelection() override
Definition: fusel.cxx:62
bool IsVertical() const
bool IsNoteCaptionClicked(const Point &rPos) const
Definition: fusel2.cxx:117
bool AreObjectsMarked() const
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2321
bool EndDragObj(bool bCopy=false)
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
Definition: global.cxx:760
bool IsShift() const
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
ScSplitPos GetActivePart() const
Definition: viewdata.hxx:398
SdrMark * GetMark(size_t nNum) const
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
static bool ShouldOpenURL()
Whether the URL can be opened according to current security options (Click/Ctrl-Click) ...
Definition: global.cxx:825
static SfxObjectShell * Current()
Base class for all Drawmodule specific functions.
Definition: fudraw.hxx:28
css::uno::Reference< css::frame::XModel > GetModel() const
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
const OUString & GetTargetFrame() const
static void CreateProtectedChartListenersAndNotify(ScDocument &rDoc, const SdrPage *pPage, ScModelObj *pModelObj, SCTAB nTab, const ScRangeListVector &rRangesVector, const ::std::vector< OUString > &rExcludedChartNames, bool bSameDoc=true)
#define SC_MAXDRAGMOVE
fusel,fuconstr,futext - combine them!
Definition: fusel.cxx:50
bool IsActive() const
sal_uInt16 GetClicks() const
virtual void MovAction(const Point &rPnt) override
FuSelection(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, const SfxRequest &rReq)
Definition: fusel.cxx:56
virtual css::uno::Reference< css::uno::XInterface > getUnoShape()
sal_uInt16 GetButtons() const
void SetMouseButtonCode(sal_uInt16 nNew)
Definition: fupoor.hxx:71
SfxFrame & GetFrame() const
int nCount
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:137
const SvxURLField * pURLField
ScTabViewShell & rViewShell
Definition: fupoor.hxx:44
bool IsMarkedHit(const Point &rPnt, short nTol=-2) const
Timer aDragTimer
Definition: fupoor.hxx:54
void UnmarkAll()
void ForceScroll(const Point &aPixPos)
Definition: fupoor.cxx:70
void BegMacroObj(const Point &rPnt, short nTol, SdrObject *pObj, SdrPageView *pPV, vcl::Window *pWin)
static void AddRangesIfProtectedChart(ScRangeListVector &rRangesVector, const ScDocument &rDocument, SdrObject *pObject)
ScViewData & GetViewData()
Definition: tabview.hxx:332
sal_uInt16 GetSlotID() const
Definition: fupoor.hxx:91
Base class for Text functions.
Definition: futext.hxx:28
SdrObject * GetMarkedSdrObj() const
SdrHitKind
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
static void GetChartNames(::std::vector< OUString > &rChartNames, const SdrPage *pPage)
std::optional< Point > getLogicPosition() const
SdrDragMethod * GetDragMethod() const
sal_uInt16 GetCurRefDlgId() const
Definition: scmod.hxx:232
int i
virtual sal_uInt16 GetObjIdentifier() const
bool IsMod2() const
#define SC_MOD()
Definition: scmod.hxx:253
void FakeButtonUp(ScSplitPos eWhich)
Definition: tabview3.cxx:209
SdrEventKind eEvent
const SdrMarkList & GetMarkedObjectList() const
bool TestDetective(const SdrPageView *pPV, const Point &rPos)
Definition: fusel2.cxx:44
SdrHdl * PickHandle(const Point &rPnt) const
ErrCode CallXScript(const OUString &rScriptURL, const css::uno::Sequence< css::uno::Any > &aParams, css::uno::Any &aRet, css::uno::Sequence< sal_Int16 > &aOutParamIndex, css::uno::Sequence< css::uno::Any > &aOutParam, bool bRaiseError=true, const css::uno::Any *aCaller=nullptr)
virtual void Start() override
bool IsGroupObject() const
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
bool IsNoteCaptionMarked() const
Definition: fusel2.cxx:103
bool IsMouseCaptured() const
Base class for all functions.
Definition: fupoor.hxx:40
Point aMDPos
Definition: fupoor.hxx:58
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fusel.cxx:326
void DeactivateObject()
ScDBFunc * GetView() const
Definition: viewdata.cxx:852
const OUString & GetURL() const
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
::std::vector< ScRangeList > ScRangeListVector
Definition: charthelper.hxx:30
void ReleaseMouse()
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fusel.cxx:66
virtual bool IsAction() const override
void UnlockInternalLayer()
Unlocks the internal layer that contains caption objects of cell notes.
Definition: drawview.hxx:138
SfxInPlaceClient * GetIPClient() const
void Stop()
static IMapObject * GetHitIMapObject(const SdrObject *pObj, const Point &rWinPoint, const vcl::Window *rCmpWnd=nullptr)
bool IsInPlace() const
SdrPage * GetPage() const
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:128
bool IsLeft() const
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3040
FuPoor * GetDrawFuncPtr()
Definition: tabview.hxx:320
ScDrawView * pView
Definition: fupoor.hxx:43
const Point & GetPosPixel() const
SdrObject * pObj
SdrPageView * GetSdrPageView() const
bool IsDragObj() const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
Definition: drwlayer.cxx:2309
void SetInEditMode(SdrObject *pObj=nullptr, const Point *pMousePixel=nullptr, bool bCursorToEnd=false, const KeyEvent *pInitialKey=nullptr)
Definition: futext.cxx:533
const OUString & GetHlink() const
Definition: userdat.hxx:87
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
bool IsRight() const
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr) override
bool IsRefDialogOpen()
Definition: scmod.cxx:1605
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:147
sal_uInt16 getHitTolLog() const
virtual void BckAction() override
virtual OutlinerParaObject * GetOutlinerParaObject() const
const OUString & GetURL() const
void UnMarkAll(SdrPageView const *pPV=nullptr)
VclPtr< vcl::Window > pWindow
Definition: fupoor.hxx:45
sal_Int16 SCTAB
Definition: types.hxx:23
SdrHdlKind GetKind() const
virtual void ForcePointer(const MouseEvent *pMEvt)
Definition: fudraw.cxx:668
void ForceMarkedToAnotherPage()
virtual void EndAction() override
bool IsMod1() const
#define SC_MINDRAGMOVE
Definition: fusel.cxx:52
static SvxIMapInfo * GetIMapInfo(const SdrObject *pObject)