summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-21 11:45:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-21 12:09:09 +0000
commitbeb8cfcf32f855a0fb638caef4782d9d867e3102 (patch)
tree23b5a2376ecacc2977c3ce5f3a2be182abb05b3b /reportdesign
parent2b14fb3a4f92b928f0a5fc536c6a5f4a6e51a9b8 (diff)
convert inventorId to scoped enum
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/RptDef.hxx5
-rw-r--r--reportdesign/inc/RptObject.hxx6
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx12
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/dlgedfac.cxx2
6 files changed, 15 insertions, 20 deletions
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index 41c7ea6b77a6..329012368c10 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -49,11 +49,6 @@ namespace rptui
#define RPT_LAYER_HIDDEN 2
-const sal_uInt32 ReportInventor = sal_uInt32('R')*0x00000001+
- sal_uInt32('P')*0x00000100+
- sal_uInt32('T')*0x00010000+
- sal_uInt32('1')*0x01000000;
-
#define OBJ_DLG_FIXEDTEXT ((sal_uInt16) OBJ_MAXI + 1)
#define OBJ_DLG_IMAGECONTROL OBJ_FM_IMAGECONTROL
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 105273f03827..6a41ea967602 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -151,7 +151,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
virtual sal_uInt16 GetObjIdentifier() const override;
- virtual sal_uInt32 GetObjInventor() const override;
+ virtual SdrInventor GetObjInventor() const override;
private:
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
@@ -195,7 +195,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
virtual sal_uInt16 GetObjIdentifier() const override;
- virtual sal_uInt32 GetObjInventor() const override;
+ virtual SdrInventor GetObjInventor() const override;
// Clone() should make a complete copy of the object.
virtual OOle2Obj* Clone() const override;
virtual void initializeOle() override;
@@ -247,7 +247,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
virtual sal_uInt16 GetObjIdentifier() const override;
- virtual sal_uInt32 GetObjInventor() const override;
+ virtual SdrInventor GetObjInventor() const override;
virtual OUnoObject* Clone() const override;
OUnoObject& operator=(const OUnoObject& rObj);
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index d099b5c1cdc1..32a7b77a54c0 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -485,9 +485,9 @@ sal_uInt16 OCustomShape::GetObjIdentifier() const
return sal_uInt16(OBJ_CUSTOMSHAPE);
}
-sal_uInt32 OCustomShape::GetObjInventor() const
+SdrInventor OCustomShape::GetObjInventor() const
{
- return ReportInventor;
+ return SdrInventor::ReportDesign;
}
SdrPage* OCustomShape::GetImplPage() const
@@ -645,9 +645,9 @@ sal_uInt16 OUnoObject::GetObjIdentifier() const
return sal_uInt16(m_nObjectType);
}
-sal_uInt32 OUnoObject::GetObjInventor() const
+SdrInventor OUnoObject::GetObjInventor() const
{
- return ReportInventor;
+ return SdrInventor::ReportDesign;
}
SdrPage* OUnoObject::GetImplPage() const
@@ -925,9 +925,9 @@ sal_uInt16 OOle2Obj::GetObjIdentifier() const
return m_nType;
}
-sal_uInt32 OOle2Obj::GetObjInventor() const
+SdrInventor OOle2Obj::GetObjInventor() const
{
- return ReportInventor;
+ return SdrInventor::ReportDesign;
}
SdrPage* OOle2Obj::GetImplPage() const
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7605e292373f..c4395fc9f58d 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3136,7 +3136,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
uno::Reference< report::XReportComponent> xShapeProp;
if ( _nObjectId == OBJ_CUSTOMSHAPE )
{
- pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
+ pNewControl = SdrObjFactory::MakeNewObject( SdrInventor::ReportDesign, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
xShapeProp.set(pNewControl->getUnoShape(),uno::UNO_QUERY);
OUString sCustomShapeType = getDesignView()->GetInsertObjString();
if ( sCustomShapeType.isEmpty() )
@@ -3146,7 +3146,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
}
else if ( _nObjectId == OBJ_OLE2 || OBJ_DLG_SUBREPORT == _nObjectId )
{
- pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
+ pNewControl = SdrObjFactory::MakeNewObject( SdrInventor::ReportDesign, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
pNewControl->SetLogicRect(Rectangle(3000,500,8000,5500)); // switch height and width
xShapeProp.set(pNewControl->getUnoShape(),uno::UNO_QUERY_THROW);
@@ -3162,7 +3162,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
SdrUnoObj* pControl( nullptr );
FmFormView::createControlLabelPair( getDesignView()
,nLeftMargin,0
- ,nullptr,nullptr,_nObjectId,OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT,
+ ,nullptr,nullptr,_nObjectId,OUString(),SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
nullptr,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(),
pLabel,pControl);
delete pLabel;
@@ -3457,7 +3457,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
// find this in svx
FmFormView::createControlLabelPair( getDesignView()
,nLeftMargin,0
- ,xField,xNumberFormats,nOBJID,OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT,
+ ,xField,xNumberFormats,nOBJID,OUString(),SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(),
pControl[0],pControl[1]);
if ( pControl[0] && pControl[1] )
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 56a78933805e..33f9669f6562 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -352,7 +352,7 @@ void OViewsWindow::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
TSectionsMap::const_iterator aIter = m_aSections.begin();
TSectionsMap::const_iterator aEnd = m_aSections.end();
for (;aIter != aEnd ; ++aIter)
- (*aIter)->getReportSection().getSectionView().SetCurrentObj( eObj, ReportInventor );
+ (*aIter)->getReportSection().getSectionView().SetCurrentObj( eObj, SdrInventor::ReportDesign );
m_sShapeType = _sShapeType;
}
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx
index 07a2e4c9c3d2..0bc995800283 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -47,7 +47,7 @@ IMPL_STATIC_LINK(
DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* )
{
SdrObject* pNewObj = nullptr;
- if ( aParams.nInventor == ReportInventor )
+ if ( aParams.nInventor == SdrInventor::ReportDesign )
{
switch( aParams.nObjIdentifier )
{