summaryrefslogtreecommitdiff
path: root/reportdesign/inc
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 /reportdesign/inc
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 'reportdesign/inc')
-rw-r--r--reportdesign/inc/RptDef.hxx11
-rw-r--r--reportdesign/inc/RptObject.hxx22
2 files changed, 12 insertions, 21 deletions
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index fab7f9df7a57..f2dd5952684a 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -28,7 +28,7 @@
#include "dllapi.h"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/style/XStyle.hpp>
-#include <svx/fmglob.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svdtypes.hxx>
namespace com::sun::star {
@@ -45,15 +45,6 @@ constexpr SdrLayerID RPT_LAYER_FRONT (0);
constexpr SdrLayerID RPT_LAYER_BACK (1);
constexpr SdrLayerID RPT_LAYER_HIDDEN (2);
-
-
-#define OBJ_DLG_FIXEDTEXT (sal_uInt16(OBJ_MAXI) + 1)
-#define OBJ_DLG_IMAGECONTROL OBJ_FM_IMAGECONTROL
-#define OBJ_DLG_FORMATTEDFIELD (sal_uInt16(OBJ_MAXI) + 3)
-#define OBJ_DLG_HFIXEDLINE (sal_uInt16(OBJ_MAXI) + 4)
-#define OBJ_DLG_VFIXEDLINE (sal_uInt16(OBJ_MAXI) + 5)
-#define OBJ_DLG_SUBREPORT (sal_uInt16(OBJ_MAXI) + 6)
-
// allows the alignment and resizing of controls
enum class ControlModification
{
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 652ae055af8c..fa2c7c3890ed 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -114,7 +114,7 @@ public:
static SdrObject* createObject(
SdrModel& rTargetModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent);
- static sal_uInt16 getObjectType(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
+ static SdrObjKind getObjectType(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
};
// OCustomShape
@@ -139,7 +139,7 @@ public:
virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override;
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
private:
@@ -176,7 +176,7 @@ public:
static OOle2Obj* Create(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
- sal_uInt16 _nType)
+ SdrObjKind _nType)
{
return new OOle2Obj(rSdrModel, _xComponent, _nType);
}
@@ -184,7 +184,7 @@ public:
virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override;
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
// Clone() should make a complete copy of the object.
virtual OOle2Obj* CloneSdrObject(SdrModel& rTargetModel) const override;
@@ -198,11 +198,11 @@ private:
OOle2Obj(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
- sal_uInt16 _nType);
+ SdrObjKind _nType);
OOle2Obj(
SdrModel& rSdrModel,
const OUString& _sComponentName,
- sal_uInt16 _nType);
+ SdrObjKind _nType);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
@@ -214,7 +214,7 @@ private:
void impl_createDataProvider_nothrow( const css::uno::Reference< css::frame::XModel>& _xModel);
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
- sal_uInt16 m_nType;
+ SdrObjKind m_nType;
bool m_bOnlyOnce;
};
@@ -227,7 +227,7 @@ class REPORTDESIGN_DLLPUBLIC OUnoObject: public SdrUnoObj , public OObjectBase
friend class OObjectBase;
friend class DlgEdFactory;
- sal_uInt16 m_nObjectType;
+ SdrObjKind m_nObjectType;
// tdf#118730 remember if this object was created interactively (due to ::EndCreate being called)
bool m_bSetDefaultLabel;
@@ -235,12 +235,12 @@ protected:
OUnoObject(SdrModel& rSdrModel,
const OUString& _sComponentName,
const OUString& rModelName,
- sal_uInt16 _nObjectType);
+ SdrObjKind _nObjectType);
OUnoObject(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
const OUString& rModelName,
- sal_uInt16 _nObjectType);
+ SdrObjKind _nObjectType);
// protected destructor
virtual ~OUnoObject() override;
@@ -266,7 +266,7 @@ public:
static OUString GetDefaultName(const OUnoObject* _pObj);
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
virtual OUnoObject* CloneSdrObject(SdrModel& rTargetModel) const override;