summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/connctrl.cxx4
-rw-r--r--svx/source/dialog/imapwnd.hxx10
-rw-r--r--svx/source/engine3d/obj3d.cxx4
-rw-r--r--svx/source/engine3d/objfac3d.cxx2
-rw-r--r--svx/source/form/fmdpage.cxx2
-rw-r--r--svx/source/form/fmobj.cxx4
-rw-r--r--svx/source/form/fmobjfac.cxx2
-rw-r--r--svx/source/form/fmpgeimp.cxx4
-rw-r--r--svx/source/form/fmshell.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmundo.cxx4
-rw-r--r--svx/source/form/fmview.cxx2
-rw-r--r--svx/source/form/fmvwimp.cxx12
-rw-r--r--svx/source/gallery2/galmisc.cxx4
-rw-r--r--svx/source/inc/fmobj.hxx2
-rw-r--r--svx/source/inc/fmvwimp.hxx3
-rw-r--r--svx/source/sdr/properties/textproperties.cxx4
-rw-r--r--svx/source/sidebar/SelectionAnalyzer.cxx46
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx2
-rw-r--r--svx/source/svdraw/svdcrtv.cxx28
-rw-r--r--svx/source/svdraw/svdedxv.cxx8
-rw-r--r--svx/source/svdraw/svdmrkv.cxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx17
-rw-r--r--svx/source/svdraw/svdopath.cxx23
-rw-r--r--svx/source/svdraw/svdotxln.cxx6
-rw-r--r--svx/source/svdraw/svdovirt.cxx2
-rw-r--r--svx/source/svdraw/svdview.cxx2
-rw-r--r--svx/source/unodraw/unomod.cxx4
-rw-r--r--svx/source/unodraw/unopage.cxx22
-rw-r--r--svx/source/unodraw/unoshape.cxx24
-rw-r--r--svx/source/unodraw/unoshtxt.cxx4
31 files changed, 134 insertions, 127 deletions
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index a81710f8674f..1e172b430202 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -153,9 +153,9 @@ void SvxXConnectionPreview::Construct()
for( size_t i = 0; i < nMarkCount && !bFound; ++i )
{
const SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
- sal_uInt32 nInv = pObj->GetObjInventor();
+ SdrInventor nInv = pObj->GetObjInventor();
sal_uInt16 nId = pObj->GetObjIdentifier();
- if( nInv == SdrInventor && nId == OBJ_EDGE )
+ if( nInv == SdrInventor::Default && nId == OBJ_EDGE )
{
bFound = true;
const SdrEdgeObj* pTmpEdgeObj = static_cast<const SdrEdgeObj*>(pObj);
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index 9492cabb6fad..585506467fda 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -45,12 +45,6 @@ struct NotifyInfo
#define SVD_IMAP_USERDATA 0x0001
-const sal_uInt32 IMapInventor = sal_uInt32('I') * 0x00000001+
- sal_uInt32('M') * 0x00000100+
- sal_uInt32('A') * 0x00010000+
- sal_uInt32('P') * 0x01000000;
-
-
typedef std::shared_ptr< IMapObject > IMapObjectPtr;
class IMapUserData : public SdrObjUserData
@@ -61,11 +55,11 @@ class IMapUserData : public SdrObjUserData
public:
explicit IMapUserData( const IMapObjectPtr& rIMapObj ) :
- SdrObjUserData ( IMapInventor, SVD_IMAP_USERDATA ),
+ SdrObjUserData ( SdrInventor::IMap, SVD_IMAP_USERDATA ),
mpObj ( rIMapObj ) {}
IMapUserData( const IMapUserData& rIMapUserData ) :
- SdrObjUserData ( IMapInventor, SVD_IMAP_USERDATA ),
+ SdrObjUserData ( SdrInventor::IMap, SVD_IMAP_USERDATA ),
mpObj ( rIMapUserData.mpObj ) {}
virtual ~IMapUserData() override { }
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 54b0b429fe36..877575cd6758 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -243,9 +243,9 @@ void E3dObject::SetRectsDirty(bool bNotMyself)
}
}
-sal_uInt32 E3dObject::GetObjInventor() const
+SdrInventor E3dObject::GetObjInventor() const
{
- return E3dInventor;
+ return SdrInventor::E3d;
}
sal_uInt16 E3dObject::GetObjIdentifier() const
diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx
index 185205a0de45..7baa7a5eba2b 100644
--- a/svx/source/engine3d/objfac3d.cxx
+++ b/svx/source/engine3d/objfac3d.cxx
@@ -47,7 +47,7 @@ E3dObjFactory::~E3dObjFactory()
IMPL_STATIC_LINK( E3dObjFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* )
{
- if ( aParams.nInventor == E3dInventor )
+ if ( aParams.nInventor == SdrInventor::E3d )
{
switch ( aParams.nObjIdentifier )
{
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
index 64380802c4b2..8ce3e23b3ab9 100644
--- a/svx/source/form/fmdpage.cxx
+++ b/svx/source/form/fmdpage.cxx
@@ -82,7 +82,7 @@ SdrObject *SvxFmDrawPage::CreateSdrObject_( const css::uno::Reference< css::draw
css::uno::Reference< css::drawing::XShape > SvxFmDrawPage::CreateShape( SdrObject *pObj ) const
throw (css::uno::RuntimeException, std::exception)
{
- if( FmFormInventor == pObj->GetObjInventor() )
+ if( SdrInventor::FmForm == pObj->GetObjInventor() )
{
css::uno::Reference< css::drawing::XShape > xShape = static_cast<SvxShape*>(new SvxShapeControl( pObj ));
return xShape;
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 3f851c874bce..8f4090dd859a 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -323,9 +323,9 @@ void FmFormObj::SetPage(SdrPage* _pNewPage)
}
-sal_uInt32 FmFormObj::GetObjInventor() const
+SdrInventor FmFormObj::GetObjInventor() const
{
- return FmFormInventor;
+ return SdrInventor::FmForm;
}
diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx
index dc244543556f..a9f0c548bc30 100644
--- a/svx/source/form/fmobjfac.cxx
+++ b/svx/source/form/fmobjfac.cxx
@@ -112,7 +112,7 @@ IMPL_STATIC_LINK(
FmFormObjFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject*)
{
SdrObject* pNewObj = nullptr;
- if (aParams.nInventor == FmFormInventor)
+ if (aParams.nInventor == SdrInventor::FmForm)
{
OUString sServiceSpecifier;
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 4712864f557a..7ed87afc1257 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -177,8 +177,8 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
FmFormObj* pForeignObj = dynamic_cast< FmFormObj* >( aForeignIter.Next() );
FmFormObj* pOwnObj = dynamic_cast< FmFormObj* >( aOwnIter.Next() );
- bool bForeignIsForm = pForeignObj && ( pForeignObj->GetObjInventor() == FmFormInventor );
- bool bOwnIsForm = pOwnObj && ( pOwnObj->GetObjInventor() == FmFormInventor );
+ bool bForeignIsForm = pForeignObj && ( pForeignObj->GetObjInventor() == SdrInventor::FmForm );
+ bool bOwnIsForm = pOwnObj && ( pOwnObj->GetObjInventor() == SdrInventor::FmForm );
if ( bForeignIsForm != bOwnIsForm )
{
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 30370464bca8..e44a926ca671 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -486,7 +486,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
}
SfxUInt16Item aIdentifierItem( SID_FM_CONTROL_IDENTIFIER, nIdentifier );
- SfxUInt32Item aInventorItem( SID_FM_CONTROL_INVENTOR, FmFormInventor );
+ SfxUInt32Item aInventorItem( SID_FM_CONTROL_INVENTOR, (sal_uInt32) SdrInventor::FmForm );
const SfxPoolItem* pArgs[] =
{
&aIdentifierItem, &aInventorItem, nullptr
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 5b5381820cb7..63df4cbee9ab 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -580,14 +580,14 @@ bool isControlList(const SdrMarkList& rMarkList)
SdrObjListIter aIter(*pObj->GetSubList());
while (aIter.IsMore() && bControlList)
{
- bControlList = FmFormInventor == aIter.Next()->GetObjInventor();
+ bControlList = SdrInventor::FmForm == aIter.Next()->GetObjInventor();
bHadAnyLeafs = true;
}
}
else
{
bHadAnyLeafs = true;
- bControlList = FmFormInventor == pObj->GetObjInventor();
+ bControlList = SdrInventor::FmForm == pObj->GetObjInventor();
}
}
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 38f2e20b8ba4..e70361d6d91b 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -332,7 +332,7 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
void FmXUndoEnvironment::Inserted(SdrObject* pObj)
{
- if (pObj->GetObjInventor() == FmFormInventor)
+ if (pObj->GetObjInventor() == SdrInventor::FmForm)
{
FmFormObj* pFormObj = dynamic_cast<FmFormObj*>( pObj );
Inserted( pFormObj );
@@ -446,7 +446,7 @@ void FmXUndoEnvironment::Removed(SdrObject* pObj)
// object, which is sufficient here
return;
- if (pObj->GetObjInventor() == FmFormInventor)
+ if (pObj->GetObjInventor() == SdrInventor::FmForm)
{
FmFormObj* pFormObj = dynamic_cast<FmFormObj*>( pObj );
Removed(pFormObj);
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 7622eb6f9c57..c94ba7c8e7d1 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -567,7 +567,7 @@ FmFormObj* FmFormView::getMarkedGrid() const
void FmFormView::createControlLabelPair( OutputDevice* _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
- sal_uInt16 _nControlObjectID, const OUString& _rFieldPostfix, sal_uInt32 _nInventor, sal_uInt16 _nLabelObjectID,
+ sal_uInt16 _nControlObjectID, const OUString& _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel* _pModel, SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl )
{
FmXFormView::createControlLabelPair(
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index f2defdd84139..bac41bc254fb 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1485,7 +1485,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_
const MapMode eSourceMode(MapUnit::Map100thMM);
const sal_uInt16 nObjID = OBJ_FM_BUTTON;
::Size controlSize(4000, 500);
- FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( FmFormInventor, nObjID, nullptr ));
+ FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( SdrInventor::FmForm, nObjID, nullptr ));
controlSize.Width() = Fraction(controlSize.Width(), 1) * eTargetMode.GetScaleX();
controlSize.Height() = Fraction(controlSize.Height(), 1) * eTargetMode.GetScaleY();
::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) );
@@ -1523,7 +1523,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO
const OUString& _rCommand, const sal_Int32 _nCommandType )
{
if ( !createControlLabelPair( _rOutDev, _nXOffsetMM, _nYOffsetMM,
- _rxField, _rxNumberFormats, _nControlObjectID, _rFieldPostfix, FmFormInventor, OBJ_FM_FIXEDTEXT,
+ _rxField, _rxNumberFormats, _nControlObjectID, _rFieldPostfix, SdrInventor::FmForm, OBJ_FM_FIXEDTEXT,
nullptr, nullptr, nullptr, _rpLabel, _rpControl )
)
return false;
@@ -1546,7 +1546,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO
bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField,
const Reference< XNumberFormats >& _rxNumberFormats, sal_uInt16 _nControlObjectID,
- const OUString& _rFieldPostfix, sal_uInt32 _nInventor, sal_uInt16 _nLabelObjectID,
+ const OUString& _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel* _pModel, SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl)
{
sal_Int32 nDataType = 0;
@@ -1780,7 +1780,7 @@ void FmXFormView::saveMarkList()
SdrObjListIter aIter( *pObj->GetSubList() );
bool bMixed = false;
while ( aIter.IsMore() && !bMixed )
- bMixed = ( aIter.Next()->GetObjInventor() != FmFormInventor );
+ bMixed = ( aIter.Next()->GetObjInventor() != SdrInventor::FmForm );
if ( !bMixed )
{
@@ -1790,7 +1790,7 @@ void FmXFormView::saveMarkList()
}
else
{
- if ( pObj->GetObjInventor() == FmFormInventor )
+ if ( pObj->GetObjInventor() == SdrInventor::FmForm )
{ // this is a form layer object
m_pView->MarkObj( pMark->GetMarkedSdrObj(), pMark->GetPageView(), true /* unmark! */ );
}
@@ -1891,7 +1891,7 @@ void FmXFormView::restoreMarkList( SdrMarkList& _rRestoredMarkList )
{
SdrMark* pMark = m_aMark.GetMark(i);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- if ( pObj->GetObjInventor() == FmFormInventor )
+ if ( pObj->GetObjInventor() == SdrInventor::FmForm )
if ( !m_pView->IsObjMarked( pObj ) )
m_pView->MarkObj( pObj, pMark->GetPageView() );
}
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index e8976066af13..86b00d8d4bcb 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -79,7 +79,7 @@ BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId )
IMPL_STATIC_LINK(
SgaUserDataFactory, MakeUserData, SdrObjUserDataCreatorParams, aParams, SdrObjUserData* )
{
- if ( aParams.nInventor == IV_IMAPINFO && aParams.nObjIdentifier == ID_IMAPINFO )
+ if ( aParams.nInventor == SdrInventor::SgaImap && aParams.nObjIdentifier == ID_IMAPINFO )
return new SgaIMapInfo;
return nullptr;
}
@@ -172,7 +172,7 @@ bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap&
{
const SdrObjUserData* pUserData = pObj->GetUserData( i );
- if ( ( pUserData->GetInventor() == IV_IMAPINFO ) && ( pUserData->GetId() == ID_IMAPINFO ) )
+ if ( ( pUserData->GetInventor() == SdrInventor::SgaImap ) && ( pUserData->GetId() == ID_IMAPINFO ) )
{
rGraphic = static_cast<const SdrGrafObj*>( pObj )->GetGraphic();
rImageMap = static_cast<const SgaIMapInfo*>( pUserData )->GetImageMap();
diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx
index cb0455d5e120..7bd6b552b82b 100644
--- a/svx/source/inc/fmobj.hxx
+++ b/svx/source/inc/fmobj.hxx
@@ -68,7 +68,7 @@ public:
SAL_DLLPRIVATE virtual ~FmFormObj() override;
SAL_DLLPRIVATE virtual void SetPage(SdrPage* pNewPage) override;
- SAL_DLLPRIVATE virtual sal_uInt32 GetObjInventor() const override;
+ SAL_DLLPRIVATE virtual SdrInventor GetObjInventor() const override;
SAL_DLLPRIVATE virtual sal_uInt16 GetObjIdentifier() const override;
SAL_DLLPRIVATE virtual void NbcReformatText() override;
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index d423df57a6ad..71e4d0821d6a 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -57,6 +57,7 @@ namespace vcl { class Window; }
class OutputDevice;
class SdrUnoObj;
struct ImplSVEvent;
+enum class SdrInventor : sal_uInt32;
namespace com { namespace sun { namespace star {
namespace awt {
@@ -256,7 +257,7 @@ private:
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
sal_uInt16 _nControlObjectID,
const OUString& _rFieldPostfix,
- sal_uInt32 _nInventor,
+ SdrInventor _nInventor,
sal_uInt16 _nLabelObjectID,
SdrPage* _pLabelPage,
SdrPage* _pControlPage,
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 5f76ca86b9f5..a511436cd97d 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -274,7 +274,7 @@ namespace sdr
if(GetStyleSheet())
{
- if((OBJ_OUTLINETEXT == rObj.GetTextKind()) && (SdrInventor == rObj.GetObjInventor()))
+ if((OBJ_OUTLINETEXT == rObj.GetTextKind()) && (SdrInventor::Default == rObj.GetObjInventor()))
{
OUString aNewStyleSheetName(GetStyleSheet()->GetName());
aNewStyleSheetName = aNewStyleSheetName.copy(0, aNewStyleSheetName.getLength() - 1);
@@ -361,7 +361,7 @@ namespace sdr
{
SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
- if( rObj.GetObjInventor() == SdrInventor )
+ if( rObj.GetObjInventor() == SdrInventor::Default )
{
const sal_uInt16 nSdrObjKind = rObj.GetObjIdentifier();
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index abba1f998c69..d77c903ad0ea 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -50,11 +50,11 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
}
else
{
- const sal_uInt32 nInv = pObj->GetObjInventor();
- const sal_uInt16 nObjId = pObj->GetObjIdentifier();
- if (nInv == SdrInventor)
+ const SdrInventor nInv = pObj->GetObjInventor();
+ const sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ if (nInv == SdrInventor::Default)
eContext = GetContextForObjectId_SC(nObjId);
- else if (nInv == FmFormInventor)
+ else if (nInv == SdrInventor::FmForm)
eContext = EnumContext::Context_Form;
}
break;
@@ -65,7 +65,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
// Multi selection.
switch (GetInventorTypeFromMark(rMarkList))
{
- case SdrInventor:
+ case SdrInventor::Default:
{
const sal_uInt16 nObjId (GetObjectTypeFromMark(rMarkList));
if (nObjId == 0)
@@ -75,13 +75,15 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
break;
}
- case FmFormInventor:
+ case SdrInventor::FmForm:
eContext = EnumContext::Context_Form;
break;
- case 0:
+ case SdrInventor::Unknown:
eContext = EnumContext::Context_MultiObject;
break;
+
+ default: break;
}
}
}
@@ -138,9 +140,9 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
}
else
{
- const sal_uInt32 nInv = pObj->GetObjInventor();
- sal_uInt16 nObjId = pObj->GetObjIdentifier();
- if (nInv == SdrInventor)
+ const SdrInventor nInv = pObj->GetObjInventor();
+ sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ if (nInv == SdrInventor::Default)
{
if (nObjId == OBJ_GRUP)
{
@@ -150,11 +152,11 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
}
eContext = GetContextForObjectId_SD(nObjId, eViewType);
}
- else if (nInv == E3dInventor)
+ else if (nInv == SdrInventor::E3d)
{
eContext = EnumContext::Context_3DObject;
}
- else if (nInv == FmFormInventor)
+ else if (nInv == SdrInventor::FmForm)
{
eContext = EnumContext::Context_Form;
}
@@ -166,7 +168,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
{
switch (GetInventorTypeFromMark(rMarkList))
{
- case SdrInventor:
+ case SdrInventor::Default:
{
const sal_uInt16 nObjId = GetObjectTypeFromMark(rMarkList);
if (nObjId == 0)
@@ -176,17 +178,19 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
break;
}
- case E3dInventor:
+ case SdrInventor::E3d:
eContext = EnumContext::Context_3DObject;
break;
- case FmFormInventor:
+ case SdrInventor::FmForm:
eContext = EnumContext::Context_Form;
break;
- case 0:
+ case SdrInventor::Unknown:
eContext = EnumContext::Context_MultiObject;
break;
+
+ default: break;
}
break;
}
@@ -305,25 +309,25 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
}
-sal_uInt32 SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMarkList)
+SdrInventor SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMarkList)
{
const size_t nMarkCount (rMarkList.GetMarkCount());
if (nMarkCount < 1)
- return 0;
+ return SdrInventor::Unknown;
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- const sal_uInt32 nFirstInv = pObj->GetObjInventor();
+ const SdrInventor nFirstInv = pObj->GetObjInventor();
for (size_t nIndex=1; nIndex<nMarkCount; ++nIndex)
{
pMark = rMarkList.GetMark(nIndex);
pObj = pMark->GetMarkedSdrObj();
- const sal_uInt32 nInv (pObj->GetObjInventor());
+ const SdrInventor nInv (pObj->GetObjInventor());
if (nInv != nFirstInv)
- return 0;
+ return SdrInventor::Unknown;
}
return nFirstInv;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index ed22fa0331c1..09703ceffadd 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -157,7 +157,7 @@ namespace
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
- if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind))
+ if((pObj->GetObjInventor() == SdrInventor::Default) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind))
{
const SdrTextObj* pSdrTextObj = dynamic_cast< const SdrTextObj* >(pObj);
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index c2311edb7b30..18664280cbe1 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -189,7 +189,7 @@ void SdrCreateView::ImpClearConnectMarker()
void SdrCreateView::ImpClearVars()
{
- nAktInvent=SdrInventor;
+ nAktInvent=SdrInventor::Default;
nAktIdent=OBJ_NONE;
pAktCreate=nullptr;
pCreatePV=nullptr;
@@ -269,10 +269,10 @@ bool SdrCreateView::CheckEdgeMode()
if (pAktCreate!=nullptr)
{
// is managed by EdgeObj
- if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return false;
+ if (nAktInvent==SdrInventor::Default && nAktIdent==OBJ_EDGE) return false;
}
- if (!IsCreateMode() || nAktInvent!=SdrInventor || nAktIdent!=OBJ_EDGE)
+ if (!IsCreateMode() || nAktInvent!=SdrInventor::Default || nAktIdent!=OBJ_EDGE)
{
ImpClearConnectMarker();
return false;
@@ -333,20 +333,20 @@ bool SdrCreateView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
bool SdrCreateView::IsTextTool() const
{
- return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor && (nAktIdent==OBJ_TEXT || nAktIdent==OBJ_TEXTEXT || nAktIdent==OBJ_TITLETEXT || nAktIdent==OBJ_OUTLINETEXT);
+ return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor::Default && (nAktIdent==OBJ_TEXT || nAktIdent==OBJ_TEXTEXT || nAktIdent==OBJ_TITLETEXT || nAktIdent==OBJ_OUTLINETEXT);
}
bool SdrCreateView::IsEdgeTool() const
{
- return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor && (nAktIdent==OBJ_EDGE);
+ return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor::Default && (nAktIdent==OBJ_EDGE);
}
bool SdrCreateView::IsMeasureTool() const
{
- return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor && (nAktIdent==OBJ_MEASURE);
+ return meEditMode==SdrViewEditMode::Create && nAktInvent==SdrInventor::Default && (nAktIdent==OBJ_MEASURE);
}
-void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
+void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent)
{
if (nAktInvent!=nInvent || nAktIdent!=nIdent)
{
@@ -380,7 +380,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
ImpSetGlueVisible3(IsEdgeTool());
}
-bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
+bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
short nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject)
{
bool bRet=false;
@@ -395,7 +395,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
{ // otherwise no side registered!
OUString aLay(maActualLayer);
- if(nInvent == SdrInventor && nIdent == OBJ_MEASURE && !maMeasureLayer.isEmpty())
+ if(nInvent == SdrInventor::Default && nIdent == OBJ_MEASURE && !maMeasureLayer.isEmpty())
{
aLay = maMeasureLayer;
}
@@ -423,7 +423,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
}
Point aPnt(rPnt);
- if (nAktInvent!=SdrInventor || (nAktIdent!=sal_uInt16(OBJ_EDGE) &&
+ if (nAktInvent!=SdrInventor::Default || (nAktIdent!=sal_uInt16(OBJ_EDGE) &&
nAktIdent!=sal_uInt16(OBJ_FREELINE) &&
nAktIdent!=sal_uInt16(OBJ_FREEFILL) )) { // no snapping for Edge and Freehand
aPnt=GetSnapPos(aPnt,pCreatePV);
@@ -436,7 +436,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
// object should not be created. Since it is possible to use it as a helper
// object (e.g. in letting the user define an area with the interactive
// construction) at least no items should be set at that object.
- if(nInvent != SdrInventor || nIdent != OBJ_NONE)
+ if(nInvent != SdrInventor::Default || nIdent != OBJ_NONE)
{
pAktCreate->SetMergedItemSet(maDefaultAttr);
}
@@ -449,7 +449,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
pAktCreate->SetMergedItemSet(aSet);
}
- if (mpModel && nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
+ if (mpModel && nInvent==SdrInventor::Default && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT))
{
// default for all text frames: no background, no border
@@ -518,7 +518,7 @@ bool SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nM
bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject)
{
- sal_uInt32 nInvent(nAktInvent);
+ SdrInventor nInvent(nAktInvent);
sal_uInt16 nIdent(nAktIdent);
if(pPreparedFactoryObject)
@@ -533,7 +533,7 @@ bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov
bool SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz,
OutputDevice* pOut, short nMinMov)
{
- return ImpBegCreateObj(SdrInventor,OBJ_CAPTION,rPnt,pOut,nMinMov,
+ return ImpBegCreateObj(SdrInventor::Default,OBJ_CAPTION,rPnt,pOut,nMinMov,
Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr);
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f8e7c727fe52..2f618b0e10fa 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1148,7 +1148,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
!pTextObj->HasFill() &&
!pTextObj->HasLine();
- if(pTEObj->IsInserted() && bDelObj && pTextObj->GetObjInventor()==SdrInventor && !bDontDeleteReally)
+ if(pTEObj->IsInserted() && bDelObj && pTextObj->GetObjInventor()==SdrInventor::Default && !bDontDeleteReally)
{
SdrObjKind eIdent=(SdrObjKind)pTextObj->GetObjIdentifier();
if(eIdent==OBJ_TEXT || eIdent==OBJ_TEXTEXT)
@@ -2080,7 +2080,7 @@ void SdrObjEditView::MarkListHasChanged()
{
const SdrObject* pObj= rMarkList.GetMark(0)->GetMarkedSdrObj();
// check for table
- if( pObj && (pObj->GetObjInventor() == SdrInventor ) && (pObj->GetObjIdentifier() == OBJ_TABLE) )
+ if( pObj && (pObj->GetObjInventor() == SdrInventor::Default ) && (pObj->GetObjIdentifier() == OBJ_TABLE) )
{
mxSelectionController = sdr::table::CreateTableController( this, pObj, mxLastSelectionController );
if( mxSelectionController.is() )
@@ -2144,9 +2144,9 @@ sal_uInt16 SdrObjEditView::GetSelectionLevel() const
return nLevel;
}
-bool SdrObjEditView::SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier )
+bool SdrObjEditView::SupportsFormatPaintbrush( SdrInventor nObjectInventor, sal_uInt16 nObjectIdentifier )
{
- if( nObjectInventor != SdrInventor && nObjectInventor != E3dInventor )
+ if( nObjectInventor != SdrInventor::Default && nObjectInventor != SdrInventor::E3d )
return false;
switch(nObjectIdentifier)
{
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 21895ed767e0..c379541d4dd8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -576,7 +576,7 @@ bool SdrMarkView::ImpIsFrameHandles() const
if (nMarkCount==1 && bStdDrag && bFrmHdl)
{
const SdrObject* pObj=GetMarkedObjectByIndex(0);
- if (pObj->GetObjInventor()==SdrInventor)
+ if (pObj->GetObjInventor()==SdrInventor::Default)
{
sal_uInt16 nIdent=pObj->GetObjIdentifier();
if (nIdent==OBJ_LINE || nIdent==OBJ_EDGE || nIdent==OBJ_CAPTION || nIdent==OBJ_MEASURE || nIdent==OBJ_CUSTOMSHAPE || nIdent==OBJ_TABLE )
@@ -2097,7 +2097,7 @@ void SdrMarkView::MarkListHasChanged()
bool bOneEdgeMarked=false;
if (GetMarkedObjectCount()==1) {
const SdrObject* pObj=GetMarkedObjectByIndex(0);
- if (pObj->GetObjInventor()==SdrInventor) {
+ if (pObj->GetObjInventor()==SdrInventor::Default) {
sal_uInt16 nIdent=pObj->GetObjIdentifier();
bOneEdgeMarked=nIdent==OBJ_EDGE;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 0f3de29393c0..7d5a15d1110d 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -157,7 +157,7 @@ SdrObjMacroHitRec::SdrObjMacroHitRec() :
bDown(false) {}
-SdrObjUserData::SdrObjUserData(sal_uInt32 nInv, sal_uInt16 nId) :
+SdrObjUserData::SdrObjUserData(SdrInventor nInv, sal_uInt16 nId) :
nInventor(nInv),
nIdentifier(nId) {}
@@ -535,9 +535,9 @@ SfxItemPool & SdrObject::GetObjectItemPool() const
return SdrObject::GetGlobalDrawObjectItemPool();
}
-sal_uInt32 SdrObject::GetObjInventor() const
+SdrInventor SdrObject::GetObjInventor() const
{
- return SdrInventor;
+ return SdrInventor::Default;
}
sal_uInt16 SdrObject::GetObjIdentifier() const
@@ -3100,7 +3100,6 @@ bool SdrObject::HasText() const
return false;
}
-
SdrDelayBroadcastObjectChange::SdrDelayBroadcastObjectChange( SdrObject& rObj ) :
mrObj(rObj), mbOldDelayBroadcastObjectChange( rObj.mbDelayBroadcastObjectChange)
{
@@ -3121,7 +3120,7 @@ SdrDelayBroadcastObjectChange::~SdrDelayBroadcastObjectChange()
}
-SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uInt16 nObjIdentifier, SdrPage* , SdrModel* )
+SdrObject* SdrObjFactory::CreateObjectFromFactory( SdrInventor nInventor, sal_uInt16 nObjIdentifier, SdrPage* , SdrModel* )
{
SdrObjCreatorParams aParams { nInventor, nObjIdentifier };
for (const auto & i : ImpGetUserMakeObjHdl()) {
@@ -3133,14 +3132,14 @@ SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uIn
return nullptr;
}
-SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pPage, SdrModel* pModel)
+SdrObject* SdrObjFactory::MakeNewObject(SdrInventor nInvent, sal_uInt16 nIdent, SdrPage* pPage, SdrModel* pModel)
{
if (!pModel && pPage)
pModel = pPage->GetModel();
SdrObject* pObj = nullptr;
- if (nInvent == SdrInventor)
+ if (nInvent == SdrInventor::Default)
{
switch (nIdent)
{
@@ -3198,7 +3197,7 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
}
SdrObject* SdrObjFactory::MakeNewObject(
- sal_uInt32 nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage )
+ SdrInventor nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage )
{
SdrModel* pModel = pPage ? pPage->GetModel() : nullptr;
@@ -3206,7 +3205,7 @@ SdrObject* SdrObjFactory::MakeNewObject(
bool bSetSnapRect = true;
- if (nInventor == SdrInventor)
+ if (nInventor == SdrInventor::Default)
{
switch (nIdentifier)
{
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index db5197fb8cc2..1ba7ff83f623 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1294,18 +1294,27 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat)
if (pView!=nullptr && pView->IsCreateMode()) {
// switch to different CreateTool, if appropriate
sal_uInt16 nIdent;
- sal_uInt32 nInvent;
+ SdrInventor nInvent;
pView->TakeCurrentObj(nIdent,nInvent);
- if (nInvent==SdrInventor && pU->eAktKind!=(SdrObjKind)nIdent) {
+ if (nInvent==SdrInventor::Default && pU->eAktKind!=(SdrObjKind)nIdent) {
SdrObjKind eNewKind=(SdrObjKind)nIdent;
switch (eNewKind) {
- case OBJ_CARC: case OBJ_CIRC: case OBJ_CCUT: case OBJ_SECT: eNewKind=OBJ_CARC;
+ case OBJ_CARC:
+ case OBJ_CIRC:
+ case OBJ_CCUT:
+ case OBJ_SECT:
+ eNewKind=OBJ_CARC;
SAL_FALLTHROUGH;
case OBJ_RECT:
- case OBJ_LINE: case OBJ_PLIN: case OBJ_POLY:
- case OBJ_PATHLINE: case OBJ_PATHFILL:
- case OBJ_FREELINE: case OBJ_FREEFILL:
- case OBJ_SPLNLINE: case OBJ_SPLNFILL: {
+ case OBJ_LINE:
+ case OBJ_PLIN:
+ case OBJ_POLY:
+ case OBJ_PATHLINE:
+ case OBJ_PATHFILL:
+ case OBJ_FREELINE:
+ case OBJ_FREEFILL:
+ case OBJ_SPLNLINE:
+ case OBJ_SPLNFILL: {
pU->eAktKind=eNewKind;
pU->bMixedCreate=true;
pU->nBezierStartPoint=rXPoly.GetPointCount();
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index 37ded6fc972f..16566fb9cfbf 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -101,7 +101,7 @@ void ImpSdrObjTextLink::Closed()
ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData():
- SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK),
+ SdrObjUserData(SdrInventor::Default,SDRUSERDATA_OBJTEXTLINK),
aFileDate0( DateTime::EMPTY ),
pLink(nullptr),
eCharSet(RTL_TEXTENCODING_DONTKNOW)
@@ -149,7 +149,7 @@ void SdrTextObj::ReleaseTextLink()
for (sal_uInt16 nNum=nCount; nNum>0;) {
nNum--;
SdrObjUserData* pData=GetUserData(nNum);
- if (pData->GetInventor()==SdrInventor && pData->GetId()==SDRUSERDATA_OBJTEXTLINK) {
+ if (pData->GetInventor()==SdrInventor::Default && pData->GetId()==SDRUSERDATA_OBJTEXTLINK) {
DeleteUserData(nNum);
}
}
@@ -249,7 +249,7 @@ ImpSdrObjTextLinkUserData* SdrTextObj::GetLinkUserData() const
for (sal_uInt16 nNum=nCount; nNum>0;) {
nNum--;
SdrObjUserData * pData=GetUserData(nNum);
- if (pData->GetInventor() == SdrInventor
+ if (pData->GetInventor() == SdrInventor::Default
&& pData->GetId() == SDRUSERDATA_OBJTEXTLINK)
{
return static_cast<ImpSdrObjTextLinkUserData *>(pData);
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 6b65fcf62a81..f277a14adca8 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -93,7 +93,7 @@ void SdrVirtObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
rRefObj.TakeObjInfo(rInfo);
}
-sal_uInt32 SdrVirtObj::GetObjInventor() const
+SdrInventor SdrVirtObj::GetObjInventor() const
{
return rRefObj.GetObjInventor();
}
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 144d3497a361..329ca480b815 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -890,7 +890,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
case SdrEventKind::BeginDragHelpline: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break;
case SdrEventKind::BeginCreateObj: {
- if (nAktInvent==SdrInventor && nAktIdent==OBJ_CAPTION) {
+ if (nAktInvent==SdrInventor::Default && nAktIdent==OBJ_CAPTION) {
long nHgt=SdrEngineDefaults::GetFontHeight();
bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
} else bRet=BegCreateObj(aLogicPos);
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 167d6a65c5eb..40f02f2f1349 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -174,7 +174,7 @@ css::uno::Reference<css::uno::XInterface> create(
if( nType != UHASHMAP_NOTFOUND )
{
sal_uInt16 nT = (sal_uInt16)(nType & ~E3D_INVENTOR_FLAG);
- sal_uInt32 nI = (nType & E3D_INVENTOR_FLAG)?E3dInventor:SdrInventor;
+ SdrInventor nI = (nType & E3D_INVENTOR_FLAG) ? SdrInventor::E3d : SdrInventor::Default;
return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI, nullptr, nullptr, referer )) );
}
@@ -492,7 +492,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
}
// create the API wrapper
- pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor, "" );
+ pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor::Default, "" );
// set shape type
if( pShape )
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index e1cb31a38278..f6cb548da731 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -482,7 +482,7 @@ SdrObject *SvxDrawPage::CreateSdrObject_(const Reference< drawing::XShape > & xS
throw (css::uno::RuntimeException, std::exception)
{
sal_uInt16 nType = 0;
- sal_uInt32 nInventor = 0;
+ SdrInventor nInventor;
GetTypeAndInventor( nType, nInventor, xShape->getShapeType() );
if (!nType)
@@ -548,7 +548,7 @@ SdrObject *SvxDrawPage::CreateSdrObject_(const Reference< drawing::XShape > & xS
return pNewObj;
}
-void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const OUString& aName ) throw()
+void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, SdrInventor& rInventor, const OUString& aName ) throw()
{
sal_uInt32 nTempType = UHashMap::getId( aName );
@@ -557,25 +557,25 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
if( aName == "com.sun.star.drawing.TableShape" ||
aName == "com.sun.star.presentation.TableShape" )
{
- rInventor = SdrInventor;
+ rInventor = SdrInventor::Default;
rType = OBJ_TABLE;
}
#if HAVE_FEATURE_AVMEDIA
else if ( aName == "com.sun.star.presentation.MediaShape" )
{
- rInventor = SdrInventor;
+ rInventor = SdrInventor::Default;
rType = OBJ_MEDIA;
}
#endif
}
else if(nTempType & E3D_INVENTOR_FLAG)
{
- rInventor = E3dInventor;
+ rInventor = SdrInventor::E3d;
rType = (sal_uInt16)(nTempType & ~E3D_INVENTOR_FLAG);
}
else
{
- rInventor = SdrInventor;
+ rInventor = SdrInventor::Default;
rType = (sal_uInt16)nTempType;
switch( rType )
@@ -589,13 +589,13 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
}
}
-SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj, SvxDrawPage *mpPage, OUString const & referer )
+SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *mpPage, OUString const & referer )
throw (css::uno::RuntimeException)
{
SvxShape* pRet = nullptr;
switch( nInventor )
{
- case E3dInventor:
+ case SdrInventor::E3d:
{
switch( nType )
{
@@ -624,7 +624,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
}
break;
}
- case SdrInventor:
+ case SdrInventor::Default:
{
switch( nType )
{
@@ -785,7 +785,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
{
sal_uInt32 nObjId = nType;
- if( nInventor == E3dInventor )
+ if( nInventor == SdrInventor::E3d )
nObjId |= E3D_INVENTOR_FLAG;
switch(nObjId)
@@ -858,7 +858,7 @@ uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() throw
return aSeq;
}
-SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, sal_uInt32 nInventor, OUString const & referer)
+SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer)
throw (css::uno::RuntimeException, std::exception)
{
return SvxDrawPage::CreateShapeByTypeAndInventor( nType, nInventor, nullptr, nullptr, referer );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 323df4fd5eb9..a93e1eb3b973 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -360,19 +360,19 @@ void SvxShape::impl_initFromSdrObject()
StartListening( *mpModel );
}
- const sal_uInt32 nInventor = mpObj->GetObjInventor();
+ const SdrInventor nInventor = mpObj->GetObjInventor();
// is it one of ours (svx) ?
- if( nInventor == SdrInventor || nInventor == E3dInventor || nInventor == FmFormInventor )
+ if( nInventor == SdrInventor::Default || nInventor == SdrInventor::E3d || nInventor == SdrInventor::FmForm )
{
- if(nInventor == FmFormInventor)
+ if(nInventor == SdrInventor::FmForm)
{
mpImpl->mnObjId = OBJ_UNO;
}
else
{
mpImpl->mnObjId = mpObj->GetObjIdentifier();
- if( nInventor == E3dInventor )
+ if( nInventor == SdrInventor::E3d )
mpImpl->mnObjId |= E3D_INVENTOR_FLAG;
}
@@ -1062,7 +1062,7 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
static bool svx_needLogicRectHack( SdrObject* pObj )
{
- if( pObj->GetObjInventor() == SdrInventor)
+ if( pObj->GetObjInventor() == SdrInventor::Default)
{
switch(pObj->GetObjIdentifier())
{
@@ -1201,7 +1201,7 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
Size aLocalSize( rSize.Width, rSize.Height );
ForceMetricToItemPoolMetric(aLocalSize);
- if(mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_MEASURE )
+ if(mpObj->GetObjInventor() == SdrInventor::Default && mpObj->GetObjIdentifier() == OBJ_MEASURE )
{
Fraction aWdt(aLocalSize.Width(),aRect.Right()-aRect.Left());
Fraction aHgt(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
@@ -1945,7 +1945,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE
case SDRATTR_CIRCKIND:
{
- if( mpObj->GetObjInventor() == SdrInventor)
+ if( mpObj->GetObjInventor() == SdrInventor::Default)
{
drawing::CircleKind eKind;
switch(mpObj->GetObjIdentifier())
@@ -2630,11 +2630,11 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
case OWN_ATTR_LDBITMAP:
{
sal_uInt16 nId;
- if( mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_OLE2 )
+ if( mpObj->GetObjInventor() == SdrInventor::Default && mpObj->GetObjIdentifier() == OBJ_OLE2 )
{
nId = RID_UNODRAW_OLE2;
}
- else if( mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_GRAF )
+ else if( mpObj->GetObjInventor() == SdrInventor::Default && mpObj->GetObjIdentifier() == OBJ_GRAF )
{
nId = RID_UNODRAW_GRAPHICS;
}
@@ -3165,7 +3165,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
{
::SolarMutexGuard aGuard;
- if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor)
+ if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor::Default)
{
const sal_uInt16 nIdent = mpObj->GetObjIdentifier();
@@ -3692,11 +3692,11 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
}
}
}
- else if( mpObj.is() && mpObj->GetObjInventor() == FmFormInventor)
+ else if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor::FmForm)
{
#if OSL_DEBUG_LEVEL > 0
const sal_uInt16 nIdent = mpObj->GetObjIdentifier();
- OSL_ENSURE( nIdent == OBJ_UNO, "SvxShape::_getSupportedServiceNames: FmFormInventor, but no UNO object?" );
+ OSL_ENSURE( nIdent == OBJ_UNO, "SvxShape::_getSupportedServiceNames: SdrInventor::FmForm, but no UNO object?" );
#endif
static uno::Sequence< OUString > *pSeq = nullptr;
if( nullptr == pSeq )
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 6b7f0d86591e..cda12f763730 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -584,7 +584,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
}
- mpTextForwarder = new SvxOutlinerForwarder( *mpOutliner, (mpObject->GetObjInventor() == SdrInventor) && (mpObject->GetObjIdentifier() == OBJ_OUTLINETEXT) );
+ mpTextForwarder = new SvxOutlinerForwarder( *mpOutliner, (mpObject->GetObjInventor() == SdrInventor::Default) && (mpObject->GetObjIdentifier() == OBJ_OUTLINETEXT) );
// delay listener subscription and UAA initialization until Outliner is fully setup
bCreated = true;
@@ -682,7 +682,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetEditModeTextForwarder()
if( pEditOutliner )
{
- mpTextForwarder = new SvxOutlinerForwarder( *pEditOutliner, (mpObject->GetObjInventor() == SdrInventor) && (mpObject->GetObjIdentifier() == OBJ_OUTLINETEXT) );
+ mpTextForwarder = new SvxOutlinerForwarder( *pEditOutliner, (mpObject->GetObjInventor() == SdrInventor::Default) && (mpObject->GetObjIdentifier() == OBJ_OUTLINETEXT) );
mbForwarderIsEditMode = true;
}
}