Bump version to 21.06.18.1
[LibreOffice.git] / include / svx / svdovirt.hxx
blobb47bc03ce3f307f2becf828caf7a4e1e1ebec45b
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>
26 /**
27 * FIXME: The virtual object is not yet fully implemented and tested.
28 * At the moment we only use it in a derived class in Writer.
30 class SVXCORE_DLLPUBLIC SdrVirtObj : public SdrObject
32 SdrVirtObj(const SdrVirtObj&) = delete;
34 public:
35 virtual sdr::properties::BaseProperties& GetProperties() const override;
37 protected:
38 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
40 SdrObject& rRefObj; // Referenced drawing object
41 tools::Rectangle aSnapRect;
43 protected:
44 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
46 virtual SdrObjGeoData* NewGeoData() const override;
47 virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
48 virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
50 // protected destructor
51 virtual ~SdrVirtObj() override;
53 public:
54 SdrVirtObj(SdrModel& rSdrModel, SdrObject& rNewObj);
56 SdrObject& ReferencedObj();
57 const SdrObject& GetReferencedObj() const;
58 virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
60 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
61 virtual SdrInventor GetObjInventor() const override;
62 virtual SdrObjKind GetObjIdentifier() const override;
63 virtual SdrObjList* GetSubList() const override;
65 virtual const tools::Rectangle& GetCurrentBoundRect() const override;
66 virtual const tools::Rectangle& GetLastBoundRect() const override;
67 virtual void RecalcBoundRect() override;
68 virtual SdrVirtObj* CloneSdrObject(SdrModel& rTargetModel) const override;
69 SdrVirtObj& operator=(const SdrVirtObj& rObj);
71 virtual OUString TakeObjNameSingul() const override;
72 virtual OUString TakeObjNamePlural() const override;
74 // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
75 virtual bool HasLimitedRotation() const override;
77 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
78 virtual sal_uInt32 GetHdlCount() const override;
79 virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const override;
80 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
82 // special drag methods
83 virtual bool hasSpecialDrag() const override;
84 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
85 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
86 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
87 virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
89 // FullDrag support
90 virtual bool supportsFullDrag() const override;
91 virtual SdrObjectUniquePtr getFullDragClone() const override;
93 virtual bool BegCreate(SdrDragStat& rStat) override;
94 virtual bool MovCreate(SdrDragStat& rStat) override;
95 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
96 virtual bool BckCreate(SdrDragStat& rStat) override;
97 virtual void BrkCreate(SdrDragStat& rStat) override;
98 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
100 virtual void NbcMove(const Size& rSiz) override;
101 virtual void NbcResize(const Point& rRef, const Fraction& xFact,
102 const Fraction& yFact) override;
103 virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
104 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
105 virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
107 virtual void Move(const Size& rSiz) override;
108 virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact,
109 bool bUnsetRelative = true) override;
110 virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
111 virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
112 virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
114 virtual void RecalcSnapRect() override;
115 virtual const tools::Rectangle& GetSnapRect() const override;
116 virtual void SetSnapRect(const tools::Rectangle& rRect) override;
117 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
119 virtual const tools::Rectangle& GetLogicRect() const override;
120 virtual void SetLogicRect(const tools::Rectangle& rRect) override;
121 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
123 virtual tools::Long GetRotateAngle() const override;
124 virtual tools::Long GetShearAngle(bool bVertical = false) const override;
126 virtual sal_uInt32 GetSnapPointCount() const override;
127 virtual Point GetSnapPoint(sal_uInt32 i) const override;
129 virtual bool IsPolyObj() const override;
130 virtual sal_uInt32 GetPointCount() const override;
131 virtual Point GetPoint(sal_uInt32 i) const override;
132 virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
134 virtual SdrObjGeoData* GetGeoData() const override;
135 virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
137 virtual void NbcReformatText() override;
139 virtual bool HasMacro() const override;
140 virtual SdrObject* CheckMacroHit(const SdrObjMacroHitRec& rRec) const override;
141 virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec& rRec) const override;
142 virtual void PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect,
143 const SdrObjMacroHitRec& rRec) const override;
144 virtual bool DoMacro(const SdrObjMacroHitRec& rRec) override;
146 // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
147 virtual Point GetOffset() const;
150 #endif // INCLUDED_SVX_SVDOVIRT_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */