Fix typo in code
[LibreOffice.git] / include / svx / svdovirt.hxx
blob17c869313067688026f98c0a89c712a502c314d8
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 #pragma once
22 #include <svx/svdobj.hxx>
23 #include <svx/svxdllapi.h>
25 /**
26 * FIXME: The virtual object is not yet fully implemented and tested.
27 * At the moment we only use it in a derived class in Writer.
29 class SVXCORE_DLLPUBLIC SdrVirtObj : public SdrObject
31 SdrVirtObj(const SdrVirtObj&) = delete;
33 public:
34 virtual sdr::properties::BaseProperties& GetProperties() const override;
36 protected:
37 virtual std::unique_ptr<sdr::properties::BaseProperties>
38 CreateObjectSpecificProperties() override;
40 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
42 rtl::Reference<SdrObject> mxRefObj; // Referenced drawing object
43 tools::Rectangle aSnapRect;
45 protected:
46 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
48 virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
49 virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
50 virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
52 // protected destructor
53 virtual ~SdrVirtObj() override;
55 public:
56 SdrVirtObj(SdrModel& rSdrModel, SdrObject& rNewObj);
57 // Copy constructor
58 SdrVirtObj(SdrModel& rSdrModel, SdrVirtObj const& rSource);
60 SdrObject& ReferencedObj();
61 const SdrObject& GetReferencedObj() const;
62 virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
64 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
65 virtual SdrInventor GetObjInventor() const override;
66 virtual SdrObjKind GetObjIdentifier() const override;
67 virtual SdrObjList* GetSubList() const override;
68 virtual void SetName(const OUString& rStr, const bool bSetChanged = true) override;
69 virtual const OUString& GetName() const override;
70 virtual void SetTitle(const OUString& rStr) override;
71 virtual OUString GetTitle() const override;
72 virtual void SetDescription(const OUString& rStr) override;
73 virtual OUString GetDescription() const override;
74 virtual void SetDecorative(bool isDecorative) override;
75 virtual bool IsDecorative() const override;
77 virtual const tools::Rectangle& GetCurrentBoundRect() const override;
78 virtual const tools::Rectangle& GetLastBoundRect() const override;
79 virtual void RecalcBoundRect() override;
80 virtual rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override;
82 virtual OUString TakeObjNameSingul() const override;
83 virtual OUString TakeObjNamePlural() const override;
85 // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
86 virtual bool HasLimitedRotation() const override;
88 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
89 virtual sal_uInt32 GetHdlCount() const override;
90 virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const override;
91 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
93 // special drag methods
94 virtual bool hasSpecialDrag() const override;
95 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
96 virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
97 virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
98 virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
100 // FullDrag support
101 virtual bool supportsFullDrag() const override;
102 virtual rtl::Reference<SdrObject> getFullDragClone() const override;
104 virtual bool BegCreate(SdrDragStat& rStat) override;
105 virtual bool MovCreate(SdrDragStat& rStat) override;
106 virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
107 virtual bool BckCreate(SdrDragStat& rStat) override;
108 virtual void BrkCreate(SdrDragStat& rStat) override;
109 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
111 virtual void NbcMove(const Size& rSiz) override;
112 virtual void NbcResize(const Point& rRef, const Fraction& xFact,
113 const Fraction& yFact) override;
114 virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
115 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
116 virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
118 virtual void Move(const Size& rSiz) override;
119 virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact,
120 bool bUnsetRelative = true) override;
121 virtual void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
122 virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
123 virtual void Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
125 virtual void RecalcSnapRect() override;
126 virtual const tools::Rectangle& GetSnapRect() const override;
127 virtual void SetSnapRect(const tools::Rectangle& rRect) override;
128 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
130 virtual const tools::Rectangle& GetLogicRect() const override;
131 virtual void SetLogicRect(const tools::Rectangle& rRect) override;
132 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
134 virtual Degree100 GetRotateAngle() const override;
135 virtual Degree100 GetShearAngle(bool bVertical = false) const override;
137 virtual sal_uInt32 GetSnapPointCount() const override;
138 virtual Point GetSnapPoint(sal_uInt32 i) const override;
140 virtual bool IsPolyObj() const override;
141 virtual sal_uInt32 GetPointCount() const override;
142 virtual Point GetPoint(sal_uInt32 i) const override;
143 virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
145 virtual std::unique_ptr<SdrObjGeoData> GetGeoData() const override;
146 virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
148 virtual void NbcReformatText() override;
150 virtual bool HasMacro() const override;
151 virtual SdrObject* CheckMacroHit(const SdrObjMacroHitRec& rRec) const override;
152 virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec& rRec) const override;
153 virtual void PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect,
154 const SdrObjMacroHitRec& rRec) const override;
155 virtual bool DoMacro(const SdrObjMacroHitRec& rRec) override;
157 // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
158 virtual Point GetOffset() const;
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */