23#include <osl/diagnose.h>
36 for (
size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
53 for (
size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) {
72 for (
size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
107 if (nMarkNum==SAL_MAX_SIZE)
115 rPts.
insert(
static_cast<sal_uInt16
>(nHdlNum));
120 if (it != rPts.
end())
174 if (nMarkNum!=SAL_MAX_SIZE) {
196 for (
size_t nHdlNum=nHdlCnt; nHdlNum>0;) {
202 if (pObj!=pObj0 || pPV!=pPV0 || pM==
nullptr) {
204 if (nMarkNum!=SAL_MAX_SIZE) {
211 OSL_FAIL(
"SdrMarkView::MarkPoints(const Rectangle* pRect): Selected object not found.");
218 if (pM!=
nullptr && (pRect==
nullptr || pRect->
Contains(aPos))) {
262 for (
size_t nHdlNum=0; nHdlNum<nHdlCnt; ++nHdlNum) {
291 for (
size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) {
303 if( it != rPts.
end() )
314 OSL_FAIL(
"SdrMarkView::UndirtyMrkPnt(): Selected points on an object that is not a PolyObj!");
358 for (
size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
366 for(sal_uInt16
a(0); !bRet &&
a < pGPL->
GetCount();
a++)
368 if((*pGPL)[
a].IsUserDefined())
384 for (
size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
387 bRet = !rPts.
empty();
399 for (
size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) {
404 if (bUnmark && pRect==
nullptr) {
411 sal_uInt16 nGluePointCnt=pGPL->
GetCount();
412 for (sal_uInt16 nGPNum=0; nGPNum<nGluePointCnt; nGPNum++) {
419 if (pRect==
nullptr || pRect->
Contains(aPos)) {
420 bool bContains = rPts.
find( rGP.
GetId() ) != rPts.
end();
421 if (!bUnmark && !bContains) {
425 if (bUnmark && bContains) {
444 rpObj=
nullptr; rpPV=
nullptr; rnId=0;
448 if (
pOut==
nullptr)
return false;
451 size_t nMarkNum=nMarkCount;
468 rnId=(*pGPL)[nNum].GetId();
485 if (nMarkPos!=SAL_MAX_SIZE) {
488 bool bContains = rPts.
find(
nId ) != rPts.
end();
489 if (!bUnmark && !bContains) {
493 if (bUnmark && bContains) {
513 if (
nPos!=SAL_MAX_SIZE) {
525 for (
size_t nHdlNum=0; nHdlNum<nHdlCnt; ++nHdlNum) {
527 if (pHdl->
GetObj()==pObj &&
constexpr tools::Long Y() const
constexpr tools::Long X() const
sal_uInt16 FindGluePoint(sal_uInt16 nId) const
sal_uInt16 HitTest(const Point &rPnt, const OutputDevice &rOut, const SdrObject *pObj) const
sal_uInt16 GetCount() const
Point GetAbsolutePos(const SdrObject &rObj) const
bool IsUserDefined() const
void MoveTo(SdrHdlList &rOther)
size_t GetHdlCount() const
std::unique_ptr< SdrHdl > RemoveHdl(size_t nNum)
SdrHdl * GetHdl(size_t nNum) const
SdrPageView * GetPageView() const
void SetSelected(bool bJa=true)
SdrHdlKind GetKind() const
sal_uInt32 GetObjHdlNum() const
sal_uInt32 GetSourceHdlNum() const
void SetPlusHdl(bool bOn)
SdrObject * GetObj() const
void SetObj(SdrObject *pNewObj)
const Point & GetPos() const
void SetPageView(SdrPageView *pNewPV)
virtual sal_Int32 GetMarkablePointCount() const
static constexpr sal_uInt16 mnFrameHandlesLimit
virtual void SetMarkHandles(SfxViewShell *pOtherShell)
bool ImpIsFrameHandles() const
tools::Rectangle maMarkedPointsRect
const tools::Rectangle & GetMarkedGluePointsRect() const
void SortMarkedObjects() const
bool HasMarkedGluePoints() const
bool mbMarkedPointsRectsDirty
virtual bool HasMarkedPoints() const
size_t GetMarkedObjectCount() const
void ForceUndirtyMrkPnt() const
const tools::Rectangle & GetMarkedPointsRect() const
bool MarkPointHelper(SdrHdl *pHdl, SdrMark *pMark, bool bUnmark)
should only be used from outside svx for special ui elements
bool IsGluePointMarked(const SdrObject *pObj, sal_uInt16 nId) const
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
bool IsPointMarkable(const SdrHdl &rHdl) const
SdrMark * GetSdrMarkByIndex(size_t nNum) const
void SetPlusHandlesAlwaysVisible(bool bOn)
SdrHdl * GetGluePointHdl(const SdrObject *pObj, sal_uInt16 nId) const
void UndirtyMrkPnt() const
tools::Rectangle maMarkedGluePointsRect
bool ImpMarkPoint(SdrHdl *pHdl, SdrMark *pMark, bool bUnmark)
virtual bool HasMarkablePoints() const
virtual void MarkListHasChanged()
size_t TryToFindMarkedObject(const SdrObject *pObj) const
bool HasMarkableGluePoints() const
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
bool MarkGluePoints(const tools::Rectangle *pRect, bool bUnmark)
bool IsGluePointEditMode() const
virtual bool MarkPoints(const tools::Rectangle *pRect, bool bUnmark)
SVX_DLLPRIVATE void ImpSetPointsRects() const
bool MarkGluePoint(const SdrObject *pObj, sal_uInt16 nId, bool bUnmark)
bool PickGluePoint(const Point &rPnt, SdrObject *&rpObj, sal_uInt16 &rnId, SdrPageView *&rpPV) const
Everything a View needs to know about a selected object.
SdrPageView * GetPageView() const
SdrObject * GetMarkedSdrObj() const
const SdrUShortCont & GetMarkedGluePoints() const
const SdrUShortCont & GetMarkedPoints() const
virtual bool IsPolyObj() const
virtual const SdrGluePointList * GetGluePointList() const
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
virtual sal_uInt32 GetPointCount() const
OutputDevice * GetFirstOutputDevice() const
VclPtr< OutputDevice > mpActualOutDev
reference_type * get() const
const_iterator begin() const
std::vector< Value >::const_iterator const_iterator
const_iterator find(const Value &x) const
size_type erase(const Value &x)
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
const_iterator lower_bound(const Value &x) const
#define SDRGLUEPOINT_NOTFOUND