25 #include <document.hxx>
32 #include <drawview.hxx>
52 while (pObject && !bFound)
62 Point aLineStart = pObject->GetPoint(0);
63 Point aLineEnd = pObject->GetPoint(1);
67 rViewData.
GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nStartCol, nStartRow );
71 rViewData.
GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow );
74 bool bStart = (
Diff( rPos,aLineStart ) >
Diff( rPos,aLineEnd ) );
75 if ( nCurX == nStartCol && nCurY == nStartRow )
77 else if ( nCurX == nEndCol && nCurY == nEndRow )
84 nDifX = nStartCol - nCurX;
85 nDifY = nStartRow - nCurY;
89 nDifX = nEndCol - nCurX;
90 nDifY = nEndRow - nCurY;
98 pObject = aIter.Next();
130 for(
SdrObject* pObj = aIter.Next(); pObj; pObj = aIter.Next() )
132 if( pObj->GetLogicRect().IsInside( rPos ) )
136 const ScAddress& rNotePos = pCaptData->maStart;
140 if( !bProtectAttr || !bProtectDoc )
ScDocShell * GetDocShell() const
size_t GetMarkCount() const
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
ScSplitPos FindWindow(const vcl::Window *pWindow) const
bool IsNoteCaptionClicked(const Point &rPos) const
static bool IsNonAlienArrow(const SdrObject *pObject)
SdrMark * GetMark(size_t nNum) const
ScDocument & GetDocument() const
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
EmbeddedObjectRef * pObject
static tools::Long Diff(const Point &rP1, const Point &rP2)
css::chart::ChartAxisLabelPosition ePos
SdrObject * SdrObjectPrimitiveHit(const SdrObject &rObject, const Point &rPnt, sal_uInt16 nTol, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly, drawinglayer::primitive2d::Primitive2DContainer *pHitContainer)
ScTabViewShell & rViewShell
ScViewData & GetViewData()
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SdrObjList * GetObjList() const
SdrObject * GetMarkedSdrObj() const
void ActivateNoteHandles(SdrObject *pObj)
void GetPosFromPixel(tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich, SCCOL &rPosX, SCROW &rPosY, bool bTestMerge=true, bool bRepair=false, SCTAB nForTab=-1)
static ScDrawObjData * GetNoteCaptionData(SdrObject *pObj, SCTAB nTab)
Returns the object data, if the passed object is a cell note caption.
const SdrMarkList & GetMarkedObjectList() const
bool TestDetective(const SdrPageView *pPV, const Point &rPos)
bool IsNoteCaptionMarked() const
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
void UnlockInternalLayer()
Unlocks the internal layer that contains caption objects of cell notes.
bool GetProtection() const
void MoveCursorRel(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel=false)
sal_uInt16 GetHitTolerancePixel() const
SdrPageView * GetSdrPageView() const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
VclPtr< vcl::Window > pWindow