1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
23 #include <svx/svdobj.hxx>
24 #include "svx/svxdllapi.h"
26 ////////////////////////////////////////////////////////////////////////////////////////////////////
30 // Achtung! Das virtuelle Objekt ist noch nicht bis in alle Feinheiten
31 // durchprogrammiert und getestet. Z.Zt. kommt es nur in abgeleiteter
32 // beim Writer zum Einsatz.
34 ////////////////////////////////////////////////////////////////////////////////////////////////////
36 class SVX_DLLPUBLIC SdrVirtObj
: public SdrObject
39 virtual sdr::properties::BaseProperties
& GetProperties() const;
42 virtual sdr::contact::ViewContact
* CreateObjectSpecificViewContact();
44 SdrObject
& rRefObj
; // Referenziertes Zeichenobjekt
48 virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
50 virtual SdrObjGeoData
* NewGeoData() const;
51 virtual void SaveGeoData(SdrObjGeoData
& rGeo
) const;
52 virtual void RestGeoData(const SdrObjGeoData
& rGeo
);
56 SdrVirtObj(SdrObject
& rNewObj
);
57 virtual ~SdrVirtObj();
58 virtual SdrObject
& ReferencedObj();
59 virtual const SdrObject
& GetReferencedObj() const;
60 virtual void NbcSetAnchorPos(const Point
& rAnchorPos
);
61 virtual void SetModel(SdrModel
* pNewModel
);
63 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const;
64 virtual sal_uInt32
GetObjInventor() const;
65 virtual sal_uInt16
GetObjIdentifier() const;
66 virtual SdrObjList
* GetSubList() const;
68 virtual const Rectangle
& GetCurrentBoundRect() const;
69 virtual const Rectangle
& GetLastBoundRect() const;
70 virtual void RecalcBoundRect();
71 virtual void SetChanged();
72 virtual SdrVirtObj
* Clone() const;
73 SdrVirtObj
& operator=(const SdrVirtObj
& rObj
);
75 virtual void TakeObjNameSingul(String
& rName
) const;
76 virtual void TakeObjNamePlural(String
& rName
) const;
78 virtual basegfx::B2DPolyPolygon
TakeXorPoly() const;
79 virtual sal_uInt32
GetHdlCount() const;
80 virtual SdrHdl
* GetHdl(sal_uInt32 nHdlNum
) const;
81 virtual sal_uInt32
GetPlusHdlCount(const SdrHdl
& rHdl
) const;
82 virtual SdrHdl
* GetPlusHdl(const SdrHdl
& rHdl
, sal_uInt32 nPlNum
) const;
83 virtual void AddToHdlList(SdrHdlList
& rHdlList
) const;
85 // special drag methods
86 virtual bool hasSpecialDrag() const;
87 virtual bool beginSpecialDrag(SdrDragStat
& rDrag
) const;
88 virtual bool applySpecialDrag(SdrDragStat
& rDrag
);
89 virtual String
getSpecialDragComment(const SdrDragStat
& rDrag
) const;
90 virtual basegfx::B2DPolyPolygon
getSpecialDragPoly(const SdrDragStat
& rDrag
) const;
93 virtual bool supportsFullDrag() const;
94 virtual SdrObject
* getFullDragClone() const;
96 virtual bool BegCreate(SdrDragStat
& rStat
);
97 virtual bool MovCreate(SdrDragStat
& rStat
);
98 virtual bool EndCreate(SdrDragStat
& rStat
, SdrCreateCmd eCmd
);
99 virtual bool BckCreate(SdrDragStat
& rStat
);
100 virtual void BrkCreate(SdrDragStat
& rStat
);
101 virtual basegfx::B2DPolyPolygon
TakeCreatePoly(const SdrDragStat
& rDrag
) const;
103 virtual void NbcMove(const Size
& rSiz
);
104 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
);
105 virtual void NbcRotate(const Point
& rRef
, long nWink
, double sn
, double cs
);
106 virtual void NbcMirror(const Point
& rRef1
, const Point
& rRef2
);
107 virtual void NbcShear(const Point
& rRef
, long nWink
, double tn
, bool bVShear
);
109 virtual void Move(const Size
& rSiz
);
110 virtual void Resize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
, bool bUnsetRelative
= true);
111 virtual void Rotate(const Point
& rRef
, long nWink
, double sn
, double cs
);
112 virtual void Mirror(const Point
& rRef1
, const Point
& rRef2
);
113 virtual void Shear(const Point
& rRef
, long nWink
, double tn
, bool bVShear
);
115 virtual void RecalcSnapRect();
116 virtual const Rectangle
& GetSnapRect() const;
117 virtual void SetSnapRect(const Rectangle
& rRect
);
118 virtual void NbcSetSnapRect(const Rectangle
& rRect
);
120 virtual const Rectangle
& GetLogicRect() const;
121 virtual void SetLogicRect(const Rectangle
& rRect
);
122 virtual void NbcSetLogicRect(const Rectangle
& rRect
);
124 virtual long GetRotateAngle() const;
125 virtual long GetShearAngle(bool bVertical
= false) const;
127 virtual sal_uInt32
GetSnapPointCount() const;
128 virtual Point
GetSnapPoint(sal_uInt32 i
) const;
130 virtual sal_Bool
IsPolyObj() const;
131 virtual sal_uInt32
GetPointCount() const;
132 virtual Point
GetPoint(sal_uInt32 i
) const;
133 virtual void NbcSetPoint(const Point
& rPnt
, sal_uInt32 i
);
135 virtual SdrObjGeoData
* GetGeoData() const;
136 virtual void SetGeoData(const SdrObjGeoData
& rGeo
);
138 virtual void NbcReformatText();
139 virtual void ReformatText();
141 virtual bool HasMacro() const;
142 virtual SdrObject
* CheckMacroHit (const SdrObjMacroHitRec
& rRec
) const;
143 virtual Pointer
GetMacroPointer (const SdrObjMacroHitRec
& rRec
) const;
144 virtual void PaintMacro (OutputDevice
& rOut
, const Rectangle
& rDirtyRect
, const SdrObjMacroHitRec
& rRec
) const;
145 virtual bool DoMacro (const SdrObjMacroHitRec
& rRec
);
146 virtual OUString
GetMacroPopupComment(const SdrObjMacroHitRec
& rRec
) const;
148 // OD 30.06.2003 #108784# - virtual <GetOffset()> returns Point(0,0)
149 // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
150 virtual const Point
GetOffset() const;
153 ////////////////////////////////////////////////////////////////////////////////////////////////////
155 #endif //_SVDOVIRT_HXX
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */