summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-11 19:22:52 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-16 21:21:37 +0200
commitfda4b0f65eb23b597612113686a927a90f11a0f0 (patch)
treeb39c1b8abb7a6d50eee862ad01f7f999e554421f /include/svx
parent6703b806a7d33f27bdec53d5c897beac94308fd9 (diff)
Take care of E3DObjList
E3DObjList is not needed, remove. Remove memeber from E3DObject, derive E3DScene directly from SdrObjList, some cleanups in SdrObject, too Change-Id: Ifa4620a800c14faf21f8b80fd4dc1d39f71be804 Reviewed-on: https://gerrit.libreoffice.org/52740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/obj3d.hxx54
-rw-r--r--include/svx/scene3d.hxx23
-rw-r--r--include/svx/svdobj.hxx6
-rw-r--r--include/svx/svdogrp.hxx2
-rw-r--r--include/svx/svdpage.hxx6
5 files changed, 34 insertions, 57 deletions
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 7ad18848d4cd..099c4b3aad63 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -36,10 +36,7 @@
#include <basegfx/vector/b2enums.hxx>
#include <svx/svxdllapi.h>
-
-// Forward declaration
-
-
+// Forward declarations
class SfxPoolItem;
class Viewport3D;
class E3dScene;
@@ -71,30 +68,6 @@ public:
/*************************************************************************
|*
-|* List for 3D objects
-|*
-\************************************************************************/
-
-class E3dObjList final : public SdrObjList
-{
-public:
- E3dObjList();
- SVX_DLLPUBLIC virtual ~E3dObjList() override;
-
- virtual E3dObjList* CloneSdrObjList(SdrModel* pNewModel = nullptr) const override;
-
- virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
- virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
- virtual SdrObject* NbcRemoveObject(size_t nObjNum) override;
- virtual SdrObject* RemoveObject(size_t nObjNum) override;
-
-private:
- E3dObjList &operator=(const E3dObjList& rSrcList) = delete;
- E3dObjList(const E3dObjList& rSrcList) = delete;
-};
-
-/*************************************************************************
-|*
|* Base class for 3D objects
|*
\************************************************************************/
@@ -106,14 +79,11 @@ private:
friend class sdr::properties::E3dProperties;
// Allow everything for E3dObjList and E3dDragMethod
- friend class E3dObjList;
friend class E3dDragMethod;
protected:
virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties() override;
- E3dObjList maSubList; // child objects
-
basegfx::B3DRange maLocalBoundVol; // surrounding volume of the object (from the geometry generation)
basegfx::B3DHomMatrix maTransformation; // local transformation
basegfx::B3DHomMatrix maFullTransform; // global transformation (including. parents)
@@ -122,11 +92,10 @@ private:
bool mbTfHasChanged : 1;
bool mbIsSelected : 1;
- protected:
- void SetTransformChanged();
+protected:
virtual void NewObjectInserted(const E3dObject* p3DObj);
virtual void StructureChanged();
- basegfx::B3DRange RecalcBoundVolume() const;
+ virtual basegfx::B3DRange RecalcBoundVolume() const;
protected:
// E3dObject is only a helper class (for E3DScene and E3DCompoundObject)
@@ -135,31 +104,18 @@ protected:
E3dObject(SdrModel& rSdrModel);
public:
+ virtual void SetTransformChanged();
virtual void RecalcSnapRect() override;
- virtual void SetRectsDirty(bool bNotMyself = false) override;
virtual ~E3dObject() override;
virtual SdrInventor GetObjInventor() const override;
virtual sal_uInt16 GetObjIdentifier() const override;
-
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
-
- virtual void NbcSetLayer(SdrLayerID nLayer) override;
-
- virtual void SetObjList(SdrObjList* pNewObjList) override;
- virtual void SetPage(SdrPage* pNewPage) override;
virtual void NbcMove(const Size& rSize) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual SdrObjList* GetSubList() const override;
-
- // Insert 3D object into the group; transfer to other owner!
- void Insert3DObj(E3dObject* p3DObj);
- void Remove3DObj(E3dObject const * p3DObj);
-
E3dObject* GetParentObj() const;
virtual E3dScene* GetScene() const;
-
const basegfx::B3DRange& GetBoundVolume() const;
void InvalidateBoundVolume();
@@ -192,7 +148,7 @@ public:
// get/set the selection
bool GetSelected() const { return mbIsSelected; }
- void SetSelected(bool bNew);
+ virtual void SetSelected(bool bNew);
// break up
virtual bool IsBreakObjPossible();
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index eef2c0422ba9..3c54bf83b2b6 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -56,7 +56,7 @@ class Imp3DDepthRemapper;
|*
\************************************************************************/
-class SVX_DLLPUBLIC E3dScene : public E3dObject
+class SVX_DLLPUBLIC E3dScene : public E3dObject, public SdrObjList
{
private:
// to allow sdr::properties::E3dSceneProperties access to StructureChanged()
@@ -168,6 +168,27 @@ public:
void ResumeReportingDirtyRects();
void SetAllSceneRectsDirty();
+ // set selection fropm E3dObject (temporary flag for 3D actions)
+ virtual void SetSelected(bool bNew) override;
+
+ // derived from SdrObjList
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
+ virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
+ virtual SdrObject* NbcRemoveObject(size_t nObjNum) override;
+ virtual SdrObject* RemoveObject(size_t nObjNum) override;
+
+ // needed for group functionality
+ virtual void SetRectsDirty(bool bNotMyself = false) override;
+ virtual void NbcSetLayer(SdrLayerID nLayer) override;
+ virtual void setParentOfSdrObject(SdrObjList* pNewObjList) override;
+ virtual void SetPage(SdrPage* pNewPage) override;
+ virtual SdrObjList* GetSubList() const override;
+ void Insert3DObj(E3dObject* p3DObj);
+ void Remove3DObj(E3dObject const * p3DObj);
+ virtual void SetTransformChanged() override;
+
+protected:
+ virtual basegfx::B3DRange RecalcBoundVolume() const override;
};
#endif // INCLUDED_SVX_SCENE3D_HXX
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 6cf9336ea014..618b6b37495a 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -383,8 +383,8 @@ public:
// this method is only for access from Property objects
virtual void SetBoundRectDirty();
- virtual void SetObjList(SdrObjList* pNewObjList);
- SdrObjList* GetObjList() const { return pObjList;}
+ virtual void setParentOfSdrObject(SdrObjList* pNewObjList);
+ SdrObjList* getParentOfSdrObject() const { return mpParentOfSdrObject;}
virtual void SetPage(SdrPage* pNewPage);
SdrPage* GetPage() const { return pPage;}
@@ -992,7 +992,7 @@ private:
struct Impl;
std::unique_ptr<Impl> mpImpl;
Point aGridOffset; // hack (Calc)
- SdrObjList* pObjList; // list that includes this object
+ SdrObjList* mpParentOfSdrObject; // list that includes this object
sal_uInt32 nOrdNum; // order number of the object in the list
std::unique_ptr<SfxGrabBagItem> pGrabBagItem; // holds the GrabBagItem property
// Position in the navigation order. SAL_MAX_UINT32 when not used.
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index 7f0fb234f972..118f91a0a9eb 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -47,7 +47,7 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrLayerID GetLayer() const override;
virtual void NbcSetLayer(SdrLayerID nLayer) override;
- virtual void SetObjList(SdrObjList* pNewObjList) override;
+ virtual void setParentOfSdrObject(SdrObjList* pNewObjList) override;
virtual void SetPage(SdrPage* pNewPage) override;
virtual SdrObjList* GetSubList() const override;
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 1ea8f1f57358..3e8fcb54f880 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -73,9 +73,9 @@ protected:
friend class SdrObjListIter;
friend class SdrEditView;
SdrObjList* pUpList; /// parent list
- SdrPage* pPage; /// Page containing the list, may be "this".
+ SdrPage* mpPage; /// Page containing the list, may be "this".
SdrObject* pOwnerObj; /// OwnerObject, if it's list of a Group object.
- tools::Rectangle aOutRect;
+ tools::Rectangle maOutRect;
tools::Rectangle aSnapRect;
SdrObjListKind eListKind;
bool bObjOrdNumsDirty;
@@ -83,7 +83,7 @@ friend class SdrEditView;
protected:
void RecalcRects();
- void lateInitSdrObjList(const SdrObjList& rSrcList, SdrModel* pNewModel = nullptr);
+ void copyDataFromSdrObjList(const SdrObjList& rSrcList, SdrModel* pNewModel = nullptr);
private:
/// simple ActionChildInserted forwarder to have it on a central place