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