43#include <svx/strings.hrc>
52#include <svx/svxids.hrc>
54#include <osl/diagnose.h>
84 for (
size_t nm=0; nm<
nCount; ++nm)
91 for (
size_t nm=
nCount; nm>0;)
104 size_t nCmpPos = nNowPos+1;
106 if (pMaxObj!=
nullptr)
117 while (nCmpPos<nNewPos && !bEnd)
120 if (pCmpObj==
nullptr)
122 OSL_FAIL(
"MovMarkedToTop(): Reference object not found.");
125 else if (pCmpObj==pMaxObj)
141 if (nNowPos!=nNewPos)
146 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
171 for (
size_t nm=0; nm<
nCount; ++nm)
179 for (
size_t nm=0; nm<
nCount; ++nm)
191 size_t nCmpPos = nNowPos;
195 if (pMaxObj!=
nullptr)
197 const size_t nMinPos=pMaxObj->
GetOrdNum()+1;
207 while (nCmpPos>nNewPos && !bEnd)
210 if (pCmpObj==
nullptr)
212 OSL_FAIL(
"MovMarkedToBtm(): Reference object not found.");
215 else if (pCmpObj==pMaxObj)
231 if (nNowPos!=nNewPos)
236 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
266 if (pRefObj!=
nullptr)
272 if (nRefMark!=SAL_MAX_SIZE)
278 if (nRefMark!=SAL_MAX_SIZE)
284 for (
size_t nm=0; nm<
nCount; ++nm)
291 for (
size_t nm=
nCount; nm>0;)
306 if (pMaxObj!=
nullptr)
316 if (pRefObj!=
nullptr)
320 const size_t nMaxOrd=pRefObj->
GetOrdNum();
331 if (nNowPos!=nNewPos)
336 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
367 if (pRefObj!=
nullptr)
373 if (nRefMark!=SAL_MAX_SIZE)
379 if (nRefMark!=SAL_MAX_SIZE)
385 for (
size_t nm=0; nm<
nCount; ++nm) {
391 for (
size_t nm=0; nm<
nCount; ++nm) {
402 if (pMinObj!=
nullptr) {
403 const size_t nMinOrd=pMinObj->
GetOrdNum()+1;
404 if (nNewPos<nMinOrd) nNewPos=nMinOrd;
405 if (nNewPos>nNowPos) nNewPos=nNowPos;
407 if (pRefObj!=
nullptr) {
409 const size_t nMinOrd=pRefObj->
GetOrdNum();
410 if (nNewPos<nMinOrd) nNewPos=nMinOrd;
411 if (nNewPos>nNowPos) nNewPos=nNowPos;
416 if (nNowPos!=nNewPos) {
420 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
466 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj1,nOrd1,nOrd2));
467 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj2,nOrd2-1,nOrd1));
478 }
while (
a<nMarkCount);
496 SAL_WARN_IF(!pOL,
"svx",
"Object somehow has no ObjList");
501 if (pRestrict!=
nullptr) {
502 const size_t nRestrict=pRestrict->
GetOrdNum();
503 if (nRestrict<nMax) nMax=nRestrict;
506 if (pRestrict!=
nullptr) {
507 const size_t nRestrict=pRestrict->
GetOrdNum();
508 if (nRestrict>nMin) nMin=nRestrict;
528 nPos0 = SAL_MAX_SIZE;
550 if (pSource!=
nullptr) {
552 if (pOL!=
nullptr && !pSource->
Is3DObj()) {
554 pSource=aIter.
Next();
558 if(!(pSource && pDest))
583 bIsLine = pPath->
IsLine();
656 pPath =
dynamic_cast<SdrPathObj*
>( pConvObj.get() );
694 const sal_uInt32 nPolyCount(rPolyPolygon.
count());
700 else if(1 == nPolyCount)
708 for(sal_uInt32
a(1);
a < nPolyCount;
a++)
714 if(aCandidate.
count())
726 const double fSmallestRA(std::min(fRACA, fRACB));
727 const double fSmallestRB(std::min(fRBCA, fRBCB));
729 if(fSmallestRA < fSmallestRB)
735 const double fSmallestCA(std::min(fRACA, fRBCA));
736 const double fSmallestCB(std::min(fRACB, fRBCB));
738 if(fSmallestCB < fSmallestCA)
745 aRetval.
append(aCandidate);
750 aRetval = aCandidate;
761struct ImpDistributeEntry
795 ImpDistributeEntryList::iterator itEntryList;
796 sal_uInt32 nFullLength;
807 for(
size_t a = 0;
a < nMark; ++
a )
810 ImpDistributeEntry aNew;
818 aNew.mnPos = aNew.mpObj->GetSnapRect().Left();
823 aNew.mnPos = (aNew.mpObj->GetSnapRect().Right() + aNew.mpObj->GetSnapRect().Left()) / 2;
828 aNew.mnLength = aNew.mpObj->GetSnapRect().GetWidth() + 1;
829 nFullLength += aNew.mnLength;
830 aNew.mnPos = (aNew.mpObj->GetSnapRect().Right() + aNew.mpObj->GetSnapRect().Left()) / 2;
835 aNew.mnPos = aNew.mpObj->GetSnapRect().Right();
841 itEntryList = std::find_if(aEntryList.begin(), aEntryList.end(),
842 [&aNew](
const ImpDistributeEntry& rEntry) { return rEntry.mnPos >= aNew.mnPos; });
843 if ( itEntryList < aEntryList.end() )
844 aEntryList.insert( itEntryList, aNew );
846 aEntryList.push_back( aNew );
853 double fStepWidth = (
static_cast<double>(nWidth) -
static_cast<double>(nFullLength)) /
static_cast<double>(aEntryList.size() - 1);
854 double fStepStart =
static_cast<double>(aEntryList[ 0 ].mnPos);
855 fStepStart += fStepWidth +
static_cast<double>((aEntryList[ 0 ].mnLength + aEntryList[ 1 ].mnLength) / 2);
858 for(
size_t i = 1,
n = aEntryList.size()-1;
i <
n; ++
i )
860 ImpDistributeEntry& rCurr = aEntryList[
i ];
861 ImpDistributeEntry& rNext = aEntryList[
i + 1];
862 sal_Int32 nDelta =
static_cast<sal_Int32
>(fStepStart + 0.5) - rCurr.mnPos;
864 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*rCurr.mpObj));
865 rCurr.mpObj->Move(
Size(nDelta, 0));
866 fStepStart += fStepWidth +
static_cast<double>((rCurr.mnLength + rNext.mnLength) / 2);
872 sal_Int32 nWidth = aEntryList[ aEntryList.size() - 1 ].mnPos - aEntryList[ 0 ].mnPos;
873 double fStepWidth =
static_cast<double>(nWidth) /
static_cast<double>(aEntryList.size() - 1);
874 double fStepStart =
static_cast<double>(aEntryList[ 0 ].mnPos);
875 fStepStart += fStepWidth;
878 for(
size_t i = 1 ;
i < aEntryList.size()-1 ; ++
i )
880 ImpDistributeEntry& rCurr = aEntryList[
i ];
881 sal_Int32 nDelta =
static_cast<sal_Int32
>(fStepStart + 0.5) - rCurr.mnPos;
883 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*rCurr.mpObj));
884 rCurr.mpObj->Move(
Size(nDelta, 0));
885 fStepStart += fStepWidth;
898 for(
size_t a = 0;
a < nMark; ++
a )
901 ImpDistributeEntry aNew;
909 aNew.mnPos = aNew.mpObj->GetSnapRect().Top();
914 aNew.mnPos = (aNew.mpObj->GetSnapRect().Bottom() + aNew.mpObj->GetSnapRect().Top()) / 2;
919 aNew.mnLength = aNew.mpObj->GetSnapRect().GetHeight() + 1;
920 nFullLength += aNew.mnLength;
921 aNew.mnPos = (aNew.mpObj->GetSnapRect().Bottom() + aNew.mpObj->GetSnapRect().Top()) / 2;
926 aNew.mnPos = aNew.mpObj->GetSnapRect().Bottom();
932 itEntryList = std::find_if(aEntryList.begin(), aEntryList.end(),
933 [&aNew](
const ImpDistributeEntry& rEntry) { return rEntry.mnPos >= aNew.mnPos; });
934 if ( itEntryList < aEntryList.end() )
935 aEntryList.insert( itEntryList, aNew );
937 aEntryList.push_back( aNew );
944 double fStepWidth = (
static_cast<double>(nHeight) -
static_cast<double>(nFullLength)) /
static_cast<double>(aEntryList.size() - 1);
945 double fStepStart =
static_cast<double>(aEntryList[ 0 ].mnPos);
946 fStepStart += fStepWidth +
static_cast<double>((aEntryList[ 0 ].mnLength + aEntryList[ 1 ].mnLength) / 2);
949 for(
size_t i = 1,
n = aEntryList.size()-1;
i <
n; ++
i)
951 ImpDistributeEntry& rCurr = aEntryList[
i ];
952 ImpDistributeEntry& rNext = aEntryList[
i + 1 ];
953 sal_Int32 nDelta =
static_cast<sal_Int32
>(fStepStart + 0.5) - rCurr.mnPos;
955 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*rCurr.mpObj));
956 rCurr.mpObj->Move(
Size(0, nDelta));
957 fStepStart += fStepWidth +
static_cast<double>((rCurr.mnLength + rNext.mnLength) / 2);
963 sal_Int32 nHeight = aEntryList[ aEntryList.size() - 1 ].mnPos - aEntryList[ 0 ].mnPos;
964 double fStepWidth =
static_cast<double>(nHeight) /
static_cast<double>(aEntryList.size() - 1);
965 double fStepStart =
static_cast<double>(aEntryList[ 0 ].mnPos);
966 fStepStart += fStepWidth;
969 for(
size_t i = 1,
n = aEntryList.size()-1;
i <
n; ++
i)
971 ImpDistributeEntry& rCurr = aEntryList[
i ];
972 sal_Int32 nDelta =
static_cast<sal_Int32
>(fStepStart + 0.5) - rCurr.mnPos;
974 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*rCurr.mpObj));
975 rCurr.mpObj->Move(
Size(0, nDelta));
976 fStepStart += fStepWidth;
1005 size_t nInsPos = SAL_MAX_SIZE;
1012 bool bFirstObjectComplete(
false);
1020 OSL_ENSURE(
AreObjectsMarked(),
"no more objects selected after preparations (!)");
1057 if(!bFirstObjectComplete)
1061 if(aMergePolyPolygonA.
count())
1067 aMergePolyPolygonA = aTmpPoly;
1072 if(aMergePolyPolygonB.
count())
1081 aMergePolyPolygonB = aTmpPoly;
1088 if(!bFirstObjectComplete && aMergePolyPolygonA.
count())
1090 bFirstObjectComplete =
true;
1134 MarkObj(pPath.get(), pInsPV,
false,
true);
1150 SvxResId(STR_EditMergeSubstractPoly),
1157 SvxResId(STR_EditMergeIntersectPoly),
1176 size_t nLastSelected = 0;
1178 for (
size_t a = 1;
a < nMarked; ++
a)
1181 if (nCandidateTime > nLastSelectedTime)
1183 nLastSelectedTime = nCandidateTime;
1196 for (
size_t a = 0;
a < nMarked; ++
a)
1198 if (
a == nLastSelected)
1208 aLogicRect.
SetSize(aLogicRectSize);
1215 SvxResId(bWidth ? STR_EqualizeWidthMarkedObjects : STR_EqualizeHeightMarkedObjects),
1251 const OUString sLastPara = nPara ? rDrawOutliner.
GetText( rDrawOutliner.
GetParagraph( nPara - 1 ) ) :
"";
1252 sal_Int32
n = sLastPara.getLength();
1256 const bool bAppend = !
n || ( sLastPara[
n] !=
'.' && sLastPara[
n] !=
'?' && sLastPara[
n] !=
'!' );
1257 rDrawOutliner.
AddText( *pOPO, bAppend );
1262 MarkObj(pObj, pPageView,
true,
true);
1329 size_t nInsPos = SAL_MAX_SIZE;
1341 if(pCurrentOL != pThisOL)
1343 pCurrentOL = pThisOL;
1355 aPolyPolygon.
insert(0, aTmpPoly);
1371 aPolyPolygon.
clear();
1372 aPolyPolygon.
append(aCombinedPolygon);
1375 const sal_uInt32 nPolyCount(aPolyPolygon.
count());
1377 if (nPolyCount && pAttrObj)
1389 const sal_uInt32 nPointCount(aPolygon.
count());
1391 if(nPointCount <= 2)
1402 const double fJoinTolerance(10.0);
1404 if(fDistance < fJoinTolerance)
1426 bool bIsClosedPathObj =
false;
1427 if (
auto pPathObj =
dynamic_cast<const SdrPathObj*
>(pAttrObj))
1428 if (pPathObj->IsClosed())
1429 bIsClosedPathObj =
true;
1431 if(drawing::LineStyle_NONE == eLineStyle && (drawing::FillStyle_NONE == eFillStyle || !bIsClosedPathObj))
1445 MarkObj(pPath.get(), pInsPV,
false,
true);
1466 const sal_uInt32 nPolygonCount(rPpolyPolygon.
count());
1468 if(nPolygonCount >= 2)
1473 else if(bMakeLines && 1 == nPolygonCount)
1477 const sal_uInt32 nPointCount(aPolygon.
count());
1490 bool bOtherObjs(
false);
1491 bool bMin1PolyPoly(
false);
1499 while(aIter.
IsMore() && !bOtherObjs)
1508 bMin1PolyPoly =
true;
1536 bMin1PolyPoly =
true;
1549 else if(pCustomShape)
1554 bMin1PolyPoly =
true;
1562 return bMin1PolyPoly && !bOtherObjs;
1577 const sal_uInt32 nPolyCount(rPolyPolygon.
count());
1579 for(sal_uInt32
a(0);
a < nPolyCount;
a++)
1582 const sal_uInt32 nPointCount(rCandidate.
count());
1584 if(!bMakeLines || nPointCount < 2)
1591 pLast = pPath.get();
1594 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pPath,
true));
1595 MarkObj(pPath.get(), pPV,
false,
true);
1600 const sal_uInt32 nLoopCount(rCandidate.
isClosed() ? nPointCount : nPointCount - 1);
1602 for(sal_uInt32 b(0); b < nLoopCount; b++)
1606 const sal_uInt32 nNextIndex((b + 1) % nPointCount);
1628 pLast = pPath.get();
1631 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pPath,
true));
1632 MarkObj(pPath.get(), pPV,
false,
true);
1643 else if(pCustomShape)
1653 DBG_ASSERT(pCandidate,
"SdrEditView::ImpDismantleOneObject: Could not clone SdrObject (!)");
1657 if(
dynamic_cast<const SdrObjGroup*
>( pReplacement) !=
nullptr)
1665 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pCandidate,
true));
1666 MarkObj(pCandidate.get(), pPV,
false,
true);
1680 pTextObj->NbcSetOutlinerParaObject(*pParaObj);
1694 pTextObj->SetSnapRect(aTextBounds);
1701 pTextObj->NbcRotate(
1707 pTextObj->SetMergedItemSet(aTargetItemSet);
1712 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pTextObj,
true));
1713 MarkObj(pTextObj.get(), pPV,
false,
true);
1744 if (pOL!=pOL0) { pOL0=pOL; pObj->
GetOrdNum(); }
1748 size_t nPos=nPos0+1;
1750 if (pSubList!=
nullptr && !pObj->
Is3DObj()) {
1760 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj,
true));
1798 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoRemoveObject( *pObj ));
1818 bool bNeedInsPos=
true;
1829 pDstLst=pGrp->GetSubList();
1830 assert(pDstLst &&
"Alleged group object doesn't return object list.");
1833 if (pSrcLst!=pSrcLst0)
1838 bool bForeignList=pSrcLst!=pCurrentLst;
1839 if (!bForeignList && bNeedInsPos)
1861 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pGrp,
true));
1862 for (
size_t no=0; no<
nCount; ++no)
1897 if (pSrcLst!=
nullptr) {
1915 const bool bIsDiagram(pGrp->
isDiagram());
1919 if(bIsDiagram && nObjCount)
1946 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
1960 for (
size_t no=nObjCount; no>0;)
1964 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoRemoveObject(*pObj));
1968 for (
size_t no=0; no<nObjCount; ++no)
1973 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoInsertObject(*pObj,
true));
1986 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pGrp));
2022 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoReplaceObject(*pObj,*pNewObj));
2033 bool bMrkChg =
false;
2039 pDscrID = STR_EditConvToContour;
2041 pDscrID = STR_EditConvToContours;
2048 if (nMarkCount==1) pDscrID=STR_EditConvToCurve;
2049 else pDscrID=STR_EditConvToCurves;
2052 if (nMarkCount==1) pDscrID=STR_EditConvToPoly;
2053 else pDscrID=STR_EditConvToPolys;
2057 for (
size_t nm=nMarkCount; nm>0;) {
2121 if (pProgrInfo !=
nullptr)
2133 const size_t nInsPos=pObj->
GetOrdNum()+1;
2138 if (pGraf !=
nullptr)
2143 if (pVectorGraphicData && pVectorGraphicData->getType() == VectorGraphicDataType::Pdf)
2163 nInsCnt = aFilter.
DoImport(aMetaFile, *pOL, nInsPos, pProgrInfo);
2180 size_t nObj = nInsPos;
2188 for (
size_t i = 0;
i < nInsCnt;
i++)
2203 SdrMark aNewMark(pCandidate, pPV);
2212 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
double mfCosRotationAngle
double mfSinRotationAngle
Degree100 m_nRotationAngle
const GDIMetaFile & GetGDIMetaFile() const
sal_Int32 getPageNumber() const
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData() const
size_t DoImport(SdrObjList &rDestList, size_t nInsPos, int nPageNumber, SvdProgressInfo *pProgrInfo=nullptr)
OUString GetText(Paragraph const *pPara, sal_Int32 nParaCount=1) const
void AddText(const OutlinerParaObject &, bool bAppend=false)
Paragraph * GetParagraph(sal_Int32 nAbsPos) const
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
sal_Int32 GetParagraphCount() const
virtual const tools::Rectangle & GetSnapRect() const override
static bool ImpCanDismantle(const basegfx::B2DPolyPolygon &rPpolyPpolygon, bool bMakeLines)
void PutMarkedBehindObj(const SdrObject *pRefObj)
bool IsUndoEnabled() const
void EqualizeMarkedObjects(bool bWidth)
virtual void MarkListHasChanged() override
virtual void ObjOrderChanged(SdrObject *pObj, size_t nOldPos, size_t nNewPos)
void ConvertMarkedToPathObj(bool bLineToArea)
static basegfx::B2DPolyPolygon ImpGetPolyPolygon(const SdrObject *pObj)
static bool ImpCanConvertForCombine1(const SdrObject *pObj)
void MergeMarkedObjects(SdrMergeMode eMode)
void ReverseOrderOfMarked()
virtual SdrObject * GetMaxToTopObj(SdrObject *pObj) const
std::vector< rtl::Reference< SdrObject > > DeleteMarkedList(SdrMarkList const &rMark)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
void ImpDismantleOneObject(const SdrObject *pObj, SdrObjList &rOL, size_t &rPos, SdrPageView *pPV, bool bMakeLines)
std::vector< std::unique_ptr< SdrUndoAction > > CreateConnectorUndo(const SdrObject &rO)
virtual SdrObject * GetMaxToBtmObj(SdrObject *pObj) const
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void DismantleMarkedObjects(bool bMakeLines=false)
void AddUndoActions(std::vector< std::unique_ptr< SdrUndoAction > >)
void CombineMarkedTextObjects()
void DoImportMarkedMtf(SvdProgressInfo *pProgrInfo=nullptr)
void ImpConvertTo(bool bPath, bool bLineToArea)
void CombineMarkedObjects(bool bNoPolyPoly=true)
void ConvertMarkedToPolyObj()
void SetUndoComment(const OUString &rComment, const OUString &rObjDescr)
void ImpCheckToTopBtmPossible()
void PutMarkedInFrontOfObj(const SdrObject *pRefObj)
void DistributeMarkedObjects(sal_uInt16 SlotID)
static bool ImpCanConvertForCombine(const SdrObject *pObj)
rtl::Reference< SdrObject > ImpConvertOneObj(SdrObject *pObj, bool bPath, bool bLineToArea)
void ImpCopyAttributes(const SdrObject *pSource, SdrObject *pDest) const
static basegfx::B2DPolyPolygon ImpGetPolyPolygon1(const SdrObject *pObj)
static basegfx::B2DPolygon ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon &rPolyPolygon)
This class represents an embedded or linked bitmap graphic object.
bool HasGDIMetaFile() const
GDIMetaFile getMetafileFromEmbeddedVectorGraphicData() const
Graphic GetTransformedGraphic(SdrGrafObjTransformsAttrs nTransformFlags=SdrGrafObjTransformsAttrs::ALL) const
const Graphic & GetGraphic() const
bool isEmbeddedVectorGraphicData() const
const OUString & GetMarkDescription() const
void ReplaceMark(const SdrMark &rNewMark, size_t nNum)
size_t GetMarkCount() const
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
SdrMark * GetMark(size_t nNum) const
void DeleteMark(size_t nNum)
void Merge(const SdrMarkList &rSrcList, bool bReverse=false)
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
void SortMarkedObjects() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
SdrMarkList & GetMarkedObjectListWriteAccess()
tools::Rectangle GetAllMarkedBoundRect() const
size_t GetMarkedObjectCount() const
SdrMark * GetSdrMarkByIndex(size_t nNum) const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
OUString const & GetDescriptionOfMarkedObjects() const
SdrPageView * GetSdrPageViewOfMarkedByIndex(size_t nNum) const
const tools::Rectangle & GetMarkedObjRect() const
size_t TryToFindMarkedObject(const SdrObject *pObj) const
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Everything a View needs to know about a selected object.
SdrPageView * GetPageView() const
SdrObject * GetMarkedSdrObj() const
sal_Int64 getTimeStamp() const
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
void SetUndoComment(const OUString &rComment)
virtual bool IsTextPath() const override
const SdrObject * GetSdrObjectFromCustomShape() const
bool GetTextBounds(tools::Rectangle &rTextBound) const
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
virtual rtl::Reference< SdrObject > ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
Replace existing object by different one.
virtual SdrObject * SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
Modify ZOrder of an SdrObject.
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void RecalcObjOrdNums()
recalculate order numbers / ZIndex
bool IsObjOrdNumsDirty() const
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
sal_uInt32 GetOrdNumDirect() const
bool IsResizeProtect() const
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
virtual void NbcSetLayer(SdrLayerID nLayer)
void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
virtual OUString TakeObjNamePlural() const
bool IsMoveProtect() const
virtual SdrInventor GetObjInventor() const
virtual OutlinerParaObject * GetOutlinerParaObject() const
sal_uInt32 GetOrdNum() const
The order number (aka ZOrder, aka z-index) determines whether a SdrObject is located above or below a...
virtual SdrObjList * GetSubList() const
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
rtl::Reference< SdrObject > ConvertToPolyObj(bool bBezier, bool bLineToArea) const
void NbcSetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual const tools::Rectangle & GetCurrentBoundRect() const
void SetResizeProtect(bool bProt)
SdrObjList * getParentSdrObjListFromSdrObject() const
SdrModel & getSdrModelFromSdrObject() const
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
virtual void SetLogicRect(const tools::Rectangle &rRect)
SfxStyleSheet * GetStyleSheet() const
void SetMoveProtect(bool bProt)
bool IsGroupObject() const
bool HasLineStyle() const
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const =0
const SfxItemSet & GetMergedItemSet() const
virtual OUString TakeObjNameSingul() const
void ClearMergedItem(const sal_uInt16 nWhich=0)
virtual SdrLayerID GetLayer() const
bool HasFillStyle() const
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
virtual const tools::Rectangle & GetLogicRect() const
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)=0
const Graphic * GetGraphic() const
SdrObjList * GetObjList() const
Return current List.
bool IsLayerLocked(const OUString &rName) const
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
const OUString & GetActiveLayer() const
virtual SdrObjKind GetObjIdentifier() const override
const basegfx::B2DPolyPolygon & GetPathPoly() const
Rectangle objects (rectangle, circle, ...)
virtual OutlinerParaObject * GetOutlinerParaObject() const override
virtual const tools::Rectangle & GetLogicRect() const override
virtual bool HasText() const override
virtual SdrObjKind GetObjIdentifier() const override
const GeoStat & GetGeoStat() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
Helper class for the communication between the dialog In order to break open Metafiles (sd/source/ui/...
bool ReportActions(size_t nActionCount)
void insert(sal_uInt32 nIndex, const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
void setClosed(bool bNew)
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
basegfx::B2DPoint getPrevControlPoint(sal_uInt32 nIndex) const
bool areControlPointsUsed() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
basegfx::B2DPoint getNextControlPoint(sal_uInt32 nIndex) const
void appendBezierSegment(const basegfx::B2DPoint &rNextControlPoint, const basegfx::B2DPoint &rPrevControlPoint, const basegfx::B2DPoint &rPoint)
static bool isWhiteSpace(const sal_uInt32 ch)
#define DBG_ASSERT(sCon, aError)
OUString SvxResId(TranslateId aId)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
#define SAL_WARN_IF(condition, area, stream)
B2DPolyPolygon prepareForPolygonOperation(const B2DPolygon &rCandidate)
double getLength(const B2DPolygon &rCandidate)
B2DPolyPolygon solvePolygonOperationOr(const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB)
B2DPolyPolygon solvePolygonOperationAnd(const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB)
B2DPolygon simplifyCurveSegments(const B2DPolygon &rCandidate)
B2DPolyPolygon solvePolygonOperationDiff(const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB)
SdrOnOffItem makeSdrShadowItem(bool bShadow)
static std::shared_ptr< PDFium > & get()
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
constexpr sal_uInt16 SDRATTR_NOTPERSIST_LAST(SDRATTR_OBJVISIBLE)
constexpr sal_uInt16 SDRATTR_NOTPERSIST_FIRST(SDRATTR_CIRC_LAST+1)
constexpr sal_uInt16 SDRATTR_END(SDRATTR_WRITINGMODE2_LAST)
std::vector< ImpDistributeEntry > ImpDistributeEntryList
SdrTextObj * DynCastSdrTextObj(SdrObject *pObj)
@ PathFill
open Bezier-curve
@ Text
closed free-hand line
@ PolyLine
polygon, PolyPolygon
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)