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#pragma once
21
22#include <memory>
23#include <svx/svdobj.hxx>
24#include <svx/svxdllapi.h>
25#include <svx/svdpage.hxx>
26
27// SdrObjGroup
29{
30public:
31 // Basic DiagramHelper support
32 virtual const std::shared_ptr< svx::diagram::IDiagramHelper >& getDiagramHelper() const override;
33
34private:
35 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
36 virtual std::unique_ptr<sdr::properties::BaseProperties>
38
39 Point maRefPoint; // Reference point inside the object group
40
41 // Allow *only* DiagramHelper itself to set this internal reference to
42 // tightly control usage
44 std::shared_ptr< svx::diagram::IDiagramHelper > mp_DiagramHelper;
45
46public:
47 SdrObjGroup(SdrModel& rSdrModel);
48 // Copy constructor
49 SdrObjGroup(SdrModel& rSdrModel, SdrObjGroup const& rSource);
50 virtual ~SdrObjGroup() override;
51
52 // derived from SdrObjList
53 virtual SdrPage* getSdrPageFromSdrObjList() const override;
54 virtual SdrObject* getSdrObjectFromSdrObjList() const override;
55
56 // derived from SdrObject
57 virtual SdrObjList* getChildrenOfSdrObject() const override;
58
59 virtual void SetBoundRectDirty() override;
60 virtual SdrObjKind GetObjIdentifier() const override;
61 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
62 virtual SdrLayerID GetLayer() const override;
63 virtual void NbcSetLayer(SdrLayerID nLayer) override;
64
65 // react on model/page change
66 virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
67
68 virtual SdrObjList* GetSubList() const override;
69 virtual void SetGrabBagItem(const css::uno::Any& rVal) override;
70
71 virtual const tools::Rectangle& GetCurrentBoundRect() const override;
72 virtual const tools::Rectangle& GetSnapRect() const override;
73
74 virtual rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override;
75
76 virtual OUString TakeObjNameSingul() const override;
77 virtual OUString TakeObjNamePlural() const override;
78
79 virtual void RecalcSnapRect() override;
80 virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
81
82 // special drag methods
83 virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
84
85 virtual bool BegCreate(SdrDragStat& rStat) override;
86
87 virtual Degree100 GetRotateAngle() const override;
88 virtual Degree100 GetShearAngle(bool bVertical = false) const override;
89
90 virtual void Move(const Size& rSiz) override;
91 virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact,
92 bool bUnsetRelative = true) override;
93 virtual void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
94 virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
95 virtual void Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
96 virtual void SetAnchorPos(const Point& rPnt) override;
97 virtual void SetRelativePos(const Point& rPnt) override;
98 virtual void SetSnapRect(const tools::Rectangle& rRect) override;
99 virtual void SetLogicRect(const tools::Rectangle& rRect) override;
100
101 virtual void NbcMove(const Size& rSiz) override;
102 virtual void NbcResize(const Point& rRef, const Fraction& xFact,
103 const Fraction& yFact) override;
104 virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
105 virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
106 virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
107 virtual void NbcSetAnchorPos(const Point& rPnt) override;
108 virtual void NbcSetRelativePos(const Point& rPnt) override;
109 virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
110 virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
111
112 virtual void NbcReformatText() override;
113
115 bool bAddText) const override;
116
117 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
118 virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
119};
120
121/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< svx::diagram::IDiagramHelper > mp_DiagramHelper
Definition: svdogrp.hxx:44
Point maRefPoint
Definition: svdogrp.hxx:39
virtual SdrPage * getSdrPageFromSdrObjList() const
Definition: svdpage.cxx:122
virtual SdrObject * getSdrObjectFromSdrObjList() const
Definition: svdpage.cxx:128
Provides information about various ZObject properties.
Definition: svdobj.hxx:193
Abstract DrawObject.
Definition: svdobj.hxx:257
virtual void RecalcSnapRect()
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdobj.cxx:1656
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties()
Definition: svdobj.cxx:210
virtual void NbcSetAnchorPos(const Point &rPnt)
Definition: svdobj.cxx:1633
virtual Degree100 GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1708
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: svdobj.cxx:1769
virtual rtl::Reference< SdrObject > DoConvertToPolyObj(bool bBezier, bool bAddText) const
Definition: svdobj.cxx:2637
virtual void SetAnchorPos(const Point &rPnt)
Definition: svdobj.cxx:1640
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1703
virtual void SetGrabBagItem(const css::uno::Any &rVal)
Definition: svdobj.cxx:889
virtual void NbcSetLayer(SdrLayerID nLayer)
Definition: svdobj.cxx:657
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1307
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1675
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1405
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1594
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1057
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1343
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1091
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:1605
virtual const std::shared_ptr< svx::diagram::IDiagramHelper > & getDiagramHelper() const
Definition: svdobj.cxx:202
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1585
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:710
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
Definition: svdobj.cxx:518
virtual void Move(const Size &rSiz)
Definition: svdobj.cxx:1529
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:921
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1665
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1509
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1660
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1522
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1694
virtual SdrObjList * getChildrenOfSdrObject() const
Definition: svdobj.cxx:318
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact()
Definition: svdobj.cxx:251
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1498
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1574
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:621
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1685
virtual void NbcReformatText()
Definition: svdobj.cxx:1836
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1047
virtual SdrLayerID GetLayer() const
Definition: svdobj.cxx:640
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1191
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const
Definition: svdobj.cxx:1042
virtual void SetRelativePos(const Point &rPnt)
Definition: svdobj.cxx:1612
virtual void SetBoundRectDirty()
Definition: svdobj.cxx:324
virtual void NbcMove(const Size &rSiz)
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdobj.cxx:1399
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:626
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
Definition: svdobj.cxx:1546
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:377
struct _xmlTextWriter * xmlTextWriterPtr
SdrObjKind
Definition: svdobjkind.hxx:25
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35