bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / svdorect.hxx
blobf984bb2c68ad143f02484a6fb7ac2d8cf6edf5b6
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 _SVDORECT_HXX
21 #define _SVDORECT_HXX
23 #include <svx/svdotext.hxx>
24 #include "svx/svxdllapi.h"
26 //************************************************************
27 // Vorausdeklarationen
28 //************************************************************
30 class XPolygon;
32 namespace sdr { namespace properties {
33 class RectangleProperties;
36 //************************************************************
37 // SdrRectObj
39 // Rechteck-Objekte (Rechteck,Kreis,...)
41 //************************************************************
43 class SVX_DLLPUBLIC SdrRectObj : public SdrTextObj
45 private:
46 // to allow sdr::properties::RectangleProperties access to SetXPolyDirty()
47 friend class sdr::properties::RectangleProperties;
48 friend class SdrTextObj; // wg SetXPolyDirty bei GrowAdjust
50 protected:
51 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
52 virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
54 XPolygon* mpXPoly;
56 protected:
57 XPolygon ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const;
58 void SetXPolyDirty();
60 // RecalcXPoly sollte ueberladen werden. Dabei muss dann eine XPolygon
61 // Instanz generiert (new) und an mpXPoly zugewiesen werden.
62 virtual void RecalcXPoly();
63 const XPolygon& GetXPoly() const;
64 virtual void RestGeoData(const SdrObjGeoData& rGeo);
66 public:
67 TYPEINFO();
68 // Der Eckenradius-Parameter fliegt irgendwann raus. Der Eckenradius
69 // ist dann (spaeter) ueber SfxItems einzustellen (SetAttributes()).
70 // Konstruktion eines Rechteck-Zeichenobjekts
72 SdrRectObj();
73 SdrRectObj(const Rectangle& rRect);
75 SdrRectObj& operator=(const SdrRectObj& rCopy);
77 // Konstruktion eines Textrahmens
78 SdrRectObj(SdrObjKind eNewTextKind);
79 SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect);
80 virtual ~SdrRectObj();
82 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
83 virtual sal_uInt16 GetObjIdentifier() const;
84 virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
86 virtual void TakeObjNameSingul(String& rName) const;
87 virtual void TakeObjNamePlural(String& rName) const;
89 virtual SdrRectObj* Clone() const;
90 virtual void RecalcSnapRect();
91 virtual void NbcSetSnapRect(const Rectangle& rRect);
92 virtual void NbcSetLogicRect(const Rectangle& rRect);
93 virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
95 virtual sal_uInt32 GetHdlCount() const;
96 virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
98 // special drag methods
99 virtual bool hasSpecialDrag() const;
100 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
101 virtual bool applySpecialDrag(SdrDragStat& rDrag);
102 virtual String getSpecialDragComment(const SdrDragStat& rDrag) const;
104 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
105 virtual Pointer GetCreatePointer() const;
107 virtual void NbcMove(const Size& rSiz);
108 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
109 virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
110 virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
111 virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear);
113 virtual bool DoMacro(const SdrObjMacroHitRec& rRec);
114 virtual OUString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const;
116 virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const;
117 virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const;
119 virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
121 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
124 #endif //_SVDORECT_HXX
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */