xref: /AOO41X/main/svx/inc/svx/svdogrp.hxx (revision ca62e2c2083b5d0995f1245bad6c2edfb455fbec)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVDOGRP_HXX
25 #define _SVDOGRP_HXX
26 
27 #include <tools/datetime.hxx>
28 #include <svx/svdobj.hxx>
29 #include "svx/svxdllapi.h"
30 
31 //************************************************************
32 //   Vorausdeklarationen
33 //************************************************************
34 
35 class SdrObjList;
36 class SdrObjListIter;
37 class SfxItemSet;
38 
39 //************************************************************
40 //   SdrObjGroup
41 //************************************************************
42 
43 class SVX_DLLPUBLIC SdrObjGroup : public SdrObject
44 {
45 private:
46 protected:
47     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
48     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
49 
50     SdrObjList*                 pSub;    // Subliste (Kinder)
51     Point                       aRefPoint; // Referenzpunkt innerhalb der Objektgruppe
52     FASTBOOL                    bRefPoint; // Ist ein RefPoint gesetzt?
53 
54 public:
55     TYPEINFO();
56     SdrObjGroup();
57     virtual ~SdrObjGroup();
58 
59     virtual void SetBoundRectDirty();
60     virtual sal_uInt16 GetObjIdentifier() const;
61     virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
62     virtual SdrLayerID GetLayer() const;
63     virtual void NbcSetLayer(SdrLayerID nLayer);
64     virtual void SetObjList(SdrObjList* pNewObjList);
65     virtual void SetPage(SdrPage* pNewPage);
66     virtual void SetModel(SdrModel* pNewModel);
67     virtual FASTBOOL HasRefPoint() const;
68     virtual Point GetRefPoint() const;
69     virtual void SetRefPoint(const Point& rPnt);
70     virtual SdrObjList* GetSubList() const;
71 
72     virtual const Rectangle& GetCurrentBoundRect() const;
73     virtual const Rectangle& GetSnapRect() const;
74 
75     virtual void operator=(const SdrObject& rObj);
76 
77     virtual void TakeObjNameSingul(String& rName) const;
78     virtual void TakeObjNamePlural(String& rName) const;
79 
80     virtual void RecalcSnapRect();
81     virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
82 
83     // special drag methods
84     virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
85 
86     virtual FASTBOOL BegCreate(SdrDragStat& rStat);
87 
88     virtual long GetRotateAngle() const;
89     virtual long GetShearAngle(FASTBOOL bVertical=sal_False) const;
90 
91     virtual void Move(const Size& rSiz);
92     virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
93     virtual void Rotate(const Point& rRef, long nWink, double sn, double cs);
94     virtual void Mirror(const Point& rRef1, const Point& rRef2);
95     virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
96     virtual void SetAnchorPos(const Point& rPnt);
97     virtual void SetRelativePos(const Point& rPnt);
98     virtual void SetSnapRect(const Rectangle& rRect);
99     virtual void SetLogicRect(const Rectangle& rRect);
100 
101     virtual void NbcMove(const Size& rSiz);
102     virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
103     virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
104     virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
105     virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
106     virtual void NbcSetAnchorPos(const Point& rPnt);
107     virtual void NbcSetRelativePos(const Point& rPnt);
108     virtual void NbcSetSnapRect(const Rectangle& rRect);
109     virtual void NbcSetLogicRect(const Rectangle& rRect);
110 
111     virtual void NbcReformatText();
112     virtual void ReformatText();
113 
114     virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
115 };
116 
117 #endif //_SVDOGRP_HXX
118 
119