1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SVDOGRP_HXX
21 #define INCLUDED_SVX_SVDOGRP_HXX
24 #include <svx/svdobj.hxx>
25 #include <svx/svxdllapi.h>
26 #include <svx/svdpage.hxx>
28 // Forward declarations
32 class SVXCORE_DLLPUBLIC SdrObjGroup final
: public SdrObject
, public SdrObjList
35 virtual std::unique_ptr
<sdr::contact::ViewContact
> CreateObjectSpecificViewContact() override
;
36 virtual std::unique_ptr
<sdr::properties::BaseProperties
>
37 CreateObjectSpecificProperties() override
;
39 Point aRefPoint
; // Reference point inside the object group
42 // protected destructor - due to final, make private
43 virtual ~SdrObjGroup() override
;
46 SdrObjGroup(SdrModel
& rSdrModel
);
48 // derived from SdrObjList
49 virtual SdrPage
* getSdrPageFromSdrObjList() const override
;
50 virtual SdrObject
* getSdrObjectFromSdrObjList() const override
;
52 // derived from SdrObject
53 virtual SdrObjList
* getChildrenOfSdrObject() const override
;
55 virtual void SetBoundRectDirty() override
;
56 virtual SdrObjKind
GetObjIdentifier() const override
;
57 virtual void TakeObjInfo(SdrObjTransformInfoRec
& rInfo
) const override
;
58 virtual SdrLayerID
GetLayer() const override
;
59 virtual void NbcSetLayer(SdrLayerID nLayer
) override
;
61 // react on model/page change
62 virtual void handlePageChange(SdrPage
* pOldPage
, SdrPage
* pNewPage
) override
;
64 virtual SdrObjList
* GetSubList() const override
;
66 virtual const tools::Rectangle
& GetCurrentBoundRect() const override
;
67 virtual const tools::Rectangle
& GetSnapRect() const override
;
69 virtual SdrObjGroup
* CloneSdrObject(SdrModel
& rTargetModel
) const override
;
70 SdrObjGroup
& operator=(const SdrObjGroup
& rObj
);
72 virtual OUString
TakeObjNameSingul() const override
;
73 virtual OUString
TakeObjNamePlural() const override
;
75 virtual void RecalcSnapRect() override
;
76 virtual basegfx::B2DPolyPolygon
TakeXorPoly() const override
;
78 // special drag methods
79 virtual bool beginSpecialDrag(SdrDragStat
& rDrag
) const override
;
81 virtual bool BegCreate(SdrDragStat
& rStat
) override
;
83 virtual tools::Long
GetRotateAngle() const override
;
84 virtual tools::Long
GetShearAngle(bool bVertical
= false) const override
;
86 virtual void Move(const Size
& rSiz
) override
;
87 virtual void Resize(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
,
88 bool bUnsetRelative
= true) override
;
89 virtual void Rotate(const Point
& rRef
, tools::Long nAngle
, double sn
, double cs
) override
;
90 virtual void Mirror(const Point
& rRef1
, const Point
& rRef2
) override
;
91 virtual void Shear(const Point
& rRef
, tools::Long nAngle
, double tn
, bool bVShear
) override
;
92 virtual void SetAnchorPos(const Point
& rPnt
) override
;
93 virtual void SetRelativePos(const Point
& rPnt
) override
;
94 virtual void SetSnapRect(const tools::Rectangle
& rRect
) override
;
95 virtual void SetLogicRect(const tools::Rectangle
& rRect
) override
;
97 virtual void NbcMove(const Size
& rSiz
) override
;
98 virtual void NbcResize(const Point
& rRef
, const Fraction
& xFact
,
99 const Fraction
& yFact
) override
;
100 virtual void NbcRotate(const Point
& rRef
, tools::Long nAngle
, double sn
, double cs
) override
;
101 virtual void NbcMirror(const Point
& rRef1
, const Point
& rRef2
) override
;
102 virtual void NbcShear(const Point
& rRef
, tools::Long nAngle
, double tn
, bool bVShear
) override
;
103 virtual void NbcSetAnchorPos(const Point
& rPnt
) override
;
104 virtual void NbcSetRelativePos(const Point
& rPnt
) override
;
105 virtual void NbcSetSnapRect(const tools::Rectangle
& rRect
) override
;
106 virtual void NbcSetLogicRect(const tools::Rectangle
& rRect
) override
;
108 virtual void NbcReformatText() override
;
110 virtual SdrObjectUniquePtr
DoConvertToPolyObj(bool bBezier
, bool bAddText
) const override
;
112 virtual void dumpAsXml(xmlTextWriterPtr pWriter
) const override
;
115 #endif // INCLUDED_SVX_SVDOGRP_HXX
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */