Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / svdovirt.hxx
blob6140c386492c38be4302413c7b1c82e09017fbd1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_SVX_SVDOVIRT_HXX
21 #define INCLUDED_SVX_SVDOVIRT_HXX
23 #include <svx/svdobj.hxx>
24 #include <svx/svxdllapi.h>
28 // SdrVirtObj
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.
36 class SVX_DLLPUBLIC SdrVirtObj : public SdrObject
38 SdrVirtObj( const SdrVirtObj& ) SAL_DELETED_FUNCTION;
39 public:
40 virtual sdr::properties::BaseProperties& GetProperties() const SAL_OVERRIDE;
42 protected:
43 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE;
45 SdrObject& rRefObj; // Referenziertes Zeichenobjekt
46 Rectangle aSnapRect;
48 protected:
49 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE;
51 virtual SdrObjGeoData* NewGeoData() const SAL_OVERRIDE;
52 virtual void SaveGeoData(SdrObjGeoData& rGeo) const SAL_OVERRIDE;
53 virtual void RestGeoData(const SdrObjGeoData& rGeo) SAL_OVERRIDE;
55 public:
56 TYPEINFO_OVERRIDE();
57 SdrVirtObj(SdrObject& rNewObj);
58 virtual ~SdrVirtObj();
59 SdrObject& ReferencedObj();
60 const SdrObject& GetReferencedObj() const;
61 virtual void NbcSetAnchorPos(const Point& rAnchorPos) SAL_OVERRIDE;
62 virtual void SetModel(SdrModel* pNewModel) SAL_OVERRIDE;
64 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const SAL_OVERRIDE;
65 virtual sal_uInt32 GetObjInventor() const SAL_OVERRIDE;
66 virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
67 virtual SdrObjList* GetSubList() const SAL_OVERRIDE;
69 virtual const Rectangle& GetCurrentBoundRect() const SAL_OVERRIDE;
70 virtual const Rectangle& GetLastBoundRect() const SAL_OVERRIDE;
71 virtual void RecalcBoundRect() SAL_OVERRIDE;
72 virtual void SetChanged() SAL_OVERRIDE;
73 virtual SdrVirtObj* Clone() const SAL_OVERRIDE;
74 SdrVirtObj& operator=(const SdrVirtObj& rObj);
76 virtual OUString TakeObjNameSingul() const SAL_OVERRIDE;
77 virtual OUString TakeObjNamePlural() const SAL_OVERRIDE;
79 virtual basegfx::B2DPolyPolygon TakeXorPoly() const SAL_OVERRIDE;
80 virtual sal_uInt32 GetHdlCount() const SAL_OVERRIDE;
81 virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const SAL_OVERRIDE;
82 virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const SAL_OVERRIDE;
83 virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlNum) const SAL_OVERRIDE;
84 virtual void AddToHdlList(SdrHdlList& rHdlList) const SAL_OVERRIDE;
86 // special drag methods
87 virtual bool hasSpecialDrag() const SAL_OVERRIDE;
88 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const SAL_OVERRIDE;
89 virtual bool applySpecialDrag(SdrDragStat& rDrag) SAL_OVERRIDE;
90 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const SAL_OVERRIDE;
91 virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const SAL_OVERRIDE;
93 // FullDrag support
94 virtual bool supportsFullDrag() const SAL_OVERRIDE;
95 virtual SdrObject* getFullDragClone() const SAL_OVERRIDE;
97 virtual bool BegCreate(SdrDragStat& rStat) SAL_OVERRIDE;
98 virtual bool MovCreate(SdrDragStat& rStat) SAL_OVERRIDE;
99 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SAL_OVERRIDE;
100 virtual bool BckCreate(SdrDragStat& rStat) SAL_OVERRIDE;
101 virtual void BrkCreate(SdrDragStat& rStat) SAL_OVERRIDE;
102 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const SAL_OVERRIDE;
104 virtual void NbcMove(const Size& rSiz) SAL_OVERRIDE;
105 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) SAL_OVERRIDE;
106 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) SAL_OVERRIDE;
107 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE;
108 virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) SAL_OVERRIDE;
110 virtual void Move(const Size& rSiz) SAL_OVERRIDE;
111 virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) SAL_OVERRIDE;
112 virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) SAL_OVERRIDE;
113 virtual void Mirror(const Point& rRef1, const Point& rRef2) SAL_OVERRIDE;
114 virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) SAL_OVERRIDE;
116 virtual void RecalcSnapRect() SAL_OVERRIDE;
117 virtual const Rectangle& GetSnapRect() const SAL_OVERRIDE;
118 virtual void SetSnapRect(const Rectangle& rRect) SAL_OVERRIDE;
119 virtual void NbcSetSnapRect(const Rectangle& rRect) SAL_OVERRIDE;
121 virtual const Rectangle& GetLogicRect() const SAL_OVERRIDE;
122 virtual void SetLogicRect(const Rectangle& rRect) SAL_OVERRIDE;
123 virtual void NbcSetLogicRect(const Rectangle& rRect) SAL_OVERRIDE;
125 virtual long GetRotateAngle() const SAL_OVERRIDE;
126 virtual long GetShearAngle(bool bVertical = false) const SAL_OVERRIDE;
128 virtual sal_uInt32 GetSnapPointCount() const SAL_OVERRIDE;
129 virtual Point GetSnapPoint(sal_uInt32 i) const SAL_OVERRIDE;
131 virtual bool IsPolyObj() const SAL_OVERRIDE;
132 virtual sal_uInt32 GetPointCount() const SAL_OVERRIDE;
133 virtual Point GetPoint(sal_uInt32 i) const SAL_OVERRIDE;
134 virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) SAL_OVERRIDE;
136 virtual SdrObjGeoData* GetGeoData() const SAL_OVERRIDE;
137 virtual void SetGeoData(const SdrObjGeoData& rGeo) SAL_OVERRIDE;
139 virtual void NbcReformatText() SAL_OVERRIDE;
140 virtual void ReformatText() SAL_OVERRIDE;
142 virtual bool HasMacro() const SAL_OVERRIDE;
143 virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const SAL_OVERRIDE;
144 virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const SAL_OVERRIDE;
145 virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const SAL_OVERRIDE;
146 virtual bool DoMacro (const SdrObjMacroHitRec& rRec) SAL_OVERRIDE;
147 virtual OUString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const SAL_OVERRIDE;
149 // OD 30.06.2003 #108784# - virtual <GetOffset()> returns Point(0,0)
150 // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
151 virtual const Point GetOffset() const;
156 #endif // INCLUDED_SVX_SVDOVIRT_HXX
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */