Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / svdovirt.hxx
bloba6223975572d962660cb86ef90e3087aa8517038
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 SVX_DLLPUBLIC SdrVirtObj : public SdrObject
32 SdrVirtObj( const SdrVirtObj& ) = delete;
33 public:
34 virtual sdr::properties::BaseProperties& GetProperties() const override;
36 protected:
37 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override;
39 SdrObject& rRefObj; // Referenced drawing object
40 tools::Rectangle aSnapRect;
42 protected:
43 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
45 virtual SdrObjGeoData* NewGeoData() const override;
46 virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
47 virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
49 public:
50 SdrVirtObj(SdrObject& rNewObj);
51 virtual ~SdrVirtObj() override;
52 SdrObject& ReferencedObj();
53 const SdrObject& GetReferencedObj() const;
54 virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
55 virtual void SetModel(SdrModel* pNewModel) override;
57 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
58 virtual SdrInventor GetObjInventor() const override;
59 virtual sal_uInt16 GetObjIdentifier() const override;
60 virtual SdrObjList* GetSubList() const override;
62 virtual const tools::Rectangle& GetCurrentBoundRect() const override;
63 virtual const tools::Rectangle& GetLastBoundRect() const override;
64 virtual void RecalcBoundRect() override;
65 virtual SdrVirtObj* Clone() const override;
66 SdrVirtObj& operator=(const SdrVirtObj& rObj);
68 virtual OUString TakeObjNameSingul() const override;
69 virtual OUString TakeObjNamePlural() const override;
71 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
72 virtual sal_uInt32 GetHdlCount() const override;
73 virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const override;
74 virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const override;
75 virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlNum) const override;
76 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
78 // special drag methods
79 virtual bool hasSpecialDrag() const override;
80 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
81 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
82 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
83 virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
85 // FullDrag support
86 virtual bool supportsFullDrag() const override;
87 virtual SdrObject* getFullDragClone() const override;
89 virtual bool BegCreate(SdrDragStat& rStat) override;
90 virtual bool MovCreate(SdrDragStat& rStat) override;
91 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
92 virtual bool BckCreate(SdrDragStat& rStat) override;
93 virtual void BrkCreate(SdrDragStat& rStat) override;
94 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
96 virtual void NbcMove(const Size& rSiz) override;
97 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
98 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
99 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
100 virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
102 virtual void Move(const Size& rSiz) override;
103 virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
104 virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
105 virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
106 virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
108 virtual void RecalcSnapRect() override;
109 virtual const tools::Rectangle& GetSnapRect() const override;
110 virtual void SetSnapRect(const tools::Rectangle& rRect) override;
111 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
113 virtual const tools::Rectangle& GetLogicRect() const override;
114 virtual void SetLogicRect(const tools::Rectangle& rRect) override;
115 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
117 virtual long GetRotateAngle() const override;
118 virtual long GetShearAngle(bool bVertical = false) const override;
120 virtual sal_uInt32 GetSnapPointCount() const override;
121 virtual Point GetSnapPoint(sal_uInt32 i) const override;
123 virtual bool IsPolyObj() const override;
124 virtual sal_uInt32 GetPointCount() const override;
125 virtual Point GetPoint(sal_uInt32 i) const override;
126 virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
128 virtual SdrObjGeoData* GetGeoData() const override;
129 virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
131 virtual void NbcReformatText() override;
132 virtual void ReformatText() override;
134 virtual bool HasMacro() const override;
135 virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const override;
136 virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const override;
137 virtual void PaintMacro (OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const override;
138 virtual bool DoMacro (const SdrObjMacroHitRec& rRec) override;
139 virtual OUString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const override;
141 // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
142 virtual const Point GetOffset() const;
145 #endif // INCLUDED_SVX_SVDOVIRT_HXX
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */