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; }
82namespace svx {
class PropertyValueProvider; }
90namespace sdr {
class ObjectUser; }
100 BasicDialog = sal_uInt32(
'D' | (
'L' << 8) | (
'G' << 16) | (
'1' << 24) ),
101 Default = sal_uInt32(
'S' | (
'V' << 8) | (
'D' << 16) | (
'r' << 24) ),
102 E3d = sal_uInt32(
'E' | (
'3' << 8) | (
'D' << 16) | (
'1' << 24) ),
103 FmForm = sal_uInt32(
'F' | (
'M' << 8) | (
'0' << 16) | (
'1' << 24) ),
104 IMap = sal_uInt32(
'I' | (
'M' << 8) | (
'A' << 16) | (
'P' << 24) ),
105 ReportDesign = sal_uInt32(
'R' | (
'P' << 8) | (
'T' << 16) | (
'1' << 24) ),
106 ScOrSwDraw = sal_uInt32(
'S' | (
'C' << 8) | (
'3' << 16) | (
'0' << 24) ),
107 SgaImap = sal_uInt32(
'S' | (
'D' << 8) | (
'U' << 16) | (
'D' << 24) ),
108 StarDrawUserData = sal_uInt32(
'S' | (
'D' << 8) | (
'U' << 16) | (
'D' << 24) ),
109 Swg = sal_uInt32(
'S' | (
'W' << 8) | (
'G' << 16) ),
132 virtual void const* GetPDFAnchorStructureElementKey(
SdrObject const& rObj);
167 sal_uInt16
GetId()
const {
return nIdentifier;}
178 std::unique_ptr<SdrGluePointList>
263 virtual const std::shared_ptr< svx::diagram::IDiagramHelper >& getDiagramHelper()
const;
264 bool isDiagram()
const {
return bool(getDiagramHelper()); }
302 virtual void SAL_CALL acquire() noexcept override final;
303 virtual
void SAL_CALL release() noexcept override final;
306 SdrPage* getSdrPageFromSdrObject() const;
307 SdrModel& getSdrModelFromSdrObject() const;
310 virtual
SdrObjList* getChildrenOfSdrObject() const;
313 SdrObjList* getParentSdrObjListFromSdrObject() const;
314 SdrObject* getParentSdrObjectFromSdrObject() const;
321 virtual
void handlePageChange(
SdrPage* pOldPage,
SdrPage* pNewPage);
323 void AddObjectUser(
sdr::ObjectUser& rNewUser);
324 void RemoveObjectUser(
sdr::ObjectUser& rOldUser);
326 sdr::contact::ViewContact& GetViewContact() const;
328 virtual
sdr::
properties::BaseProperties& GetProperties() const;
331 void ActionChanged() const;
334 void SetRelativeWidth(
double nValue );
335 void SetRelativeWidthRelation( sal_Int16 eValue );
336 void SetRelativeHeight(
double nValue );
337 void SetRelativeHeightRelation( sal_Int16 eValue );
338 const
double* GetRelativeWidth() const;
339 sal_Int16 GetRelativeWidthRelation() const;
340 const
double* GetRelativeHeight() const;
341 sal_Int16 GetRelativeHeightRelation() const;
347 virtual
void SetBoundAndSnapRectsDirty(
bool bNotMyself = false,
bool bRecursive = true);
350 virtual
void SetBoundRectDirty();
367 bool isVisibleOnAnyOfTheseLayers(const
SdrLayerIDSet& rSet) const;
375 virtual
void SetName(const OUString& rStr, const
bool bSetChanged = true);
376 virtual const OUString & GetName() const;
377 void MakeNameUnique();
378 void MakeNameUnique(
std::unordered_set<OUString>& rNameSet);
379 virtual
void SetTitle(const OUString& rStr);
380 virtual OUString GetTitle() const;
381 virtual
void SetDescription(const OUString& rStr);
382 virtual OUString GetDescription() const;
383 virtual
void SetDecorative(
bool isDecorative);
384 virtual
bool IsDecorative() 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);
545 virtual void NbcCrop (
const basegfx::B2DPoint& rRef,
double fxFact,
double fyFact);
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);
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 );
809 bool IsInDestruction()
const;
812 bool HasFillStyle()
const;
813 bool HasLineStyle()
const;
823 virtual bool HasText()
const;
830 virtual bool IsTextBox()
const;
832 void SetEmptyPresObj(
bool bEpt);
834 void SetNotVisibleAsMaster(
bool bFlg);
839 void SetDoNotInsertIntoPageAutomatically(
bool bSet);
849 const Point& GetAnchorPos()
const;
860 void SetNavigationPosition (
const sal_uInt32 nPosition);
874 virtual void setUnoShape(
const css::uno::Reference< css::drawing::XShape >& _rxUnoShape );
876 const css::uno::WeakReference< css::drawing::XShape >&
getWeakUnoShape()
const {
return maWeakUnoShape; }
879 bool setSuitableOutlinerBg(
Outliner& rOutliner)
const;
881 const Graphic* getFillGraphic()
const;
884 void setHyperlink(
const OUString& sHyperlink) { msHyperlink = sHyperlink; }
892 void resetOutRectangle();
893 void moveOutRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta);
898 std::unique_ptr<SdrObjPlusData>
926 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties();
928 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
933 OUString ImpGetDescriptionStr(
TranslateId pStrCacheID)
const;
935 void ImpForcePlusData();
943 virtual std::unique_ptr<SdrObjGeoData> NewGeoData()
const;
950 void SetObjectItemSet(
const SfxItemSet& rSet);
951 const SfxPoolItem& GetObjectItem(
const sal_uInt16 nWhich)
const;
954 return static_cast<const T&
>(GetObjectItem(sal_uInt16(nWhich)));
957 const SfxItemSet* getBackgroundFillSet()
const;
959 virtual void InternalSetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr,
bool bBroadcast);
976 std::unique_ptr<sdr::properties::BaseProperties>
978 std::unique_ptr<sdr::contact::ViewContact>
984 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)
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)=0
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
struct _xmlTextWriter * xmlTextWriterPtr
SdrObjKind nObjIdentifier
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
SVXCORE_DLLPUBLIC E3dObject * DynCastE3dObject(SdrObject *)
SVXCORE_DLLPUBLIC E3dScene * DynCastE3dScene(SdrObject *)
#define SVXCORE_DLLPUBLIC