summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-05 14:04:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-06 17:16:09 +0100
commitde78304d92140901d19a6ea17bdc1d568df955c4 (patch)
treef0494ee90a4d7493e2381bbd17f5c1f337a35f0e /include
parent8c9b8c5970a08c2ef0ccddb7a691f3731d39175a (diff)
make SdrObject Identifiers SdrObjKind enum members
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/cube3d.hxx2
-rw-r--r--include/svx/fmglob.hxx52
-rw-r--r--include/svx/fmview.hxx4
-rw-r--r--include/svx/globl3d.hxx36
-rw-r--r--include/svx/lathe3d.hxx2
-rw-r--r--include/svx/obj3d.hxx4
-rw-r--r--include/svx/scene3d.hxx2
-rw-r--r--include/svx/sphere3d.hxx2
-rw-r--r--include/svx/svdcrtv.hxx10
-rw-r--r--include/svx/svdoashp.hxx2
-rw-r--r--include/svx/svdobj.hxx45
-rw-r--r--include/svx/svdobjkind.hxx147
-rw-r--r--include/svx/svdocapt.hxx2
-rw-r--r--include/svx/svdocirc.hxx2
-rw-r--r--include/svx/svdoedge.hxx2
-rw-r--r--include/svx/svdograf.hxx2
-rw-r--r--include/svx/svdogrp.hxx2
-rw-r--r--include/svx/svdomeas.hxx2
-rw-r--r--include/svx/svdomedia.hxx2
-rw-r--r--include/svx/svdoole2.hxx2
-rw-r--r--include/svx/svdopage.hxx2
-rw-r--r--include/svx/svdopath.hxx2
-rw-r--r--include/svx/svdorect.hxx2
-rw-r--r--include/svx/svdotable.hxx2
-rw-r--r--include/svx/svdotext.hxx2
-rw-r--r--include/svx/svdouno.hxx2
-rw-r--r--include/svx/svdovirt.hxx2
-rw-r--r--include/svx/unopage.hxx3
-rw-r--r--include/svx/unoprov.hxx3
29 files changed, 183 insertions, 161 deletions
diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx
index d9b660fa6e52..515e8331c044 100644
--- a/include/svx/cube3d.hxx
+++ b/include/svx/cube3d.hxx
@@ -67,7 +67,7 @@ public:
const basegfx::B3DVector& r3DSize);
E3dCubeObj(SdrModel& rSdrModel);
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
virtual E3dCubeObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/fmglob.hxx b/include/svx/fmglob.hxx
deleted file mode 100644
index 35f3460f19a3..000000000000
--- a/include/svx/fmglob.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_FMGLOB_HXX
-#define INCLUDED_SVX_FMGLOB_HXX
-
-#include <com/sun/star/form/FormComponentType.hpp>
-
-const sal_uInt16 OBJ_FM_CONTROL = css::form::FormComponentType::CONTROL;
- // for form components
-const sal_uInt16 OBJ_FM_EDIT = css::form::FormComponentType::TEXTFIELD;
-const sal_uInt16 OBJ_FM_BUTTON = css::form::FormComponentType::COMMANDBUTTON;
-const sal_uInt16 OBJ_FM_FIXEDTEXT = css::form::FormComponentType::FIXEDTEXT;
-const sal_uInt16 OBJ_FM_LISTBOX = css::form::FormComponentType::LISTBOX;
-const sal_uInt16 OBJ_FM_CHECKBOX = css::form::FormComponentType::CHECKBOX;
-const sal_uInt16 OBJ_FM_COMBOBOX = css::form::FormComponentType::COMBOBOX;
-const sal_uInt16 OBJ_FM_RADIOBUTTON = css::form::FormComponentType::RADIOBUTTON;
-const sal_uInt16 OBJ_FM_GROUPBOX = css::form::FormComponentType::GROUPBOX;
-const sal_uInt16 OBJ_FM_GRID = css::form::FormComponentType::GRIDCONTROL;
-const sal_uInt16 OBJ_FM_IMAGEBUTTON = css::form::FormComponentType::IMAGEBUTTON;
-const sal_uInt16 OBJ_FM_FILECONTROL = css::form::FormComponentType::FILECONTROL;
-const sal_uInt16 OBJ_FM_DATEFIELD = css::form::FormComponentType::DATEFIELD;
-const sal_uInt16 OBJ_FM_TIMEFIELD = css::form::FormComponentType::TIMEFIELD;
-const sal_uInt16 OBJ_FM_NUMERICFIELD = css::form::FormComponentType::NUMERICFIELD;
-const sal_uInt16 OBJ_FM_CURRENCYFIELD = css::form::FormComponentType::CURRENCYFIELD;
-const sal_uInt16 OBJ_FM_PATTERNFIELD = css::form::FormComponentType::PATTERNFIELD;
-const sal_uInt16 OBJ_FM_HIDDEN = css::form::FormComponentType::HIDDENCONTROL;
-const sal_uInt16 OBJ_FM_IMAGECONTROL = css::form::FormComponentType::IMAGECONTROL;
-const sal_uInt16 OBJ_FM_FORMATTEDFIELD = css::form::FormComponentType::PATTERNFIELD + 1;
-const sal_uInt16 OBJ_FM_SCROLLBAR = css::form::FormComponentType::PATTERNFIELD + 2;
-const sal_uInt16 OBJ_FM_SPINBUTTON = css::form::FormComponentType::PATTERNFIELD + 3;
-const sal_uInt16 OBJ_FM_NAVIGATIONBAR = css::form::FormComponentType::PATTERNFIELD + 4;
-
-#endif // _FM_FMGLOB_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 00cecc94d8be..13c1ec711745 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -91,9 +91,9 @@ public:
sal_Int32 _nYOffsetMM,
const css::uno::Reference< css::beans::XPropertySet >& _rxField,
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
- sal_uInt16 _nControlObjectID,
+ SdrObjKind _nControlObjectID,
SdrInventor _nInventor,
- sal_uInt16 _nLabelObjectID,
+ SdrObjKind _nLabelObjectID,
// tdf#118963 Need a SdrModel for SdrObject creation. To make the
// demand clear, hand over a SdrMldel&
diff --git a/include/svx/globl3d.hxx b/include/svx/globl3d.hxx
deleted file mode 100644
index 2eed87268988..000000000000
--- a/include/svx/globl3d.hxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_GLOBL3D_HXX
-#define INCLUDED_SVX_GLOBL3D_HXX
-
-#include <sal/types.h>
-
-const sal_uInt16 E3D_SCENE_ID = 2;
-const sal_uInt16 E3D_OBJECT_ID = 3; // should not be used, it's only a helper class for E3DScene and E3DCompoundObject
-const sal_uInt16 E3D_CUBEOBJ_ID = 4;
-const sal_uInt16 E3D_SPHEREOBJ_ID = 5;
-const sal_uInt16 E3D_EXTRUDEOBJ_ID = 6;
-const sal_uInt16 E3D_LATHEOBJ_ID = 7;
-const sal_uInt16 E3D_COMPOUNDOBJ_ID = 8;
-const sal_uInt16 E3D_POLYGONOBJ_ID = 9;
-
-#endif // INCLUDED_SVX_GLOBL3D_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx
index a14ae9a0ea6c..db2c868280ce 100644
--- a/include/svx/lathe3d.hxx
+++ b/include/svx/lathe3d.hxx
@@ -98,7 +98,7 @@ public:
bool GetCloseBack() const
{ return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK).GetValue(); }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual E3dLatheObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 5a51cc34c603..b9f43315d730 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -93,7 +93,7 @@ public:
virtual void RecalcSnapRect() override;
virtual SdrInventor GetObjInventor() const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void NbcMove(const Size& rSize) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
@@ -176,7 +176,7 @@ public:
virtual sal_uInt32 GetHdlCount() const override;
virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void RecalcSnapRect() override;
virtual E3dCompoundObject* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index e3fb1b5c779c..3ff3a5562e44 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -114,7 +114,7 @@ public:
// set flag to draw only selected
void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; }
bool GetDrawOnlySelected() const { return bDrawOnlySelected; }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcMove(const Size& rSize) override;
diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx
index 3bc2ab2f192c..0ee9bc0531b3 100644
--- a/include/svx/sphere3d.hxx
+++ b/include/svx/sphere3d.hxx
@@ -66,7 +66,7 @@ public:
sal_uInt32 GetVerticalSegments() const
{ return GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue(); }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
virtual E3dSphereObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 6868e7ba1cb2..253d1060aba9 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -50,7 +50,7 @@ protected:
sal_Int32 nAutoCloseDistPix;
sal_Int32 nFreeHandMinDistPix;
SdrInventor nCurrentInvent; // set the current ones
- sal_uInt16 nCurrentIdent; // Obj for re-creating
+ SdrObjKind nCurrentIdent; // Obj for re-creating
bool b1stPointAsCenter : 1;
bool bUseIncompatiblePathCreateInterface : 1;
@@ -58,7 +58,7 @@ protected:
void ImpClearConnectMarker();
protected:
- bool ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
+ bool ImpBegCreateObj(SdrInventor nInvent, SdrObjKind nIdent, const Point& rPnt, OutputDevice* pOut,
sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject);
void ShowCreateObj(/*OutputDevice* pOut, bool bFull*/);
@@ -100,10 +100,10 @@ public:
// Determine whether a measurement tool activated
bool IsMeasureTool() const;
- void SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent=SdrInventor::Default);
- void TakeCurrentObj(sal_uInt16& nIdent, SdrInventor& nInvent) const { nInvent=nCurrentInvent; nIdent=nCurrentIdent; }
+ void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default);
+ void TakeCurrentObj(SdrObjKind& nIdent, SdrInventor& nInvent) const { nInvent=nCurrentInvent; nIdent=nCurrentIdent; }
SdrInventor GetCurrentObjInventor() const { return nCurrentInvent; }
- sal_uInt16 GetCurrentObjIdentifier() const { return nCurrentIdent; }
+ SdrObjKind GetCurrentObjIdentifier() const { return nCurrentIdent; }
// Beginning the regular Create
bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3);
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 040302faa4c0..2014e0998c2d 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -164,7 +164,7 @@ public:
};
bool IsDefaultGeometry( const DefaultType eDefaultType ) const;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void Move(const Size& rSiz) override;
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index bb09c6856d3e..bd528c9fe4cb 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -30,6 +30,7 @@
#include <svl/typedwhich.hxx>
#include <svx/DiagramDataInterface.hxx>
#include <svx/svdtypes.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svxdllapi.h>
#include <svx/shapeproperty.hxx>
#include <tools/link.hxx>
@@ -114,42 +115,6 @@ struct SVXCORE_DLLPUBLIC SdrObjectFreeOp;
// deleter is needed - here, SdrObject::Free needs to be used.
typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr;
-enum SdrObjKind {
- OBJ_NONE = 0, /// abstract object (SdrObject)
- OBJ_GRUP = 1, /// object group
- OBJ_LINE = 2, /// line
- OBJ_RECT = 3, /// rectangle (round corners optional)
- OBJ_CIRC = 4, /// circle, ellipse
- OBJ_SECT = 5, /// circle section
- OBJ_CARC = 6, /// circle arc
- OBJ_CCUT = 7, /// circle cut
- OBJ_POLY = 8, /// polygon, PolyPolygon
- OBJ_PLIN = 9, /// PolyLine
- OBJ_PATHLINE =10, /// open Bezier-curve
- OBJ_PATHFILL =11, /// closed Bezier-curve
- OBJ_FREELINE =12, /// open free-hand line
- OBJ_FREEFILL =13, /// closed free-hand line
- OBJ_SPLNLINE =14, /// natural cubic Spline (ni)
- OBJ_SPLNFILL =15, /// periodic cubic Spline (ni)
- OBJ_TEXT =16, /// text object
- OBJ_TITLETEXT =20, /// TitleText, special text object for StarDraw
- OBJ_OUTLINETEXT=21, /// OutlineText, special text object for StarDraw
- OBJ_GRAF =22, /// foreign graphic (StarView Graphic)
- OBJ_OLE2 =23, /// OLE object
- OBJ_EDGE =24, /// connector object
- OBJ_CAPTION =25, /// caption object
- OBJ_PATHPOLY =26, /// Polygon/PolyPolygon represented by SdrPathObj
- OBJ_PATHPLIN =27, /// Polyline represented by SdrPathObj
- OBJ_PAGE =28, /// object that represents a SdrPage
- OBJ_MEASURE =29, /// measurement object
- OBJ_FRAME =31, /// continuously activated OLE (PlugIn-Frame or similar)
- OBJ_UNO =32, /// Universal Network Object packed into SvDraw object
- OBJ_CUSTOMSHAPE=33, /// custom shape
- OBJ_MEDIA =34, /// media shape
- OBJ_TABLE =35, /// table
- OBJ_MAXI
-};
-
enum class SdrInventor : sal_uInt32 {
Unknown = 0,
BasicDialog = sal_uInt32( 'D' | ('L' << 8) | ('G' << 16) | ('1' << 24) ),
@@ -410,7 +375,7 @@ public:
void AddReference(SdrVirtObj& rVrtObj);
void DelReference(SdrVirtObj& rVrtObj);
virtual SdrInventor GetObjInventor() const;
- virtual sal_uInt16 GetObjIdentifier() const;
+ virtual SdrObjKind GetObjIdentifier() const;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
// Layer interface
@@ -1048,7 +1013,7 @@ struct SVXCORE_DLLPUBLIC SdrObjectFreeOp
struct SdrObjCreatorParams
{
SdrInventor nInventor;
- sal_uInt16 nObjIdentifier;
+ SdrObjKind nObjIdentifier;
SdrModel& rSdrModel;
};
@@ -1066,7 +1031,7 @@ public:
static SdrObject* MakeNewObject(
SdrModel& rSdrModel,
SdrInventor nInventor,
- sal_uInt16 nObjIdentifier,
+ SdrObjKind nObjIdentifier,
const tools::Rectangle* pSnapRect = nullptr);
static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
@@ -1076,7 +1041,7 @@ private:
static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory(
SdrModel& rSdrModel,
SdrInventor nInventor,
- sal_uInt16 nIdentifier);
+ SdrObjKind nIdentifier);
SdrObjFactory() = delete;
};
diff --git a/include/svx/svdobjkind.hxx b/include/svx/svdobjkind.hxx
new file mode 100644
index 000000000000..827b35e3b339
--- /dev/null
+++ b/include/svx/svdobjkind.hxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/form/FormComponentType.hpp>
+
+enum SdrObjKind
+{
+ OBJ_NONE = 0, /// abstract object (SdrObject)
+ OBJ_GRUP = 1, /// object group
+ OBJ_LINE = 2, /// line
+ OBJ_RECT = 3, /// rectangle (round corners optional)
+ OBJ_CIRC = 4, /// circle, ellipse
+ OBJ_SECT = 5, /// circle section
+ OBJ_CARC = 6, /// circle arc
+ OBJ_CCUT = 7, /// circle cut
+ OBJ_POLY = 8, /// polygon, PolyPolygon
+ OBJ_PLIN = 9, /// PolyLine
+ OBJ_PATHLINE = 10, /// open Bezier-curve
+ OBJ_PATHFILL = 11, /// closed Bezier-curve
+ OBJ_FREELINE = 12, /// open free-hand line
+ OBJ_FREEFILL = 13, /// closed free-hand line
+ OBJ_SPLNLINE = 14, /// natural cubic Spline (ni)
+ OBJ_SPLNFILL = 15, /// periodic cubic Spline (ni)
+ OBJ_TEXT = 16, /// text object
+ OBJ_TITLETEXT = 20, /// TitleText, special text object for StarDraw
+ OBJ_OUTLINETEXT = 21, /// OutlineText, special text object for StarDraw
+ OBJ_GRAF = 22, /// foreign graphic (StarView Graphic)
+ OBJ_OLE2 = 23, /// OLE object
+ OBJ_EDGE = 24, /// connector object
+ OBJ_CAPTION = 25, /// caption object
+ OBJ_PATHPOLY = 26, /// Polygon/PolyPolygon represented by SdrPathObj
+ OBJ_PATHPLIN = 27, /// Polyline represented by SdrPathObj
+ OBJ_PAGE = 28, /// object that represents a SdrPage
+ OBJ_MEASURE = 29, /// measurement object
+ OBJ_FRAME = 31, /// continuously activated OLE (PlugIn-Frame or similar)
+ OBJ_UNO = 32, /// Universal Network Object packed into SvDraw object
+ OBJ_CUSTOMSHAPE = 33, /// custom shape
+ OBJ_MEDIA = 34, /// media shape
+ OBJ_TABLE = 35, /// table
+
+ OBJ_OLE2_APPLET = 100,
+ OBJ_OLE2_PLUGIN = 101,
+
+ // engine3d, arbitrarily place at 200
+ E3D_SCENE_ID = 202,
+ // E3D_OBJECT_ID should not be used, it's only a helper class for E3DScene and E3DCompoundObject
+ E3D_OBJECT_ID = 203,
+ E3D_CUBEOBJ_ID = 204,
+ E3D_SPHEREOBJ_ID = 205,
+ E3D_EXTRUDEOBJ_ID = 206,
+ E3D_LATHEOBJ_ID = 207,
+ E3D_COMPOUNDOBJ_ID = 208,
+ E3D_POLYGONOBJ_ID = 209,
+
+ // for form components, arbitrarily place at 300
+ OBJ_FM_CONTROL = 300 + css::form::FormComponentType::CONTROL,
+ OBJ_FM_EDIT = 300 + css::form::FormComponentType::TEXTFIELD,
+ OBJ_FM_BUTTON = 300 + css::form::FormComponentType::COMMANDBUTTON,
+ OBJ_FM_FIXEDTEXT = 300 + css::form::FormComponentType::FIXEDTEXT,
+ OBJ_FM_LISTBOX = 300 + css::form::FormComponentType::LISTBOX,
+ OBJ_FM_CHECKBOX = 300 + css::form::FormComponentType::CHECKBOX,
+ OBJ_FM_COMBOBOX = 300 + css::form::FormComponentType::COMBOBOX,
+ OBJ_FM_RADIOBUTTON = 300 + css::form::FormComponentType::RADIOBUTTON,
+ OBJ_FM_GROUPBOX = 300 + css::form::FormComponentType::GROUPBOX,
+ OBJ_FM_GRID = 300 + css::form::FormComponentType::GRIDCONTROL,
+ OBJ_FM_IMAGEBUTTON = 300 + css::form::FormComponentType::IMAGEBUTTON,
+ OBJ_FM_FILECONTROL = 300 + css::form::FormComponentType::FILECONTROL,
+ OBJ_FM_DATEFIELD = 300 + css::form::FormComponentType::DATEFIELD,
+ OBJ_FM_TIMEFIELD = 300 + css::form::FormComponentType::TIMEFIELD,
+ OBJ_FM_NUMERICFIELD = 300 + css::form::FormComponentType::NUMERICFIELD,
+ OBJ_FM_CURRENCYFIELD = 300 + css::form::FormComponentType::CURRENCYFIELD,
+ OBJ_FM_PATTERNFIELD = 300 + css::form::FormComponentType::PATTERNFIELD,
+ OBJ_FM_HIDDEN = 300 + css::form::FormComponentType::HIDDENCONTROL,
+ OBJ_FM_IMAGECONTROL = 300 + css::form::FormComponentType::IMAGECONTROL,
+ OBJ_FM_FORMATTEDFIELD = 300 + css::form::FormComponentType::PATTERNFIELD + 1,
+ OBJ_FM_SCROLLBAR = 300 + css::form::FormComponentType::PATTERNFIELD + 2,
+ OBJ_FM_SPINBUTTON = 300 + css::form::FormComponentType::PATTERNFIELD + 3,
+ OBJ_FM_NAVIGATIONBAR = 300 + css::form::FormComponentType::PATTERNFIELD + 4,
+
+ // basctl, arbitrarily place at 400
+ OBJ_DLG_CONTROL = 401,
+ OBJ_DLG_DIALOG = 402,
+ OBJ_DLG_PUSHBUTTON = 403,
+ OBJ_DLG_RADIOBUTTON = 404,
+ OBJ_DLG_CHECKBOX = 405,
+ OBJ_DLG_LISTBOX = 406,
+ OBJ_DLG_COMBOBOX = 407,
+ OBJ_DLG_GROUPBOX = 408,
+ OBJ_DLG_EDIT = 409,
+ OBJ_DLG_FIXEDTEXT = 410,
+ OBJ_DLG_IMAGECONTROL = 411,
+ OBJ_DLG_PROGRESSBAR = 412,
+ OBJ_DLG_HSCROLLBAR = 413,
+ OBJ_DLG_VSCROLLBAR = 414,
+ OBJ_DLG_HFIXEDLINE = 415,
+ OBJ_DLG_VFIXEDLINE = 416,
+ OBJ_DLG_DATEFIELD = 417,
+ OBJ_DLG_TIMEFIELD = 418,
+ OBJ_DLG_NUMERICFIELD = 419,
+ OBJ_DLG_CURRENCYFIELD = 420,
+ OBJ_DLG_FORMATTEDFIELD = 421,
+ OBJ_DLG_PATTERNFIELD = 422,
+ OBJ_DLG_FILECONTROL = 423,
+ OBJ_DLG_TREECONTROL = 424,
+ OBJ_DLG_SPINBUTTON = 425,
+ OBJ_DLG_GRIDCONTROL = 426,
+ OBJ_DLG_HYPERLINKCONTROL = 427,
+
+ OBJ_DLG_FORMRADIO = 428,
+ OBJ_DLG_FORMCHECK = 429,
+ OBJ_DLG_FORMLIST = 430,
+ OBJ_DLG_FORMCOMBO = 431,
+ OBJ_DLG_FORMSPIN = 432,
+ OBJ_DLG_FORMVSCROLL = 433,
+ OBJ_DLG_FORMHSCROLL = 434,
+
+ // reportdesign, arbitrarily place at 500
+ OBJ_RD_FIXEDTEXT = 501,
+ OBJ_RD_IMAGECONTROL = 502,
+ OBJ_RD_FORMATTEDFIELD = 503,
+ OBJ_RD_HFIXEDLINE = 504,
+ OBJ_RD_VFIXEDLINE = 505,
+ OBJ_RD_SUBREPORT = 506,
+
+ // writer, arbitrarily place at 600
+ SwFlyDrawObjIdentifier = 601
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index 01b928b612ed..c313fb9a1bb4 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -83,7 +83,7 @@ public:
bool isSuppressGetBitmap() const { return mbSuppressGetBitmap; }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrCaptionObj* CloneSdrObject(SdrModel& rTargetModel) const override;
// implemented mainly for the purposes of Clone()
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
index dc0956388ed1..15c27ddbe10f 100644
--- a/include/svx/svdocirc.hxx
+++ b/include/svx/svdocirc.hxx
@@ -92,7 +92,7 @@ public:
SdrCircKind GetCircleKind() const { return meCircleKind; }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual OUString TakeObjNameSingul() const override;
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index d1f9558a0648..5d0116cb97d8 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -196,7 +196,7 @@ public:
SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &aCon1 : &aCon2); }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual const tools::Rectangle& GetCurrentBoundRect() const override;
virtual const tools::Rectangle& GetSnapRect() const override;
virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 11ab6f115780..21ab9b3a2fb5 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -172,7 +172,7 @@ public:
void StartAnimation();
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index 7c44fa6afb4f..b63cf4b63d53 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -52,7 +52,7 @@ public:
virtual SdrObjList* getChildrenOfSdrObject() const override;
virtual void SetBoundRectDirty() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrLayerID GetLayer() const override;
virtual void NbcSetLayer(SdrLayerID nLayer) override;
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 3591a27c0d69..d72798e23111 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -83,7 +83,7 @@ public:
const Point& rPt2);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual SdrMeasureObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index 258a287509a4..9eab605e8ef4 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -48,7 +48,7 @@ public:
virtual bool HasTextEdit() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 85f0125c17b0..8c209ce7f281 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -134,7 +134,7 @@ public:
virtual SdrObjectUniquePtr getFullDragClone() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx
index af557b27be86..601b86d5480c 100644
--- a/include/svx/svdopage.hxx
+++ b/include/svx/svdopage.hxx
@@ -57,7 +57,7 @@ public:
// #i96598#
virtual void SetBoundRectDirty() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrPageObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrPageObj& operator=(const SdrPageObj& rObj);
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
index 6c8de0e5ae0b..5f56fd38e5ae 100644
--- a/include/svx/svdopath.hxx
+++ b/include/svx/svdopath.hxx
@@ -73,7 +73,7 @@ public:
const basegfx::B2DPolyPolygon& rPathPoly);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual SdrPathObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrPathObj& operator=(const SdrPathObj& rObj);
diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx
index 92c4e1d665cb..9480acdb103a 100644
--- a/include/svx/svdorect.hxx
+++ b/include/svx/svdorect.hxx
@@ -86,7 +86,7 @@ public:
const tools::Rectangle& rRect);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual OUString TakeObjNameSingul() const override;
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index df713b66c951..98b9229df404 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -196,7 +196,7 @@ public:
virtual bool IsFontwork() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void SetChanged() override;
virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 21a25330e913..9d74bffec93e 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -440,7 +440,7 @@ public:
virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
// needed to determine text anchor area
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx
index 22f10d334a09..3796b086c8b9 100644
--- a/include/svx/svdouno.hxx
+++ b/include/svx/svdouno.hxx
@@ -73,7 +73,7 @@ public:
const css::uno::Reference< css::lang::XMultiServiceFactory >& rxSFac);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrUnoObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrUnoObj& operator= (const SdrUnoObj& rObj);
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index bede9e4356eb..a9864189da3f 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -60,7 +60,7 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrInventor GetObjInventor() const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjList* GetSubList() const override;
virtual const tools::Rectangle& GetCurrentBoundRect() const override;
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index 911be0c2a66e..a428254f6af7 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <editeng/mutxhelp.hxx>
#include <svx/svxdllapi.h>
+#include <svx/svdobjkind.hxx>
#include <cppuhelper/implbase7.hxx>
#include <comphelper/servicehelper.hxx>
@@ -83,7 +84,7 @@ class SVXCORE_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper7< css::dr
SdrObject *CreateSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape, bool bBeginning = false ) throw();
// Determine Type and Inventor
- static void GetTypeAndInventor( sal_uInt16& rType, SdrInventor& rInventor, const OUString& aName ) throw();
+ static void GetTypeAndInventor( SdrObjKind& rType, SdrInventor& rInventor, const OUString& aName ) throw();
// Creating a SdrObject using it's Description.
// Can be used by derived classes to support their owen Shapes (e.g. Controls).
diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx
index d69ddfca1d8b..7292bb1d5fdd 100644
--- a/include/svx/unoprov.hxx
+++ b/include/svx/unoprov.hxx
@@ -96,9 +96,6 @@ public:
* Globals
*/
-const sal_Int16 OBJ_OLE2_APPLET = 100;
-const sal_Int16 OBJ_OLE2_PLUGIN = 101;
-
#define E3D_INVENTOR_FLAG (0x80000000)
/**