LibreOffice Module svx (master)  1
svdobj.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SVX_SVDOBJ_HXX
21 #define INCLUDED_SVX_SVDOBJ_HXX
22 
23 #include <memory>
24 #include <com/sun/star/uno/Any.hxx>
25 #include <cppuhelper/weakref.hxx>
26 #include <rtl/ustring.hxx>
27 #include <vcl/outdev.hxx>
28 #include <svl/lstner.hxx>
29 #include <svl/poolitem.hxx>
30 #include <svl/typedwhich.hxx>
32 #include <svx/svdtypes.hxx>
33 #include <svx/svxdllapi.h>
34 #include <svx/shapeproperty.hxx>
35 #include <tools/link.hxx>
36 #include <tools/weakbase.h>
37 #include <tools/gen.hxx>
38 #include <osl/diagnose.h>
39 #include <typeinfo>
40 
41 #include <unordered_set>
42 
43 class SfxBroadcaster;
44 class AutoTimer;
45 class OutlinerParaObject;
46 class Outliner;
47 class SdrOutliner;
48 class SdrDragStat;
49 class SdrHdl;
50 class SdrHdlList;
51 class SdrItemPool;
52 class SdrModel;
53 class SdrObjList;
54 class SdrObject;
55 class SdrPage;
56 class SdrPageView;
57 class SdrView;
58 class SfxItemSet;
59 class SfxGrabBagItem;
60 class SfxSetItem;
61 class SfxStyleSheet;
62 class SfxUndoAction;
63 class XFillAttrSetItem;
64 class XLineAttrSetItem;
65 class SfxItemPool;
66 namespace tools { class PolyPolygon; }
67 class SfxPoolItem;
68 class SdrVirtObj;
69 class SdrDragView;
70 class SdrObjUserDataList;
71 class SdrObjPlusData;
72 class SdrGluePoint;
73 class SdrGluePointList;
74 class SdrLayerIDSet;
75 class Fraction;
76 enum class PointerStyle;
77 
78 namespace basegfx
79 {
80  class B2DPoint;
81  class B2DPolyPolygon;
82  class B2DHomMatrix;
83 }
84 
85 namespace sdr
86 {
87  namespace properties
88  {
89  class BaseProperties;
90  }
91 
92  class ObjectUser;
93 }
94 
95 namespace sdr
96 {
97  namespace contact
98  {
99  class ViewContact;
100  } // end of namespace contact
101 }
102 
103 namespace svx
104 {
106 }
107 
108 class SvxShape;
109 class SdrObject;
111 
112 // helper for constructing std::unique_ptr for SdrObjects where a
113 // deleter is needed - here, SdrObject::Free needs to be used.
114 typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr;
115 
117  OBJ_NONE = 0,
118  OBJ_GRUP = 1,
119  OBJ_LINE = 2,
120  OBJ_RECT = 3,
121  OBJ_CIRC = 4,
122  OBJ_SECT = 5,
123  OBJ_CARC = 6,
124  OBJ_CCUT = 7,
125  OBJ_POLY = 8,
126  OBJ_PLIN = 9,
133  OBJ_TEXT =16,
136  OBJ_GRAF =22,
137  OBJ_OLE2 =23,
138  OBJ_EDGE =24,
142  OBJ_PAGE =28,
144  OBJ_FRAME =31,
145  OBJ_UNO =32,
147  OBJ_MEDIA =34,
148  OBJ_TABLE =35,
150 };
151 
152 enum class SdrInventor : sal_uInt32 {
153  Unknown = 0,
154  BasicDialog = sal_uInt32( 'D' | ('L' << 8) | ('G' << 16) | ('1' << 24) ),
155  Default = sal_uInt32( 'S' | ('V' << 8) | ('D' << 16) | ('r' << 24) ),
156  E3d = sal_uInt32( 'E' | ('3' << 8) | ('D' << 16) | ('1' << 24) ),
157  FmForm = sal_uInt32( 'F' | ('M' << 8) | ('0' << 16) | ('1' << 24) ),
158  IMap = sal_uInt32( 'I' | ('M' << 8) | ('A' << 16) | ('P' << 24) ),
159  ReportDesign = sal_uInt32( 'R' | ('P' << 8) | ('T' << 16) | ('1' << 24) ),
160  ScOrSwDraw = sal_uInt32( 'S' | ('C' << 8) | ('3' << 16) | ('0' << 24) ), // Used in sc/ and sw/
161  SgaImap = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ),
162  StarDrawUserData = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ),
163  Swg = sal_uInt32( 'S' | ('W' << 8) | ('G' << 16) ),
164 };
165 
166 enum class SdrUserCallType {
167  MoveOnly, // only moved, size unchanged
168  Resize, // size and maybe position changed
169  ChangeAttr, // attribute changed. Eventually new size, because of line width
170  Delete, // object is going to be deleted soon, no attributes anymore
171  Inserted, // inserted into an object list (e.g. Page)
172  Removed, // removed from an object list
173  ChildMoveOnly, // a child within a group has changed
174  ChildResize, // a child within a group has changed
175  ChildChangeAttr, // a child within a group has changed
176  ChildDelete, // a child within a group has changed
177  ChildInserted, // a child within a group has changed
178  ChildRemoved // a child within a group has changed
179 };
180 
182 {
183 public:
184  virtual ~SdrObjUserCall();
185  virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect);
186 };
187 
189 {
190 public:
194  sal_uInt16 nTol;
195 
197 };
198 
205 {
207  sal_uInt16 const nIdentifier;
208 
209  void operator=(const SdrObjUserData& rData) = delete;
210  bool operator==(const SdrObjUserData& rData) const = delete;
211  bool operator!=(const SdrObjUserData& rData) const = delete;
212 
213 public:
214  SdrObjUserData(SdrInventor nInv, sal_uInt16 nId);
215  SdrObjUserData(const SdrObjUserData& rData);
216  virtual ~SdrObjUserData();
217 
218  virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const = 0; // #i71039# NULL -> 0
219  SdrInventor GetInventor() const { return nInventor;}
220  sal_uInt16 GetId() const { return nIdentifier;}
221 };
222 
226 class SAL_DLLPUBLIC_RTTI SdrObjGeoData
227 {
228 public:
231  std::unique_ptr<SdrGluePointList>
233  bool bMovProt;
234  bool bSizProt;
235  bool bNoPrint;
237  bool mbVisible;
239 
240 public:
241  SdrObjGeoData();
242  virtual ~SdrObjGeoData();
243 };
244 
249 {
250 public:
251  bool bMoveAllowed : 1; // if false, object cannot be moved
252  bool bResizeFreeAllowed : 1; // if false, object cannot be resized freely
253  bool bResizePropAllowed : 1; // if false, object cannot even be resized proportionally
254  bool bRotateFreeAllowed : 1; // if false, object cannot be rotated freely
255  bool bRotate90Allowed : 1; // if false, object cannot even be rotated in 90 degree steps
256  bool bMirrorFreeAllowed : 1; // if false, object cannot be mirrored freely
257  bool bMirror45Allowed : 1; // if false, object cannot even be mirrored over axes in a 45 degree raster
258  bool bMirror90Allowed : 1; // if false, object cannot even be mirrored over axes in a 90 degree raster
259  bool bTransparenceAllowed : 1; // if false, object does not have an interactive transparence control
260  bool bShearAllowed : 1; // if false, object cannot be sheared
261  bool bEdgeRadiusAllowed : 1;
262  bool bNoOrthoDesired : 1; // is true for Rect; is false for BMP, MTF
263  bool bNoContortion : 1; // if false, contortion not possible (for crook, only true for PathObj and grouped PathObjs)
264  bool bCanConvToPath : 1; // if false, no conversion into PathObj possible
265  bool bCanConvToPoly : 1; // if false, no conversion into PolyObj possible
266  bool bCanConvToContour : 1; // if false, no conversion down to whole contour possible
267  bool bCanConvToPathLineToArea : 1; // if false, no conversion into PathObj with transformation from LineToArea possible
268  bool bCanConvToPolyLineToArea : 1; // if false, no conversion into PolyObj with transformation from LineToArea possible
269 
271 };
272 
274 //
275 // SdrObject
276 // SdrAttrObj
277 // E3dObject
278 // E3dCompoundObject
279 // E3dCubeObj
280 // E3dExtrudeObj
281 // E3dLatheObj
282 // E3dPolygonObj
283 // E3dSphereObj
284 // E3dScene
285 // SdrTextObj
286 // SdrObjCustomShape
287 // OCustomShape
288 // SdrEdgeObj
289 // SdrMeasureObj
290 // SdrPathObj
291 // SdrRectObj
292 // SdrCaptionObj
293 // SdrCircObj
294 // SdrGrafObj
295 // SdrMediaObj
296 // SdrOle2Obj
297 // OOle2Obj
298 // SdrUnoObj
299 // DlgEdObj
300 // DlgEdForm
301 // OUnoObject
302 // FmFormObj
303 // SdrTableObj
304 // SdrObjGroup
305 // SdrPageObj
306 // SdrVirtObj
307 // SwDrawVirtObj
308 // SwVirtFlyDrawObj
309 // SwFlyDrawObj
310 
313 {
314 private:
315  friend class SdrObjListIter;
316  friend class SdrVirtObj;
317  friend class SdrRectObj;
318 
319  // OperationSmiley: Allow at each SdrObject to set a FillGeometryDefiningShape,
320  // so that for SdrObjects where this is set, the definition of a defined FillStyle
321  // will use this, but the local geometry will be filled. This allows to fill
322  // multiple shapes with a unified fill, e.g think about CustomShapes.
323  // Currently this is *only* used for CustomShapes, but may be developed to get a
324  // common mechanism - usages for it are easy to be found. The current limitation
325  // to CustomShapes allows to think about these SdrObjects to 'vanish' during the
326  // lifetime of 'this' - the SdrObjects without SdrPage and SdrModel are used as helper
327  // objects for SdrObjCustomShape and thus their lifetime is limited to the lifetime
328  // of this local object. For unifying this mechanism, some weak reference of
329  // SdrObjects would have to be thought about (not easy with the current implementation).
330  // So - allow *only* EnhancedCustomShape2d (which creates the visualizations for
331  // SdrObjCustomShape) to set this. Already allow unified read to use it - thus already
332  // allowing to implement as standard case for all kinds of SdrObjects.
333  friend class EnhancedCustomShape2d;
335  void setFillGeometryDefiningShape(const SdrObject* pNew) { mpFillGeometryDefiningShape = pNew; }
336 public:
337  const SdrObject* getFillGeometryDefiningShape() const { return mpFillGeometryDefiningShape; }
338 
339 private:
340  // the SdrModel this objects was created with, unchanged during SdrObject lifetime
342 
343 public:
344  // A SdrObject always needs a SdrModel for lifetime (Pool, ...)
345  SdrObject(SdrModel& rSdrModel);
346 
347  // SdrModel/SdrPage access on SdrObject level
348  SdrPage* getSdrPageFromSdrObject() const;
349  SdrModel& getSdrModelFromSdrObject() const;
350 
351  // access to possible children (SdrObjGroup/E3dScene)
352  virtual SdrObjList* getChildrenOfSdrObject() const;
353 
354  // access to parent
355  SdrObjList* getParentSdrObjListFromSdrObject() const;
356  SdrObject* getParentSdrObjectFromSdrObject() const;
357 
358 private:
359  // only allow SetParentAtSdrObjectFromSdrObjList to call setParentOfSdrObject
360  friend void SetParentAtSdrObjectFromSdrObjList(SdrObject& rSdrObject, SdrObjList* pNew);
361  SVX_DLLPRIVATE void setParentOfSdrObject(SdrObjList* pNew);
362 
363 public:
364  // react on model/page change
365  virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage);
366 
367  void AddObjectUser(sdr::ObjectUser& rNewUser);
368  void RemoveObjectUser(sdr::ObjectUser& rOldUser);
369 
370  sdr::contact::ViewContact& GetViewContact() const;
371 
372  virtual sdr::properties::BaseProperties& GetProperties() const;
373 
374  // DrawContact support: Methods for handling Object changes
375  void ActionChanged() const;
376 
377  static SdrItemPool& GetGlobalDrawObjectItemPool();
378  void SetRelativeWidth( double nValue );
379  void SetRelativeWidthRelation( sal_Int16 eValue );
380  void SetRelativeHeight( double nValue );
381  void SetRelativeHeightRelation( sal_Int16 eValue );
382  const double* GetRelativeWidth() const;
383  sal_Int16 GetRelativeWidthRelation() const;
384  const double* GetRelativeHeight() const;
385  sal_Int16 GetRelativeHeightRelation() const;
386 
387  void SetDiagramData(std::shared_ptr<DiagramDataInterface> pDiagramData);
388  std::shared_ptr<DiagramDataInterface> GetDiagramData() const;
389 
394  virtual void SetRectsDirty(bool bNotMyself = false, bool bRecursive = true);
395 
396  // frees the SdrObject pointed to by the argument
397  // In case the object has an SvxShape, which has the ownership of the object, it
398  // is actually *not* deleted.
399  static void Free( SdrObject*& _rpObject );
400 
401  // this method is only for access from Property objects
402  virtual void SetBoundRectDirty();
403 
404  SfxItemPool & GetObjectItemPool() const;
405 
406  void AddListener(SfxListener& rListener);
407  void RemoveListener(SfxListener& rListener);
408 
409  void AddReference(SdrVirtObj& rVrtObj);
410  void DelReference(SdrVirtObj& rVrtObj);
411  virtual SdrInventor GetObjInventor() const;
412  virtual sal_uInt16 GetObjIdentifier() const;
413  virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
414 
415  // Layer interface
416  virtual SdrLayerID GetLayer() const;
417  virtual void NbcSetLayer(SdrLayerID nLayer);
418  virtual void SetLayer(SdrLayerID nLayer);
419  // renaming GetSdrLayerIDSet -> getMergedHierarchySdrLayerIDSet to make clear what happens here. rSet needs to be empty.
420  void getMergedHierarchySdrLayerIDSet(SdrLayerIDSet& rSet) const;
421 
422  void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const;
423 
424  // #i68101#
425  // An object may have a user-set Name (Get/SetName()), e.g SdrGrafObj, SdrObjGroup
426  // or SdrOle2Obj.
427  // It may also have a Title and a Description for accessibility purposes.
428  void SetName(const OUString& rStr);
429  OUString GetName() const;
430  void MakeNameUnique(std::unordered_set<OUString>& rNameSet);
431  void SetTitle(const OUString& rStr);
432  OUString GetTitle() const;
433  void SetDescription(const OUString& rStr);
434  OUString GetDescription() const;
435 
436  // for group objects
437  bool IsGroupObject() const;
438  virtual SdrObjList* GetSubList() const;
439 
446  sal_uInt32 GetOrdNum() const;
447 
448  // setting the order number should only happen from the model or from the page
449  void SetOrdNum(sal_uInt32 nNum);
450 
451  // GrabBagItem for interim interop purposes
452  void GetGrabBagItem(css::uno::Any& rVal) const;
453 
454  void SetGrabBagItem(const css::uno::Any& rVal);
455 
456  // Return the position in the navigation order for the called object.
457  // Note that this method may update the navigation position of the
458  // called and of other SdrObjects. Therefore this method can not be
459  // const.
460  // @return
461  // If no navigation position has been explicitly defined then the
462  // result of GetOrdNum() is returned.
463  sal_uInt32 GetNavigationPosition() const;
464 
465  // To make clearer that this method may trigger RecalcBoundRect and thus may be
466  // expensive and sometimes problematic (inside a bigger object change You will get
467  // non-useful BoundRects sometimes) i rename that method from GetBoundRect() to
468  // GetCurrentBoundRect().
469  virtual const tools::Rectangle& GetCurrentBoundRect() const;
470 
471  // To have a possibility to get the last calculated BoundRect e.g for producing
472  // the first rectangle for repaints (old and new need to be used) without forcing
473  // a RecalcBoundRect (which may be problematical and expensive sometimes) i add here
474  // a new method for accessing the last BoundRect.
475  virtual const tools::Rectangle& GetLastBoundRect() const;
476 
477  virtual void RecalcBoundRect();
478 
479  void BroadcastObjectChange() const;
480 
481  const SfxBroadcaster* GetBroadcaster() const;
482 
483  // set modified-flag in the model
484  virtual void SetChanged();
485 
486  // Tooling for painting a single object to an OutputDevice. This will be needed as long
487  // as not all painting is changed to use DrawContact objects.
488  void SingleObjectPainter(OutputDevice& rOut) const;
489  bool LineGeometryUsageIsNecessary() const;
490 
491  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation, that
492  // means no change of the rotation point (only centered) and no shear allowed
493  virtual bool HasLimitedRotation() const;
494 
495  // Returns a copy of the object. Every inherited class must reimplement this (in class Foo
496  // it should be sufficient to do "virtual Foo* CloneSdrObject(...) const { return CloneHelper< Foo >(); }".
497  // Note that this function uses operator= internally.
498  virtual SdrObject* CloneSdrObject(SdrModel& rTargetModel) const;
499 
500  // implemented mainly for the purposes of CloneSdrObject()
501  SdrObject& operator=(const SdrObject& rObj);
502 
503  // TakeObjName...() is for the display in the UI, e.g. "3 frames selected"
504  virtual OUString TakeObjNameSingul() const;
505  virtual OUString TakeObjNamePlural() const;
506 
510  virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
511 
513  virtual basegfx::B2DPolyPolygon TakeContour() const;
514 
526  virtual sal_uInt32 GetHdlCount() const;
527  virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const;
528  virtual void AddToHdlList(SdrHdlList& rHdlList) const;
529  virtual void addCropHandles(SdrHdlList& rTarget) const;
530 
541  virtual bool hasSpecialDrag() const;
542  virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
543  virtual bool applySpecialDrag(SdrDragStat& rDrag);
544  virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const;
545  virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const;
546 
547  // FullDrag support. This is for standard interactions and for SdrObjOwn
548  // support. If supportsFullDrag() returns true, getFullDragClone has to
549  // return a cloned SdrObject (who's ownership it loses) at which modifications
550  // like Move(), Scale(), etc or applySpecialDrag() will be executed. That
551  // object will be visualized on overlay for full drag, but should not be
552  // part of the model, thus not changing anything since it's only a temporary
553  // helper object for interaction
554  virtual bool supportsFullDrag() const;
555  virtual SdrObjectUniquePtr getFullDragClone() const;
556 
570  virtual bool BegCreate(SdrDragStat& rStat);
571  virtual bool MovCreate(SdrDragStat& rStat); // if true, Xor needs to be repainted
572  virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
573  virtual bool BckCreate(SdrDragStat& rStat);
574  virtual void BrkCreate(SdrDragStat& rStat);
575 
577  virtual PointerStyle GetCreatePointer() const;
578 
580  virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
581 
587  virtual void NbcMove (const Size& rSiz);
588  virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
589  virtual void NbcCrop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
590  virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs);
591  virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
592  virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool bVShear);
593 
594  virtual void Move (const Size& rSiz);
595  virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true);
596  virtual void Crop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
597  virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs);
598  virtual void Mirror(const Point& rRef1, const Point& rRef2);
599  virtual void Shear (const Point& rRef, long nAngle, double tn, bool bVShear);
600 
603  virtual void NbcSetRelativePos(const Point& rPnt);
604  virtual void SetRelativePos(const Point& rPnt);
605  virtual Point GetRelativePos() const;
606  void ImpSetAnchorPos(const Point& rPnt);
607  virtual void NbcSetAnchorPos(const Point& rPnt);
608  virtual void SetAnchorPos(const Point& rPnt);
609 
614  virtual void RecalcSnapRect();
615  virtual const tools::Rectangle& GetSnapRect() const;
616  virtual void SetSnapRect(const tools::Rectangle& rRect);
617  virtual void NbcSetSnapRect(const tools::Rectangle& rRect);
618 
619  // Logic Rect: for the Rect for instance without regard to rotation angle, shear, ...
620  virtual const tools::Rectangle& GetLogicRect() const;
621  virtual void SetLogicRect(const tools::Rectangle& rRect);
622  virtual void NbcSetLogicRect(const tools::Rectangle& rRect);
623 
624  // the default is to set the logic rect to the given rectangle rMaxRect. If the shape
625  // has an intrinsic aspect ratio it may set the logic rect so the aspect
626  // ratio is kept but still inside the rectangle rMaxRect.
627  // If bShrinkOnly is set to true, the size of the current logic rect will not
628  // be changed if it is smaller than the given rectangle rMaxRect.
629  virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false );
630 
631  // rotation and shear angle
632  virtual long GetRotateAngle() const;
633  virtual long GetShearAngle(bool bVertical = false) const;
634 
636  virtual sal_uInt32 GetSnapPointCount() const;
637  virtual Point GetSnapPoint(sal_uInt32 i) const;
638 
639  // For objects, whose points can be moved individually.
640  // (e.g. polygons, polylines, lines)
641  // The points of those objects are selected (if necessary multiselection),
642  // deleted, inserted, or as a multiselection moved or rotated...
643  // Only such objects can have PlusHandles (e.g. the weights of a Bezier curve).
644  virtual bool IsPolyObj() const;
645  virtual sal_uInt32 GetPointCount() const;
646  virtual Point GetPoint(sal_uInt32 i) const;
647  void SetPoint(const Point& rPnt, sal_uInt32 i);
648  virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
649 
650  // get all geometrical data for undo/redo
651  virtual SdrObjGeoData* GetGeoData() const;
652  virtual void SetGeoData(const SdrObjGeoData& rGeo);
653 
654  // ItemSet access
655  const SfxItemSet& GetMergedItemSet() const;
656  void SetMergedItem(const SfxPoolItem& rItem);
657  void ClearMergedItem(const sal_uInt16 nWhich = 0);
658  void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false);
659  const SfxPoolItem& GetMergedItem(const sal_uInt16 nWhich) const;
660  template<class T>
661  const T& GetMergedItem( TypedWhichId<T> nWhich ) const
662  {
663  return static_cast<const T&>(GetMergedItem(sal_uInt16(nWhich)));
664  }
665 
666  // syntactical sugar for ItemSet accesses
667  void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems = false);
668 
669  // NotPersistAttr for Layer, ObjName, geometrical transformations etc.
670  void TakeNotPersistAttr(SfxItemSet& rAttr) const;
671  void ApplyNotPersistAttr(const SfxItemSet& rAttr);
672  void NbcApplyNotPersistAttr(const SfxItemSet& rAttr);
673 
674  // if bDontRemoveHardAttr is false, set all attributes, which were set in the style sheet, to their default value
675  // if true, all hard attributes keep their values
676  void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr);
677  virtual void NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr);
678  SfxStyleSheet* GetStyleSheet() const;
679 
680  virtual bool HasTextEdit() const;
681 
682  // keep text in outliner's format
683  // SetOutlinerParaObject: transfer ownership of *pTextObject!
684  void SetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject);
685  virtual void NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject);
686  virtual OutlinerParaObject* GetOutlinerParaObject() const;
687  virtual void NbcReformatText();
688 
689  void BurnInStyleSheetAttributes();
690 
691  // macro abilities, e.g. a rectangle as PushButton.
692  virtual bool HasMacro() const;
693  virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const;
694  virtual PointerStyle GetMacroPointer (const SdrObjMacroHitRec& rRec) const;
695  virtual void PaintMacro (OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const;
696  virtual bool DoMacro (const SdrObjMacroHitRec& rRec);
697  bool IsMacroHit(const SdrObjMacroHitRec& rRec) const;
698 
699  // Connectors
700  // (see also documentation in SvdoEdge.hxx, SdrEdgeObj, as well as SvdGlue.hxx and SvdGlEV.hxx)
701  //
702  // There are nodes and edges. In theory an edge can also be a node, but this isn't implemented yet.
703  // A node has a number of glue points, onto which edges can glued to
704  // An edge can be either
705  // - without any connection to any node,
706  // - or connected on one end to a node, while the other end is not connected,
707  // - or connected on both ends with exactly one node each.
708  // The edge is listener for its up to two nodes.
709  // Whenever a node is moved or resized, all its connected edges follow.
710  // This is also true for SetGluePoint()... on the node.
711  // On the other hand, moving/resizing an edge breaks the connection.
712 
713  // automatic glue points:
714  // a node object must provide four vertex and corner positions
715  // usually 0: top, 1: right, 2: bottom, 3: left
716  virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const;
717 
718  // usually:
719  // 0: top-left, 1: top-right, 2: bottom-right, 3: bottom-left
720  virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const;
721 
722  // list of all glue points, can be NULL
723  virtual const SdrGluePointList* GetGluePointList() const;
724 
725  // after changing the GluePointList, one has to call the object's SendRepaintBroadcast!
726  virtual SdrGluePointList* ForceGluePointList();
727 
728  // to be set temporarily when transforming related object(?)
729  void SetGlueReallyAbsolute(bool bOn);
730  void NbcRotateGluePoints(const Point& rRef, long nAngle, double sn, double cs);
731  void NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2);
732  void NbcShearGluePoints (const Point& rRef, double tn, bool bVShear);
733 
734  // if bTail1 is true, line start, otherwise line end
735  // if pObj is null disconnect
736  virtual void ConnectToNode(bool bTail1, SdrObject* pObj);
737  virtual void DisconnectFromNode(bool bTail1);
738  virtual SdrObject* GetConnectedNode(bool bTail1) const;
739 
740  // sets the writing mode of the object's context
741  // Objects which itself do not support different writing modes will ignore this call.
742  // Objects which support different writing modes, but have an own, explicit writing mode set,
743  // will also ignore this call.
744  // Objects which support different writing modes, and whose own mode is set to css.text.WritingMode2.CONTEXT,
745  // will use the given writing mode to calculate their "effective writing mode".
746  // The behaviour of this method is undefined if you pass css.text.WritingMode2.CONTEXT.
747  // @param _nContextWritingMode
748  // the effective writing mode of the context of the object
749  virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode );
750 
751  // If an object is able to convert itself into a polygon or into a Bezier curve (or into both),
752  // then the following methods should be overridden.
753  // E.g., convert a RectObj with line width 10, SOLID_PEN into a polygon:
754  // In the bLineToArea=false mode a PolyObj with four supporting points,
755  // line width 10 and SOLID_PEN shall be created.
756  // On the contrary in the bLineToArea=true mode the generated object should
757  // still have a line attribute NULL_PEN, and the line (also line pattern)
758  // itself should be emulated by the polygon area, which thereby can be
759  // manipulated by the user afterwards.
760  // The RectObj therefore can only convert correctly if it has an area attribute NULL_BRUSH.
761  // In this case it would have to:
762  // - set SOLID_BRUSH with the color of the given pen,
763  // - set NULL_PEN, and
764  // - generate tools::PolyPolygon with two polygons with four supporting points each.
765  // In each case the return value is a SdrObject*, because it is also
766  // allowed to return group objects (e.g. for SdrTextObj).
767  // In the case of the conversion from TextObj to PathObj,
768  // both modi (bLineToArea=true/false) would be identical.
769  // The methods' default implementations report "I'm unable to do this" (false/null).
770  virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const;
771  SdrObjectUniquePtr ConvertToPolyObj(bool bBezier, bool bLineToArea) const;
772 
773  // convert this path object to contour object; bForceLineDash converts even
774  // when there is no filled new polygon created from line-to-polygon conversion,
775  // specially used for XLINE_DASH and 3D conversion
776  SdrObject* ConvertToContourObj(SdrObject* pRet, bool bForceLineDash = false) const;
777 private:
778  SdrObject* ImpConvertToContourObj(bool bForceLineDash);
779 public:
780 
781  // if true, reference onto an object
782  bool IsVirtualObj() const { return bVirtObj;}
783 
784  // is true, if object can probably be filled
785  // is false, if object has probably line ends
786  // is invalid, if this is a group object
787  bool IsClosedObj() const { return bClosedObj;}
788 
789  // tdf#118662 reorganize inserted state, no local bool needed anymore,
790  // it depends on being a member of a SdrObjList
791  void InsertedStateChange();
792  bool IsInserted() const { return nullptr != getParentSdrObjListFromSdrObject(); }
793 
794  bool IsEdgeObj() const { return bIsEdge;}
795  bool Is3DObj() const { return bIs3DObj;}
796  bool IsUnoObj() const { return bIsUnoObj;}
797  void SetMoveProtect(bool bProt);
798  bool IsMoveProtect() const { return bMovProt;}
799  void SetResizeProtect(bool bProt);
800  bool IsResizeProtect() const { return bSizProt;}
801  void SetPrintable(bool bPrn);
802  bool IsPrintable() const { return !bNoPrint;}
803  void SetVisible(bool bVisible);
804  bool IsVisible() const { return mbVisible;}
805  void SetMarkProtect(bool bProt);
806  bool IsMarkProtect() const { return bMarkProt;}
807 
809  virtual bool shouldKeepAspectRatio() const { return false; }
810 
811  // application specific data
812  sal_uInt16 GetUserDataCount() const;
813  SdrObjUserData* GetUserData(sal_uInt16 nNum) const;
814 
815  void AppendUserData(std::unique_ptr<SdrObjUserData> pData);
816 
817  // removes the record from the list and performs delete (FreeMem+Dtor).
818  void DeleteUserData(sal_uInt16 nNum);
819 
820  // access to the UNO representation of the shape
821  virtual css::uno::Reference< css::uno::XInterface > getUnoShape();
822 
823  static SdrObject* getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt );
824 
825  // retrieves the instance responsible for notifying changes in the properties of the shape associated with
826  // the SdrObject
827  //
828  // @precond
829  // There already exists an SvxShape instance associated with the SdrObject
830  // @throws css::uno::RuntimeException
831  // if there does nt yet exists an SvxShape instance associated with the SdrObject.
832  svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
833 
834  // notifies a change in the given property, to all applicable listeners registered at the associated SvxShape
835  //
836  // This method is equivalent to calling getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty ),
837  // exception that it is allowed to be called when there does not yet exist an associated SvxShape - in which
838  // case the method will silently return without doing anything.
839  void notifyShapePropertyChange( const svx::ShapeProperty _eProperty ) const;
840 
841  // transformation interface for StarOfficeAPI. This implements support for
842  // homogen 3x3 matrices containing the transformation of the SdrObject. At the
843  // moment it contains a shearX, rotation and translation, but for setting all linear
844  // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
845  //
846  // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
847  // with the base geometry and returns TRUE. Otherwise it returns FALSE.
848  virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const;
849 
850  // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
851  // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
852  // to use (0,0) as upper left and will be scaled to the given size in the matrix.
853  virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon);
854 
855  // give info if object is in destruction
856  bool IsInDestruction() const;
857 
858  // return if fill is != XFILL_NONE
859  bool HasFillStyle() const;
860  bool HasLineStyle() const;
861 
862  // on import of OLE object from MS documents the BLIP size might be retrieved,
863  // the following methods are used to control it;
864  // usually this data makes no sense after the import is finished, since the object
865  // might be resized
866  const tools::Rectangle& GetBLIPSizeRectangle() const { return maBLIPSizeRectangle;}
867  void SetBLIPSizeRectangle( const tools::Rectangle& aRect );
868 
869  // #i121917#
870  virtual bool HasText() const;
871 
872  bool Equals(const SdrObject&) const;
873 
874  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
875 
877  virtual bool IsTextBox() const;
878 
879  void SetEmptyPresObj(bool bEpt);
880  bool IsEmptyPresObj() const { return bEmptyPresObj;}
881  void SetNotVisibleAsMaster(bool bFlg);
882  bool IsNotVisibleAsMaster() const { return bNotVisibleAsMaster;}
883  void SetUserCall(SdrObjUserCall* pUser);
884  SdrObjUserCall* GetUserCall() const { return pUserCall;}
886  void SetDoNotInsertIntoPageAutomatically(bool bSet);
888  bool IsDoNotInsertIntoPageAutomatically() const { return mbDoNotInsertIntoPageAutomatically;}
889 
890  // Warning: this method should only be used if you really know what you're doing
891  sal_uInt32 GetOrdNumDirect() const { return nOrdNum;}
892 
893  // #i25616#
894  bool DoesSupportTextIndentingOnLineWidthChange() const { return mbSupportTextIndentingOnLineWidthChange;}
895 
896  const Point& GetAnchorPos() const;
897 
898  // #i25616#
899  bool LineIsOutsideGeometry() const { return mbLineIsOutsideGeometry;}
900 
901  // Set the position in the navigation position to the given value.
902  // This method is typically used only by the model after a change to
903  // the navigation order.
904  // This method does not change the navigation position of other
905  // objects.
906  // Use SdrObjList::SetObjectNavigationPosition() instead.
907  void SetNavigationPosition (const sal_uInt32 nPosition);
908 
909  // sets a new UNO representation of the shape
910  // This is only a public interface function. The actual work is
911  // done by impl_setUnoShape().
912  // Calling this function is only allowed for the UNO representation
913  // itself!
914  void setUnoShape( const css::uno::Reference<css::uno::XInterface>& _rxUnoShape);
915 
916  const css::uno::WeakReference< css::uno::XInterface >& getWeakUnoShape() const { return maWeakUnoShape; }
917 
918  void setSuitableOutlinerBg(Outliner& rOutliner) const;
919 
920 protected:
921  tools::Rectangle aOutRect; // surrounding rectangle for Paint (incl. LineWidth, ...)
922  Point aAnchor; // anchor position (Writer)
924  std::unique_ptr<SdrObjPlusData>
925  pPlusData; // Broadcaster, UserData, connectors, ... (this is the Bitsack)
926  // object is only pointing to another one
927  bool bVirtObj : 1;
928  bool bSnapRectDirty : 1;
929  // the following flags will be streamed
930  bool bMovProt : 1; // if true, the position is protected
931  bool bSizProt : 1; // if true, the size is protected
932  // If bEmptyPresObj is true, it is a presentation object that has no content yet.
933  // The flag's default value is false.
934  // The management is done by the application.
935  // Neither assign operator nor cloning copies the flag!
936  // The flag is persistent.
937  bool bEmptyPresObj : 1; // empty presentation object (Draw)
938  // if true, object is invisible as object of the MasterPage
939  bool bNotVisibleAsMaster : 1;
940  // if true, the object is closed, i.e. no line, arc...
941  bool bClosedObj : 1;
942  bool bIsEdge : 1;
943  bool bIs3DObj : 1;
944  bool bIsUnoObj : 1;
945  // #i25616#
946  bool mbLineIsOutsideGeometry : 1;
947  // #i25616#
948  bool mbSupportTextIndentingOnLineWidthChange : 1;
949 
950  virtual ~SdrObject() override;
951 
952  virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties();
953 
954  virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
955 
956  tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
957 
958  // for GetDragComment
959  OUString ImpGetDescriptionStr(const char* pStrCacheID) const;
960 
961  void ImpForcePlusData();
962 
963  OUString GetMetrStr(long nVal) const;
964 
969  virtual SdrObjGeoData* NewGeoData() const;
970  virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
971  virtual void RestGeoData(const SdrObjGeoData& rGeo);
972 
973  // internal versions
974  const SfxItemSet& GetObjectItemSet() const;
975  void SetObjectItem(const SfxPoolItem& rItem);
976  void SetObjectItemSet(const SfxItemSet& rSet);
977  const SfxPoolItem& GetObjectItem(const sal_uInt16 nWhich) const;
978  template<class T> const T& GetObjectItem( TypedWhichId<T> nWhich ) const
979  {
980  return static_cast<const T&>(GetObjectItem(sal_uInt16(nWhich)));
981  }
982 
992  virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& _rxUnoShape );
993 
994  // helper function for reimplementing Clone().
995  template< typename T > T* CloneHelper(SdrModel& rTargetModel) const;
996 
997 private:
998  struct Impl;
999  std::unique_ptr<Impl> mpImpl;
1000  SdrObjList* mpParentOfSdrObject; // list that includes this object
1001  sal_uInt32 nOrdNum; // order number of the object in the list
1002  std::unique_ptr<SfxGrabBagItem> pGrabBagItem; // holds the GrabBagItem property
1003  // Position in the navigation order. SAL_MAX_UINT32 when not used.
1006  bool bNoPrint : 1; // if true, the object is not printed.
1007  bool mbVisible : 1; // if false, the object is not visible on screen (but maybe on printer, depending on bNoprint
1008  bool bMarkProt : 1; // marking forbidden, persistent
1009  // on import of OLE object from MS documents the BLIP size might be retrieved,
1010  // in this case the following member is initialized as nonempty rectangle
1012  std::unique_ptr<sdr::properties::BaseProperties>
1014  std::unique_ptr<sdr::contact::ViewContact>
1016 
1017  // global static ItemPool for not-yet-inserted items
1019 
1020  // do not use directly, always use getSvxShape() if you have to!
1022  css::uno::WeakReference< css::uno::XInterface >
1024  // HACK: Do not automatically insert newly created object into a page.
1025  // The user needs to do it manually later.
1027 
1028  // only for internal use!
1029  SvxShape* getSvxShape();
1030 
1031  SdrObject( const SdrObject& ) = delete;
1032 };
1033 
1035 {
1037  {
1038  SdrObject::Free(obj);
1039  }
1040 };
1041 
1043 {
1045  sal_uInt16 const nObjIdentifier;
1047 };
1048 
1058 {
1059 public:
1060  static SdrObject* MakeNewObject(
1061  SdrModel& rSdrModel,
1062  SdrInventor nInventor,
1063  sal_uInt16 nObjIdentifier,
1064  const tools::Rectangle* pSnapRect = nullptr);
1065 
1066  static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
1067  static void RemoveMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
1068 
1069 private:
1070  static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory(
1071  SdrModel& rSdrModel,
1072  SdrInventor nInventor,
1073  sal_uInt16 nIdentifier);
1074 
1075  SdrObjFactory() = delete;
1076 };
1077 
1078 template< typename T > T* SdrObject::CloneHelper(SdrModel& rTargetModel) const
1079 {
1080  OSL_ASSERT( typeid( T ) == typeid( *this ));
1081  T* pObj = dynamic_cast< T* >(
1083  rTargetModel,
1084  GetObjInventor(),
1085  GetObjIdentifier()));
1086 
1087  if(nullptr != pObj)
1088  {
1089  // use ::operator=()
1090  *pObj = *static_cast< const T* >( this );
1091  }
1092 
1093  return pObj;
1094 }
1095 
1096 #endif // INCLUDED_SVX_SVDOBJ_HXX
1097 
1098 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
User data of a drawing object, e.g.
Definition: svdobj.hxx:204
OutlineText, special text object for StarDraw.
Definition: svdobj.hxx:136
const css::uno::WeakReference< css::uno::XInterface > & getWeakUnoShape() const
Definition: svdobj.hxx:916
void operator()(SdrObject *obj)
Definition: svdobj.hxx:1036
bool IsNotVisibleAsMaster() const
Definition: svdobj.hxx:882
bool IsClosedObj() const
Definition: svdobj.hxx:787
void dumpAsXml(xmlTextWriterPtr pWriter) const
Universal Network Object packed into SvDraw object.
Definition: svdobj.hxx:146
foreign graphic (StarView Graphic)
Definition: svdobj.hxx:137
SdrObjUserCall * pUserCall
Definition: svdobj.hxx:923
natural cubic Spline (ni)
Definition: svdobj.hxx:132
media shape
Definition: svdobj.hxx:148
Polyline represented by SdrPathObj.
Definition: svdobj.hxx:142
bool DoesSupportTextIndentingOnLineWidthChange() const
Definition: svdobj.hxx:894
sal_uInt16 const nIdentifier
Definition: svdobj.hxx:207
periodic cubic Spline (ni)
Definition: svdobj.hxx:133
bool IsEdgeObj() const
Definition: svdobj.hxx:794
SdrUserCallType
Definition: svdobj.hxx:166
caption object
Definition: svdobj.hxx:140
bool IsInserted() const
Definition: svdobj.hxx:792
const SfxListener & operator=(const SfxListener &)=delete
SdrInventor
Definition: svdobj.hxx:152
measurement object
Definition: svdobj.hxx:144
OLE object.
Definition: svdobj.hxx:138
circle cut
Definition: svdobj.hxx:125
static void Free(SdrObject *&_rpObject)
Definition: svdobj.cxx:423
open free-hand line
Definition: svdobj.hxx:130
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
bool bSizProt
Definition: svdobj.hxx:234
struct _xmlTextWriter * xmlTextWriterPtr
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:226
polygon, PolyPolygon
Definition: svdobj.hxx:126
object that represents a SdrPage
Definition: svdobj.hxx:143
line
Definition: svdobj.hxx:120
const SdrObject * mpFillGeometryDefiningShape
Definition: svdobj.hxx:334
bool IsVisible() const
Definition: svdobj.hxx:804
Rectangle objects (rectangle, circle, ...)
Definition: svdorect.hxx:39
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
SdrObjList * mpParentOfSdrObject
Definition: svdobj.hxx:1000
custom shape
Definition: svdobj.hxx:147
void setFillGeometryDefiningShape(const SdrObject *pNew)
Definition: svdobj.hxx:335
Polygon/PolyPolygon represented by SdrPathObj.
Definition: svdobj.hxx:141
UNOTOOLS_DLLPUBLIC bool GetTitle(OUString const &url, OUString *title)
connector object
Definition: svdobj.hxx:139
table
Definition: svdobj.hxx:149
continuously activated OLE (PlugIn-Frame or similar)
Definition: svdobj.hxx:145
const T & GetMergedItem(TypedWhichId< T > nWhich) const
Definition: svdobj.hxx:661
const T & GetObjectItem(TypedWhichId< T > nWhich) const
Definition: svdobj.hxx:978
sal_Int16 const nValue
Definition: fmsrccfg.cxx:82
bool LineIsOutsideGeometry() const
Definition: svdobj.hxx:899
PolyLine.
Definition: svdobj.hxx:127
static SdrObject * MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, sal_uInt16 nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
Definition: svdobj.cxx:3071
SdrInventor const nInventor
Definition: svdobj.hxx:206
SdrLayerID mnLayerID
Definition: svdobj.hxx:1005
std::unique_ptr< SfxGrabBagItem > pGrabBagItem
Definition: svdobj.hxx:1002
bool Equals(const SfxItemSet &, bool bComparePool) const
circle, ellipse
Definition: svdobj.hxx:122
static void GetPoint(const tools::Polygon &rPoly, const std::vector< double > &rDistances, const double &fX, double &fx1, double &fy1)
const tools::Rectangle & GetBLIPSizeRectangle() const
Definition: svdobj.hxx:866
sal_uInt32 GetOrdNumDirect() const
Definition: svdobj.hxx:891
SdrLayerID mnLayerID
Definition: svdobj.hxx:238
object group
Definition: svdobj.hxx:119
bool IsDoNotInsertIntoPageAutomatically() const
Definition: svdobj.hxx:888
css::uno::WeakReference< css::uno::XInterface > maWeakUnoShape
Definition: svdobj.hxx:1023
std::unique_ptr< sdr::properties::BaseProperties > mpProperties
Definition: svdobj.hxx:1013
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
abstract object (SdrObject)
Definition: svdobj.hxx:118
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:585
tools::Rectangle aOutRect
Definition: svdobj.hxx:921
sal_uInt32 mnNavigationPosition
Definition: svdobj.hxx:1004
bool IsPrintable() const
Definition: svdobj.hxx:802
SdrInventor const nInventor
Definition: svdobj.hxx:1044
bool IsResizeProtect() const
Definition: svdobj.hxx:800
const SdrLayerIDSet * pVisiLayer
Definition: svdobj.hxx:192
DocumentType const eType
Abstract DrawObject.
Definition: svdobj.hxx:312
bool bNoPrint
Definition: svdobj.hxx:235
SdrModel & rSdrModel
Definition: svdobj.hxx:1046
Point aAnchor
Definition: svdobj.hxx:922
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:580
bool operator!=(const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
SdrModel & mrSdrModelFromSdrObject
Definition: svdobj.hxx:341
bool IsMarkProtect() const
Definition: svdobj.hxx:806
Point aAnchor
Definition: svdobj.hxx:230
SvxShape * mpSvxShape
Definition: svdobj.hxx:1021
bool bMovProt
Definition: svdobj.hxx:233
closed Bezier-curve
Definition: svdobj.hxx:129
static SdrItemPool * mpGlobalItemPool
Definition: svdobj.hxx:1018
circle section
Definition: svdobj.hxx:123
TitleText, special text object for StarDraw.
Definition: svdobj.hxx:135
bool IsUnoObj() const
Definition: svdobj.hxx:796
circle arc
Definition: svdobj.hxx:124
SdrObjKind
Definition: svdobj.hxx:116
sal_uInt16 GetId() const
Definition: svdobj.hxx:220
bool mbVisible
Definition: svdobj.hxx:237
SAL_DLLPRIVATE sal_Int32 GetRotateAngle() const
sal_uInt16 const nObjIdentifier
Definition: svdobj.hxx:1045
bool IsVirtualObj() const
Definition: svdobj.hxx:782
sal_uInt32 GetHdlCount() const
FIXME: The virtual object is not yet fully implemented and tested.
Definition: svdovirt.hxx:30
tools::Rectangle aBoundRect
Definition: svdobj.hxx:229
bool const mbVisible
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:114
PointerStyle
std::unique_ptr< SdrObjPlusData > pPlusData
Definition: svdobj.hxx:925
std::unique_ptr< SdrGluePointList > pGPL
Definition: svdobj.hxx:232
virtual bool shouldKeepAspectRatio() const
Whether the aspect ratio should be kept by default when resizing.
Definition: svdobj.hxx:809
T * CloneHelper(SdrModel &rTargetModel) const
Definition: svdobj.hxx:1078
std::unique_ptr< sdr::contact::ViewContact > mpViewContact
Definition: svdobj.hxx:1015
tools::Rectangle maBLIPSizeRectangle
Definition: svdobj.hxx:1011
std::unique_ptr< Impl > mpImpl
Definition: svdobj.hxx:998
sal_uInt16 nTol
Definition: svdobj.hxx:194
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
SdrCreateCmd
Definition: svdtypes.hxx:27
helper class for notifying XPropertyChangeListeners
SdrInventor GetInventor() const
Definition: svdobj.hxx:219
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
sal_uInt32 nOrdNum
Definition: svdobj.hxx:1001
Whoever creates his own objects must set a link in the SdrObjFactory class.
Definition: svdobj.hxx:1057
bool operator==(const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
SdrObjUserCall * GetUserCall() const
Definition: svdobj.hxx:884
bool Is3DObj() const
Definition: svdobj.hxx:795
bool bClosedObj
Definition: svdobj.hxx:236
text object
Definition: svdobj.hxx:134
open Bezier-curve
Definition: svdobj.hxx:128
const SdrPageView * pPageView
Definition: svdobj.hxx:193
bool mbDoNotInsertIntoPageAutomatically
Definition: svdobj.hxx:1026
closed free-hand line
Definition: svdobj.hxx:131
bool IsMoveProtect() const
Definition: svdobj.hxx:798
const tools::Rectangle & GetLogicRect() const
Point Rotate(const Point &rPoint, short nOrientation, const Point &rOrigin)
void SetParentAtSdrObjectFromSdrObjList(SdrObject &rSdrObject, SdrObjList *pNew)
Definition: svdpage.cxx:78
rectangle (round corners optional)
Definition: svdobj.hxx:121
const SdrObject * getFillGeometryDefiningShape() const
Definition: svdobj.hxx:337
bool IsEmptyPresObj() const
Definition: svdobj.hxx:880