24#include <osl/diagnose.h>
37#include <svx/strings.hrc>
76: mbAddToTransparent(false)
86: maOriginalPolyPolygon(
std::move(aOriginalPolyPolygon))
186: maPrimitive2DSequence(
std::move(rSequence))
208: maPositions(
std::move(rPositions)),
209 mbIsPointDrag(bIsPointDrag)
237 std::vector< basegfx::B2DPoint > aTransformedPositions;
239 aTransformedPositions.reserve(aTransformed.
count());
241 for(sal_uInt32
a = 0;
a < aTransformed.
count();
a++)
243 aTransformedPositions.push_back(aTransformed.
getB2DPoint(
a));
330 std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject,
341 rOverlayManager.
add(*pOverlayObject);
355 pOverlayObject->setOffset(aOffset);
372 for(
size_t a = 0;
a < nMarkCount; ++
a)
393 bool bAddWireframe(bSuppressFullDrag);
398 bAddWireframe =
true;
401 if(!bSuppressFullDrag)
428 sal_uInt32 nPointCount(0);
430 for(
size_t a = 0; !bNoPolygons &&
a < nMarkCount; ++
a)
438 for(
auto const& rPolygon : aNewPolyPolygon)
440 nPointCount += rPolygon.count();
450 aResult.
append(aNewPolyPolygon);
473 std::vector< basegfx::B2DPoint > aPositions;
475 for(
size_t nm = 0; nm < nMarkCount; ++nm)
494 for(
const sal_uInt16 nObjPt : rPts)
496 sal_uInt32 nPolyNum, nPointNum;
509 if(!aPositions.empty())
518 std::vector< basegfx::B2DPoint > aPositions;
520 for(
size_t nm = 0; nm < nMarkCount; ++nm)
535 for(
const sal_uInt16 nObjPt : rPts)
541 const Point aPoint((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
542 aPositions.emplace_back(aPoint.
X(), aPoint.
Y());
550 if(!aPositions.empty())
592 bool bPolyUsed(
rTarget.TRGetBaseGeometry(aObjectTransform, aObjectPolyPolygon));
615 aPolyTransform.
scale(fScaleX, fScaleY);
618 aObjectPolyPolygon.
transform(aPolyTransform);
631: mrSdrDragView(rNewView),
633 mbSolidDraggingActive(getSdrDragView().IsSolidDragging()),
634 mbShiftPressed(false)
695 std::vector< SdrEdgeObj* > aEdges;
703 if(pSdrDragEntrySdrObject)
711 aEdges.push_back(pSdrEdgeObj);
714 if(pSdrDragEntrySdrObject->
getClone())
716 aOriginalAndClones[&pSdrDragEntrySdrObject->
getOriginal()] = pSdrDragEntrySdrObject->
getClone();
728 SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
730 if(aEntry != aOriginalAndClones.end())
740 SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
742 if(aEntry != aOriginalAndClones.end())
757 if(!aCandidateResult.empty())
759 if(pCandidate->getAddToTransparent())
761 aResultTransparent.
append(aCandidateResult);
765 aResult.
append(aCandidateResult);
774 if(!aConnectorOverlays.empty())
777 aResultTransparent.
append(aConnectorOverlays);
783 std::unique_ptr<sdr::overlay::OverlayObject> pNewOverlayObject(
785 std::move(aResult)));
788 std::move(pNewOverlayObject),
793 if(!aResultTransparent.empty())
798 std::unique_ptr<sdr::overlay::OverlayObject> pNewOverlayObject(
800 std::move(aResultTransparent)));
803 std::move(pNewOverlayObject),
818 std::unique_ptr<sdr::overlay::OverlayRollingRectangleStriped> pNew(
885 if(aEdgePolygon.
count())
892 if(bUseSolidDragging)
897 bUseSolidDragging =
false;
901 if(bUseSolidDragging)
934 std::move(aEdgePolygon), aColA, aColB, fStripeLength));
935 aRetval.push_back(aPolyPolygonMarkerPrimitive2D);
977 if (pH1==
nullptr || pH2==
nullptr)
979 OSL_FAIL(
"SdrDragMovHdl::BeginSdrDrag(): Moving the axis of reflection: reference handles not found.");
996 Point aPnt(rNoSnapPnt);
1006 if (pH1==
nullptr || pH2==
nullptr)
1013 bool bXSnapped=
false;
1014 bool bYSnapped=
false;
1070 nNewAngle+=nSA/2_deg100;
1080 if (nSA==9000_deg100)
1082 if (nNewAngle==0_deg100 || nNewAngle==18000_deg100) aPnt.
setY(aRef.
Y() );
1083 if (nNewAngle==9000_deg100 || nNewAngle==27000_deg100) aPnt.
setX(aRef.
X() );
1086 if (nSA==4500_deg100)
1156 return PointerStyle::RefHand;
1182 bool bAddWireframe(
true);
1193 bAddWireframe =
false;
1203 bAddWireframe =
true;
1210 aDragPolyPolygon =
mxClone->TakeXorPoly();
1216 if(aSpecialDragPolyPolygon.
count())
1218 aDragPolyPolygon.
append(aSpecialDragPolyPolygon);
1221 if(aDragPolyPolygon.
count())
1278 Point aPnt(rNoSnapPnt);
1295 else if (
DragStat().IsOrtho4Possible())
1301 if (!
DragStat().CheckMinMoved(rNoSnapPnt))
1329 if (bOldAutoGrowWidth != bNewAutoGrowWidth)
1340 std::vector< std::unique_ptr<SdrUndoAction> > vConnectorUndoActions;
1346 std::unique_ptr<SdrUndoAction> pUndo;
1347 std::unique_ptr<SdrUndoAction> pUndo2;
1355 if (
DragStat().IsEndDragChangesAttributes())
1359 if (
DragStat().IsEndDragChangesGeoAndAttributes())
1396 if (
DragStat().IsEndDragChangesLayout())
1441 return PointerStyle::Move;
1452 std::unique_ptr<SdrDragEntry>(
1454 std::move(xRetval))));
1550 Point aNoSnapPnt(rNoSnapPnt_);
1573 if (!
DragStat().CheckMinMoved(aNoSnapPnt))
1578 bool bWorkArea=!aLR.
IsEmpty();
1581 if (bDragLimit || bWorkArea)
1598 aSR2.
Move(aD.
X(),0);
1614 aSR2.
Move(0,aD.
Y());
1616 if (aSR2.
Top()<aLR.
Top())
1635 for (
size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum)
1646 for (sal_uInt16
nId : rPts)
1652 Point aPt((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
1707 return PointerStyle::MovePoint;
1711 return PointerStyle::Move;
1729 sal_Int32 nXDiv(aStart.
X() - aRef.
X());
1734 sal_Int32 nYDiv(aStart.
Y() - aRef.
Y());
1739 bool bX(
aXFact != aFact1 && std::abs(nXDiv) > 1);
1740 bool bY(
aYFact != aFact1 && std::abs(nYDiv) > 1);
1801 if (pRef1!=
nullptr && pRef2!=
nullptr)
1833 bool bWorkArea=!aLR.
IsEmpty();
1836 if (bDragLimit || bWorkArea)
1850 if (aPnt.
X()<aLR.
Left())
1852 else if (aPnt.
X()>aLR.
Right())
1855 if (aPnt.
Y()<aLR.
Top())
1857 else if (aPnt.
Y()>aLR.
Bottom())
1860 if (aRef.
X()>aSR.
Left())
1868 if (aRef.
X()<aSR.
Right())
1876 if (aRef.
Y()>aSR.
Top())
1893 tools::Long nXDiv=aStart.
X()-aRef.
X();
if (nXDiv==0) nXDiv=1;
1894 tools::Long nYDiv=aStart.
Y()-aRef.
Y();
if (nYDiv==0) nYDiv=1;
1910 bool bXNeg=nXMul<0;
if (bXNeg) nXMul=-nXMul;
1911 bool bYNeg=nYMul<0;
if (bYNeg) nYMul=-nYMul;
1916 if (std::abs(nXDiv)<=1 || std::abs(nYDiv)<=1)
1974 if (aNewXFact>aMaxFact)
1980 if (aNewYFact>aMaxFact)
1993 if (
DragStat().CheckMinMoved(aPnt))
2041 return PointerStyle::Move;
2068 nTmpAngle -= 36000_deg100;
2102 OSL_FAIL(
"SdrDragRotate::BeginSdrDrag(): No reference point handle found.");
2116 if (!
DragStat().CheckMinMoved(aPnt))
2130 nNewAngle += nSA / 2_deg100;
2143 if (nSekt0==0 && nSekt1==3)
2146 if (nSekt0==3 && nSekt1==0)
2151 double nSin1=sin(
a);
2152 double nCos1=cos(
a);
2184 return PointerStyle::Rotate;
2209 nTmpAngle += 18000_deg100;
2237 if (pRefHdl!=
nullptr)
2244 OSL_FAIL(
"SdrDragShear::BeginSdrDrag(): No reference point handle for shearing found.");
2278 if (!
DragStat().CheckMinMoved(rPnt))
2292 if (nSA==0_deg100 && !
bSlant)
2298 aPnt.
setX(aP0.
X() );
2300 aPnt.
setY(aP0.
Y() );
2304 Point aDif(aPnt-aRef);
2322 if (nNewAngle<
Degree100(-9000) || nNewAngle>9000_deg100)
2334 aNewFract=
Fraction(aPt2.
X()-aRef.
X(),aP0.
X()-aRef.
X());
2338 aNewFract=
Fraction(aPt2.
Y()-aRef.
Y(),aP0.
Y()-aRef.
Y());
2343 bool bNeg=nNewAngle<0_deg100;
2346 nNewAngle=-nNewAngle;
2350 nNewAngle += nSA / 2_deg100;
2356 bUpSideDown=nNewAngle>9000_deg100 && nNewAngle<27000_deg100;
2363 if (bNeg) nTmpAngle=-nTmpAngle;
2369 if (nNewAngle > 8900_deg100)
2370 nNewAngle = 8900_deg100;
2373 nNewAngle=-nNewAngle;
2380 double nTan1=tan(
a);
2458 return PointerStyle::VShear;
2460 return PointerStyle::HShear;
2486 return nAngle1<18000_deg100;
2494 else if (
aDif.
Y()==0)
2496 else if (std::abs(
aDif.
X()) == std::abs(
aDif.
Y()))
2511 if (pH1!=
nullptr && pH2!=
nullptr)
2519 bool b45=b90 || (std::abs(
aDif.
X()) == std::abs(
aDif.
Y()));
2534 OSL_FAIL(
"SdrDragMirror::BeginSdrDrag(): Axis of reflection not found.");
2547 const double fRotation(atan2(fDeltaY, fDeltaX));
2550 aRetval.
rotate(-fRotation);
2551 aRetval.
scale(1.0, -1.0);
2552 aRetval.
rotate(fRotation);
2561 if (!
DragStat().CheckMinMoved(rPnt))
2565 bool bNewMirrored=
bSide0!=bNewSide;
2590 return PointerStyle::Mirror;
2596 pIAOHandle(nullptr),
2611 bool bRetval(
false);
2645 if(!bHit && pColHdl)
2672 OSL_FAIL(
"SdrDragGradient::BeginSdrDrag(): IAOGradient not found.");
2748 return PointerStyle::RefHand;
2755 bContortionAllowed(false),
2756 bNoContortionAllowed(false),
2758 bResizeAllowed(false),
2760 bRotateAllowed(false),
2788 nVal = std::abs(nVal);
2799#define DRAG_CROOK_RASTER_MINIMUM (4)
2800#define DRAG_CROOK_RASTER_MAXIMUM (15)
2801#define DRAG_CROOK_RASTER_DISTANCE (30)
2824 const double fXLen(rMarkRect.
GetWidth() /
static_cast<double>(nHorDiv));
2825 const double fYLen(rMarkRect.
GetHeight() /
static_cast<double>(nVerDiv));
2826 double fYPos(rMarkRect.
Top());
2829 for(
a = 0;
a <= nVerDiv;
a++)
2832 for(b = 0; b < nHorDiv; b++)
2836 const double fNewX(rMarkRect.
Left() + (b * fXLen));
2842 aRetval.
append(aHorLineSegment);
2849 double fXPos(rMarkRect.
Left());
2851 for(
a = 0;
a <= nHorDiv;
a++)
2854 for(b = 0; b < nVerDiv; b++)
2858 const double fNewY(rMarkRect.
Top() + (b * fYLen));
2864 aRetval.
append(aVerLineSegment);
2882 if(aDragRaster.
count())
2927 sal_uInt16 nPolyCount=aTempPolyPoly.
Count();
2931 sal_uInt16 n1st=0,nLast=0;
2934 while (n1st<nPolyCount)
2937 while (nLast<nPolyCount && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++;
2941 for (
i=n1st+1;
i<nLast;
i++)
2943 aBound.
Union(aTempPolyPoly[n1st].GetBoundRect());
2964 double nSin=0,nCos=0;
2980 for (
i=n1st;
i<nLast;
i++)
2987 aTempPolyPoly[
i].Move(aCtr1.
X(),aCtr1.
Y());
2997 for (j=0; j<nPolyCount; j++)
3003 while (
i<nPointCount)
3036 bool bC1=pC1!=
nullptr;
3037 bool bC2=pC2!=
nullptr;
3081 if (!
DragStat().CheckMinMoved(rPnt))
3127 bValid = std::abs(dx1)*100>std::abs(dy1);
3129 bValid = std::abs(dy1)*100>std::abs(dx1);
3142 a=
static_cast<double>(dy1)/
static_cast<double>(dx1);
3145 nPntAngle=
GetAngle(aPnt-aNewCenter);
3149 a=
static_cast<double>(dx1)/
static_cast<double>(dy1);
3152 nPntAngle=
GetAngle(aPnt-aNewCenter)-9000_deg100;
3159 if (
bRgt) nPntAngle += 18000_deg100;
3160 if (
bLft) nPntAngle = 18000_deg100 - nPntAngle;
3161 if (
bLwr) nPntAngle =- nPntAngle;
3165 if (
bRgt) nPntAngle = -nPntAngle;
3166 if (
bUpr) nPntAngle = 18000_deg100 - nPntAngle;
3167 if (
bLwr) nPntAngle += 18000_deg100;
3174 if (nNewRad<0) nPntAngle += 18000_deg100;
3175 if (
bVertical) nPntAngle = 18000_deg100 - nPntAngle;
3177 nPntAngle =
abs(nPntAngle);
3180 double nCircumference = 2 * std::abs(nNewRad) * M_PI;
3201 if (
nAngle==0_deg100 || nNewRad==0)
3219 nMul = std::abs(nMul);
3247 if (!(bDoCrook || bDoResize))
3279 Size aSiz(aCtr1.
X()-aCtr0.
X(),aCtr1.
Y()-aCtr0.
Y());
3341 for (
size_t nm=0; nm<nMarkCount; ++nm)
3353 Size aSiz(aCtr1.
X()-aCtr0.
X(),aCtr1.
Y()-aCtr0.
Y());
3379 return PointerStyle::Crook;
3386 bContortionAllowed(false),
3387 bNoContortionAllowed(false),
3413 if(aDragRaster.
count())
3466 aDragPolygon =
basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight);
3473 if (!
DragStat().CheckMinMoved(rPnt))
3509 return PointerStyle::RefHand;
3590 bool bExternal(
false);
3595 if (
nullptr != pSdrObject &&
dynamic_cast< const SdrGrafObj*
>(pSdrObject) ==
nullptr)
3604 if(
dynamic_cast< SdrGrafObj*
>(pFullDragClone.get()))
3607 pExternalSdrObject = pSdrObject;
3608 pSdrObject = pFullDragClone.get();
3621 const bool bUndo(!bExternal &&
getSdrDragView().IsUndoEnabled());
3636 bool bShearCorrected(
false);
3644 bShearCorrected =
true;
3656 bool bOnAxis(
false);
3682 aLocalCurrent.
setX(aLocalStart.
getX());
3686 aLocalCurrent.
setY(aLocalStart.
getY());
3695 if(aLocalStart.
getX() < 0.5)
3697 aDiscreteChangeMatrix.
scale(aLocalCurrent.
getX(), 1.0);
3701 aDiscreteChangeMatrix.
scale(1.0 - aLocalCurrent.
getX(), 1.0);
3708 if(aLocalStart.
getY() < 0.5)
3710 aDiscreteChangeMatrix.
scale(1.0, aLocalCurrent.
getY());
3714 aDiscreteChangeMatrix.
scale(1.0, 1.0 - aLocalCurrent.
getY());
3734 aRangeOriginalNoShearNoRotate.
transform(aOriginalMatrixNoShearNoRotate);
3735 aRangeNewNoShearNoRotate.
transform(aOriginalMatrixNoShearNoRotate * aDiscreteChangeMatrix);
3743 const double fScaleX(aRangeNewNoShearNoRotate.
getWidth() / aRangeOriginalNoShearNoRotate.
getWidth());
3744 const double fScaleY(aRangeNewNoShearNoRotate.
getHeight() / aRangeOriginalNoShearNoRotate.
getHeight());
3746 pExternalSdrObject->
Crop(
3814 if(0 == aGraphicSize.
Width() || 0 == aGraphicSize.
Height())
3820 double fScaleX = ( aGraphicSize.
Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) /
static_cast<double>(aOldRect.
GetWidth());
3821 double fScaleY = ( aGraphicSize.
Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) /
static_cast<double>(aOldRect.
GetHeight());
3823 sal_Int32 nDiffLeft = aNewRect.
Left() - aOldRect.
Left();
3824 sal_Int32 nDiffTop = aNewRect.
Top() - aOldRect.
Top();
3825 sal_Int32 nDiffRight = aNewRect.
Right() - aOldRect.
Right();
3826 sal_Int32 nDiffBottom = aNewRect.
Bottom() - aOldRect.
Bottom();
3832 sal_Int32 nTmp(nDiffLeft);
3833 nDiffLeft = -nDiffRight;
3837 sal_Int32 nLeftCrop =
static_cast<sal_Int32
>( rOldCrop.GetLeft() + nDiffLeft * fScaleX );
3838 sal_Int32 nTopCrop =
static_cast<sal_Int32
>( rOldCrop.GetTop() + nDiffTop * fScaleY );
3839 sal_Int32 nRightCrop =
static_cast<sal_Int32
>( rOldCrop.GetRight() - nDiffRight * fScaleX );
3840 sal_Int32 nBottomCrop =
static_cast<sal_Int32
>( rOldCrop.GetBottom() - nDiffBottom * fScaleY );
3844 aSet.
Put( SdrGrafCropItem( nLeftCrop, nTopCrop, nRightCrop, nBottomCrop ) );
3858 return PointerStyle::Crop;
const B2DPolyPolygon maOriginal
const StyleSettings & GetStyleSettings() const
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
basegfx::BColor getBColor() const
sal_Int32 GetNumerator() const
void ReduceInaccurate(unsigned nSignificantBits)
sal_Int32 GetDenominator() const
MapMode GetPrefMapMode() const
MapUnit GetMapUnit() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual void MoveSdrDrag(const Point &rPnt) override
virtual void createSdrDragEntries() override
void MovCrookPoint(Point &rPnt, Point *pC1, Point *pC2)
SdrDragCrook(SdrDragView &rNewView)
virtual bool EndSdrDrag(bool bCopy) override
virtual bool BeginSdrDrag() override
virtual OUString GetSdrDragComment() const override
void MovAllPoints(basegfx::B2DPolyPolygon &rTarget)
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon &rTarget) override
tools::Rectangle aMarkRect
bool bNoContortionAllowed
virtual PointerStyle GetSdrDragPointer() const override
virtual PointerStyle GetSdrDragPointer() const override
SdrDragCrop(SdrDragView &rNewView)
virtual OUString GetSdrDragComment() const override
virtual bool BeginSdrDrag() override
virtual bool EndSdrDrag(bool bCopy) override
tools::Rectangle aMarkRect
bool bNoContortionAllowed
virtual PointerStyle GetSdrDragPointer() const override
virtual void createSdrDragEntries() override
virtual OUString GetSdrDragComment() const override
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
SdrDragDistort(SdrDragView &rNewView)
virtual void MoveSdrDrag(const Point &rPnt) override
virtual bool EndSdrDrag(bool bCopy) override
void MovAllPoints(basegfx::B2DPolyPolygon &rTarget)
virtual bool BeginSdrDrag() override
virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon &rTarget) override
std::vector< basegfx::B2DPoint > maPositions
virtual ~SdrDragEntryPointGlueDrag() override
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod &rDragMethod) override
SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint > &&rPositions, bool bIsPointDrag)
virtual ~SdrDragEntryPolyPolygon() override
SdrDragEntryPolyPolygon(basegfx::B2DPolyPolygon aOriginalPolyPolygon)
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod &rDragMethod) override
basegfx::B2DPolyPolygon maOriginalPolyPolygon
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod &rDragMethod) override
drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence
SdrDragEntryPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DContainer &&rSequence)
virtual ~SdrDragEntryPrimitive2DSequence() override
const SdrObject & maOriginal
void prepareCurrentState(SdrDragMethod &rDragMethod)
rtl::Reference< SdrObject > mxClone
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod &rDragMethod) override
virtual ~SdrDragEntrySdrObject() override
const SdrObject & getOriginal() const
SdrDragEntrySdrObject(const SdrObject &rOriginal, bool bModify)
void setAddToTransparent(bool bNew)
virtual void MoveSdrDrag(const Point &rPnt) override
virtual bool EndSdrDrag(bool bCopy) override
SdrHdlGradient * pIAOHandle
virtual bool BeginSdrDrag() override
virtual PointerStyle GetSdrDragPointer() const override
virtual OUString GetSdrDragComment() const override
virtual void CancelSdrDrag() override
SdrDragGradient(SdrDragView &rNewView, bool bGrad=true)
const SdrMarkList & GetMarkedObjectList()
basegfx::B2DRange getCurrentRange() const
bool DoAddConnectorOverlays()
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget)
SdrHdl * GetDragHdl() const
drawinglayer::primitive2d::Primitive2DContainer AddConnectorOverlays()
SdrHdlKind GetDragHdlKind() const
virtual basegfx::B2DHomMatrix getCurrentTransformation() const
std::vector< std::unique_ptr< SdrDragEntry > > maSdrDragEntries
virtual void createSdrDragEntries()
void clearSdrDragEntries()
bool IsDraggingPoints() const
void destroyOverlayGeometry()
SdrPageView * GetDragPV() const
virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager &rOverlayManager, const sdr::contact::ObjectContact &rObjectContact)
SdrSnap SnapPos(Point &rPt) const
OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Point GetSnapPos(const Point &rPt) const
bool mbSolidDraggingActive
void insertNewlyCreatedOverlayObjectForSdrDragMethod(std::unique_ptr< sdr::overlay::OverlayObject > pOverlayObject, const sdr::contact::ObjectContact &rObjectContact, sdr::overlay::OverlayManager &rOverlayManager)
SdrObject * GetDragObj() const
SdrDragView & getSdrDragView()
void setMoveOnly(bool bNew)
const tools::Rectangle & GetMarkedRect() const
sdr::overlay::OverlayObjectList maOverlayObjectList
bool IsDraggingGluePoints() const
void addSdrDragEntry(std::unique_ptr< SdrDragEntry > pNew)
void createSdrDragEntries_PolygonDrag()
const SdrHdlList & GetHdlList() const
void resetSdrDragEntries()
void setSolidDraggingActive(bool bNew)
virtual void CancelSdrDrag()
const tools::Rectangle & GetDragLimitRect()
virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon &rTarget)
void createSdrDragEntries_SolidDrag()
bool getSolidDraggingActive() const
void createSdrDragEntries_GlueDrag()
virtual void createSdrDragEntryForSdrObject(const SdrObject &rOriginal)
SdrDragMethod(SdrDragView &rNewView)
void createSdrDragEntries_PointDrag()
virtual basegfx::B2DHomMatrix getCurrentTransformation() const override
bool ImpCheckSide(const Point &rPnt) const
virtual OUString GetSdrDragComment() const override
SdrDragMirror(SdrDragView &rNewView)
virtual bool BeginSdrDrag() override
virtual void MoveSdrDrag(const Point &rPnt) override
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual bool EndSdrDrag(bool bCopy) override
virtual PointerStyle GetSdrDragPointer() const override
virtual void CancelSdrDrag() override
virtual OUString GetSdrDragComment() const override
virtual bool BeginSdrDrag() override
virtual PointerStyle GetSdrDragPointer() const override
virtual void MoveSdrDrag(const Point &rPnt) override
virtual bool EndSdrDrag(bool bCopy) override
virtual void createSdrDragEntries() override
SdrDragMovHdl(SdrDragView &rNewView)
virtual bool EndSdrDrag(bool bCopy) override
void ImpCheckSnap(const Point &rPt)
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual void createSdrDragEntryForSdrObject(const SdrObject &rOriginal) override
virtual bool BeginSdrDrag() override
virtual void MoveSdrDrag(const Point &rPnt) override
virtual basegfx::B2DHomMatrix getCurrentTransformation() const override
SdrDragMove(SdrDragView &rNewView)
virtual OUString GetSdrDragComment() const override
virtual PointerStyle GetSdrDragPointer() const override
virtual PointerStyle GetSdrDragPointer() const override
virtual bool EndSdrDrag(bool bCopy) override
virtual void MoveSdrDrag(const Point &rPnt) override
virtual ~SdrDragObjOwn() override
virtual void createSdrDragEntries() override
rtl::Reference< SdrObject > mxClone
virtual bool BeginSdrDrag() override
virtual OUString GetSdrDragComment() const override
SdrDragObjOwn(SdrDragView &rNewView)
virtual void MoveSdrDrag(const Point &rPnt) override
virtual basegfx::B2DHomMatrix getCurrentTransformation() const override
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual OUString GetSdrDragComment() const override
virtual PointerStyle GetSdrDragPointer() const override
SdrDragResize(SdrDragView &rNewView)
virtual bool BeginSdrDrag() override
virtual bool EndSdrDrag(bool bCopy) override
virtual PointerStyle GetSdrDragPointer() const override
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual void MoveSdrDrag(const Point &rPnt) override
virtual OUString GetSdrDragComment() const override
virtual basegfx::B2DHomMatrix getCurrentTransformation() const override
virtual bool EndSdrDrag(bool bCopy) override
SdrDragRotate(SdrDragView &rNewView)
virtual bool BeginSdrDrag() override
virtual OUString GetSdrDragComment() const override
virtual basegfx::B2DHomMatrix getCurrentTransformation() const override
SdrDragShear(SdrDragView &rNewView, bool bSlant1)
virtual void MoveSdrDrag(const Point &rPnt) override
virtual bool EndSdrDrag(bool bCopy) override
virtual void applyCurrentTransformationToSdrObject(SdrObject &rTarget) override
virtual PointerStyle GetSdrDragPointer() const override
virtual bool BeginSdrDrag() override
void NextMove(const Point &rPnt)
void SetActionRect(const tools::Rectangle &rR)
void SetRef2(const Point &pt)
tools::Long GetDY() const
const Point & GetStart() const
void SetHorFixed(bool bOn)
void SetVerFixed(bool bOn)
const Point & GetNow() const
tools::Long GetDX() const
void SetRef1(const Point &pt)
virtual void TakeActionRect(tools::Rectangle &rRect) const override
static size_t GetDragXorPolyLimit()
static size_t GetDragXorPointLimit()
Utility class SdrEdgeObj.
basegfx::B2DPolygon ImplAddConnectorOverlay(const SdrDragMethod &rDragMethod, bool bTail1, bool bTail2, bool bDetail) const
bool IsResizeAllowed(bool bProp=false) const
bool IsUndoEnabled() const
void MirrorMarkedObj(const Point &rRef1, const Point &rRef2, bool bCopy=false)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool IsDistortAllowed(bool bNoContortion=false) const
void EndTextEditCurrentView(bool bDontDeleteReally=false)
bool IsCrookAllowed(bool bNoContortion=false) const
std::vector< std::unique_ptr< SdrUndoAction > > CreateConnectorUndo(const SdrObject &rO)
static void ImpDistortObj(SdrObject *pO, const tools::Rectangle &rRef, const XPolygon &rDistortedRect, bool bNoContortion)
void AddUndoActions(std::vector< std::unique_ptr< SdrUndoAction > >)
bool IsRotateAllowed(bool b90Deg=false) const
void ShearMarkedObj(const Point &rRef, Degree100 nAngle, bool bVShear=false, bool bCopy=false)
void CrookMarkedObj(const Point &rRef, const Point &rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy=false)
void RotateMarkedObj(const Point &rRef, Degree100 nAngle, bool bCopy=false)
void ResizeMarkedObj(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bCopy=false)
void DistortMarkedObj(const tools::Rectangle &rRef, const XPolygon &rDistortedRect, bool bNoContortion, bool bCopy=false)
static void ImpCrookObj(SdrObject *pO, const Point &rRef, const Point &rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle &rMarkRect)
void MoveMarkedObj(const Size &rSiz, bool bCopy=false)
void MoveMarkedGluePoints(const Size &rSiz, bool bCopy)
void ResizeMarkedGluePoints(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bCopy)
void RotateMarkedGluePoints(const Point &rRef, Degree100 nAngle, bool bCopy)
sal_uInt16 FindGluePoint(sal_uInt16 nId) const
This class represents an embedded or linked bitmap graphic object.
GraphicType GetGraphicType() const
const GraphicObject & GetGraphicObject(bool bForceSwapIn=false) const
bool IsMoveFirstHandle() const
void FromIAOToItem(SdrObject *pObj, bool bSetItemOnObject, bool bUndo)
const Point & Get2ndPos() const
SdrHdlColor * GetColorHdl2() const
void SetMoveFirstHandle(bool bNew)
void SetMoveSingleHandle(bool bNew)
SdrHdlColor * GetColorHdl1() const
void Set2ndPos(const Point &rPnt)
bool IsMoveSingleHandle() const
SdrHdl * GetHdl(size_t nNum) const
SdrPageView * GetPageView() const
SdrHdlKind GetKind() const
static BitmapEx createGluePointBitmap()
const sdr::overlay::OverlayObjectList & getOverlayObjectList() const
void SetPos(const Point &rPnt)
virtual PointerStyle GetPointer() const
SdrObject * GetObj() const
const Point & GetPos() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetEdgesOfMarkedNodes() const
OUString ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const
const SdrMarkList & GetMarkedObjectList() const
SdrMark * GetSdrMarkByIndex(size_t nNum) 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
const SfxItemPool & GetItemPool() const
OUString GetMetricString(tools::Long nVal, bool bNoUnitChars=false, sal_Int32 nNumDigits=-1) const
SdrUndoFactory & GetSdrUndoFactory() const
returns the models undo factory.
static OUString GetAngleString(Degree100 nAngle)
static OUString GetPercentString(const Fraction &rVal)
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll)
bool IsResizeProtect() const
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
SdrObjUserCall * GetUserCall() const
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
virtual rtl::Reference< SdrObject > getFullDragClone() const
virtual void Crop(const basegfx::B2DPoint &rRef, double fxFact, double fyFact)
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
void BroadcastObjectChange() const
virtual bool supportsFullDrag() const
virtual void Move(const Size &rSiz)
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrModel & getSdrModelFromSdrObject() const
virtual const tools::Rectangle & GetSnapRect() const
sdr::contact::ViewContact & GetViewContact() const
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
bool HasLineStyle() const
virtual void ConnectToNode(bool bTail1, SdrObject *pObj)
virtual void SetChanged()
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
virtual const tools::Rectangle & GetLastBoundRect() const
virtual const SdrGluePointList * GetGluePointList() const
const SfxItemSet & GetMergedItemSet() const
void SetMergedItem(const SfxPoolItem &rItem)
virtual SdrObject * GetConnectedNode(bool bTail1) const
virtual bool applySpecialDrag(SdrDragStat &rDrag)
bool HasMarkedObjPageView() const
sal_uInt32 PageWindowCount() const
SdrPageWindow * GetPageWindow(sal_uInt32 nIndex) const
SdrPaintWindow & GetPaintWindow() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
OutputDevice & GetOutputDevice() const
const basegfx::B2DPolyPolygon & GetPathPoly() const
void MoveMarkedPoints(const Size &rSiz)
void RotateMarkedPoints(const Point &rRef, Degree100 nAngle)
void ResizeMarkedPoints(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
bool IsCrookNoContortion() const
Degree100 GetSnapAngle() const
bool IsMoveOnlyDragging() const
void CheckSnap(const Point &rPt, tools::Long &nBestXSnap, tools::Long &nBestYSnap, bool &bXSnapped, bool &bYSnapped) const
SdrCrookMode GetCrookMode() const
virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix &rMatrix, const basegfx::B2DPolyPolygon &rPolyPolygon) override
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix &rMatrix, basegfx::B2DPolyPolygon &rPolyPolygon) const override
virtual std::unique_ptr< SdrUndoAction > CreateUndoAttrObject(SdrObject &rObject, bool bStyleSheet1=false, bool bSaveText=false)
virtual std::unique_ptr< SdrUndoAction > CreateUndoGeoObject(SdrObject &rObject)
Changing the geometry of an object.
void SetSkipChangeLayout(bool bOn)
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetHighlightColor() const
basegfx::B2DPolyPolygon getB2DPolyPolygon() const
bool IsControl(sal_uInt16 nPos) const
short path to read the CONTROL flag directly (TODO: better explain what the sense behind this flag is...
sal_uInt16 GetPointCount() const
void rotate(double fRadiant)
void translate(double fX, double fY)
void scale(double fX, double fY)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
void transform(const basegfx::B2DHomMatrix &rMatrix)
B2DRange getB2DRange() const
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void appendBezierSegment(const basegfx::B2DPoint &rNextControlPoint, const basegfx::B2DPoint &rPrevControlPoint, const basegfx::B2DPoint &rPoint)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
const B2DVector & getScale() const
const B2DVector & getTranslate() const
void append(const Primitive2DReference &)
static bool GetRelativePolyPoint(const basegfx::B2DPolyPolygon &rPoly, sal_uInt32 nAbsPnt, sal_uInt32 &rPolyNum, sal_uInt32 &rPointNum)
Outputs the relative position ( polygon number and point number in that polygon ) from the absolute p...
void add(OverlayObject &rOverlayObject)
void append(std::unique_ptr< OverlayObject > pOverlayObject)
basegfx::B2DRange getBaseRange() const
bool isHitLogic(const basegfx::B2DPoint &rLogicPosition, double fLogicTolerance=0.0) const
OUString SvxResId(TranslateId aId)
EmbeddedObjectRef * pObject
sal_uInt16 GetTransparentSelectionPercent()
sal_uInt16 GetStripeLength()
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
B2DPolygon expandToCurve(const B2DPolygon &rCandidate)
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
B2DPoint distort(const B2DPoint &rCandidate, const B2DRange &rOriginal, const B2DPoint &rTopLeft, const B2DPoint &rTopRight, const B2DPoint &rBottomLeft, const B2DPoint &rBottomRight)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY)
B2DTuple absolute(const B2DTuple &rTup)
B2IRange fround(const B2DRange &rRange)
attribute::SdrLineAttribute createNewSdrLineAttribute(const SfxItemSet &rSet)
BitmapEx createDefaultCross_3x3(const basegfx::BColor &rBColor)
Primitive2DReference createPolygonLinePrimitive(const basegfx::B2DPolygon &rPolygon, const attribute::SdrLineAttribute &rLine, const attribute::SdrLineStartEndAttribute &rStroke)
attribute::SdrLineStartEndAttribute createNewSdrLineStartEndAttribute(const SfxItemSet &rSet, double fWidth)
SwNodeOffset abs(const SwNodeOffset &a)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
UNDERLYING_TYPE get() const
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWWIDTH(SDRATTR_MISC_FIRST+12)
constexpr TypedWhichId< SdrGrafCropItem > SDRATTR_GRAFCROP(SDRATTR_GRAF_FIRST+9)
std::map< const SdrObject *, SdrObject * > SdrObjectAndCloneMap
#define DRAG_CROOK_RASTER_MAXIMUM
#define DRAG_CROOK_RASTER_MINIMUM
#define DRAG_CROOK_RASTER_DISTANCE
static basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView const &rPageView, const tools::Rectangle &rMarkRect)
#define SDRGLUEPOINT_NOTFOUND
ImpGetDescriptionOptions
options for ImpGetDescriptionString()
double CrookRotateXPoint(Point &rPnt, Point *pC1, Point *pC2, const Point &rCenter, const Point &rRad, double &rSin, double &rCos, bool bVert)
The following methods accept a point of an XPolygon, whereas the neighbouring control points of the a...
void OrthoDistance4(const Point &rPt0, Point &rPt, bool bBigOrtho)
void RotateXPoly(XPolygon &rPoly, const Point &rRef, double sn, double cs)
double CrookSlantXPoint(Point &rPnt, Point *pC1, Point *pC2, const Point &rCenter, const Point &rRad, double &rSin, double &rCos, bool bVert)
void OrthoDistance8(const Point &rPt0, Point &rPt, bool bBigOrtho)
double CrookStretchXPoint(Point &rPnt, Point *pC1, Point *pC2, const Point &rCenter, const Point &rRad, double &rSin, double &rCos, bool bVert, const tools::Rectangle &rRefRect)
sal_uInt16 GetAngleSector(Degree100 nAngle)
Normalize angle to 0.00..359.99.
Degree100 GetAngle(const Point &rPnt)
The Y axis points down! The function negates the Y axis, when calculating the angle,...
Degree100 NormAngle18000(Degree100 a)
Degree100 NormAngle36000(Degree100 a)
Normalize angle to -180.00..179.99.
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
void ResizePoint(Point &rPnt, const Point &rRef, const Fraction &xFract, const Fraction &yFract)