22#include <com/sun/star/uno/Any.hxx>
24#include <rtl/ustring.hxx>
37#include <osl/diagnose.h>
40#include <unordered_set>
68namespace tools {
class PolyPolygon; }
90namespace sdr {
class ObjectUser; }
101 BasicDialog = sal_uInt32(
'D' | (
'L' << 8) | (
'G' << 16) | (
'1' << 24) ),
102 Default = sal_uInt32(
'S' | (
'V' << 8) | (
'D' << 16) | (
'r' << 24) ),
103 E3d = sal_uInt32(
'E' | (
'3' << 8) | (
'D' << 16) | (
'1' << 24) ),
104 FmForm = sal_uInt32(
'F' | (
'M' << 8) | (
'0' << 16) | (
'1' << 24) ),
105 IMap = sal_uInt32(
'I' | (
'M' << 8) | (
'A' << 16) | (
'P' << 24) ),
106 ReportDesign = sal_uInt32(
'R' | (
'P' << 8) | (
'T' << 16) | (
'1' << 24) ),
107 ScOrSwDraw = sal_uInt32(
'S' | (
'C' << 8) | (
'3' << 16) | (
'0' << 24) ),
108 SgaImap = sal_uInt32(
'S' | (
'D' << 8) | (
'U' << 16) | (
'D' << 24) ),
109 StarDrawUserData = sal_uInt32(
'S' | (
'D' << 8) | (
'U' << 16) | (
'D' << 24) ),
110 Swg = sal_uInt32(
'S' | (
'W' << 8) | (
'G' << 16) ),
133 virtual sal_Int32 GetPDFAnchorStructureElementId(
SdrObject const& rObj);
168 sal_uInt16
GetId()
const {
return nIdentifier;}
179 std::unique_ptr<SdrGluePointList>
264 virtual const std::shared_ptr< svx::diagram::IDiagramHelper >& getDiagramHelper()
const;
265 bool isDiagram()
const {
return bool(getDiagramHelper()); }
303 virtual void SAL_CALL acquire() noexcept override final;
304 virtual
void SAL_CALL release() noexcept override final;
307 SdrPage* getSdrPageFromSdrObject() const;
308 SdrModel& getSdrModelFromSdrObject() const;
311 virtual
SdrObjList* getChildrenOfSdrObject() const;
314 SdrObjList* getParentSdrObjListFromSdrObject() const;
315 SdrObject* getParentSdrObjectFromSdrObject() const;
322 virtual
void handlePageChange(
SdrPage* pOldPage,
SdrPage* pNewPage);
324 void AddObjectUser(
sdr::ObjectUser& rNewUser);
325 void RemoveObjectUser(
sdr::ObjectUser& rOldUser);
327 sdr::contact::ViewContact& GetViewContact() const;
329 virtual
sdr::
properties::BaseProperties& GetProperties() const;
332 void ActionChanged() const;
335 void SetRelativeWidth(
double nValue );
336 void SetRelativeWidthRelation( sal_Int16 eValue );
337 void SetRelativeHeight(
double nValue );
338 void SetRelativeHeightRelation( sal_Int16 eValue );
339 const
double* GetRelativeWidth() const;
340 sal_Int16 GetRelativeWidthRelation() const;
341 const
double* GetRelativeHeight() const;
342 sal_Int16 GetRelativeHeightRelation() const;
348 virtual
void SetBoundAndSnapRectsDirty(
bool bNotMyself = false,
bool bRecursive = true);
351 virtual
void SetBoundRectDirty();
369 void getMergedHierarchySdrLayerIDSet(
SdrLayerIDSet& rSet) const;
377 virtual
void SetName(const OUString& rStr, const
bool bSetChanged = true);
378 virtual const OUString & GetName() const;
379 void MakeNameUnique();
380 void MakeNameUnique(
std::unordered_set<OUString>& rNameSet);
381 virtual
void SetTitle(const OUString& rStr);
382 virtual OUString GetTitle() const;
383 virtual
void SetDescription(const OUString& rStr);
384 virtual OUString GetDescription() const;
387 bool IsGroupObject() const;
396 sal_uInt32 GetOrdNum() const;
399 void SetOrdNum(sal_uInt32 nNum);
402 void GetGrabBagItem(css::
uno::Any& rVal) const;
404 virtual
void SetGrabBagItem(const css::
uno::Any& rVal);
413 sal_uInt32 GetNavigationPosition() const;
419 virtual const
tools::Rectangle& GetCurrentBoundRect() const;
425 virtual const
tools::Rectangle& GetLastBoundRect() const;
427 virtual
void RecalcBoundRect();
429 void BroadcastObjectChange() const;
434 virtual
void SetChanged();
439 bool LineGeometryUsageIsNecessary() const;
443 virtual
bool HasLimitedRotation() const;
452 return static_cast<T*
>(newObj.get());
460 virtual OUString TakeObjNameSingul()
const;
461 virtual OUString TakeObjNamePlural()
const;
484 virtual void AddToHdlList(
SdrHdlList& rHdlList)
const;
485 virtual void addCropHandles(
SdrHdlList& rTarget)
const;
497 virtual bool hasSpecialDrag()
const;
498 virtual bool beginSpecialDrag(
SdrDragStat& rDrag)
const;
500 virtual OUString getSpecialDragComment(
const SdrDragStat& rDrag)
const;
510 virtual bool supportsFullDrag()
const;
543 virtual void NbcMove (
const Size& rSiz);
544 virtual void NbcResize(
const Point& rRef,
const Fraction& xFact,
const Fraction& yFact);
545 virtual void NbcCrop (
const basegfx::B2DPoint& rRef,
double fxFact,
double fyFact);
546 virtual void NbcRotate(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
548 void NbcRotate(
const Point& rRef,
Degree100 nAngle);
549 virtual void NbcMirror(
const Point& rRef1,
const Point& rRef2);
550 virtual void NbcShear (
const Point& rRef,
Degree100 nAngle,
double tn,
bool bVShear);
552 virtual void Move (
const Size& rSiz);
553 virtual void Resize(
const Point& rRef,
const Fraction& xFact,
const Fraction& yFact,
bool bUnsetRelative =
true);
555 virtual void Rotate(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
556 virtual void Mirror(
const Point& rRef1,
const Point& rRef2);
557 virtual void Shear (
const Point& rRef,
Degree100 nAngle,
double tn,
bool bVShear);
561 virtual void NbcSetRelativePos(
const Point& rPnt);
562 virtual void SetRelativePos(
const Point& rPnt);
563 virtual Point GetRelativePos()
const;
564 void ImpSetAnchorPos(
const Point& rPnt);
565 virtual void NbcSetAnchorPos(
const Point& rPnt);
566 virtual void SetAnchorPos(
const Point& rPnt);
572 virtual void RecalcSnapRect();
587 virtual void AdjustToMaxRect(
const tools::Rectangle& rMaxRect,
bool bShrinkOnly =
false );
591 virtual Degree100 GetShearAngle(
bool bVertical =
false)
const;
594 virtual sal_uInt32 GetSnapPointCount()
const;
595 virtual Point GetSnapPoint(sal_uInt32 i)
const;
602 virtual bool IsPolyObj()
const;
603 virtual sal_uInt32 GetPointCount()
const;
605 void SetPoint(
const Point& rPnt, sal_uInt32 i);
606 virtual void NbcSetPoint(
const Point& rPnt, sal_uInt32 i);
609 virtual std::unique_ptr<SdrObjGeoData> GetGeoData()
const;
615 void ClearMergedItem(
const sal_uInt16 nWhich = 0);
616 void SetMergedItemSet(
const SfxItemSet& rSet,
bool bClearAllItems =
false);
617 const SfxPoolItem& GetMergedItem(
const sal_uInt16 nWhich)
const;
621 return static_cast<const T&
>(GetMergedItem(sal_uInt16(nWhich)));
625 void SetMergedItemSetAndBroadcast(
const SfxItemSet& rSet,
bool bClearAllItems =
false);
628 void TakeNotPersistAttr(
SfxItemSet& rAttr)
const;
629 void ApplyNotPersistAttr(
const SfxItemSet& rAttr);
630 void NbcApplyNotPersistAttr(
const SfxItemSet& rAttr);
634 void SetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr);
635 void NbcSetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr);
638 virtual bool HasTextEdit()
const;
645 virtual void NbcReformatText();
647 void BurnInStyleSheetAttributes();
650 virtual bool HasMacro()
const;
674 virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum)
const;
678 virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum)
const;
687 void SetGlueReallyAbsolute(
bool bOn);
688 void NbcRotateGluePoints(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
689 void NbcMirrorGluePoints(
const Point& rRef1,
const Point& rRef2);
690 void NbcShearGluePoints (
const Point& rRef,
double tn,
bool bVShear);
694 virtual void ConnectToNode(
bool bTail1,
SdrObject* pObj);
695 virtual void DisconnectFromNode(
bool bTail1);
696 virtual SdrObject* GetConnectedNode(
bool bTail1)
const;
707 virtual void SetContextWritingMode(
const sal_Int16 _nContextWritingMode );
749 void InsertedStateChange();
750 bool IsInserted()
const {
return nullptr != getParentSdrObjListFromSdrObject(); }
755 void SetMoveProtect(
bool bProt);
757 void SetResizeProtect(
bool bProt);
759 void SetPrintable(
bool bPrn);
761 void SetVisible(
bool bVisible);
763 void SetMarkProtect(
bool bProt);
772 sal_uInt16 GetUserDataCount()
const;
775 void AppendUserData(std::unique_ptr<SdrObjUserData> pData);
778 void DeleteUserData(sal_uInt16 nNum);
781 virtual css::uno::Reference< css::drawing::XShape > getUnoShape();
783 static SdrObject* getSdrObjectFromXShape(
const css::uno::Reference< css::uno::XInterface >& xInt );
816 bool IsInDestruction()
const;
819 bool HasFillStyle()
const;
820 bool HasLineStyle()
const;
830 virtual bool HasText()
const;
837 virtual bool IsTextBox()
const;
839 void SetEmptyPresObj(
bool bEpt);
841 void SetNotVisibleAsMaster(
bool bFlg);
846 void SetDoNotInsertIntoPageAutomatically(
bool bSet);
856 const Point& GetAnchorPos()
const;
867 void SetNavigationPosition (
const sal_uInt32 nPosition);
881 virtual void setUnoShape(
const css::uno::Reference< css::drawing::XShape >& _rxUnoShape );
883 const css::uno::WeakReference< css::drawing::XShape >&
getWeakUnoShape()
const {
return maWeakUnoShape; }
886 bool setSuitableOutlinerBg(
Outliner& rOutliner)
const;
888 const Graphic* getFillGraphic()
const;
891 void setHyperlink(
const OUString& sHyperlink) { msHyperlink = sHyperlink; }
899 void resetOutRectangle();
900 void moveOutRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta);
905 std::unique_ptr<SdrObjPlusData>
933 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties();
935 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
940 OUString ImpGetDescriptionStr(
TranslateId pStrCacheID)
const;
942 void ImpForcePlusData();
950 virtual std::unique_ptr<SdrObjGeoData> NewGeoData()
const;
957 void SetObjectItemSet(
const SfxItemSet& rSet);
958 const SfxPoolItem& GetObjectItem(
const sal_uInt16 nWhich)
const;
961 return static_cast<const T&
>(GetObjectItem(sal_uInt16(nWhich)));
964 const SfxItemSet* getBackgroundFillSet()
const;
966 virtual void InternalSetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr,
bool bBroadcast);
983 std::unique_ptr<sdr::properties::BaseProperties>
985 std::unique_ptr<sdr::contact::ViewContact>
991 css::uno::WeakReference< css::drawing::XShape >
static void GetPoint(const tools::Polygon &rPoly, const std::vector< double > &rDistances, const double &fX, double &fx1, double &fy1)
sal_uInt32 GetHdlCount() const
SAL_DLLPRIVATE Degree100 GetRotateAngle() const
const tools::Rectangle & GetLogicRect() const
Whoever creates his own objects must set a link in the SdrObjFactory class.
All geometrical data of an arbitrary object for use in undo/redo.
std::unique_ptr< SdrGluePointList > pGPL
tools::Rectangle aBoundRect
const SdrPageView * pPageView
const SdrLayerIDSet * pVisiLayer
User data of a drawing object, e.g.
bool operator==(const SdrObjUserData &rData) const =delete
SdrInventor GetInventor() const
void operator=(const SdrObjUserData &rData)=delete
virtual std::unique_ptr< SdrObjUserData > Clone(SdrObject *pObj1) const =0
bool operator!=(const SdrObjUserData &rData) const =delete
sal_uInt32 GetOrdNumDirect() const
SdrObject(const SdrObject &)=delete
bool IsResizeProtect() const
SdrObject & operator=(const SdrObject &rObj)=delete
std::unique_ptr< Impl > mpImpl
SdrObjUserCall * GetUserCall() const
const css::uno::WeakReference< css::drawing::XShape > & getWeakUnoShape() const
bool mbLineIsOutsideGeometry
const T & GetMergedItem(TypedWhichId< T > nWhich) const
SdrModel & mrSdrModelFromSdrObject
const tools::Rectangle & GetBLIPSizeRectangle() const
const SdrObject * mpFillGeometryDefiningShape
tools::Rectangle maBLIPSizeRectangle
const OUString & getHyperlink() const
bool IsDoNotInsertIntoPageAutomatically() const
std::unique_ptr< SdrObjPlusData > m_pPlusData
bool IsMoveProtect() const
bool LineIsOutsideGeometry() const
bool mbSupportTextIndentingOnLineWidthChange
SdrObjList * mpParentOfSdrObject
bool IsEmptyPresObj() const
const SdrObject * getFillGeometryDefiningShape() const
bool DoesSupportTextIndentingOnLineWidthChange() const
SdrObjUserCall * m_pUserCall
bool IsVirtualObj() const
std::unique_ptr< SfxGrabBagItem > m_pGrabBagItem
virtual bool IsSdrTextObj() const
virtual bool IsTextPath() const
tools::Rectangle m_aOutRect
std::unique_ptr< sdr::contact::ViewContact > mpViewContact
bool IsMarkProtect() const
const T & GetObjectItem(TypedWhichId< T > nWhich) const
SdrObject & operator=(SdrObject &&rObj)=delete
bool mbDoNotInsertIntoPageAutomatically
bool IsNotVisibleAsMaster() const
css::uno::WeakReference< css::drawing::XShape > maWeakUnoShape
sal_uInt32 mnNavigationPosition
std::unique_ptr< sdr::properties::BaseProperties > mpProperties
bool m_bNotVisibleAsMaster
virtual bool shouldKeepAspectRatio() const
Whether the aspect ratio should be kept by default when resizing.
void setHyperlink(const OUString &sHyperlink)
void setFillGeometryDefiningShape(const SdrObject *pNew)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Rectangle objects (rectangle, circle, ...)
FIXME: The virtual object is not yet fully implemented and tested.
void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
bool Equals(const SfxItemSet &, bool bComparePool) const
helper class for notifying XPropertyChangeListeners
struct _xmlTextWriter * xmlTextWriterPtr
Point Rotate(const Point &rPoint, Degree10 nOrientation, const Point &rOrigin)
SdrObjKind nObjIdentifier
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
SVXCORE_DLLPUBLIC E3dObject * DynCastE3dObject(SdrObject *)
SVXCORE_DLLPUBLIC E3dScene * DynCastE3dScene(SdrObject *)
#define SVXCORE_DLLPUBLIC