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