22 #include <com/sun/star/uno/Any.hxx>
24 #include <rtl/ustring.hxx>
38 #include <unordered_set>
63 namespace tools {
class PolyPolygon; }
85 namespace 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) ),
165 virtual std::unique_ptr<SdrObjUserData>
Clone(
SdrObject* pObj1)
const = 0;
167 sal_uInt16
GetId()
const {
return nIdentifier;}
178 std::unique_ptr<SdrGluePointList>
198 bool bMoveAllowed : 1;
199 bool bResizeFreeAllowed : 1;
200 bool bResizePropAllowed : 1;
201 bool bRotateFreeAllowed : 1;
202 bool bRotate90Allowed : 1;
203 bool bMirrorFreeAllowed : 1;
204 bool bMirror45Allowed : 1;
205 bool bMirror90Allowed : 1;
206 bool bTransparenceAllowed : 1;
207 bool bShearAllowed : 1;
208 bool bEdgeRadiusAllowed : 1;
209 bool bNoOrthoDesired : 1;
210 bool bNoContortion : 1;
211 bool bCanConvToPath : 1;
212 bool bCanConvToPoly : 1;
213 bool bCanConvToContour : 1;
214 bool bCanConvToPathLineToArea : 1;
215 bool bCanConvToPolyLineToArea : 1;
298 SdrPage* getSdrPageFromSdrObject()
const;
299 SdrModel& getSdrModelFromSdrObject()
const;
302 virtual SdrObjList* getChildrenOfSdrObject()
const;
305 SdrObjList* getParentSdrObjListFromSdrObject()
const;
306 SdrObject* getParentSdrObjectFromSdrObject()
const;
313 virtual void handlePageChange(
SdrPage* pOldPage,
SdrPage* pNewPage);
323 void ActionChanged()
const;
326 void SetRelativeWidth(
double nValue );
327 void SetRelativeWidthRelation( sal_Int16 eValue );
328 void SetRelativeHeight(
double nValue );
329 void SetRelativeHeightRelation( sal_Int16 eValue );
330 const double* GetRelativeWidth()
const;
331 sal_Int16 GetRelativeWidthRelation()
const;
332 const double* GetRelativeHeight()
const;
333 sal_Int16 GetRelativeHeightRelation()
const;
339 virtual void SetBoundAndSnapRectsDirty(
bool bNotMyself =
false,
bool bRecursive =
true);
347 virtual void SetBoundRectDirty();
365 void getMergedHierarchySdrLayerIDSet(
SdrLayerIDSet& rSet)
const;
373 void SetName(
const OUString& rStr,
const bool bSetChanged =
true);
374 const OUString &
GetName()
const;
375 void MakeNameUnique();
376 void MakeNameUnique(std::unordered_set<OUString>& rNameSet);
377 void SetTitle(
const OUString& rStr);
379 void SetDescription(
const OUString& rStr);
383 bool IsGroupObject()
const;
392 sal_uInt32 GetOrdNum()
const;
395 void SetOrdNum(sal_uInt32 nNum);
398 void GetGrabBagItem(css::uno::Any& rVal)
const;
400 virtual void SetGrabBagItem(
const css::uno::Any& rVal);
409 sal_uInt32 GetNavigationPosition()
const;
423 virtual void RecalcBoundRect();
425 void BroadcastObjectChange()
const;
430 virtual void SetChanged();
435 bool LineGeometryUsageIsNecessary()
const;
439 virtual bool HasLimitedRotation()
const;
449 virtual OUString TakeObjNameSingul()
const;
450 virtual OUString TakeObjNamePlural()
const;
473 virtual void AddToHdlList(
SdrHdlList& rHdlList)
const;
474 virtual void addCropHandles(
SdrHdlList& rTarget)
const;
486 virtual bool hasSpecialDrag()
const;
487 virtual bool beginSpecialDrag(
SdrDragStat& rDrag)
const;
489 virtual OUString getSpecialDragComment(
const SdrDragStat& rDrag)
const;
499 virtual bool supportsFullDrag()
const;
532 virtual void NbcMove (
const Size& rSiz);
533 virtual void NbcResize(
const Point& rRef,
const Fraction& xFact,
const Fraction& yFact);
534 virtual void NbcCrop (
const basegfx::B2DPoint& rRef,
double fxFact,
double fyFact);
535 virtual void NbcRotate(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
537 void NbcRotate(
const Point& rRef,
Degree100 nAngle);
538 virtual void NbcMirror(
const Point& rRef1,
const Point& rRef2);
539 virtual void NbcShear (
const Point& rRef,
Degree100 nAngle,
double tn,
bool bVShear);
541 virtual void Move (
const Size& rSiz);
542 virtual void Resize(
const Point& rRef,
const Fraction& xFact,
const Fraction& yFact,
bool bUnsetRelative =
true);
544 virtual void Rotate(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
545 virtual void Mirror(
const Point& rRef1,
const Point& rRef2);
546 virtual void Shear (
const Point& rRef,
Degree100 nAngle,
double tn,
bool bVShear);
550 virtual void NbcSetRelativePos(
const Point& rPnt);
551 virtual void SetRelativePos(
const Point& rPnt);
552 virtual Point GetRelativePos()
const;
553 void ImpSetAnchorPos(
const Point& rPnt);
554 virtual void NbcSetAnchorPos(
const Point& rPnt);
555 virtual void SetAnchorPos(
const Point& rPnt);
561 virtual void RecalcSnapRect();
576 virtual void AdjustToMaxRect(
const tools::Rectangle& rMaxRect,
bool bShrinkOnly =
false );
580 virtual Degree100 GetShearAngle(
bool bVertical =
false)
const;
583 virtual sal_uInt32 GetSnapPointCount()
const;
584 virtual Point GetSnapPoint(sal_uInt32 i)
const;
591 virtual bool IsPolyObj()
const;
592 virtual sal_uInt32 GetPointCount()
const;
594 void SetPoint(
const Point& rPnt, sal_uInt32 i);
595 virtual void NbcSetPoint(
const Point& rPnt, sal_uInt32 i);
598 virtual std::unique_ptr<SdrObjGeoData> GetGeoData()
const;
604 void ClearMergedItem(
const sal_uInt16 nWhich = 0);
605 void SetMergedItemSet(
const SfxItemSet& rSet,
bool bClearAllItems =
false);
606 const SfxPoolItem& GetMergedItem(
const sal_uInt16 nWhich)
const;
610 return static_cast<const T&
>(GetMergedItem(sal_uInt16(nWhich)));
614 void SetMergedItemSetAndBroadcast(
const SfxItemSet& rSet,
bool bClearAllItems =
false);
617 void TakeNotPersistAttr(
SfxItemSet& rAttr)
const;
618 void ApplyNotPersistAttr(
const SfxItemSet& rAttr);
619 void NbcApplyNotPersistAttr(
const SfxItemSet& rAttr);
623 void SetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr);
624 void NbcSetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr);
627 virtual bool HasTextEdit()
const;
634 virtual void NbcReformatText();
636 void BurnInStyleSheetAttributes();
639 virtual bool HasMacro()
const;
663 virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum)
const;
667 virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum)
const;
676 void SetGlueReallyAbsolute(
bool bOn);
677 void NbcRotateGluePoints(
const Point& rRef,
Degree100 nAngle,
double sn,
double cs);
678 void NbcMirrorGluePoints(
const Point& rRef1,
const Point& rRef2);
679 void NbcShearGluePoints (
const Point& rRef,
double tn,
bool bVShear);
683 virtual void ConnectToNode(
bool bTail1,
SdrObject* pObj);
684 virtual void DisconnectFromNode(
bool bTail1);
685 virtual SdrObject* GetConnectedNode(
bool bTail1)
const;
696 virtual void SetContextWritingMode(
const sal_Int16 _nContextWritingMode );
725 SdrObject* ImpConvertToContourObj(
bool bForceLineDash);
738 void InsertedStateChange();
739 bool IsInserted()
const {
return nullptr != getParentSdrObjListFromSdrObject(); }
744 void SetMoveProtect(
bool bProt);
746 void SetResizeProtect(
bool bProt);
748 void SetPrintable(
bool bPrn);
750 void SetVisible(
bool bVisible);
752 void SetMarkProtect(
bool bProt);
759 sal_uInt16 GetUserDataCount()
const;
762 void AppendUserData(std::unique_ptr<SdrObjUserData> pData);
765 void DeleteUserData(sal_uInt16 nNum);
768 virtual css::uno::Reference< css::drawing::XShape > getUnoShape();
770 static SdrObject* getSdrObjectFromXShape(
const css::uno::Reference< css::uno::XInterface >& xInt );
803 bool IsInDestruction()
const;
806 bool HasFillStyle()
const;
807 bool HasLineStyle()
const;
817 virtual bool HasText()
const;
824 virtual bool IsTextBox()
const;
826 void SetEmptyPresObj(
bool bEpt);
828 void SetNotVisibleAsMaster(
bool bFlg);
833 void SetDoNotInsertIntoPageAutomatically(
bool bSet);
843 const Point& GetAnchorPos()
const;
854 void SetNavigationPosition (
const sal_uInt32 nPosition);
868 virtual void setUnoShape(
const css::uno::Reference< css::drawing::XShape >& _rxUnoShape );
870 const css::uno::WeakReference< css::drawing::XShape >&
getWeakUnoShape()
const {
return maWeakUnoShape; }
872 void setSuitableOutlinerBg(
Outliner& rOutliner)
const;
874 const Graphic* getFillGraphic()
const;
877 void setHyperlink(
const OUString& sHyperlink) { msHyperlink = sHyperlink; }
885 std::unique_ptr<SdrObjPlusData>
889 bool m_bSnapRectDirty : 1;
898 bool m_bEmptyPresObj : 1;
900 bool m_bNotVisibleAsMaster : 1;
902 bool m_bClosedObj : 1;
905 bool m_bIsUnoObj : 1;
907 bool mbLineIsOutsideGeometry : 1;
909 bool mbSupportTextIndentingOnLineWidthChange : 1;
913 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties();
915 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
920 OUString ImpGetDescriptionStr(
TranslateId pStrCacheID)
const;
922 void ImpForcePlusData();
930 virtual std::unique_ptr<SdrObjGeoData> NewGeoData()
const;
937 void SetObjectItemSet(
const SfxItemSet& rSet);
938 const SfxPoolItem& GetObjectItem(
const sal_uInt16 nWhich)
const;
941 return static_cast<const T&
>(GetObjectItem(sal_uInt16(nWhich)));
944 const SfxItemSet* getBackgroundFillSet()
const;
946 virtual void InternalSetStyleSheet(
SfxStyleSheet* pNewStyleSheet,
bool bDontRemoveHardAttr,
bool bBroadcast);
950 std::unique_ptr<Impl>
mpImpl;
959 bool m_bMarkProt : 1;
963 std::unique_ptr<sdr::properties::BaseProperties>
965 std::unique_ptr<sdr::contact::ViewContact>
970 css::uno::WeakReference< css::drawing::XShape >
User data of a drawing object, e.g.
void operator()(SdrObject *obj)
bool IsNotVisibleAsMaster() const
void dumpAsXml(xmlTextWriterPtr pWriter) const
SAL_DLLPRIVATE Degree100 GetRotateAngle() const
struct _xmlTextWriter * xmlTextWriterPtr
void setHyperlink(const OUString &sHyperlink)
bool DoesSupportTextIndentingOnLineWidthChange() const
const css::uno::WeakReference< css::drawing::XShape > & getWeakUnoShape() const
const SfxListener & operator=(const SfxListener &)=delete
const OUString & getHyperlink() const
tools::Rectangle m_aOutRect
css::uno::WeakReference< css::drawing::XShape > maWeakUnoShape
static void Free(SdrObject *&_rpObject)
All geometrical data of an arbitrary object for use in undo/redo.
const SdrObject * mpFillGeometryDefiningShape
SdrObjKind nObjIdentifier
Rectangle objects (rectangle, circle, ...)
SdrObjList * mpParentOfSdrObject
void setFillGeometryDefiningShape(const SdrObject *pNew)
UNOTOOLS_DLLPUBLIC bool GetTitle(OUString const &url, OUString *title)
const T & GetMergedItem(TypedWhichId< T > nWhich) const
const T & GetObjectItem(TypedWhichId< T > nWhich) const
bool LineIsOutsideGeometry() const
virtual void SetTitle(const OUString &rNewTitle) override
virtual OUString GetName() const override
bool Equals(const SfxItemSet &, bool bComparePool) const
static void GetPoint(const tools::Polygon &rPoly, const std::vector< double > &rDistances, const double &fX, double &fx1, double &fy1)
const tools::Rectangle & GetBLIPSizeRectangle() const
sal_uInt32 GetOrdNumDirect() const
Point Rotate(const Point &rPoint, Degree10 nOrientation, const Point &rOrigin)
bool IsDoNotInsertIntoPageAutomatically() const
std::unique_ptr< sdr::properties::BaseProperties > mpProperties
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
sal_uInt32 mnNavigationPosition
SdrObjUserCall * m_pUserCall
bool IsResizeProtect() const
const SdrLayerIDSet * pVisiLayer
bool operator!=(const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
SdrModel & mrSdrModelFromSdrObject
bool IsMarkProtect() const
virtual void GetDescription(OUString &rName) override
std::unique_ptr< SfxGrabBagItem > m_pGrabBagItem
#define SVXCORE_DLLPUBLIC
bool IsVirtualObj() const
sal_uInt32 GetHdlCount() const
FIXME: The virtual object is not yet fully implemented and tested.
tools::Rectangle aBoundRect
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
std::unique_ptr< SdrGluePointList > pGPL
virtual bool shouldKeepAspectRatio() const
Whether the aspect ratio should be kept by default when resizing.
std::unique_ptr< sdr::contact::ViewContact > mpViewContact
tools::Rectangle maBLIPSizeRectangle
std::unique_ptr< Impl > mpImpl
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
helper class for notifying XPropertyChangeListeners
std::unique_ptr< SdrObjPlusData > m_pPlusData
SdrInventor GetInventor() const
Whoever creates his own objects must set a link in the SdrObjFactory class.
bool operator==(const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
SdrObjUserCall * GetUserCall() const
const SdrPageView * pPageView
bool mbDoNotInsertIntoPageAutomatically
bool IsMoveProtect() const
const tools::Rectangle & GetLogicRect() const
const SdrObject * getFillGeometryDefiningShape() const
bool IsEmptyPresObj() const