basctl/source/dlged/dlged.cxx | 2 basctl/source/dlged/dlgedfac.cxx | 2 basctl/source/dlged/dlgedobj.cxx | 4 - basctl/source/inc/dlgeddef.hxx | 5 -- basctl/source/inc/dlgedobj.hxx | 2 cui/source/tabpages/swpossizetabpage.cxx | 2 cui/source/tabpages/tabline.cxx | 2 cui/source/tabpages/transfrm.cxx | 2 editeng/source/uno/unoforou.cxx | 2 filter/source/msfilter/msdffimp.cxx | 4 - filter/source/msfilter/svdfppt.cxx | 2 include/filter/msfilter/svdfppt.hxx | 6 -- include/svx/fmglob.hxx | 5 -- include/svx/fmview.hxx | 2 include/svx/galmisc.hxx | 5 -- include/svx/globl3d.hxx | 5 -- include/svx/obj3d.hxx | 4 - include/svx/sidebar/SelectionAnalyzer.hxx | 4 - include/svx/svdcrtv.hxx | 12 ++--- include/svx/svdedxv.hxx | 2 include/svx/svdobj.hxx | 38 +++++++++++----- include/svx/svdovirt.hxx | 2 include/svx/svdtypes.hxx | 8 --- include/svx/unoapi.hxx | 3 - include/svx/unopage.hxx | 5 +- reportdesign/inc/RptDef.hxx | 5 -- reportdesign/inc/RptObject.hxx | 6 +- reportdesign/source/core/sdr/RptObject.cxx | 12 ++--- reportdesign/source/ui/report/ReportController.cxx | 8 +-- reportdesign/source/ui/report/ViewsWindow.cxx | 2 reportdesign/source/ui/report/dlgedfac.cxx | 2 sc/inc/userdat.hxx | 2 sc/source/core/data/drwlayer.cxx | 6 +- sc/source/core/data/userdat.cxx | 10 ++-- sc/source/ui/app/drwtrans.cxx | 2 sc/source/ui/app/seltrans.cxx | 2 sc/source/ui/drawfunc/drawsh5.cxx | 4 - sc/source/ui/drawfunc/fuconuno.cxx | 4 - sc/source/ui/inc/fuconuno.hxx | 6 +- sc/source/ui/view/tabvwshg.cxx | 2 sd/inc/glob.hxx | 6 -- sd/inc/imapinfo.hxx | 6 +- sd/source/core/EffectMigration.cxx | 2 sd/source/core/anminfo.cxx | 2 sd/source/core/drawdoc.cxx | 2 sd/source/core/drawdoc2.cxx | 10 ++-- sd/source/core/drawdoc3.cxx | 2 sd/source/core/drawdoc4.cxx | 6 +- sd/source/core/sdobjfac.cxx | 2 sd/source/core/sdpage.cxx | 8 +-- sd/source/core/sdpage2.cxx | 4 - sd/source/filter/html/htmlex.cxx | 6 +- sd/source/filter/xml/sdtransform.cxx | 2 sd/source/ui/app/sdxfer.cxx | 4 - sd/source/ui/dlg/animobjs.cxx | 6 +- sd/source/ui/dlg/dlgolbul.cxx | 2 sd/source/ui/dlg/sdtreelb.cxx | 8 +-- sd/source/ui/dlg/tpaction.cxx | 8 +-- sd/source/ui/func/fuconstr.cxx | 2 sd/source/ui/func/fuconuno.cxx | 4 - sd/source/ui/func/fudraw.cxx | 10 ++-- sd/source/ui/func/fuformatpaintbrush.cxx | 2 sd/source/ui/func/fuinsert.cxx | 2 sd/source/ui/func/fuinsfil.cxx | 2 sd/source/ui/func/fulinend.cxx | 2 sd/source/ui/func/fuoaprms.cxx | 8 +-- sd/source/ui/func/fuolbull.cxx | 2 sd/source/ui/func/fupoor.cxx | 8 +-- sd/source/ui/func/fusel.cxx | 6 +- sd/source/ui/func/futext.cxx | 12 ++--- sd/source/ui/func/futransf.cxx | 2 sd/source/ui/inc/fuconuno.hxx | 6 +- sd/source/ui/inc/fuformatpaintbrush.hxx | 2 sd/source/ui/tools/PreviewRenderer.cxx | 2 sd/source/ui/unoidl/unomodel.cxx | 12 ++--- sd/source/ui/unoidl/unoobj.cxx | 2 sd/source/ui/unoidl/unopage.cxx | 4 - sd/source/ui/view/DocumentRenderer.cxx | 4 - sd/source/ui/view/drawview.cxx | 10 ++-- sd/source/ui/view/drviews1.cxx | 12 ++--- sd/source/ui/view/drviews3.cxx | 2 sd/source/ui/view/drviews4.cxx | 18 +++---- sd/source/ui/view/drviews6.cxx | 8 +-- sd/source/ui/view/drviews7.cxx | 14 +++--- sd/source/ui/view/drviews9.cxx | 2 sd/source/ui/view/drviewse.cxx | 4 - sd/source/ui/view/drviewsf.cxx | 4 - sd/source/ui/view/drviewsj.cxx | 30 ++++++------- sd/source/ui/view/outlview.cxx | 4 - sd/source/ui/view/sdview.cxx | 10 ++-- sd/source/ui/view/viewshel.cxx | 2 svx/source/dialog/connctrl.cxx | 4 - svx/source/dialog/imapwnd.hxx | 10 ---- svx/source/engine3d/obj3d.cxx | 4 - svx/source/engine3d/objfac3d.cxx | 2 svx/source/form/fmdpage.cxx | 2 svx/source/form/fmobj.cxx | 4 - svx/source/form/fmobjfac.cxx | 2 svx/source/form/fmpgeimp.cxx | 4 - svx/source/form/fmshell.cxx | 2 svx/source/form/fmshimp.cxx | 4 - svx/source/form/fmundo.cxx | 4 - svx/source/form/fmview.cxx | 2 svx/source/form/fmvwimp.cxx | 12 ++--- svx/source/gallery2/galmisc.cxx | 4 - svx/source/inc/fmobj.hxx | 2 svx/source/inc/fmvwimp.hxx | 3 - svx/source/sdr/properties/textproperties.cxx | 4 - svx/source/sidebar/SelectionAnalyzer.cxx | 46 ++++++++++---------- svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 2 svx/source/svdraw/svdcrtv.cxx | 28 ++++++------ svx/source/svdraw/svdedxv.cxx | 8 +-- svx/source/svdraw/svdmrkv.cxx | 4 - svx/source/svdraw/svdobj.cxx | 17 +++---- svx/source/svdraw/svdopath.cxx | 23 ++++++---- svx/source/svdraw/svdotxln.cxx | 6 +- svx/source/svdraw/svdovirt.cxx | 2 svx/source/svdraw/svdview.cxx | 2 svx/source/unodraw/unomod.cxx | 4 - svx/source/unodraw/unopage.cxx | 22 ++++----- svx/source/unodraw/unoshape.cxx | 24 +++++----- svx/source/unodraw/unoshtxt.cxx | 4 - sw/inc/fesh.hxx | 2 sw/inc/view.hxx | 2 sw/source/core/doc/doclay.cxx | 2 sw/source/core/draw/dcontact.cxx | 4 - sw/source/core/draw/dflyobj.cxx | 4 - sw/source/core/draw/dobjfac.cxx | 2 sw/source/core/frmedt/fefly1.cxx | 2 sw/source/core/frmedt/feshview.cxx | 8 +-- sw/source/core/inc/dflyobj.hxx | 8 --- sw/source/core/unocore/unodraw.cxx | 10 ++-- sw/source/filter/html/htmldrawreader.cxx | 2 sw/source/filter/html/htmlform.cxx | 2 sw/source/filter/html/htmlforw.cxx | 2 sw/source/filter/ww8/docxattributeoutput.cxx | 2 sw/source/filter/ww8/rtfattributeoutput.cxx | 2 sw/source/filter/ww8/writerhelper.cxx | 4 - sw/source/filter/ww8/wrtw8esh.cxx | 2 sw/source/filter/ww8/wrtw8sty.cxx | 2 sw/source/filter/ww8/ww8graf.cxx | 16 ++---- sw/source/filter/ww8/ww8par.cxx | 4 - sw/source/filter/ww8/ww8par.hxx | 3 - sw/source/uibase/ribbar/conform.cxx | 4 - sw/source/uibase/shells/drformsh.cxx | 4 - sw/source/uibase/shells/textdrw.cxx | 2 sw/source/uibase/uiview/viewdraw.cxx | 12 ++--- sw/source/uibase/wrtsh/wrtsh3.cxx | 2 148 files changed, 424 insertions(+), 449 deletions(-)
New commits: commit beb8cfcf32f855a0fb638caef4782d9d867e3102 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Nov 21 11:45:50 2016 +0200 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 <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 9d8b0ad..411cb55 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -606,7 +606,7 @@ void DlgEditor::SetInsertObj( sal_uInt16 eObj ) { eActObj = eObj; - pDlgEdView->SetCurrentObj( eActObj, DlgInventor ); + pDlgEdView->SetCurrentObj( eActObj, SdrInventor::BasicDialog ); } void DlgEditor::CreateDefaultObject() diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index cb2fbc6..8933f9a 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -61,7 +61,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) } SdrObject* pNewObj = nullptr; - if( (aParams.nInventor == DlgInventor) && + if( (aParams.nInventor == SdrInventor::BasicDialog) && (aParams.nObjIdentifier >= OBJ_DLG_PUSHBUTTON) && (aParams.nObjIdentifier <= OBJ_DLG_FORMHSCROLL) ) { diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 10020bf..a8dd562 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -749,9 +749,9 @@ OUString DlgEdObj::GetUniqueName() const return aUniqueName; } -sal_uInt32 DlgEdObj::GetObjInventor() const +SdrInventor DlgEdObj::GetObjInventor() const { - return DlgInventor; + return SdrInventor::BasicDialog; } sal_uInt16 DlgEdObj::GetObjIdentifier() const diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx index bb649a4..e14bc28 100644 --- a/basctl/source/inc/dlgeddef.hxx +++ b/basctl/source/inc/dlgeddef.hxx @@ -25,11 +25,6 @@ namespace basctl { -const sal_uInt32 DlgInventor = sal_uInt32('D')*0x00000001+ - sal_uInt32('L')*0x00000100+ - sal_uInt32('G')*0x00010000+ - sal_uInt32('1')*0x01000000; - enum { OBJ_DLG_CONTROL = 1, diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 101a695..3eb50a2 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -92,7 +92,7 @@ public: void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; } DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; } - virtual sal_uInt32 GetObjInventor() const override; + virtual SdrInventor GetObjInventor() const override; virtual sal_uInt16 GetObjIdentifier() const override; virtual DlgEdObj* Clone() const override; // not working yet diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index c11767a..43d95f5 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -1927,7 +1927,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) { const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); - if( ( pObj->GetObjInventor() == SdrInventor ) && + if( ( pObj->GetObjInventor() == SdrInventor::Default ) && ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) && pObj->HasText() ) { diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index e8d080e..85b4f31 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -69,7 +69,7 @@ SvxLineTabDialog::SvxLineTabDialog mbAreaTP( false ) { bool bLineOnly = false; - if( pObj && pObj->GetObjInventor() == SdrInventor ) + if( pObj && pObj->GetObjInventor() == SdrInventor::Default ) { switch( pObj->GetObjIdentifier() ) { diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 98d1f9b..3e791e2 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -876,7 +876,7 @@ void SvxPositionSizeTabPage::Construct() const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier()); - if((pObj->GetObjInventor() == SdrInventor) && + if((pObj->GetObjInventor() == SdrInventor::Default) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && pObj->HasText()) { diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index dfa76ff..5a3f5f4 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -476,7 +476,7 @@ bool SvxOutlinerForwarder::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) { rOutliner.SetDepth( pPara, nNewDepth ); -// const bool bOutlinerText = pSdrObject && (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT); +// const bool bOutlinerText = pSdrObject && (pSdrObject->GetObjInventor() == SdrInventor::Default) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT); if( bOutlinerText ) rOutliner.SetLevelDependendStyleSheet( nPara ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 6c67b1e..8c017ec 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -460,9 +460,9 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) SdrGluePointList* pList = pO->ForceGluePointList(); sal_Int32 nId = nC; - sal_uInt32 nInventor = pO->GetObjInventor(); + SdrInventor nInventor = pO->GetObjInventor(); - if( nInventor == SdrInventor ) + if( nInventor == SdrInventor::Default ) { bool bValidGluePoint = false; sal_uInt32 nObjId = pO->GetObjIdentifier(); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 6eada01..7405440 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2224,7 +2224,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* { TSS_Type nDestinationInstance = pTextObj->GetDestinationInstance() ; SdrOutliner& rOutliner = pText->ImpGetDrawOutliner(); - if ( ( pText->GetObjInventor() == SdrInventor ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL) + if ( ( pText->GetObjInventor() == SdrInventor::Default ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL) rOutliner.Init( OutlinerMode::TitleObject ); // Outliner reset bool bOldUpdateMode = rOutliner.GetUpdateMode(); diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 22ab642..d0ccd36 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -177,12 +177,6 @@ enum class TSS_Type : unsigned { Unknown = 0xffffffff // or invalid }; -// Inventor-Id for PPT UserData -const sal_uInt32 PPTInventor = sal_uInt32('P') * 0x00000001 - + sal_uInt32('P') * 0x00000100 - + sal_uInt32('T') * 0x00010000 - + sal_uInt32('0') * 0x01000000; - const int nMaxPPTLevels = 5; // Object IDs for StarDraw UserData diff --git a/include/svx/fmglob.hxx b/include/svx/fmglob.hxx index b82231e..cc8f51c 100644 --- a/include/svx/fmglob.hxx +++ b/include/svx/fmglob.hxx @@ -23,11 +23,6 @@ #include <com/sun/star/form/FormComponentType.hpp> #include <svx/svdobj.hxx> -const sal_uInt32 FmFormInventor = sal_uInt32('F')*0x00000001+ - sal_uInt32('M')*0x00000100+ - sal_uInt32('0')*0x00010000+ - sal_uInt32('1')*0x01000000; - const sal_uInt16 OBJ_FM_CONTROL = css::form::FormComponentType::CONTROL; // for form components const sal_uInt16 OBJ_FM_EDIT = css::form::FormComponentType::TEXTFIELD; diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx index 5e28fe4..6de1f3b 100644 --- a/include/svx/fmview.hxx +++ b/include/svx/fmview.hxx @@ -93,7 +93,7 @@ public: 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/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 4598c26..4031af5 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -61,7 +61,6 @@ enum class SgaObjKind Inet = 6 // graphics from the internet }; -#define IV_IMAPINFO (sal_uInt32('S')*0x00000001+sal_uInt32('D')*0x00000100+sal_uInt32('U')*0x00010000+sal_uInt32('D')*0x01000000) #define ID_IMAPINFO 2 #define GAL_RES(nId) ResId(nId, *GetGalleryResMgr()) @@ -106,10 +105,10 @@ class SgaIMapInfo : public SdrObjUserData, public SfxListener ImageMap aImageMap; public: - SgaIMapInfo() : SdrObjUserData( IV_IMAPINFO, ID_IMAPINFO ) {}; + SgaIMapInfo() : SdrObjUserData( SdrInventor::SgaImap, ID_IMAPINFO ) {}; SgaIMapInfo( const ImageMap& rImageMap) : - SdrObjUserData( IV_IMAPINFO, ID_IMAPINFO ), + SdrObjUserData( SdrInventor::SgaImap, ID_IMAPINFO ), aImageMap( rImageMap ) {}; virtual ~SgaIMapInfo() override {}; diff --git a/include/svx/globl3d.hxx b/include/svx/globl3d.hxx index 88fec32..a258b6b 100644 --- a/include/svx/globl3d.hxx +++ b/include/svx/globl3d.hxx @@ -22,11 +22,6 @@ #include <sal/types.h> -const sal_uInt32 E3dInventor = sal_uInt32('E')*0x00000001+ - sal_uInt32('3')*0x00000100+ - sal_uInt32('D')*0x00010000+ - sal_uInt32('1')*0x01000000; - const sal_uInt16 E3D_SCENE_ID = 1; const sal_uInt16 E3D_POLYSCENE_ID = 2; const sal_uInt16 E3D_OBJECT_ID = 3; // should not be used, it's only a helper class for E3DScene and E3DCompoundObject diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 5f85296..accfb8f 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -145,10 +145,10 @@ public: virtual ~E3dObject() override; - virtual sal_uInt32 GetObjInventor() const override; + virtual SdrInventor GetObjInventor() const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual void NbcSetLayer(SdrLayerID nLayer) override; diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx b/include/svx/sidebar/SelectionAnalyzer.hxx index 196f1dd..c4ed2fa 100644 --- a/include/svx/sidebar/SelectionAnalyzer.hxx +++ b/include/svx/sidebar/SelectionAnalyzer.hxx @@ -24,7 +24,7 @@ class SdrMarkList; class SdrObject; - +enum class SdrInventor : sal_uInt32; namespace svx { namespace sidebar { @@ -57,7 +57,7 @@ private: static vcl::EnumContext::Context GetContextForObjectId_SD ( const sal_uInt16 nObjectId, const ViewType eViewType); - static sal_uInt32 GetInventorTypeFromMark ( + static SdrInventor GetInventorTypeFromMark ( const SdrMarkList& rMarkList); static sal_uInt16 GetObjectTypeFromMark ( const SdrMarkList& rMarkList); diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx index a294bb5..c66b054 100644 --- a/include/svx/svdcrtv.hxx +++ b/include/svx/svdcrtv.hxx @@ -48,7 +48,7 @@ protected: sal_Int32 nAutoCloseDistPix; sal_Int32 nFreeHandMinDistPix; - sal_uInt32 nAktInvent; // set the current ones + SdrInventor nAktInvent; // set the current ones sal_uInt16 nAktIdent; // Obj for re-creating bool b1stPointAsCenter : 1; @@ -60,7 +60,7 @@ private: SVX_DLLPRIVATE void ImpClearVars(); protected: - bool ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, + bool ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, sal_Int16 nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject); void ShowCreateObj(/*OutputDevice* pOut, bool bFull*/); @@ -99,10 +99,10 @@ public: // Determine whether a measurement tool activated bool IsMeasureTool() const; - void SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent=SdrInventor); - void TakeCurrentObj(sal_uInt16& nIdent, sal_uInt32& nInvent) const { nInvent=nAktInvent; nIdent=nAktIdent; } - sal_uInt32 GetCurrentObjInventor() const { return nAktInvent; } - sal_uInt16 GetCurrentObjIdentifier() const { return nAktIdent; } + void SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent=SdrInventor::Default); + void TakeCurrentObj(sal_uInt16& nIdent, SdrInventor& nInvent) const { nInvent=nAktInvent; nIdent=nAktIdent; } + SdrInventor GetCurrentObjInventor() const { return nAktInvent; } + sal_uInt16 GetCurrentObjIdentifier() const { return nAktIdent; } // Beginning the regular Create bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3); diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 3ad19c8..211594a 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -262,7 +262,7 @@ public: const rtl::Reference< sdr::SelectionController >& getSelectionController() const { return mxSelectionController; } /** returns true if the shape identified by its inventor and identifier supports format paint brush operation */ - static bool SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ); + static bool SupportsFormatPaintbrush( SdrInventor nObjectInventor, sal_uInt16 nObjectIdentifier ); /** returns a format paint brush set from the current selection */ void TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ); diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index b398a19..ace6f53 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -142,6 +142,20 @@ enum SdrObjKind { OBJ_MAXI }; +enum class SdrInventor : sal_uInt32 { + Unknown = 0, + BasicDialog = sal_uInt32( 'D' | ('L' << 8) | ('G' << 16) | ('1' << 24) ), + Default = sal_uInt32( 'S' | ('V' << 8) | ('D' << 16) | ('r' << 24) ), + E3d = sal_uInt32( 'E' | ('3' << 8) | ('D' << 16) | ('1' << 24) ), + FmForm = sal_uInt32( 'F' | ('M' << 8) | ('0' << 16) | ('1' << 24) ), + IMap = sal_uInt32( 'I' | ('M' << 8) | ('A' << 16) | ('P' << 24) ), + ReportDesign = sal_uInt32( 'R' | ('P' << 8) | ('T' << 16) | ('1' << 24) ), + ScOrSwDraw = sal_uInt32( 'S' | ('C' << 8) | ('3' << 16) | ('0' << 24) ), // Used in sc/ and sw/ + SgaImap = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ), + StarDrawUserData = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ), + Swg = sal_uInt32( 'S' | ('W' << 8) | ('G' << 16) ), +}; + enum class SdrUserCallType { MoveOnly, // only moved, size unchanged Resize, // size and maybe position changed @@ -188,7 +202,7 @@ public: class SVX_DLLPUBLIC SdrObjUserData { protected: - sal_uInt32 nInventor; + SdrInventor nInventor; sal_uInt16 nIdentifier; private: @@ -197,12 +211,12 @@ private: bool operator!=(const SdrObjUserData& rData) const = delete; public: - SdrObjUserData(sal_uInt32 nInv, sal_uInt16 nId); + SdrObjUserData(SdrInventor nInv, sal_uInt16 nId); SdrObjUserData(const SdrObjUserData& rData); virtual ~SdrObjUserData(); virtual SdrObjUserData* Clone(SdrObject* pObj1) const = 0; // #i71039# NULL -> 0 - sal_uInt32 GetInventor() const { return nInventor;} + SdrInventor GetInventor() const { return nInventor;} sal_uInt16 GetId() const { return nIdentifier;} }; @@ -434,7 +448,7 @@ public: void AddReference(SdrVirtObj& rVrtObj); void DelReference(SdrVirtObj& rVrtObj); - virtual sal_uInt32 GetObjInventor() const; + virtual SdrInventor GetObjInventor() const; virtual sal_uInt16 GetObjIdentifier() const; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; @@ -990,14 +1004,14 @@ public: struct SdrObjCreatorParams { - sal_uInt32 nInventor; - sal_uInt16 nObjIdentifier; + SdrInventor nInventor; + sal_uInt16 nObjIdentifier; }; struct SdrObjUserDataCreatorParams { - sal_uInt32 nInventor; - sal_uInt16 nObjIdentifier; - SdrObject* pObject; + SdrInventor nInventor; + sal_uInt16 nObjIdentifier; + SdrObject* pObject; }; /** @@ -1011,8 +1025,8 @@ struct SdrObjUserDataCreatorParams class SVX_DLLPUBLIC SdrObjFactory { public: - static SdrObject* MakeNewObject(sal_uInt32 nInventor, sal_uInt16 nObjIdentifier, SdrPage* pPage, SdrModel* pModel=nullptr); - static SdrObject* MakeNewObject(sal_uInt32 nInventor, sal_uInt16 nObjIdentifier, const Rectangle& rSnapRect, SdrPage* pPage); + static SdrObject* MakeNewObject(SdrInventor nInventor, sal_uInt16 nObjIdentifier, SdrPage* pPage, SdrModel* pModel=nullptr); + static SdrObject* MakeNewObject(SdrInventor nInventor, sal_uInt16 nObjIdentifier, const Rectangle& rSnapRect, SdrPage* pPage); static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink); static void RemoveMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink); static void InsertMakeUserDataHdl(Link<SdrObjUserDataCreatorParams, SdrObjUserData*> const & rLink); @@ -1020,7 +1034,7 @@ public: private: static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory( - sal_uInt32 nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel ); + SdrInventor nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel ); SdrObjFactory() = delete; }; diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index d81732e..3484671 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -55,7 +55,7 @@ public: virtual void SetModel(SdrModel* pNewModel) override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; - virtual sal_uInt32 GetObjInventor() const override; + virtual SdrInventor GetObjInventor() const override; virtual sal_uInt16 GetObjIdentifier() const override; virtual SdrObjList* GetSubList() const override; diff --git a/include/svx/svdtypes.hxx b/include/svx/svdtypes.hxx index f999a92..7f800ea 100644 --- a/include/svx/svdtypes.hxx +++ b/include/svx/svdtypes.hxx @@ -22,14 +22,6 @@ #include <sal/types.h> -/* - * SdrObject - */ -const sal_uInt32 SdrInventor=sal_uInt32('S')*0x00000001+ - sal_uInt32('V')*0x00000100+ - sal_uInt32('D')*0x00010000+ - sal_uInt32('r')*0x01000000; - // commands for EndCreate() enum class SdrCreateCmd { diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx index 6afd9c1..35e7098 100644 --- a/include/svx/unoapi.hxx +++ b/include/svx/unoapi.hxx @@ -33,12 +33,13 @@ class SdrObject; class SdrPage; class SvxNumBulletItem; class SfxItemPool; +enum class SdrInventor : sal_uInt32; /** * Creates a StarOffice API wrapper with the given type and inventor * Deprecated: This will be replaced with a function returning XShape. */ -SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, sal_uInt32 nInventor, OUString const & referer) +SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer) throw (css::uno::RuntimeException, std::exception); /** Returns a StarOffice API wrapper for the given SdrObject */ diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx index 8810327..7bbdc16 100644 --- a/include/svx/unopage.hxx +++ b/include/svx/unopage.hxx @@ -49,6 +49,7 @@ class SdrObject; class SvxShape; class SvxShapeGroup; class SvxShapeConnector; +enum class SdrInventor : sal_uInt32; /** * Macros to convert Twips<->100tel mm @@ -88,14 +89,14 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin SdrObject *CreateSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape, bool bBeginning = false ) throw(); // Determine Type and Inventor - static void GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const OUString& aName ) throw(); + static void GetTypeAndInventor( sal_uInt16& 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). virtual SdrObject *CreateSdrObject_( const css::uno::Reference< css::drawing::XShape >& xShape ) throw (css::uno::RuntimeException, std::exception); - static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj, SvxDrawPage *pPage = nullptr, OUString const & referer = OUString() ) throw (css::uno::RuntimeException); + static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage = nullptr, OUString const & referer = OUString() ) throw (css::uno::RuntimeException); // The following method is called if a SvxShape object is to be created. // Derived classes can create a derivation or an SvxShape aggregating object. diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx index 41c7ea6..3290123 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 105273f..6a41ea9 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 d099b5c..32a7b77 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 7605e29..c4395fc 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 56a7893..33f9669 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 07a2e4c..0bc9958 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 ) { diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index ee07183..c8e8d6a9 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -26,8 +26,6 @@ #include "global.hxx" #include "address.hxx" -#define SC_DRAWLAYER 0x30334353 // Inventor: "SC30" - // Object-Ids fuer UserData #define SC_UD_OBJDATA 1 #define SC_UD_IMAPDATA 2 diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 1396caa..e577290 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1855,7 +1855,7 @@ namespace for( sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObj->GetUserData( i ); - if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId ) + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == nId ) return pData; } return nullptr; @@ -1867,7 +1867,7 @@ namespace for( sal_uInt16 i = nCount; i > 0; i-- ) { SdrObjUserData* pData = pObj->GetUserData( i-1 ); - if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId ) + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == nId ) pObj->DeleteUserData(i-1); } } @@ -1983,7 +1983,7 @@ ScDrawObjData* ScDrawLayer::GetNonRotatedObjData( SdrObject* pObj, bool bCreate for( sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObj->GetUserData( i ); - if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == SC_UD_OBJDATA && ++nFound == 2 ) + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == SC_UD_OBJDATA && ++nFound == 2 ) return static_cast<ScDrawObjData*>(pData); } if( pObj && bCreate ) diff --git a/sc/source/core/data/userdat.cxx b/sc/source/core/data/userdat.cxx index cc5fe0d..1a76e39 100644 --- a/sc/source/core/data/userdat.cxx +++ b/sc/source/core/data/userdat.cxx @@ -34,7 +34,7 @@ ScDrawObjFactory::~ScDrawObjFactory() IMPL_STATIC_LINK( ScDrawObjFactory, MakeUserData, SdrObjUserDataCreatorParams, aParams, SdrObjUserData* ) { - if ( aParams.nInventor == SC_DRAWLAYER ) + if ( aParams.nInventor == SdrInventor::ScOrSwDraw ) { if ( aParams.nObjIdentifier == SC_UD_OBJDATA ) return new ScDrawObjData; @@ -48,7 +48,7 @@ IMPL_STATIC_LINK( } ScDrawObjData::ScDrawObjData() : - SdrObjUserData( SC_DRAWLAYER, SC_UD_OBJDATA ), + SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_OBJDATA ), maStart( ScAddress::INITIALIZE_INVALID ), maEnd( ScAddress::INITIALIZE_INVALID ), meType( DrawingObject ) @@ -61,12 +61,12 @@ ScDrawObjData* ScDrawObjData::Clone( SdrObject* ) const } ScIMapInfo::ScIMapInfo() : - SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA ) + SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_IMAPDATA ) { } ScIMapInfo::ScIMapInfo( const ImageMap& rImageMap ) : - SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA ), + SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_IMAPDATA ), aImageMap( rImageMap ) { } @@ -87,7 +87,7 @@ SdrObjUserData* ScIMapInfo::Clone( SdrObject* ) const } ScMacroInfo::ScMacroInfo() : - SdrObjUserData( SC_DRAWLAYER, SC_UD_MACRODATA ) + SdrObjUserData( SdrInventor::ScOrSwDraw, SC_UD_MACRODATA ) { } diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 0f7d5b2..78a13d3 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -128,7 +128,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain // URL button SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObject ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); OSL_ENSURE( xControlModel.is(), "uno control without model" ); diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 8060b1a..5dbebf4 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -44,7 +44,7 @@ static bool lcl_IsURLButton( SdrObject* pObject ) bool bRet = false; SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObject ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); OSL_ENSURE( xControlModel.is(), "uno control without model" ); diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index 989fc89..9851f08 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -81,7 +81,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink aHLinkItem.SetInsertMode(HLINK_FIELD); } SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObj ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" ); @@ -167,7 +167,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObj ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index 449b0b2..dfb4f0f 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -31,13 +31,13 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq) : FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq) - , nInventor(0) + , nInventor(SdrInventor::Unknown) , nIdentifier(0) { const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR); const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); if( pInventorItem ) - nInventor = pInventorItem->GetValue(); + nInventor = (SdrInventor)pInventorItem->GetValue(); if( pIdentifierItem ) nIdentifier = pIdentifierItem->GetValue(); } diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx index 699e6c4..b17cc84 100644 --- a/sc/source/ui/inc/fuconuno.hxx +++ b/sc/source/ui/inc/fuconuno.hxx @@ -22,12 +22,14 @@ #include "fuconstr.hxx" +enum class SdrInventor : sal_uInt32; + /** Draw Control */ class FuConstUnoControl : public FuConstruct { protected: - sal_uInt32 nInventor; - sal_uInt16 nIdentifier; + SdrInventor nInventor; + sal_uInt16 nIdentifier; public: FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView, diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 73cbb2c..5b2a4dc 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -58,7 +58,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR ScDrawView* pDrView = pView->GetScDrawView(); SdrModel* pModel = pDrView->GetModel(); - SdrObject* pObj = SdrObjFactory::MakeNewObject(FmFormInventor, OBJ_FM_BUTTON, + SdrObject* pObj = SdrObjFactory::MakeNewObject(SdrInventor::FmForm, OBJ_FM_BUTTON, pDrView->GetSdrPageView()->GetPage(), pModel); SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObj ); OSL_ENSURE( pUnoCtrl, "no SdrUnoObj"); diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx index 6f66420..f5c5ebc 100644 --- a/sd/inc/glob.hxx +++ b/sd/inc/glob.hxx @@ -43,12 +43,6 @@ #define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + 30 -// Inventor-Id for StarDraw UserData -const sal_uInt32 SdUDInventor=sal_uInt32('S')*0x00000001+ - sal_uInt32('D')*0x00000100+ - sal_uInt32('U')*0x00010000+ - sal_uInt32('D')*0x01000000; - // Object-Ids for StarDraw UserData #define SD_ANIMATIONINFO_ID 1 #define SD_IMAPINFO_ID 2 diff --git a/sd/inc/imapinfo.hxx b/sd/inc/imapinfo.hxx index b07d99a..665a68f 100644 --- a/sd/inc/imapinfo.hxx +++ b/sd/inc/imapinfo.hxx @@ -32,14 +32,14 @@ class SdIMapInfo : public SdrObjUserData, public SfxListener public: SdIMapInfo() : - SdrObjUserData( SdUDInventor, SD_IMAPINFO_ID ) {}; + SdrObjUserData( SdrInventor::StarDrawUserData, SD_IMAPINFO_ID ) {}; SdIMapInfo( const ImageMap& rImageMap ) : - SdrObjUserData( SdUDInventor, SD_IMAPINFO_ID ), + SdrObjUserData( SdrInventor::StarDrawUserData, SD_IMAPINFO_ID ), aImageMap( rImageMap ) {}; SdIMapInfo( const SdIMapInfo& rIMapInfo ) : - SdrObjUserData( SdUDInventor, SD_IMAPINFO_ID ), + SdrObjUserData( SdrInventor::StarDrawUserData, SD_IMAPINFO_ID ), SfxListener(), aImageMap( rIMapInfo.aImageMap ) {}; diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 67f2c80..607f798 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -497,7 +497,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEff pMainSequence->append( pEffect ); - if( ( pObj->GetObjInventor() == SdrInventor ) && ( pObj->GetObjIdentifier() == OBJ_OUTLINETEXT ) ) + if( ( pObj->GetObjInventor() == SdrInventor::Default ) && ( pObj->GetObjIdentifier() == OBJ_OUTLINETEXT ) ) { // special case for outline text, effects are always mapped to text group effect pMainSequence-> diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index 4b31dc1..ba3c297 100644 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) - : SdrObjUserData(SdUDInventor, SD_ANIMATIONINFO_ID), + : SdrObjUserData(SdrInventor::StarDrawUserData, SD_ANIMATIONINFO_ID), mePresObjKind (PRESOBJ_NONE), meEffect (presentation::AnimationEffect_NONE), meTextEffect (presentation::AnimationEffect_NONE), diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index eda9ce8..f11fce1 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -757,7 +757,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool // listeners. while( (pObj = rPresentationShapes.getNextShape()) ) { - if (pObj->GetObjInventor() == SdrInventor) + if (pObj->GetObjInventor() == SdrInventor::Default) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); sal_uInt16 nId = pObj->GetObjIdentifier(); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 875d544..8c7cdba 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -99,7 +99,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const pObj = aIter.Next(); if( ( pObj->GetName().equals(rObjName) ) || - ( SdrInventor == pObj->GetObjInventor() && + ( SdrInventor::Default == pObj->GetObjInventor() && OBJ_OLE2 == pObj->GetObjIdentifier() && rObjName == static_cast< SdrOle2Obj* >( pObj )->GetPersistName() ) ) { @@ -124,7 +124,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const pObj = aIter.Next(); if( ( pObj->GetName().equals(rObjName) ) || - ( SdrInventor == pObj->GetObjInventor() && + ( SdrInventor::Default == pObj->GetObjInventor() && OBJ_OLE2 == pObj->GetObjIdentifier() && rObjName == static_cast< SdrOle2Obj* >( pObj )->GetPersistName() ) ) { @@ -231,7 +231,7 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos) { SdrObject* pObj = pPage->GetObj(nObj); if (pObj->GetObjIdentifier() == OBJ_PAGE && - pObj->GetObjInventor() == SdrInventor) + pObj->GetObjInventor() == SdrInventor::Default) { // The page object is the preceding page (drawing page) SAL_WARN_IF(!nStartPos, "sd", "Position of notes page must not be 0."); @@ -964,7 +964,7 @@ SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCrea for (nUD = 0; nUD < nUDCount; nUD++) { SdrObjUserData* pUD = rObject.GetUserData(nUD); - if((pUD->GetInventor() == SdUDInventor) && (pUD->GetId() == SD_ANIMATIONINFO_ID)) + if((pUD->GetInventor() == SdrInventor::StarDrawUserData) && (pUD->GetId() == SD_ANIMATIONINFO_ID)) { pRet = dynamic_cast<SdAnimationInfo*>(pUD); break; @@ -992,7 +992,7 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) { SdrObjUserData* pUserData = pObject->GetUserData( i ); - if ( ( pUserData->GetInventor() == SdUDInventor ) && ( pUserData->GetId() == SD_IMAPINFO_ID ) ) + if ( ( pUserData->GetInventor() == SdrInventor::StarDrawUserData ) && ( pUserData->GetId() == SD_IMAPINFO_ID ) ) pIMapInfo = static_cast<SdIMapInfo*>(pUserData); } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 68c8c12..62754d3 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1021,7 +1021,7 @@ bool SdDrawDocument::InsertBookmarkAsObject( if (pObj) { // Found an object - if (pObj->GetObjInventor() == SdrInventor && + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OLE2) { bOLEObjFound = true; diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 72d6889..9d27b77 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -885,7 +885,7 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) OutlinerMode nOldOutlMode = pOutl->GetMode(); OutlinerMode nOutlMode = OutlinerMode::TextObject; - if (pObj->GetObjInventor() == SdrInventor && + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT) { nOutlMode = OutlinerMode::OutlineObject; @@ -1120,7 +1120,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const { SdrObject* pObj = pPage->GetObj(nObj); - if (pObj->GetObjInventor() == SdrInventor) + if (pObj->GetObjInventor() == SdrInventor::Default) { switch( pObj->GetObjIdentifier() ) { @@ -1163,7 +1163,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const { SdrObject* pObj = pPage->GetObj(nObj); - if (pObj->GetObjInventor() == SdrInventor) + if (pObj->GetObjInventor() == SdrInventor::Default) { switch(pObj->GetObjIdentifier()) { diff --git a/sd/source/core/sdobjfac.cxx b/sd/source/core/sdobjfac.cxx index a3fc3dc..abffd21 100644 --- a/sd/source/core/sdobjfac.cxx +++ b/sd/source/core/sdobjfac.cxx @@ -37,7 +37,7 @@ SdObjectFactory aSdObjectFactory; IMPL_STATIC_LINK( SdObjectFactory, MakeUserData, SdrObjUserDataCreatorParams, aParams, SdrObjUserData* ) { - if ( aParams.nInventor == SdUDInventor ) + if ( aParams.nInventor == SdrInventor::StarDrawUserData ) { switch( aParams.nObjIdentifier ) { diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7e844b0..945056d 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1463,7 +1463,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto if( pObj->IsEmptyPresObj() ) continue; - if( pObj->GetObjInventor() != SdrInventor ) + if( pObj->GetObjInventor() != SdrInventor::Default ) continue; // do not reuse shapes that are already part of the layout @@ -2811,11 +2811,11 @@ bool SdPage::checkVisibility( // empty presentation objects only visible during edit mode if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() ) { - if( (pObj->GetObjInventor() != SdrInventor) || ( (pObj->GetObjIdentifier() != OBJ_RECT) && (pObj->GetObjIdentifier() != OBJ_PAGE) ) ) + if( (pObj->GetObjInventor() != SdrInventor::Default) || ( (pObj->GetObjIdentifier() != OBJ_RECT) && (pObj->GetObjIdentifier() != OBJ_PAGE) ) ) return false; } - if( ( pObj->GetObjInventor() == SdrInventor ) && ( pObj->GetObjIdentifier() == OBJ_TEXT ) ) + if( ( pObj->GetObjInventor() == SdrInventor::Default ) && ( pObj->GetObjIdentifier() == OBJ_TEXT ) ) { const SdPage* pCheckPage = dynamic_cast< const SdPage* >(pObj->GetPage()); @@ -2862,7 +2862,7 @@ bool SdPage::checkVisibility( } // i63977, do not print SdrpageObjs from master pages - if( ( pObj->GetObjInventor() == SdrInventor ) && ( pObj->GetObjIdentifier() == OBJ_PAGE ) ) + if( ( pObj->GetObjInventor() == SdrInventor::Default ) && ( pObj->GetObjIdentifier() == OBJ_PAGE ) ) { if( pObj->GetPage() && pObj->GetPage()->IsMasterPage() ) return false; diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 5644999..e8f119f 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -149,7 +149,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName, { auto pObj = GetObj(nObj); - if (pObj->GetObjInventor() == SdrInventor && + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT) { if (!bListsFilled || !bReplaceStyleSheets) @@ -228,7 +228,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName, } } } - else if (pObj->GetObjInventor() == SdrInventor && + else if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_TITLETEXT) { // We do net get PresObjKind via GetPresObjKind() since there are diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index e7120f4..8bc792b 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1038,7 +1038,7 @@ SdrTextObj* HtmlExport::GetLayoutTextObject(SdrPage* pPage) for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { SdrObject* pObject = pPage->GetObj(nObject); - if (pObject->GetObjInventor() == SdrInventor && + if (pObject->GetObjInventor() == SdrInventor::Default && pObject->GetObjIdentifier() == OBJ_OUTLINETEXT) { pResult = static_cast<SdrTextObj*>(pObject); @@ -1867,7 +1867,7 @@ bool HtmlExport::CreateHtmlForPresPages() if (!aHRef.isEmpty()) { // a circle? - if (pObject->GetObjInventor() == SdrInventor && + if (pObject->GetObjInventor() == SdrInventor::Default && pObject->GetObjIdentifier() == OBJ_CIRC && bIsSquare ) { @@ -1877,7 +1877,7 @@ bool HtmlExport::CreateHtmlForPresPages() aHRef)); } // a polygon? - else if (pObject->GetObjInventor() == SdrInventor && + else if (pObject->GetObjInventor() == SdrInventor::Default && (pObject->GetObjIdentifier() == OBJ_PATHLINE || pObject->GetObjIdentifier() == OBJ_PLIN || pObject->GetObjIdentifier() == OBJ_POLY)) diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index 855e63d..726fa02 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -207,7 +207,7 @@ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape ) if( (nDepth != -1) && (!getBulletState( aParaSet, mrOutliner.GetStyleSheet( nPara ), bState ) || !bState) ) { // disable bullet if text::enable-bullet="false" is found - if( (nDepth > 0 ) && (rTextShape.GetObjInventor() == SdrInventor) && (rTextShape.GetObjIdentifier() == OBJ_OUTLINETEXT) ) + if( (nDepth > 0 ) && (rTextShape.GetObjInventor() == SdrInventor::Default) && (rTextShape.GetObjIdentifier() == OBJ_OUTLINETEXT) ) { // for outline object and level > 0 burn in the style sheet because it will be changed to "outline 1" SfxStyleSheet* pStyleSheet = mrOutliner.GetStyleSheet( nPara ); diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index a1d8434..12b55ee 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -185,11 +185,11 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) { mpGraphic = new Graphic( static_cast< SdrGrafObj* >( pObj )->GetTransformedGraphic() ); } - else if( pObj->IsUnoObj() && FmFormInventor == pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == (sal_uInt16) OBJ_FM_BUTTON ) ) + else if( pObj->IsUnoObj() && SdrInventor::FmForm == pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == (sal_uInt16) OBJ_FM_BUTTON ) ) { SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( pObj ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { Reference< css::awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel() ); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index b023d0a..9f37ab7 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -721,11 +721,11 @@ void AnimationWindow::AddObj (::sd::View& rView ) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObject = pMark->GetMarkedSdrObj(); SdAnimationInfo* pAnimInfo = SdDrawDocument::GetAnimationInfo( pObject ); - sal_uInt32 nInv = pObject->GetObjInventor(); - sal_uInt16 nId = pObject->GetObjIdentifier(); + SdrInventor nInv = pObject->GetObjInventor(); + sal_uInt16 nId = pObject->GetObjIdentifier(); // Animated Bitmap (GIF) - if( nInv == SdrInventor && nId == OBJ_GRAF && static_cast<SdrGrafObj*>( pObject )->IsAnimated() ) + if( nInv == SdrInventor::Default && nId == OBJ_GRAF && static_cast<SdrGrafObj*>( pObject )->IsAnimated() ) { const SdrGrafObj* pGrafObj = static_cast<SdrGrafObj*>(pObject); Graphic aGraphic( pGrafObj->GetTransformedGraphic() ); diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index 4fbeeb6..ae69b2a 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -73,7 +73,7 @@ OutlineBulletDlg::OutlineBulletDlg( for(size_t nNum = 0; nNum < nCount; ++nNum) { SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj(); - if( pObj->GetObjInventor() == SdrInventor ) + if( pObj->GetObjInventor() == SdrInventor::Default ) { switch(pObj->GetObjIdentifier()) diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 9b9416a..d6a0434 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -611,7 +611,7 @@ void SdPageObjsTLB::AddShapeList ( if( !aStr.isEmpty() ) { - if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 ) + if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OLE2 ) { SvTreeListEntry *pNewEntry = InsertEntry( aStr, @@ -645,7 +645,7 @@ void SdPageObjsTLB::AddShapeList ( } } } - else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF ) + else if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_GRAF ) { SvTreeListEntry *pNewEntry = InsertEntry( aStr, @@ -913,11 +913,11 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry ) OUString aStr( GetObjectName( pObj ) ); if( !aStr.isEmpty() ) { - if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 ) + if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OLE2 ) { InsertEntry(aStr, maImgOle, maImgOle, pPageEntry); } - else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF ) + else if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_GRAF ) { InsertEntry(aStr, maImgGraphic, maImgGraphic, pPageEntry); } diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index df252fb..d1a0b74 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -202,14 +202,14 @@ void SdTPAction::Construct() SdrMark* pMark = rMarkList.GetMark(0); pObj = pMark->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); - if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2) + if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_OLE2) { pOleObj = static_cast<SdrOle2Obj*>(pObj); } - else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRAF) + else if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_GRAF) { pGrafObj = static_cast<SdrGrafObj*>(pObj); } diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index f695c7a..e5ec8b9 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -189,7 +189,7 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) if (mpView->GetDragMode() == SdrDragMode::Move && mpView->IsRotateAllowed() && (mpViewShell->GetFrameView()->IsClickChangeRotation() || - (pSingleObj && pSingleObj->GetObjInventor()==E3dInventor))) + (pSingleObj && pSingleObj->GetObjInventor()==SdrInventor::E3d))) { mpView->SetDragMode(SdrDragMode::Rotate); } diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 8e8e29d..2632a7a 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -49,7 +49,7 @@ FuConstructUnoControl::FuConstructUnoControl ( SdDrawDocument* pDoc, SfxRequest& rReq) : FuConstruct(pViewSh, pWin, pView, pDoc, rReq) - , nInventor(0) + , nInventor(SdrInventor::Unknown) , nIdentifier(0) { } @@ -70,7 +70,7 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR); const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); if( pInventorItem ) - nInventor = pInventorItem->GetValue(); + nInventor = (SdrInventor)pInventorItem->GetValue(); if( pIdentifierItem ) nIdentifier = pIdentifierItem->GetValue(); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index f593a96..45c8ddd 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -690,10 +690,10 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); - if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2) + if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_OLE2) { DrawDocShell* pDocSh = mpDoc->GetDocSh(); @@ -705,7 +705,7 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt) mpViewShell->ActivateObject( static_cast<SdrOle2Obj*>(pObj), 0); } } - else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRAF && pObj->IsEmptyPresObj() ) + else if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_GRAF && pObj->IsEmptyPresObj() ) { mpViewShell->GetViewFrame()-> GetDispatcher()->Execute( SID_INSERT_GRAPHIC, @@ -722,7 +722,7 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt) SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } - else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRUP) + else if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_GRUP) { // hit group -> select subobject mpView->UnMarkAll(); diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index d665ce0..a234e78 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -226,7 +226,7 @@ void FuFormatPaintBrush::Deactivate() } } -bool FuFormatPaintBrush::HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const +bool FuFormatPaintBrush::HasContentForThisType( SdrInventor nObjectInventor, sal_uInt16 nObjectIdentifier ) const { if( mxItemSet.get() == nullptr ) return false; diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 82e42ba..f68e92b 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -571,7 +571,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - if (pObj->GetObjInventor() == SdrInventor && + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OLE2) { if ( !static_cast<SdrOle2Obj*>(pObj)->GetObjRef().is() ) diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index b000b3e..aca9c8c 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -480,7 +480,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) { SdrObject* pObj = mpView->GetTextEditObject(); if( pObj && - pObj->GetObjInventor() == SdrInventor && + pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_TITLETEXT && pOutliner->GetParagraphCount() > 1 ) { diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index f79612f..a3ff6e6 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -71,7 +71,7 @@ void FuLineEnd::DoExecute( SfxRequest& ) pObj->TakeObjInfo( aInfoRec ); if( aInfoRec.bCanConvToPath && - pObj->GetObjInventor() == SdrInventor && + pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() != OBJ_GRUP ) // bCanConvToPath is sal_True for group objects, // but it crashes on ConvertToPathObj()! diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index a63c5f1..eb7cfae 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -295,7 +295,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) SdAnimationInfo* pInfo2 = SdDrawDocument::GetAnimationInfo(pObject2); pInfo = nullptr; - if (pObject1->GetObjInventor() == SdrInventor && + if (pObject1->GetObjInventor() == SdrInventor::Default && ((eKind1 == OBJ_LINE) || // 2 point line (eKind1 == OBJ_PLIN) || // Polygon (eKind1 == OBJ_PATHLINE)) && // Bezier curve @@ -304,7 +304,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pInfo = pInfo2; } - if (pObject2->GetObjInventor() == SdrInventor && + if (pObject2->GetObjInventor() == SdrInventor::Default && ((eKind2 == OBJ_LINE) || // 2 point line (eKind2 == OBJ_PLIN) || // Polygon (eKind2 == OBJ_PATHLINE)) && // Bezier curve @@ -637,7 +637,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) SdrObjKind eKind2 = (SdrObjKind)pObject2->GetObjIdentifier(); SdrObject* pRunningObj = nullptr; - if (pObject1->GetObjInventor() == SdrInventor && + if (pObject1->GetObjInventor() == SdrInventor::Default && ((eKind1 == OBJ_LINE) || // 2 point line (eKind1 == OBJ_PLIN) || // Polygon (eKind1 == OBJ_PATHLINE))) // Bezier curve @@ -646,7 +646,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pRunningObj = pObject2; } - if (pObject2->GetObjInventor() == SdrInventor && + if (pObject2->GetObjInventor() == SdrInventor::Default && ((eKind2 == OBJ_LINE) || // 2 point line (eKind2 == OBJ_PLIN) || // Polygon (eKind2 == OBJ_PATHLINE))) // Bezier curve diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 56d0dd2..7a28dbc 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -314,7 +314,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u for(size_t nNum = 0; nNum < nCount; ++nNum) { SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj(); - if( pObj->GetObjInventor() == SdrInventor ) + if( pObj->GetObjInventor() == SdrInventor::Default ) { switch(pObj->GetObjIdentifier()) { diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 4f58e0f..7ef6ab4 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -217,10 +217,10 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(pObj && dynamic_cast< const SdrTextObj *>( pObj ) != nullptr) { - sal_uInt32 nInv(pObj->GetObjInventor()); + SdrInventor nInv(pObj->GetObjInventor()); sal_uInt16 nKnd(pObj->GetObjIdentifier()); - if(SdrInventor == nInv && + if(SdrInventor::Default == nInv && (OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd)) { pCandidate = static_cast<SdrTextObj*>(pObj); @@ -849,10 +849,10 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(pObj && dynamic_cast< const SdrTextObj *>( pObj ) != nullptr) { - sal_uInt32 nInv(pObj->GetObjInventor()); + SdrInventor nInv(pObj->GetObjInventor()); sal_uInt16 nKnd(pObj->GetObjIdentifier()); - if(SdrInventor == nInv && OBJ_TITLETEXT == nKnd) + if(SdrInventor::Default == nInv && OBJ_TITLETEXT == nKnd) { pCandidate = static_cast<SdrTextObj*>(pObj); } diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 5bdc4e0..f1e0249 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -243,7 +243,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier(); - if (aVEvt.pObj->GetObjInventor() == SdrInventor && + if (aVEvt.pObj->GetObjInventor() == SdrInventor::Default && (nSdrObjKind == OBJ_TEXT || nSdrObjKind == OBJ_TITLETEXT || nSdrObjKind == OBJ_OUTLINETEXT || @@ -698,7 +698,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) && (rMEvt.GetClicks() != 2) && (mpViewShell->GetFrameView()->IsClickChangeRotation() || (pSingleObj - && pSingleObj->GetObjInventor()==E3dInventor)) + && pSingleObj->GetObjInventor()==SdrInventor::E3d)) && ! bSelectionOnly) { @@ -826,7 +826,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) ( mpView->GetDragMode() == SdrDragMode::Shear && !mpView->IsShearAllowed() && !mpView->IsDistortAllowed() ) || ( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj && - (pSingleObj->GetObjInventor() != SdrInventor || + (pSingleObj->GetObjInventor() != SdrInventor::Default || pSingleObj->GetObjIdentifier() == OBJ_MEASURE) ) ) { bReturn = true; diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index f020d4e..1657d2a 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -222,7 +222,7 @@ void FuText::DoExecute( SfxRequest& ) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if( pObj && (pObj->GetObjInventor() == SdrInventor ) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) + if( pObj && (pObj->GetObjInventor() == SdrInventor::Default ) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) { mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBarShell( ToolBarManager::TBG_FUNCTION, RID_DRAW_TABLE_TOOLBOX ); } @@ -923,7 +923,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt) } } - if ( mxTextObj.is() && mxTextObj->GetObjInventor() == SdrInventor && mxTextObj->GetObjIdentifier() == OBJ_TITLETEXT && rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) + if ( mxTextObj.is() && mxTextObj->GetObjInventor() == SdrInventor::Default && mxTextObj->GetObjIdentifier() == OBJ_TITLETEXT && rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) { // title text object: always soft breaks bShift = true; @@ -1036,10 +1036,10 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) if (GetTextObj() != mpView->GetTextEditObject() || bEmptyOutliner) { - sal_uInt32 nInv = mxTextObj->GetObjInventor(); - sal_uInt16 nSdrObjKind = mxTextObj->GetObjIdentifier(); + SdrInventor nInv = mxTextObj->GetObjInventor(); + sal_uInt16 nSdrObjKind = mxTextObj->GetObjIdentifier(); - if (nInv == SdrInventor && GetTextObj()->HasTextEdit() && + if (nInv == SdrInventor::Default && GetTextObj()->HasTextEdit() && (nSdrObjKind == OBJ_TEXT || nSdrObjKind == OBJ_TITLETEXT || nSdrObjKind == OBJ_OUTLINETEXT || !mxTextObj->IsEmptyPresObj() ) ) @@ -1064,7 +1064,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) pTextObj->setActiveText( pTextObj->CheckTextHit(aPnt ) ); } - if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, true, pOutl) && mxTextObj->GetObjInventor() == SdrInventor) + if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, true, pOutl) && mxTextObj->GetObjInventor() == SdrInventor::Default) { //tdf#102293 flush overlay before going on to pass clicks down to //the outline view which will want to paint selections diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index 02de2bd..d8f33c5 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -63,7 +63,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); if( rMarkList.GetMarkCount() == 1 && - pObj->GetObjInventor() == SdrInventor && + pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_CAPTION ) { // --------- itemset for caption -------- diff --git a/sd/source/ui/inc/fuconuno.hxx b/sd/source/ui/inc/fuconuno.hxx index 76c91a4..c0fc3a9 100644 --- a/sd/source/ui/inc/fuconuno.hxx +++ b/sd/source/ui/inc/fuconuno.hxx @@ -23,6 +23,8 @@ #include <svl/itemset.hxx> #include "fuconstr.hxx" +enum class SdrInventor : sal_uInt32; + namespace sd { /** @@ -56,8 +58,8 @@ protected: OUString aOldLayer; private: - sal_uInt32 nInventor; - sal_uInt16 nIdentifier; + SdrInventor nInventor; + sal_uInt16 nIdentifier; }; } // end of namespace sd diff --git a/sd/source/ui/inc/fuformatpaintbrush.hxx b/sd/source/ui/inc/fuformatpaintbrush.hxx index f522191..4a3e3e8 100644 --- a/sd/source/ui/inc/fuformatpaintbrush.hxx +++ b/sd/source/ui/inc/fuformatpaintbrush.hxx @@ -50,7 +50,7 @@ private: void DoExecute( SfxRequest& rReq ) override; - bool HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const; + bool HasContentForThisType( SdrInventor nObjectInventor, sal_uInt16 nObjectIdentifier ) const; void Paste( bool, bool ); void implcancel(); diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 9a76112..ddc4e74 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -517,7 +517,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected const bool bDoCreateGeometry (pObject->GetPage()->checkVisibility( rOriginal, rDisplayInfo, true)); if ( ! bDoCreateGeometry - && (pObject->GetObjInventor() != SdrInventor || pObject->GetObjIdentifier() != OBJ_PAGE)) + && (pObject->GetObjInventor() != SdrInventor::Default || pObject->GetObjIdentifier() != OBJ_PAGE)) { return drawinglayer::primitive2d::Primitive2DContainer(); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a648abf..510256a 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1053,7 +1053,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create( } // create the API wrapper - pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor, referer ); + pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor::Default, referer ); // set shape type if( pShape && !mbClipBoard ) @@ -1063,7 +1063,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create( } else if ( aServiceSpecifier == "com.sun.star.drawing.TableShape" ) { - SvxShape* pShape = CreateSvxShapeByTypeAndInventor( OBJ_TABLE, SdrInventor, referer ); + SvxShape* pShape = CreateSvxShapeByTypeAndInventor( OBJ_TABLE, SdrInventor::Default, referer ); if( pShape && !mbClipBoard ) pShape->SetShapeType(aServiceSpecifier); @@ -1758,11 +1758,11 @@ vcl::PDFWriter::StructElement ImplRenderPaintProc::ImplBegStructureTag( SdrObjec if ( pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportTaggedPDF() ) { - sal_uInt32 nInventor = rObject.GetObjInventor(); - sal_uInt16 nIdentifier = rObject.GetObjIdentifier(); - bool bIsTextObj = dynamic_cast< const SdrTextObj *>( &rObject ) != nullptr; + SdrInventor nInventor = rObject.GetObjInventor(); + sal_uInt16 nIdentifier = rObject.GetObjIdentifier(); + bool bIsTextObj = dynamic_cast< const SdrTextObj *>( &rObject ) != nullptr; - if ( nInventor == SdrInventor ) + if ( nInventor == SdrInventor::Default ) { if ( nIdentifier == OBJ_GRUP ) eElement = vcl::PDFWriter::Section; diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index ac8f484..4a1db16 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -862,7 +862,7 @@ uno::Sequence< OUString > SAL_CALL SdXShape::getSupportedServiceNames() throw(cs "com.sun.star.document.LinkTarget"} ); SdrObject* pObj = mpShape->GetSdrObject(); - if(pObj && pObj->GetObjInventor() == SdrInventor ) + if(pObj && pObj->GetObjInventor() == SdrInventor::Default ) { sal_uInt32 nInventor = pObj->GetObjIdentifier(); switch( nInventor ) diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 11c16df..9e5f6fe 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -409,7 +409,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap if( !aType.startsWith( aPrefix ) ) { SdrObject* pObj = SvxFmDrawPage::CreateSdrObject_( xShape ); - if( pObj && ( (pObj->GetObjInventor() != SdrInventor) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) ) + if( pObj && ( (pObj->GetObjInventor() != SdrInventor::Default) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) ) { SdDrawDocument* pDoc = static_cast<SdDrawDocument*>(GetPage()->GetModel()); if( pDoc ) @@ -1410,7 +1410,7 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co SvxShape* pShape = nullptr; - if(pObj->GetObjInventor() == SdrInventor) + if(pObj->GetObjInventor() == SdrInventor::Default) { sal_uInt32 nInventor = pObj->GetObjIdentifier(); switch( nInventor ) diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 5eb778b..3aeac30 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1664,7 +1664,7 @@ private: while (pTextObj==nullptr && nObj < pPage->GetObjCount()) { SdrObject* pObj = pPage->GetObj(nObj++); - if (pObj->GetObjInventor() == SdrInventor + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_TITLETEXT) { pTextObj = dynamic_cast<SdrTextObj*>(pObj); @@ -1688,7 +1688,7 @@ private: while (pTextObj==nullptr && nObj<pPage->GetObjCount()) { SdrObject* pObj = pPage->GetObj(nObj++); - if (pObj->GetObjInventor() == SdrInventor + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT) { pTextObj = dynamic_cast<SdrTextObj*>(pObj); diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 497ae75..9292cf5 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -144,9 +144,9 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, { // Textedit - sal_uInt32 nInv = pEditObject->GetObjInventor(); + SdrInventor nInv = pEditObject->GetObjInventor(); - if (nInv == SdrInventor) + if (nInv == SdrInventor::Default) { sal_uInt16 eObjKind = pEditObject->GetObjIdentifier(); PresObjKind ePresObjKind = rPage.GetPresObjKind(pEditObject); @@ -270,10 +270,10 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, const size_t nMarkCount = rList.GetMarkCount(); for (size_t nMark = 0; nMark < nMarkCount; ++nMark) { - SdrObject* pObject = rList.GetMark(nMark)->GetMarkedSdrObj(); - sal_uInt32 nInv = pObject->GetObjInventor(); + SdrObject* pObject = rList.GetMark(nMark)->GetMarkedSdrObj(); + SdrInventor nInv = pObject->GetObjInventor(); - if (nInv == SdrInventor) + if (nInv == SdrInventor::Default) { sal_uInt16 eObjKind = pObject->GetObjIdentifier(); PresObjKind ePresObjKind = rPage.GetPresObjKind(pObject); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index a521675..02b965c 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -177,10 +177,10 @@ void DrawViewShell::SelectionHasChanged() SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); - if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2) + if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_OLE2) { pOleObj = static_cast<SdrOle2Obj*>(pObj); UpdateIMapDlg( pObj ); @@ -719,10 +719,10 @@ ErrCode DrawViewShell::DoVerb(long nVerb) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); - if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2) + if (nInv == SdrInventor::Default && nSdrObjKind == OBJ_OLE2) { ActivateObject( static_cast<SdrOle2Obj*>(pObj), nVerb); } diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 8d3ea52..d24e4cb 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -900,7 +900,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if( mpDrawView->IsTextEdit() ) { SdrObject* pObj = mpDrawView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj(); - if( pObj->GetObjInventor() == SdrInventor) + if( pObj->GetObjInventor() == SdrInventor::Default) { SfxItemSet aEditAttr( GetDoc()->GetPool() ); mpDrawView->GetAttributes( aEditAttr ); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 5c95ce8..3ce20cd 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -155,10 +155,10 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin) if(pObj && dynamic_cast< const SdrTextObj *>( pObj ) != nullptr) { - sal_uInt32 nInv(pObj->GetObjInventor()); - sal_uInt16 nKnd(pObj->GetObjIdentifier()); + SdrInventor nInv(pObj->GetObjInventor()); + sal_uInt16 nKnd(pObj->GetObjIdentifier()); - if(SdrInventor == nInv && + if(SdrInventor::Default == nInv && (OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd) && bDidVisitOldObject) { @@ -622,7 +622,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) } else { - if( (pObj->GetObjInventor() == SdrInventor) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) + if( (pObj->GetObjInventor() == SdrInventor::Default) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) { aPopupId = "tabletext"; } @@ -635,10 +635,10 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) } else { - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nId = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nId = pObj->GetObjIdentifier(); - if (nInv == SdrInventor) + if (nInv == SdrInventor::Default) { switch ( nId ) { @@ -701,7 +701,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) break; } } - else if( nInv == E3dInventor ) + else if( nInv == SdrInventor::E3d ) { if( nId == E3D_POLYSCENE_ID || nId == E3D_SCENE_ID ) { @@ -713,7 +713,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) else aPopupId = "3dobject"; } - else if( nInv == FmFormInventor ) + else if( nInv == SdrInventor::FmForm ) { aPopupId = "form"; } diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 7fa40d5..1e13798 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -183,12 +183,12 @@ void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet ) else // 1 Object { const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nId = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nId = pObj->GetObjIdentifier(); // 1 selected group object - if( nInv == SdrInventor && nId == OBJ_GRUP ) + if( nInv == SdrInventor::Default && nId == OBJ_GRUP ) nValue = 3; - else if( nInv == SdrInventor && nId == OBJ_GRAF ) // Animated GIF ? + else if( nInv == SdrInventor::Default && nId == OBJ_GRAF ) // Animated GIF ? { sal_uInt16 nCount = 0; diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 459ac62..9af3432 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -847,7 +847,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) for(size_t nNum = 0; nNum < nMarkCount; ++nNum) { SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj(); - if( pObj->GetObjInventor() == SdrInventor ) + if( pObj->GetObjInventor() == SdrInventor::Default ) { if( pObj->GetObjIdentifier() == OBJ_OUTLINETEXT ) { @@ -1295,11 +1295,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) // const size_t nMarkCount = aMarkList.GetMarkCount(); for (size_t i=0; i < nMarkCount && !bFoundAny; ++i) { - SdrObject* pObj= aMarkList.GetMark(i)->GetMarkedSdrObj(); - sal_uInt16 nId = pObj->GetObjIdentifier(); - sal_uInt32 nInv = pObj->GetObjInventor(); + SdrObject* pObj = aMarkList.GetMark(i)->GetMarkedSdrObj(); + sal_uInt16 nId = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); - if(nInv == SdrInventor) + if(nInv == SdrInventor::Default) { // 2D objects switch( nId ) @@ -1358,7 +1358,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) bFoundAny = true; } } - else if(nInv == E3dInventor) + else if(nInv == SdrInventor::E3d) { // 3D objects bFoundAny = true; @@ -1420,7 +1420,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) { SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() ); - if ( pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor() ) + if ( pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor() ) { uno::Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel() ); if( xControlModel.is() ) diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index fdea39d..438560f 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -142,7 +142,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF) + if (pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_GRAF) { pGrafObj = static_cast<SdrGrafObj*>(pObj); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 6909901..cff011e 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1481,7 +1481,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, if( pMarkedObj ) try { // change first marked object - if( (FmFormInventor == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON) ) + if( (SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON) ) { bNewObj = false; @@ -1519,7 +1519,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, if (bNewObj) try { - SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( SdrObjFactory::MakeNewObject(FmFormInventor, OBJ_FM_BUTTON, + SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( SdrObjFactory::MakeNewObject(SdrInventor::FmForm, OBJ_FM_BUTTON, mpDrawView->GetSdrPageView()->GetPage(), GetDoc()) ); Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index bce88e6..e6fe654 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -122,7 +122,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) bool bFound = false; SdrObject* pMarkedObj = mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); - if( pMarkedObj && (FmFormInventor == pMarkedObj->GetObjInventor()) ) + if( pMarkedObj && (SdrInventor::FmForm == pMarkedObj->GetObjInventor()) ) { SdrUnoObj* pUnoCtrl = dynamic_cast< SdrUnoObj* >( pMarkedObj ); @@ -647,7 +647,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) for (size_t nIndex = 0; nIndex < nMarkCount; ++nIndex) { SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(rMarkList.GetMark(nIndex)->GetMarkedSdrObj()); - if (pTextObj && pTextObj->GetObjInventor() == SdrInventor) + if (pTextObj && pTextObj->GetObjInventor() == SdrInventor::Default) { if (pTextObj->GetObjIdentifier() != OBJ_OLE2) { diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 1d2f20d..6043ba6 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -106,8 +106,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj); const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nId = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nId = pObj->GetObjIdentifier(); SdrObjTransformInfoRec aInfoRec; pObj->TakeObjInfo( aInfoRec ); @@ -127,19 +127,19 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) /* If it is not a group object or 3D object, we disable "enter group". */ - if( !( ( dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor ) || + if( !( ( dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default ) || (dynamic_cast< const E3dPolyScene* >(pObj) != nullptr|| dynamic_cast< const E3dScene* >(pObj) != nullptr /*|| pObj->ISA (E3dCompoundObject) */) ) ) { rSet.DisableItem( SID_ENTER_GROUP ); } // If it is not a group object, we disable "ungroup" - if(!(dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor)) + if(!(dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default)) { rSet.DisableItem(SID_UNGROUP); } - if( nInv == SdrInventor && + if( nInv == SdrInventor::Default && (nId == OBJ_LINE || nId == OBJ_PLIN || nId == OBJ_PATHLINE || @@ -154,26 +154,26 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) { // JOE: a group object may can be converted into a PathObj rSet.DisableItem( SID_LINEEND_POLYGON ); } - if(nInv == SdrInventor && + if(nInv == SdrInventor::Default && (nId == OBJ_PATHFILL || nId == OBJ_PATHLINE || !aInfoRec.bCanConvToPath)) rSet.DisableItem( SID_CHANGEBEZIER ); - if( nInv == SdrInventor && + if( nInv == SdrInventor::Default && ( nId == OBJ_POLY || nId == OBJ_PLIN || !aInfoRec.bCanConvToPoly ) && !GetView()->IsVectorizeAllowed() ) { rSet.DisableItem( SID_CHANGEPOLYGON ); } - if(nInv == SdrInventor && nId == OBJ_TABLE ) + if(nInv == SdrInventor::Default && nId == OBJ_TABLE ) { rSet.DisableItem( SID_TEXTATTR_DLG ); } - if( nInv != SdrInventor || nId != OBJ_MEASURE ) + if( nInv != SdrInventor::Default || nId != OBJ_MEASURE ) rSet.DisableItem( SID_MEASURE_DLG ); - if( nInv != SdrInventor || nId != OBJ_EDGE ) + if( nInv != SdrInventor::Default || nId != OBJ_EDGE ) rSet.DisableItem( SID_CONNECTION_DLG ); else { @@ -197,7 +197,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) rSet.DisableItem( SID_CONNECTION_NEW_ROUTING ); } - if ( nInv == E3dInventor || + if ( nInv == SdrInventor::E3d || (!mpDrawView->IsConvertToPathObjPossible() && !mpDrawView->IsShearAllowed() && !mpDrawView->IsDistortAllowed()) ) @@ -305,10 +305,10 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) for( size_t i = 0; i < nMarkCount && !bText && i < 50; ++i ) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - sal_uInt32 nInv = pObj->GetObjInventor(); - sal_uInt16 nId = pObj->GetObjIdentifier(); + SdrInventor nInv = pObj->GetObjInventor(); + sal_uInt16 nId = pObj->GetObjIdentifier(); - if (nInv == SdrInventor) + if (nInv == SdrInventor::Default) { switch (nId) { @@ -337,7 +337,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) case OBJ_TABLE: bTable = true; break; } } - else if (nInv == E3dInventor) + else if (nInv == SdrInventor::E3d) { if(dynamic_cast< const E3dScene *>( pObj ) != nullptr) b3dObj = true; diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 35dd486..edc461f 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -919,7 +919,7 @@ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage) for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { SdrObject* pObject = pPage->GetObj(nObject); - if (pObject->GetObjInventor() == SdrInventor && + if (pObject->GetObjInventor() == SdrInventor::Default && pObject->GetObjIdentifier() == OBJ_TITLETEXT) { pResult = static_cast<SdrTextObj*>(pObject); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits