LibreOffice Module svx (master)  1
svdogrp.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SVX_SVDOGRP_HXX
21 #define INCLUDED_SVX_SVDOGRP_HXX
22 
23 #include <memory>
24 #include <svx/svdobj.hxx>
25 #include <svx/svxdllapi.h>
26 #include <svx/svdpage.hxx>
27 
28 // Forward declarations
29 class SfxItemSet;
30 
31 // SdrObjGroup
32 class SVXCORE_DLLPUBLIC SdrObjGroup final : public SdrObject, public SdrObjList
33 {
34 private:
35  virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
36  virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
37 
38  Point aRefPoint; // Reference point inside the object group
39 
40 private:
41  // protected destructor - due to final, make private
42  virtual ~SdrObjGroup() override;
43 
44 public:
45  SdrObjGroup(SdrModel& rSdrModel);
46 
47  // derived from SdrObjList
48  virtual SdrPage* getSdrPageFromSdrObjList() const override;
49  virtual SdrObject* getSdrObjectFromSdrObjList() const override;
50 
51  // derived from SdrObject
52  virtual SdrObjList* getChildrenOfSdrObject() const override;
53 
54  virtual void SetBoundRectDirty() override;
55  virtual sal_uInt16 GetObjIdentifier() const override;
56  virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
57  virtual SdrLayerID GetLayer() const override;
58  virtual void NbcSetLayer(SdrLayerID nLayer) override;
59 
60  // react on model/page change
61  virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
62 
63  virtual SdrObjList* GetSubList() const override;
64 
65  virtual const tools::Rectangle& GetCurrentBoundRect() const override;
66  virtual const tools::Rectangle& GetSnapRect() const override;
67 
68  virtual SdrObjGroup* CloneSdrObject(SdrModel& rTargetModel) const override;
69  SdrObjGroup& operator=(const SdrObjGroup& rObj);
70 
71  virtual OUString TakeObjNameSingul() const override;
72  virtual OUString TakeObjNamePlural() const override;
73 
74  virtual void RecalcSnapRect() override;
75  virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
76 
77  // special drag methods
78  virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
79 
80  virtual bool BegCreate(SdrDragStat& rStat) override;
81 
82  virtual long GetRotateAngle() const override;
83  virtual long GetShearAngle(bool bVertical = false) const override;
84 
85  virtual void Move(const Size& rSiz) override;
86  virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
87  virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
88  virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
89  virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
90  virtual void SetAnchorPos(const Point& rPnt) override;
91  virtual void SetRelativePos(const Point& rPnt) override;
92  virtual void SetSnapRect(const tools::Rectangle& rRect) override;
93  virtual void SetLogicRect(const tools::Rectangle& rRect) override;
94 
95  virtual void NbcMove(const Size& rSiz) override;
96  virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
97  virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
98  virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
99  virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
100  virtual void NbcSetAnchorPos(const Point& rPnt) override;
101  virtual void NbcSetRelativePos(const Point& rPnt) override;
102  virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
103  virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
104 
105  virtual void NbcReformatText() override;
106 
107  virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
108 
109  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
110 };
111 
112 #endif // INCLUDED_SVX_SVDOGRP_HXX
113 
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1066
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:562
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:853
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1320
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
Definition: svdobj.cxx:1483
struct _xmlTextWriter * xmlTextWriterPtr
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
Definition: svdobj.cxx:448
virtual SdrObjList * getChildrenOfSdrObject() const
Definition: svdobj.cxx:303
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1379
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties()
Definition: svdobj.cxx:198
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const
Definition: svdobj.cxx:2524
virtual void SetBoundRectDirty()
Definition: svdobj.cxx:309
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1017
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:646
virtual void Rotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1510
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1596
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
virtual void SetAnchorPos(const Point &rPnt)
Definition: svdobj.cxx:1576
virtual void RecalcSnapRect()
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdobj.cxx:1592
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1400
SdrObjList & operator=(const SdrObjList &rSrcList)=delete
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:557
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: svdpage.cxx:1066
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1428
virtual long GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1644
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1630
virtual void Move(const Size &rSiz)
Definition: svdobj.cxx:1466
virtual void SetRelativePos(const Point &rPnt)
Definition: svdobj.cxx:1548
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1521
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:576
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1459
virtual void NbcReformatText()
Definition: svdobj.cxx:1747
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact()
Definition: svdobj.cxx:239
Point aRefPoint
Definition: svdogrp.hxx:38
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1601
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1611
virtual void NbcMove(const Size &rSiz)
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdobj.cxx:1373
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
virtual SdrObject * CloneSdrObject(SdrModel &rTargetModel) const
Definition: svdobj.cxx:973
virtual SdrPage * getSdrPageFromSdrObjList() const
Definition: svdpage.cxx:139
virtual long GetRotateAngle() const
Definition: svdobj.cxx:1639
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:114
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1284
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1032
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1621
virtual void NbcSetAnchorPos(const Point &rPnt)
Definition: svdobj.cxx:1569
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
virtual void NbcSetRelativePos(const Point &rPnt)
The relative position of a SdrObject is the distance of the upper left corner of the logic bounding r...
Definition: svdobj.cxx:1541
virtual SdrObject * getSdrObjectFromSdrObjList() const
Definition: svdpage.cxx:145
virtual void NbcSetLayer(SdrLayerID nLayer)
Definition: svdobj.cxx:593