20#include <com/sun/star/embed/EmbedVerbs.hpp>
41#include <drawview.hxx>
46#include <charthelper.hxx>
53#define SC_MAXDRAGMOVE 3
55#define SC_MINDRAGMOVE 2
61 :
FuDraw(rViewSh, pWin, pViewP, pDoc, rReq)
73 const bool bSelectionOnly = rMEvt.
IsRight();
116 if(pHdl && (pHdl->
GetKind() != SdrHdlKind::Poly && pHdl->
GetKind() != SdrHdlKind::Circle))
139 bool bAlt = rMEvt.
IsMod2();
148 OUString sURL, sTarget;
170 if ( !pTmpInfo || pTmpInfo->
GetMacro().isEmpty() )
184 else if ( !pInfo->
GetMacro().isEmpty() )
189 uno::Reference< beans::XPropertySet > xProps( pObj->
getUnoShape(), uno::UNO_QUERY );
195 aCaller = xProps->getPropertyValue(
"Name");
197 catch( uno::Exception& ) {}
200 uno::Sequence< sal_Int16 > aOutArgsIndex;
201 uno::Sequence< uno::Any > aOutArgs;
202 uno::Sequence< uno::Any > aInArgs;
204 aInArgs, aRet, aOutArgsIndex, aOutArgs,
true, &aCaller );
215 pView->
PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) != SdrHitKind::NONE &&
216 aVEvt.
mpObj !=
nullptr )
222 if ( pIMapObj && !pIMapObj->
GetURL().isEmpty() )
224 sURL = pIMapObj->
GetURL();
258 if( bCaptionClicked )
273 if ( !bWasOleActive )
361 ::std::vector< OUString > aExcludedChartNames;
365 aPnt.
setX(-aPnt.
X());
382 for (
size_t i = 0;
i < nMarkCount; ++
i )
396 std::abs(aPnt.
X() -
aMDPos.
X()) < nDrgLog &&
397 std::abs(aPnt.
Y() -
aMDPos.
Y()) < nDrgLog)
431 for(
size_t nIdx = 0; !bFound && (nIdx <
nCount); ++nIdx )
445 if (
SC_MOD()->GetIsWaterCan())
448 if (pStyleSheet && pStyleSheet->GetFamily() == SfxStyleFamily::Frame)
480 if (eHit != SdrHitKind::NONE && aVEvt.
mpObj == pObj)
486 if (nSdrObjKind == SdrObjKind::OLE2)
490 if (
static_cast<SdrOle2Obj*
>(pObj)->GetObjRef().is())
494 if (
pWindow->IsMouseCaptured())
509 sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
512 Execute(nTextSlotId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
516 if ( pPoor && pPoor->
GetSlotID() == nTextSlotId )
533 if (
pWindow->IsMouseCaptured())
538 if ( !bReturn && rMEvt.
IsLeft() )
541 Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD);
543 if ( bCopy && pPage )
551 aProtectedChartRangesVector, aExcludedChartNames );
::std::vector< ScRangeList > ScRangeListVector
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.
virtual void ForcePointer(const MouseEvent *pMEvt)
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Base class for all functions.
sal_uInt16 GetSlotID() const
void SetMouseButtonCode(sal_uInt16 nNew)
void ForceScroll(const Point &aPixPos)
ScTabViewShell & rViewShell
VclPtr< vcl::Window > pWindow
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool MouseMove(const MouseEvent &rMEvt) override
bool TestDetective(const SdrPageView *pPV, const Point &rPos)
virtual ~FuSelection() override
FuSelection(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, const SfxRequest &rReq)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
bool IsNoteCaptionClicked(const Point &rPos) const
bool IsNoteCaptionMarked() const
Base class for Text functions.
void SetInEditMode(SdrObject *pObj=nullptr, const Point *pMousePixel=nullptr, bool bCursorToEnd=false, const KeyEvent *pInitialKey=nullptr)
const OUString & GetURL() const
const OUString & GetTarget() const
const std::optional< Point > & getLogicPosition() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() 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
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
void UnlockInternalLayer()
Unlocks the internal layer that contains caption objects of cell notes.
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
static bool ShouldOpenURL()
Whether the URL can be opened according to current security options (Click/Ctrl-Click)
const OUString & GetMacro() const
sal_uInt16 GetCurRefDlgId() const
SfxStyleSheetBase * GetActualStyleSheet()
void ActivateObject(SdrOle2Obj *pObj, sal_Int32 nVerb)
void FakeButtonUp(ScSplitPos eWhich)
FuPoor * GetDrawFuncPtr()
ScViewData & GetViewData()
bool IsDrawSelMode() const
SfxDispatcher & GetDispatcher()
ScDocument & GetDocument() const
ScDocShell * GetDocShell() const
ScDBFunc * GetView() const
ScSplitPos GetActivePart() const
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)
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
static bool IsXScriptURL(const OUString &rScriptURL)
bool IsObjectInPlaceActive() 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)
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
virtual void Start(bool bStartTimer=true) override
#define SC_MAXDRAGMOVE
fusel,fuconstr,futext - combine them!
const SvxURLField * mpURLField
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)