basctl/source/basicide/baside3.cxx | 68 ++-- basctl/source/dlged/dlged.cxx | 2 basctl/source/dlged/dlgedfac.cxx | 72 ++-- basctl/source/dlged/dlgedobj.cxx | 48 +-- chart2/source/controller/main/ChartController_Tools.cxx | 6 chart2/source/controller/main/ChartController_Window.cxx | 18 - chart2/source/controller/main/DrawCommandDispatch.cxx | 22 - chart2/source/controller/main/ShapeController.cxx | 2 chart2/source/view/main/ShapeFactory.cxx | 48 +-- chart2/source/view/main/VButton.cxx | 2 cui/source/tabpages/swpossizetabpage.cxx | 2 cui/source/tabpages/tabline.cxx | 12 cui/source/tabpages/textanim.cxx | 2 cui/source/tabpages/textattr.cxx | 14 cui/source/tabpages/transfrm.cxx | 2 filter/source/msfilter/msdffimp.cxx | 45 +- filter/source/msfilter/svdfppt.cxx | 20 - include/filter/msfilter/msdffimp.hxx | 2 include/svx/fmtools.hxx | 4 include/svx/sidebar/SelectionAnalyzer.hxx | 13 include/svx/svdedxv.hxx | 2 include/svx/svdobjkind.hxx | 219 +++++++------- include/svx/svdopath.hxx | 8 include/svx/svdotext.hxx | 8 include/svx/unoapi.hxx | 3 include/svx/unopage.hxx | 2 include/svx/unoprov.hxx | 15 include/svx/unoshape.hxx | 4 oox/source/export/drawingml.cxx | 2 reportdesign/inc/RptDef.hxx | 2 reportdesign/source/core/sdr/ReportDrawPage.cxx | 4 reportdesign/source/core/sdr/RptObject.cxx | 52 +-- reportdesign/source/ui/inc/DesignView.hxx | 2 reportdesign/source/ui/inc/ReportController.hxx | 2 reportdesign/source/ui/inc/ReportSection.hxx | 2 reportdesign/source/ui/inc/ReportWindow.hxx | 2 reportdesign/source/ui/inc/ScrollHelper.hxx | 2 reportdesign/source/ui/inc/ViewsWindow.hxx | 2 reportdesign/source/ui/misc/UITools.cxx | 2 reportdesign/source/ui/report/DesignView.cxx | 6 reportdesign/source/ui/report/ReportController.cxx | 58 +-- reportdesign/source/ui/report/ReportSection.cxx | 4 reportdesign/source/ui/report/ReportWindow.cxx | 2 reportdesign/source/ui/report/ScrollHelper.cxx | 2 reportdesign/source/ui/report/ViewsWindow.cxx | 2 reportdesign/source/ui/report/dlgedfac.cxx | 28 - reportdesign/source/ui/report/dlgedfunc.cxx | 12 sc/inc/drwlayer.hxx | 3 sc/qa/unit/helper/qahelper.cxx | 2 sc/qa/unit/scshapetest.cxx | 6 sc/qa/unit/ucalc.cxx | 2 sc/source/core/data/documen5.cxx | 14 sc/source/core/data/documen9.cxx | 4 sc/source/core/data/drwlayer.cxx | 28 - sc/source/core/tool/charthelper.cxx | 14 sc/source/core/tool/detfunc.cxx | 4 sc/source/filter/excel/xeescher.cxx | 2 sc/source/filter/excel/xiescher.cxx | 4 sc/source/filter/html/htmlexp2.cxx | 4 sc/source/filter/xcl97/xcl97esc.cxx | 14 sc/source/filter/xcl97/xcl97rec.cxx | 6 sc/source/filter/xml/xmlexprt.cxx | 2 sc/source/ui/app/client.cxx | 2 sc/source/ui/app/drwtrans.cxx | 10 sc/source/ui/app/seltrans.cxx | 6 sc/source/ui/drawfunc/drawsh.cxx | 2 sc/source/ui/drawfunc/drawsh2.cxx | 22 - sc/source/ui/drawfunc/drawsh5.cxx | 8 sc/source/ui/drawfunc/fuconarc.cxx | 8 sc/source/ui/drawfunc/fuconcustomshape.cxx | 2 sc/source/ui/drawfunc/fuconpol.cxx | 14 sc/source/ui/drawfunc/fuconrec.cxx | 14 sc/source/ui/drawfunc/fuconuno.cxx | 2 sc/source/ui/drawfunc/fupoor.cxx | 8 sc/source/ui/drawfunc/fusel.cxx | 4 sc/source/ui/drawfunc/futext.cxx | 10 sc/source/ui/inc/content.hxx | 3 sc/source/ui/navipi/content.cxx | 12 sc/source/ui/uitest/uiobject.cxx | 6 sc/source/ui/undo/undotab.cxx | 2 sc/source/ui/unoobj/ChartTools.cxx | 2 sc/source/ui/unoobj/TablePivotCharts.cxx | 2 sc/source/ui/unoobj/chartuno.cxx | 8 sc/source/ui/view/dbfunc4.cxx | 2 sc/source/ui/view/drawvie4.cxx | 14 sc/source/ui/view/drawview.cxx | 12 sc/source/ui/view/tabvwsh2.cxx | 4 sc/source/ui/view/tabvwshb.cxx | 6 sc/source/ui/view/tabvwshg.cxx | 2 sc/source/ui/view/tabvwshh.cxx | 2 sd/inc/sdmod.hxx | 3 sd/qa/unit/export-tests-ooxml1.cxx | 2 sd/qa/unit/export-tests-ooxml2.cxx | 10 sd/qa/unit/export-tests-ooxml3.cxx | 2 sd/qa/unit/import-tests-smartart.cxx | 2 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx | 16 - sd/qa/unit/tiledrendering/tiledrendering.cxx | 18 - sd/source/core/CustomAnimationEffect.cxx | 2 sd/source/core/EffectMigration.cxx | 2 sd/source/core/drawdoc.cxx | 6 sd/source/core/drawdoc2.cxx | 6 sd/source/core/drawdoc3.cxx | 2 sd/source/core/drawdoc4.cxx | 22 - sd/source/core/sdpage.cxx | 60 +-- sd/source/core/sdpage2.cxx | 4 sd/source/filter/html/htmlex.cxx | 16 - sd/source/filter/ppt/pptin.cxx | 2 sd/source/filter/xml/sdtransform.cxx | 2 sd/source/ui/app/sdxfer.cxx | 2 sd/source/ui/dlg/animobjs.cxx | 4 sd/source/ui/dlg/dlgolbul.cxx | 4 sd/source/ui/dlg/prltempl.cxx | 2 sd/source/ui/dlg/sdtreelb.cxx | 8 sd/source/ui/dlg/tpaction.cxx | 6 sd/source/ui/docshell/docshel3.cxx | 2 sd/source/ui/func/fucon3d.cxx | 2 sd/source/ui/func/fuconarc.cxx | 8 sd/source/ui/func/fuconbez.cxx | 14 sd/source/ui/func/fuconcs.cxx | 2 sd/source/ui/func/fuconrec.cxx | 20 - sd/source/ui/func/fuconuno.cxx | 2 sd/source/ui/func/fudraw.cxx | 16 - sd/source/ui/func/fuformatpaintbrush.cxx | 2 sd/source/ui/func/fuinsert.cxx | 2 sd/source/ui/func/fuinsfil.cxx | 4 sd/source/ui/func/fulinend.cxx | 2 sd/source/ui/func/fumorph.cxx | 2 sd/source/ui/func/fuoaprms.cxx | 24 - sd/source/ui/func/fuolbull.cxx | 6 sd/source/ui/func/fupoor.cxx | 16 - sd/source/ui/func/fusel.cxx | 10 sd/source/ui/func/futext.cxx | 36 +- sd/source/ui/func/futransf.cxx | 2 sd/source/ui/inc/fuformatpaintbrush.hxx | 2 sd/source/ui/tools/PreviewRenderer.cxx | 2 sd/source/ui/unoidl/unomodel.cxx | 48 +-- sd/source/ui/unoidl/unoobj.cxx | 13 sd/source/ui/unoidl/unopage.cxx | 7 sd/source/ui/view/DocumentRenderer.cxx | 6 sd/source/ui/view/drawview.cxx | 12 sd/source/ui/view/drviews1.cxx | 10 sd/source/ui/view/drviews2.cxx | 12 sd/source/ui/view/drviews3.cxx | 2 sd/source/ui/view/drviews4.cxx | 59 +-- sd/source/ui/view/drviews6.cxx | 6 sd/source/ui/view/drviews7.cxx | 22 - sd/source/ui/view/drviews9.cxx | 2 sd/source/ui/view/drviewse.cxx | 6 sd/source/ui/view/drviewsf.cxx | 2 sd/source/ui/view/drviewsj.cxx | 57 +-- sd/source/ui/view/outlview.cxx | 4 sd/source/ui/view/sdview.cxx | 48 +-- sd/source/ui/view/viewoverlaymanager.cxx | 2 sd/source/ui/view/viewshel.cxx | 4 svx/source/customshapes/EnhancedCustomShape2d.cxx | 8 svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 svx/source/dialog/_contdlg.cxx | 6 svx/source/dialog/connctrl.cxx | 4 svx/source/dialog/contwnd.cxx | 2 svx/source/dialog/dlgctrl.cxx | 6 svx/source/dialog/graphctl.cxx | 6 svx/source/dialog/imapdlg.cxx | 8 svx/source/dialog/imapwnd.cxx | 26 - svx/source/engine3d/cube3d.cxx | 2 svx/source/engine3d/extrud3d.cxx | 4 svx/source/engine3d/lathe3d.cxx | 4 svx/source/engine3d/obj3d.cxx | 4 svx/source/engine3d/objfac3d.cxx | 14 svx/source/engine3d/polygn3d.cxx | 2 svx/source/engine3d/scene3d.cxx | 2 svx/source/engine3d/sphere3d.cxx | 2 svx/source/form/fmexpl.cxx | 48 +-- svx/source/form/fmobj.cxx | 2 svx/source/form/fmobjfac.cxx | 44 +- svx/source/form/fmshell.cxx | 46 +-- svx/source/form/fmshimp.cxx | 103 +++--- svx/source/form/fmtools.cxx | 58 +-- svx/source/form/fmvwimp.cxx | 44 +- svx/source/sdr/contact/viewcontactofgraphic.cxx | 2 svx/source/sdr/contact/viewcontactofsdrcircobj.cxx | 8 svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx | 4 svx/source/sdr/properties/textproperties.cxx | 6 svx/source/sidebar/SelectionAnalyzer.cxx | 228 +++++++-------- svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 10 svx/source/svdraw/svdcrtv.cxx | 38 +- svx/source/svdraw/svdedtv2.cxx | 18 - svx/source/svdraw/svdedxv.cxx | 72 ++-- svx/source/svdraw/svdfmtf.cxx | 20 - svx/source/svdraw/svdmrkv.cxx | 13 svx/source/svdraw/svdoashp.cxx | 2 svx/source/svdraw/svdobj.cxx | 70 ++-- svx/source/svdraw/svdocapt.cxx | 6 svx/source/svdraw/svdocirc.cxx | 18 - svx/source/svdraw/svdoedge.cxx | 2 svx/source/svdraw/svdograf.cxx | 2 svx/source/svdraw/svdogrp.cxx | 2 svx/source/svdraw/svdomeas.cxx | 14 svx/source/svdraw/svdomedia.cxx | 2 svx/source/svdraw/svdoole2.cxx | 2 svx/source/svdraw/svdopage.cxx | 2 svx/source/svdraw/svdopath.cxx | 162 +++++----- svx/source/svdraw/svdorect.cxx | 10 svx/source/svdraw/svdotext.cxx | 16 - svx/source/svdraw/svdotxtr.cxx | 8 svx/source/svdraw/svdouno.cxx | 2 svx/source/svdraw/svdpage.cxx | 2 svx/source/svdraw/svdpdf.cxx | 9 svx/source/svdraw/svdview.cxx | 4 svx/source/svdraw/svdxcgv.cxx | 6 svx/source/table/svdotable.cxx | 2 svx/source/table/tablecontroller.cxx | 4 svx/source/unodraw/unomod.cxx | 41 +- svx/source/unodraw/unopage.cxx | 135 ++++---- svx/source/unodraw/unoprov.cxx | 72 ++-- svx/source/unodraw/unoshap2.cxx | 18 - svx/source/unodraw/unoshape.cxx | 211 ++++++------- svx/source/unodraw/unoshtxt.cxx | 6 sw/inc/view.hxx | 2 sw/qa/extras/uiwriter/uiwriter2.cxx | 2 sw/qa/uibase/shells/shells.cxx | 2 sw/source/core/access/AccessibilityCheck.cxx | 3 sw/source/core/draw/dcontact.cxx | 2 sw/source/core/draw/dflyobj.cxx | 2 sw/source/core/draw/dobjfac.cxx | 2 sw/source/core/frmedt/fecopy.cxx | 2 sw/source/core/frmedt/feshview.cxx | 30 - sw/source/filter/html/htmldrawreader.cxx | 10 sw/source/filter/ww8/docxsdrexport.cxx | 35 +- sw/source/filter/ww8/wrtw8esh.cxx | 2 sw/source/filter/ww8/ww8graf.cxx | 16 - sw/source/filter/ww8/ww8graf2.cxx | 2 sw/source/filter/ww8/ww8par.cxx | 2 sw/source/uibase/docvw/edtwin.cxx | 6 sw/source/uibase/ribbar/conarc.cxx | 8 sw/source/uibase/ribbar/concustomshape.cxx | 2 sw/source/uibase/ribbar/conpoly.cxx | 16 - sw/source/uibase/ribbar/conrect.cxx | 24 - sw/source/uibase/ribbar/drawbase.cxx | 18 - sw/source/uibase/ribbar/dselect.cxx | 2 sw/source/uibase/shells/drwbassh.cxx | 46 +-- sw/source/uibase/shells/textdrw.cxx | 4 sw/source/uibase/uiview/view.cxx | 2 sw/source/uibase/uiview/viewdraw.cxx | 4 sw/source/uibase/utlui/content.cxx | 36 +- 245 files changed, 1922 insertions(+), 1910 deletions(-)
New commits: commit 8295a3344704ce9a18489933c499a50c403f1a3d Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Thu Dec 30 20:33:52 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 7 14:22:07 2022 +0100 remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enum We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 920e82da3d0a..91ac35a4bbc0 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -392,7 +392,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) void DialogWindow::ExecuteCommand( SfxRequest& rReq ) { const sal_uInt16 nSlotId(rReq.GetSlot()); - SdrObjKind nInsertObj(OBJ_NONE); + SdrObjKind nInsertObj(SdrObjKind::NONE); switch ( nSlotId ) { @@ -425,100 +425,100 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq ) break; case SID_INSERT_FORM_RADIO: - nInsertObj = OBJ_DLG_FORMRADIO; + nInsertObj = SdrObjKind::BasicDialogFormRadio; break; case SID_INSERT_FORM_CHECK: - nInsertObj = OBJ_DLG_FORMCHECK; + nInsertObj = SdrObjKind::BasicDialogFormCheck; break; case SID_INSERT_FORM_LIST: - nInsertObj = OBJ_DLG_FORMLIST; + nInsertObj = SdrObjKind::BasicDialogFormList; break; case SID_INSERT_FORM_COMBO: - nInsertObj = OBJ_DLG_FORMCOMBO; + nInsertObj = SdrObjKind::BasicDialogFormCombo; break; case SID_INSERT_FORM_SPIN: - nInsertObj = OBJ_DLG_FORMSPIN; + nInsertObj = SdrObjKind::BasicDialogFormSpin; break; case SID_INSERT_FORM_VSCROLL: - nInsertObj = OBJ_DLG_FORMVSCROLL; + nInsertObj = SdrObjKind::BasicDialogFormVerticalScroll; break; case SID_INSERT_FORM_HSCROLL: - nInsertObj = OBJ_DLG_FORMHSCROLL; + nInsertObj = SdrObjKind::BasicDialogFormHorizontalScroll; break; case SID_INSERT_PUSHBUTTON: - nInsertObj = OBJ_DLG_PUSHBUTTON; + nInsertObj = SdrObjKind::BasicDialogPushButton; break; case SID_INSERT_RADIOBUTTON: - nInsertObj = OBJ_DLG_RADIOBUTTON; + nInsertObj = SdrObjKind::BasicDialogRadioButton; break; case SID_INSERT_CHECKBOX: - nInsertObj = OBJ_DLG_CHECKBOX; + nInsertObj = SdrObjKind::BasicDialogCheckbox; break; case SID_INSERT_LISTBOX: - nInsertObj = OBJ_DLG_LISTBOX; + nInsertObj = SdrObjKind::BasicDialogListbox; break; case SID_INSERT_COMBOBOX: - nInsertObj = OBJ_DLG_COMBOBOX; + nInsertObj = SdrObjKind::BasicDialogCombobox; break; case SID_INSERT_GROUPBOX: - nInsertObj = OBJ_DLG_GROUPBOX; + nInsertObj = SdrObjKind::BasicDialogGroupBox; break; case SID_INSERT_EDIT: - nInsertObj = OBJ_DLG_EDIT; + nInsertObj = SdrObjKind::BasicDialogEdit; break; case SID_INSERT_FIXEDTEXT: - nInsertObj = OBJ_DLG_FIXEDTEXT; + nInsertObj = SdrObjKind::BasicDialogFixedText; break; case SID_INSERT_IMAGECONTROL: - nInsertObj = OBJ_DLG_IMAGECONTROL; + nInsertObj = SdrObjKind::BasicDialogImageControl; break; case SID_INSERT_PROGRESSBAR: - nInsertObj = OBJ_DLG_PROGRESSBAR; + nInsertObj = SdrObjKind::BasicDialogProgressbar; break; case SID_INSERT_HSCROLLBAR: - nInsertObj = OBJ_DLG_HSCROLLBAR; + nInsertObj = SdrObjKind::BasicDialogHorizontalScrollbar; break; case SID_INSERT_VSCROLLBAR: - nInsertObj = OBJ_DLG_VSCROLLBAR; + nInsertObj = SdrObjKind::BasicDialogVerticalScrollbar; break; case SID_INSERT_HFIXEDLINE: - nInsertObj = OBJ_DLG_HFIXEDLINE; + nInsertObj = SdrObjKind::BasicDialogHorizontalFixedLine; break; case SID_INSERT_VFIXEDLINE: - nInsertObj = OBJ_DLG_VFIXEDLINE; + nInsertObj = SdrObjKind::BasicDialogVerticalFixedLine; break; case SID_INSERT_DATEFIELD: - nInsertObj = OBJ_DLG_DATEFIELD; + nInsertObj = SdrObjKind::BasicDialogDateField; break; case SID_INSERT_TIMEFIELD: - nInsertObj = OBJ_DLG_TIMEFIELD; + nInsertObj = SdrObjKind::BasicDialogTimeField; break; case SID_INSERT_NUMERICFIELD: - nInsertObj = OBJ_DLG_NUMERICFIELD; + nInsertObj = SdrObjKind::BasicDialogNumericField; break; case SID_INSERT_CURRENCYFIELD: - nInsertObj = OBJ_DLG_CURRENCYFIELD; + nInsertObj = SdrObjKind::BasicDialogCurencyField; break; case SID_INSERT_FORMATTEDFIELD: - nInsertObj = OBJ_DLG_FORMATTEDFIELD; + nInsertObj = SdrObjKind::BasicDialogFormattedField; break; case SID_INSERT_PATTERNFIELD: - nInsertObj = OBJ_DLG_PATTERNFIELD; + nInsertObj = SdrObjKind::BasicDialogPatternField; break; case SID_INSERT_FILECONTROL: - nInsertObj = OBJ_DLG_FILECONTROL; + nInsertObj = SdrObjKind::BasicDialogFileControl; break; case SID_INSERT_SPINBUTTON: - nInsertObj = OBJ_DLG_SPINBUTTON; + nInsertObj = SdrObjKind::BasicDialogSpinButton; break; case SID_INSERT_GRIDCONTROL: - nInsertObj = OBJ_DLG_GRIDCONTROL; + nInsertObj = SdrObjKind::BasicDialogGridControl; break; case SID_INSERT_HYPERLINKCONTROL: - nInsertObj = OBJ_DLG_HYPERLINKCONTROL; + nInsertObj = SdrObjKind::BasicDialogHyperlinkControl; break; case SID_INSERT_TREECONTROL: - nInsertObj = OBJ_DLG_TREECONTROL; + nInsertObj = SdrObjKind::BasicDialogTreeControl; break; case SID_INSERT_SELECT: m_nControlSlotId = nSlotId; @@ -556,7 +556,7 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq ) break; } - if ( nInsertObj ) + if ( nInsertObj != SdrObjKind::NONE ) { m_nControlSlotId = nSlotId; GetEditor().SetMode( DlgEditor::INSERT ); diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 13ff7a17ca36..69ffb81f3579 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -195,7 +195,7 @@ DlgEditor::DlgEditor ( ,pFunc(new DlgEdFuncSelect(*this)) ,rLayout(rLayout_) ,eMode( DlgEditor::SELECT ) - ,eActObj( OBJ_DLG_PUSHBUTTON ) + ,eActObj( SdrObjKind::BasicDialogPushButton ) ,bFirstDraw(false) ,bCreateOK(true) ,bDialogModelChanged(false) diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 98c0f260b0f9..5c7d012344bb 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -60,40 +60,40 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) SdrObject* pNewObj = nullptr; if( (aParams.nInventor == SdrInventor::BasicDialog) && - (aParams.nObjIdentifier >= OBJ_DLG_PUSHBUTTON) && - (aParams.nObjIdentifier <= OBJ_DLG_FORMHSCROLL) ) + (aParams.nObjIdentifier >= SdrObjKind::BasicDialogPushButton) && + (aParams.nObjIdentifier <= SdrObjKind::BasicDialogFormHorizontalScroll) ) { switch( aParams.nObjIdentifier ) { - case OBJ_DLG_PUSHBUTTON: + case SdrObjKind::BasicDialogPushButton: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlButtonModel", xDialogSFact ); break; - case OBJ_DLG_RADIOBUTTON: + case SdrObjKind::BasicDialogRadioButton: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlRadioButtonModel", xDialogSFact ); break; - case OBJ_DLG_FORMRADIO: + case SdrObjKind::BasicDialogFormRadio: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.RadioButton", xDialogSFact ); static_cast< DlgEdObj* >( pNewObj )->MakeDataAware( mxModel ); break; - case OBJ_DLG_CHECKBOX: + case SdrObjKind::BasicDialogCheckbox: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlCheckBoxModel", xDialogSFact ); break; - case OBJ_DLG_FORMCHECK: + case SdrObjKind::BasicDialogFormCheck: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.CheckBox", xDialogSFact ); static_cast< DlgEdObj* >( pNewObj )->MakeDataAware( mxModel ); break; - case OBJ_DLG_LISTBOX: + case SdrObjKind::BasicDialogListbox: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlListBoxModel", xDialogSFact ); break; - case OBJ_DLG_FORMLIST: + case SdrObjKind::BasicDialogFormList: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ListBox", xDialogSFact ); static_cast< DlgEdObj* >( pNewObj )->MakeDataAware( mxModel ); break; - case OBJ_DLG_FORMCOMBO: - case OBJ_DLG_COMBOBOX: + case SdrObjKind::BasicDialogFormCombo: + case SdrObjKind::BasicDialogCombobox: { DlgEdObj* pNew = nullptr; - if ( aParams.nObjIdentifier == OBJ_DLG_COMBOBOX ) + if ( aParams.nObjIdentifier == SdrObjKind::BasicDialogCombobox ) pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlComboBoxModel", xDialogSFact ); else { @@ -114,33 +114,33 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) } } break; - case OBJ_DLG_GROUPBOX: + case SdrObjKind::BasicDialogGroupBox: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlGroupBoxModel", xDialogSFact ); break; - case OBJ_DLG_EDIT: + case SdrObjKind::BasicDialogEdit: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlEditModel", xDialogSFact ); break; - case OBJ_DLG_FIXEDTEXT: + case SdrObjKind::BasicDialogFixedText: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedTextModel", xDialogSFact ); break; - case OBJ_DLG_IMAGECONTROL: + case SdrObjKind::BasicDialogImageControl: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlImageControlModel", xDialogSFact ); break; - case OBJ_DLG_PROGRESSBAR: + case SdrObjKind::BasicDialogProgressbar: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlProgressBarModel", xDialogSFact ); break; - case OBJ_DLG_HSCROLLBAR: + case SdrObjKind::BasicDialogHorizontalScrollbar: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact ); break; - case OBJ_DLG_FORMHSCROLL: + case SdrObjKind::BasicDialogFormHorizontalScroll: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.ScrollBar", xDialogSFact ); static_cast< DlgEdObj* >( pNewObj )->MakeDataAware( mxModel ); break; - case OBJ_DLG_FORMVSCROLL: - case OBJ_DLG_VSCROLLBAR: + case SdrObjKind::BasicDialogFormVerticalScroll: + case SdrObjKind::BasicDialogVerticalScrollbar: { DlgEdObj* pNew = nullptr; - if ( aParams.nObjIdentifier == OBJ_DLG_VSCROLLBAR ) + if ( aParams.nObjIdentifier == SdrObjKind::BasicDialogVerticalScrollbar ) pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact ); else { @@ -161,10 +161,10 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) { } } break; - case OBJ_DLG_HFIXEDLINE: + case SdrObjKind::BasicDialogHorizontalFixedLine: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact ); break; - case OBJ_DLG_VFIXEDLINE: + case SdrObjKind::BasicDialogVerticalFixedLine: { DlgEdObj* pNew = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedLineModel", xDialogSFact ); pNewObj = pNew; @@ -181,41 +181,41 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) { } } break; - case OBJ_DLG_DATEFIELD: + case SdrObjKind::BasicDialogDateField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlDateFieldModel", xDialogSFact ); break; - case OBJ_DLG_TIMEFIELD: + case SdrObjKind::BasicDialogTimeField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlTimeFieldModel", xDialogSFact ); break; - case OBJ_DLG_NUMERICFIELD: + case SdrObjKind::BasicDialogNumericField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlNumericFieldModel", xDialogSFact ); break; - case OBJ_DLG_CURRENCYFIELD: + case SdrObjKind::BasicDialogCurencyField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlCurrencyFieldModel", xDialogSFact ); break; - case OBJ_DLG_FORMATTEDFIELD: + case SdrObjKind::BasicDialogFormattedField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFormattedFieldModel", xDialogSFact ); break; - case OBJ_DLG_PATTERNFIELD: + case SdrObjKind::BasicDialogPatternField: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlPatternFieldModel", xDialogSFact ); break; - case OBJ_DLG_FILECONTROL: + case SdrObjKind::BasicDialogFileControl: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFileControlModel", xDialogSFact ); break; - case OBJ_DLG_SPINBUTTON: + case SdrObjKind::BasicDialogSpinButton: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlSpinButtonModel", xDialogSFact ); break; - case OBJ_DLG_FORMSPIN: + case SdrObjKind::BasicDialogFormSpin: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.form.component.SpinButton", xDialogSFact ); static_cast< DlgEdObj* >( pNewObj )->MakeDataAware( mxModel ); break; - case OBJ_DLG_TREECONTROL: + case SdrObjKind::BasicDialogTreeControl: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.tree.TreeControlModel", xDialogSFact ); break; - case OBJ_DLG_GRIDCONTROL: + case SdrObjKind::BasicDialogGridControl: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.grid.UnoControlGridModel", xDialogSFact ); break; - case OBJ_DLG_HYPERLINKCONTROL: + case SdrObjKind::BasicDialogHyperlinkControl: pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedHyperlinkModel", xDialogSFact ); break; default: diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index c9ae1de4ae6e..1d89210b7dd5 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -810,99 +810,99 @@ SdrObjKind DlgEdObj::GetObjIdentifier() const { if ( supportsService( "com.sun.star.awt.UnoControlDialogModel" )) { - return OBJ_DLG_DIALOG; + return SdrObjKind::BasicDialogDialog; } else if ( supportsService( "com.sun.star.awt.UnoControlButtonModel" )) { - return OBJ_DLG_PUSHBUTTON; + return SdrObjKind::BasicDialogPushButton; } else if ( supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" )) { - return OBJ_DLG_RADIOBUTTON; + return SdrObjKind::BasicDialogRadioButton; } else if ( supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" )) { - return OBJ_DLG_CHECKBOX; + return SdrObjKind::BasicDialogCheckbox; } else if ( supportsService( "com.sun.star.awt.UnoControlListBoxModel" )) { - return OBJ_DLG_LISTBOX; + return SdrObjKind::BasicDialogListbox; } else if ( supportsService( "com.sun.star.awt.UnoControlComboBoxModel" )) { - return OBJ_DLG_COMBOBOX; + return SdrObjKind::BasicDialogCombobox; } else if ( supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" )) { - return OBJ_DLG_GROUPBOX; + return SdrObjKind::BasicDialogGroupBox; } else if ( supportsService( "com.sun.star.awt.UnoControlEditModel" )) { - return OBJ_DLG_EDIT; + return SdrObjKind::BasicDialogEdit; } else if ( supportsService( "com.sun.star.awt.UnoControlFixedTextModel" )) { - return OBJ_DLG_FIXEDTEXT; + return SdrObjKind::BasicDialogFixedText; } else if ( supportsService( "com.sun.star.awt.UnoControlImageControlModel" )) { - return OBJ_DLG_IMAGECONTROL; + return SdrObjKind::BasicDialogImageControl; } else if ( supportsService( "com.sun.star.awt.UnoControlProgressBarModel" )) { - return OBJ_DLG_PROGRESSBAR; + return SdrObjKind::BasicDialogProgressbar; } else if ( supportsService( "com.sun.star.awt.UnoControlScrollBarModel" )) { - return OBJ_DLG_HSCROLLBAR; + return SdrObjKind::BasicDialogHorizontalScrollbar; } else if ( supportsService( "com.sun.star.awt.UnoControlFixedLineModel" )) { - return OBJ_DLG_HFIXEDLINE; + return SdrObjKind::BasicDialogHorizontalFixedLine; } else if ( supportsService( "com.sun.star.awt.UnoControlDateFieldModel" )) { - return OBJ_DLG_DATEFIELD; + return SdrObjKind::BasicDialogDateField; } else if ( supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" )) { - return OBJ_DLG_TIMEFIELD; + return SdrObjKind::BasicDialogTimeField; } else if ( supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" )) { - return OBJ_DLG_NUMERICFIELD; + return SdrObjKind::BasicDialogNumericField; } else if ( supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" )) { - return OBJ_DLG_CURRENCYFIELD; + return SdrObjKind::BasicDialogCurencyField; } else if ( supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" )) { - return OBJ_DLG_FORMATTEDFIELD; + return SdrObjKind::BasicDialogFormattedField; } else if ( supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" )) { - return OBJ_DLG_PATTERNFIELD; + return SdrObjKind::BasicDialogPatternField; } else if ( supportsService( "com.sun.star.awt.UnoControlFileControlModel" )) { - return OBJ_DLG_FILECONTROL; + return SdrObjKind::BasicDialogFileControl; } else if ( supportsService( "com.sun.star.awt.tree.TreeControlModel" )) { - return OBJ_DLG_TREECONTROL; + return SdrObjKind::BasicDialogTreeControl; } else if ( supportsService( "com.sun.star.awt.grid.UnoControlGridModel" )) { - return OBJ_DLG_GRIDCONTROL; + return SdrObjKind::BasicDialogGridControl; } else if ( supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" )) { - return OBJ_DLG_HYPERLINKCONTROL; + return SdrObjKind::BasicDialogHyperlinkControl; } else { - return OBJ_DLG_CONTROL; + return SdrObjKind::BasicDialogControl; } } diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 27454b66ae70..d88d9c424da5 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -352,7 +352,7 @@ void ChartController::impl_PasteGraphic( if( ! (xGraphic.is() && xModelProp.is())) return; rtl::Reference<SvxGraphicObject> xGraphicShape = new SvxGraphicObject(nullptr); - xGraphicShape->setShapeKind(OBJ_GRAF); + xGraphicShape->setShapeKind(SdrObjKind::Graphic); uno::Reference< drawing::XShapes > xPage = pDrawModelWrapper->getMainDrawPage(); if( xPage.is()) @@ -454,7 +454,7 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons try { rtl::Reference<SvxShapeText> xTextShape = new SvxShapeText(nullptr); - xTextShape->setShapeKind(OBJ_TEXT); + xTextShape->setShapeKind(SdrObjKind::Text); xDrawPage->add( xTextShape ); xTextShape->setString( rString ); @@ -571,7 +571,7 @@ bool ChartController::isShapeContext() const { return m_aSelection.isAdditionalShapeSelected() || ( m_pDrawViewWrapper && m_pDrawViewWrapper->AreObjectsMarked() && - ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) ); + ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::Text ) ); } void ChartController::impl_ClearSelection() diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 92a7f9f16851..76ccba722e54 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -637,7 +637,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) } if ( !pDrawViewWrapper->IsAction() ) { - if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_CAPTION ) + if ( pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::Caption ) { Size aCaptionSize( 2268, 1134 ); pDrawViewWrapper->BegCreateCaptionObj( aMPos, aCaptionSize ); @@ -786,7 +786,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) } if ( pDrawViewWrapper->AreObjectsMarked() ) { - if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) + if ( pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::Text ) { executeDispatch_EditText(); } @@ -1988,33 +1988,33 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) SdrObjKind eKind = m_pDrawViewWrapper->GetCurrentObjIdentifier(); switch ( eKind ) { - case OBJ_LINE: + case SdrObjKind::Line: { ePointerStyle = PointerStyle::DrawLine; } break; - case OBJ_RECT: - case OBJ_CUSTOMSHAPE: + case SdrObjKind::Rectangle: + case SdrObjKind::CustomShape: { ePointerStyle = PointerStyle::DrawRect; } break; - case OBJ_CIRC: + case SdrObjKind::CircleOrEllipse: { ePointerStyle = PointerStyle::DrawEllipse; } break; - case OBJ_FREELINE: + case SdrObjKind::FreehandLine: { ePointerStyle = PointerStyle::DrawPolygon; } break; - case OBJ_TEXT: + case SdrObjKind::Text: { ePointerStyle = PointerStyle::DrawText; } break; - case OBJ_CAPTION: + case SdrObjKind::Caption: { ePointerStyle = PointerStyle::DrawCaption; } diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 06fcf0ac4e57..a20d2ba1a7fb 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -101,7 +101,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj ) DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper(); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); - if ( !(pDrawModelWrapper && pDrawViewWrapper && pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_CUSTOMSHAPE) ) + if ( !(pDrawModelWrapper && pDrawViewWrapper && pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::CustomShape) ) return; bool bAttributesAppliedFromGallery = false; @@ -257,7 +257,7 @@ FeatureState DrawCommandDispatch::getState( const OUString& rCommand ) void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< beans::PropertyValue>& rArgs ) { ChartDrawMode eDrawMode = CHARTDRAW_SELECT; - SdrObjKind eKind = OBJ_NONE; + SdrObjKind eKind = SdrObjKind::NONE; sal_uInt16 nFeatureId = 0; OUString aBaseCommand; @@ -274,45 +274,45 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea case COMMAND_ID_OBJECT_SELECT: { eDrawMode = CHARTDRAW_SELECT; - eKind = OBJ_NONE; + eKind = SdrObjKind::NONE; } break; case COMMAND_ID_DRAW_LINE: case COMMAND_ID_LINE_ARROW_END: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_LINE; + eKind = SdrObjKind::Line; } break; case COMMAND_ID_DRAW_RECT: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_RECT; + eKind = SdrObjKind::Rectangle; } break; case COMMAND_ID_DRAW_ELLIPSE: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_CIRC; + eKind = SdrObjKind::CircleOrEllipse; } break; case COMMAND_ID_DRAW_FREELINE_NOFILL: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_FREELINE; + eKind = SdrObjKind::FreehandLine; } break; case COMMAND_ID_DRAW_TEXT: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_TEXT; + eKind = SdrObjKind::Text; bCreate = true; } break; case COMMAND_ID_DRAW_CAPTION: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_CAPTION; + eKind = SdrObjKind::Caption; } break; case COMMAND_ID_DRAWTBX_CS_BASIC: @@ -323,13 +323,13 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea case COMMAND_ID_DRAWTBX_CS_STAR: { eDrawMode = CHARTDRAW_INSERT; - eKind = OBJ_CUSTOMSHAPE; + eKind = SdrObjKind::CustomShape; } break; default: { eDrawMode = CHARTDRAW_SELECT; - eKind = OBJ_NONE; + eKind = SdrObjKind::NONE; } break; } diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index a85922dfa61d..924e4d9a6690 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -351,7 +351,7 @@ void ShapeController::executeDispatch_TransformDialog() return; SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject(); - if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == OBJ_CAPTION ) + if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == SdrObjKind::Caption ) { // item set for caption SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() ); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 7c3210cd1dc0..98afa8bba4da 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -95,7 +95,7 @@ rtl::Reference<SvxShapeGroupAnyD> ShapeFactory::getOrCreateChartRootShape( // Create a new root shape and set it to the bottom of the page. The root // shape is identified by having the name com.sun.star.chart2.shapes. rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr); - xShapeGroup->setShapeKind(OBJ_GRUP); + xShapeGroup->setShapeKind(SdrObjKind::Group); uno::Reference<drawing::XShape> xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY); xDrawPage->addBottom(xShape); @@ -405,7 +405,7 @@ rtl::Reference<Svx3DExtrudeObject> //create shape rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr); - xShape->setShapeKind(E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Extrusion); xTarget->add(xShape); //set properties @@ -640,7 +640,7 @@ rtl::Reference<Svx3DLatheObject> //create shape rtl::Reference<Svx3DLatheObject> xShape = new Svx3DLatheObject(nullptr); - xShape->setShapeKind(E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Lathe); xTarget->add(xShape); double fWidth = rSize.DirectionX/2.0; //The depth will be corrected within Matrix @@ -870,7 +870,7 @@ rtl::Reference<SvxShapePolyPolygon> //create shape rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); - xShape->setShapeKind(OBJ_PATHFILL); // aka ClosedBezierShape + xShape->setShapeKind(SdrObjKind::PathFill); // aka ClosedBezierShape xTarget->add(xShape); //need to add the shape before setting of properties //set properties @@ -917,7 +917,7 @@ rtl::Reference<Svx3DExtrudeObject> //create shape rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr); - xShape->setShapeKind(E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Extrusion); xTarget->add(xShape); //need to add the shape before setting of properties //set properties @@ -987,7 +987,7 @@ rtl::Reference<Svx3DPolygonObject> //create shape rtl::Reference<Svx3DPolygonObject> xShape = new Svx3DPolygonObject(nullptr); - xShape->setShapeKind(E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Polygon); xTarget->add(xShape); //set properties @@ -1041,7 +1041,7 @@ rtl::Reference<Svx3DExtrudeObject> //create shape rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr); - xShape->setShapeKind(E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Extrusion); xTarget->add(xShape); //set properties @@ -1090,7 +1090,7 @@ SdrPathObj* return nullptr; //create shape - SdrPathObj* pPath = new SdrPathObj(xTarget->GetSdrObject()->getSdrModelFromSdrObject(), OBJ_POLY); + SdrPathObj* pPath = new SdrPathObj(xTarget->GetSdrObject()->getSdrModelFromSdrObject(), SdrObjKind::Polygon); if (bSetZOrderToZero) // insert at ZOrder 0, an area should always be behind other shapes xTarget->GetSdrObject()->GetSubList()->InsertObject(pPath, 0); @@ -1628,7 +1628,7 @@ rtl::Reference<SvxShapePolyPolygon> //create shape rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); - xShape->setShapeKind(OBJ_POLY); + xShape->setShapeKind(SdrObjKind::Polygon); xTarget->add(uno::Reference<drawing::XShape>(xShape)); //set properties @@ -1671,7 +1671,7 @@ rtl::Reference<SvxGraphicObject> //create shape rtl::Reference<SvxGraphicObject> xShape = new SvxGraphicObject(nullptr); - xShape->setShapeKind(OBJ_GRAF); + xShape->setShapeKind(SdrObjKind::Graphic); xTarget->add(xShape); try @@ -1709,7 +1709,7 @@ rtl::Reference< SvxShapeGroup > { //create and add to target rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr); - xShapeGroup->setShapeKind(OBJ_GRUP); + xShapeGroup->setShapeKind(SdrObjKind::Group); uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW); xTarget->add(xShape); @@ -1741,7 +1741,7 @@ rtl::Reference< SvxShapeGroup > { //create and add to target rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr); - xShapeGroup->setShapeKind(OBJ_GRUP); + xShapeGroup->setShapeKind(SdrObjKind::Group); uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW); xTarget->add(xShape); @@ -1773,7 +1773,7 @@ rtl::Reference<Svx3DSceneObject> { //create shape rtl::Reference<Svx3DSceneObject> xShape = new Svx3DSceneObject(nullptr, nullptr); - xShape->setShapeKind(E3D_SCENE_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Scene); xTarget->add(xShape); //it is necessary to set the transform matrix to initialize the scene properly @@ -1815,7 +1815,7 @@ rtl::Reference<SvxShapeCircle> //create shape rtl::Reference<SvxShapeCircle> xShape = new SvxShapeCircle(nullptr); - xShape->setShapeKind(OBJ_CIRC); + xShape->setShapeKind(SdrObjKind::CircleOrEllipse); xTarget->add(xShape); try @@ -1850,7 +1850,7 @@ rtl::Reference<SvxShapeCircle> , const awt::Point& rPosition ) { rtl::Reference<SvxShapeCircle> xShape = new SvxShapeCircle(nullptr); - xShape->setShapeKind(OBJ_CIRC); + xShape->setShapeKind(SdrObjKind::CircleOrEllipse); xTarget->add(xShape); xShape->setSize( rSize ); xShape->setPosition( rPosition ); @@ -1871,7 +1871,7 @@ rtl::Reference<Svx3DPolygonObject> //create shape rtl::Reference<Svx3DPolygonObject> xShape = new Svx3DPolygonObject(nullptr); - xShape->setShapeKind(E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG); + xShape->setShapeKind(SdrObjKind::E3D_Polygon); xTarget->add(xShape); //set properties @@ -1940,7 +1940,7 @@ rtl::Reference<SvxShapePolyPolygon> //create shape rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); - xShape->setShapeKind(OBJ_PLIN); + xShape->setShapeKind(SdrObjKind::PolyLine); xTarget->add(xShape); //set properties @@ -1996,7 +1996,7 @@ rtl::Reference<SvxShapePolyPolygon> { //create shape rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); - xShape->setShapeKind(OBJ_LINE); + xShape->setShapeKind(SdrObjKind::Line); xTarget->add(xShape); xShape->setSize( rSize ); xShape->setPosition( rPosition ); @@ -2014,7 +2014,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createInvisibleRectangle( return nullptr; rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr); - xShape->setShapeKind(OBJ_RECT); + xShape->setShapeKind(SdrObjKind::Rectangle); xTarget->add( xShape ); ShapeFactory::makeShapeInvisible( xShape ); xShape->setSize( rSize ); @@ -2036,7 +2036,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createRectangle( StackPosition ePos ) { rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr); - xShape->setShapeKind(OBJ_RECT); + xShape->setShapeKind(SdrObjKind::Rectangle); if (ePos == StackPosition::Bottom) { uno::Reference<drawing::XShapes2> xTarget2(static_cast<cppu::OWeakObject*>(xTarget.get()), uno::UNO_QUERY); @@ -2058,7 +2058,7 @@ rtl::Reference<SvxShapeRect> const rtl::Reference<SvxShapeGroupAnyD>& xTarget ) { rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr); - xShape->setShapeKind(OBJ_RECT); + xShape->setShapeKind(SdrObjKind::Rectangle); xTarget->add( xShape ); return xShape; @@ -2079,7 +2079,7 @@ rtl::Reference<SvxShapeText> //create shape and add to page rtl::Reference<SvxShapeText> xShape = new SvxShapeText(nullptr); - xShape->setShapeKind(OBJ_TEXT); + xShape->setShapeKind(SdrObjKind::Text); xTarget->add(xShape); //set text @@ -2134,7 +2134,7 @@ rtl::Reference<SvxShapeText> //create shape and add to page rtl::Reference<SvxShapeText> xShape = new SvxShapeText(nullptr); - xShape->setShapeKind(OBJ_TEXT); + xShape->setShapeKind(SdrObjKind::Text); xTarget->add(xShape); //set paragraph properties @@ -2201,7 +2201,7 @@ rtl::Reference<SvxShapeText> { //create shape and add to page rtl::Reference<SvxShapeText> xShape = new SvxShapeText(nullptr); - xShape->setShapeKind(OBJ_TEXT); + xShape->setShapeKind(SdrObjKind::Text); try { xTarget->add(xShape); diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx index c53b4dc75282..c2aebd913b88 100644 --- a/chart2/source/view/main/VButton.cxx +++ b/chart2/source/view/main/VButton.cxx @@ -43,7 +43,7 @@ void VButton::init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage) rtl::Reference<SvxShapePolyPolygon> VButton::createTriangle(awt::Size aSize) { rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr); - xShape->setShapeKind(OBJ_POLY); + xShape->setShapeKind(SdrObjKind::Polygon); drawing::PolyPolygonShape3D aPolyPolygon; aPolyPolygon.SequenceX.realloc(1); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 8bd464a799ee..fe1d46a4d0c8 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -1866,7 +1866,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); if( ( pObj->GetObjInventor() == SdrInventor::Default ) && - ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) && + ( eKind==SdrObjKind::Text || eKind==SdrObjKind::TitleText || eKind==SdrObjKind::OutlineText) && pObj->HasText() ) { OSL_FAIL("AutoWidth/AutoHeight should be enabled"); diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index f4e0a1268013..1cf54885047d 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -50,12 +50,12 @@ SvxLineTabDialog::SvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAtt { switch( pObj->GetObjIdentifier() ) { - case OBJ_LINE: - case OBJ_PLIN: - case OBJ_PATHLINE: - case OBJ_FREELINE: - case OBJ_MEASURE: - case OBJ_EDGE: + case SdrObjKind::Line: + case SdrObjKind::PolyLine: + case SdrObjKind::PathLine: + case SdrObjKind::FreehandLine: + case SdrObjKind::Measure: + case SdrObjKind::Edge: bLineOnly = true; break; diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 95d3463a1607..e086969bbbd1 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -58,7 +58,7 @@ void SvxTextTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage) if (rId != "RID_SVXPAGE_TEXTATTR") return; - SdrObjKind eKind = OBJ_NONE; + SdrObjKind eKind = SdrObjKind::NONE; if (pView) { const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index a936e227622a..0f4a33bba4fa 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -49,7 +49,7 @@ const WhichRangesContainer SvxTextAttrPage::pRanges( SvxTextAttrPage::SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) : SvxTabPage(pPage, pController, "cui/ui/textattrtabpage.ui", "TextAttributesPage", rInAttrs) , rOutAttrs(rInAttrs) - , m_eObjKind(OBJ_NONE) + , m_eObjKind(SdrObjKind::NONE) , bAutoGrowSizeEnabled(false) , bContourEnabled(false) , bAutoGrowWidthEnabled(false) @@ -431,17 +431,17 @@ void SvxTextAttrPage::Construct() { switch (m_eObjKind) { - case OBJ_NONE: + case SdrObjKind::NONE: // indeterminate, show them all bFitToSizeEnabled = bContourEnabled = bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true; m_xCustomShapeText->show(); m_xDrawingText->show(); break; - case OBJ_TEXT: - case OBJ_TITLETEXT: - case OBJ_OUTLINETEXT: - case OBJ_CAPTION: + case SdrObjKind::Text: + case SdrObjKind::TitleText: + case SdrObjKind::OutlineText: + case SdrObjKind::Caption: // contour NOT possible for pure text objects bContourEnabled = bWordWrapTextEnabled = bAutoGrowSizeEnabled = false; @@ -450,7 +450,7 @@ void SvxTextAttrPage::Construct() m_xCustomShapeText->hide(); m_xDrawingText->show(); break; - case OBJ_CUSTOMSHAPE: + case SdrObjKind::CustomShape: bFitToSizeEnabled = bContourEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false; bWordWrapTextEnabled = bAutoGrowSizeEnabled = true; m_xDrawingText->hide(); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 2aa7ec09539c..61b858dc15b3 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -846,7 +846,7 @@ void SvxPositionSizeTabPage::Construct() const SdrObjKind eKind(pObj->GetObjIdentifier()); if((pObj->GetObjInventor() == SdrInventor::Default) && - (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && + (SdrObjKind::Text == eKind || SdrObjKind::TitleText == eKind || SdrObjKind::OutlineText == eKind) && pObj->HasText()) { mbAdjustDisabled = false; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 823868ae2dfe..8832617a4e58 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -481,16 +481,16 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) if( nInventor == SdrInventor::Default ) { bool bValidGluePoint = false; - sal_uInt32 nObjId = pO->GetObjIdentifier(); + SdrObjKind nObjId = pO->GetObjIdentifier(); switch( nObjId ) { - case OBJ_GRUP : - case OBJ_GRAF : - case OBJ_RECT : - case OBJ_TEXT : - case OBJ_PAGE : - case OBJ_TITLETEXT : - case OBJ_OUTLINETEXT : + case SdrObjKind::Group : + case SdrObjKind::Graphic : + case SdrObjKind::Rectangle : + case SdrObjKind::Text : + case SdrObjKind::Page : + case SdrObjKind::TitleText : + case SdrObjKind::OutlineText : { if ( nC & 1 ) { @@ -521,17 +521,17 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) bValidGluePoint = true; } break; - case OBJ_POLY : - case OBJ_PLIN : - case OBJ_LINE : - case OBJ_PATHLINE : - case OBJ_PATHFILL : - case OBJ_FREELINE : - case OBJ_FREEFILL : - case OBJ_SPLNLINE : - case OBJ_SPLNFILL : - case OBJ_PATHPOLY : - case OBJ_PATHPLIN : + case SdrObjKind::Polygon : + case SdrObjKind::PolyLine : + case SdrObjKind::Line : + case SdrObjKind::PathLine : + case SdrObjKind::PathFill : + case SdrObjKind::FreehandLine : + case SdrObjKind::FreehandFill : + case SdrObjKind::SplineLine : + case SdrObjKind::SplineFill : + case SdrObjKind::PathPoly : + case SdrObjKind::PathPolyLine : { if (pList) { @@ -597,7 +597,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) } break; - case OBJ_CUSTOMSHAPE : + case SdrObjKind::CustomShape : { const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) ); @@ -748,6 +748,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) } } break; + default: ; } if ( bValidGluePoint ) { @@ -4340,7 +4341,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); pRet = new SdrPathObj( *pSdrModel, - OBJ_LINE, + SdrObjKind::Line, basegfx::B2DPolyPolygon(aPoly)); ApplyAttributes( rSt, aSet, aObjData ); pRet->SetMergedItemSet(aSet); @@ -5293,7 +5294,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, pTextObj = new SdrRectObj( *pSdrModel, - OBJ_TEXT, + SdrObjKind::Text, rTextRect); pTextImpRec = new SvxMSDffImportRec(*pImpRec); bDeleteTextImpRec = true; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 9828b287bda5..9ab29d66458f 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -987,18 +987,18 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx nMinFrameHeight = rTextRect.GetHeight() - ( nTextTop + nTextBottom ); } - SdrObjKind eTextKind = OBJ_RECT; + SdrObjKind eTextKind = SdrObjKind::Rectangle; if ( ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::NOTESSLIDEIMAGE ) || ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::MASTERNOTESSLIDEIMAGE ) ) { aTextObj.SetInstance( TSS_Type::Notes ); - eTextKind = OBJ_TITLETEXT; + eTextKind = SdrObjKind::TitleText; } else if ( ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::MASTERNOTESBODYIMAGE ) || ( aPlaceholderAtom.nPlaceholderId == PptPlaceholder::NOTESBODY ) ) { aTextObj.SetInstance( TSS_Type::Notes ); - eTextKind = OBJ_TEXT; + eTextKind = SdrObjKind::Text; } TSS_Type nDestinationInstance = aTextObj.GetInstance(); @@ -1036,11 +1036,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx switch ( aTextObj.GetInstance() ) { case TSS_Type::PageTitle : - case TSS_Type::Title : eTextKind = OBJ_TITLETEXT; break; - case TSS_Type::Subtitle : eTextKind = OBJ_TEXT; break; + case TSS_Type::Title : eTextKind = SdrObjKind::TitleText; break; + case TSS_Type::Subtitle : eTextKind = SdrObjKind::Text; break; case TSS_Type::Body : case TSS_Type::HalfBody : - case TSS_Type::QuarterBody : eTextKind = OBJ_OUTLINETEXT; bAutoFit = true; break; + case TSS_Type::QuarterBody : eTextKind = SdrObjKind::OutlineText; bAutoFit = true; break; default: break; } if ( aTextObj.GetDestinationInstance() != TSS_Type::TextInShape ) @@ -1048,14 +1048,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx if ( !aTextObj.GetOEPlaceHolderAtom() || aTextObj.GetOEPlaceHolderAtom()->nPlaceholderId == PptPlaceholder::NONE ) { aTextObj.SetDestinationInstance( TSS_Type::TextInShape ); - eTextKind = OBJ_RECT; + eTextKind = SdrObjKind::Rectangle; } } SdrObject* pTObj = nullptr; bool bWordWrap = GetPropertyValue(DFF_Prop_WrapText, mso_wrapSquare) != mso_wrapNone; bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0; - if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) ) + if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == SdrObjKind::Rectangle ) ) { bAutoGrowHeight = bFitShapeToText; bAutoGrowWidth = !bWordWrap; @@ -1071,7 +1071,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx } pTObj = new SdrRectObj( *pSdrModel, - eTextKind != OBJ_RECT ? eTextKind : OBJ_TEXT); + eTextKind != SdrObjKind::Rectangle ? eTextKind : SdrObjKind::Text); SfxItemSet aSet( pSdrModel->GetItemPool() ); if ( !pRet ) ApplyAttributes( rSt, aSet, rObjData ); @@ -2258,7 +2258,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* bool bUndoEnabled = rOutliner.IsUndoEnabled(); rOutliner.EnableUndo(false); - if ( ( pText->GetObjInventor() == SdrInventor::Default ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL) + if ( ( pText->GetObjInventor() == SdrInventor::Default ) && ( pText->GetObjIdentifier() == SdrObjKind::TitleText ) ) // Outliner-Style for Title-Text object?!? (->of DL) rOutliner.Init( OutlinerMode::TitleObject ); // Outliner reset bool bOldUpdateMode = rOutliner.SetUpdateLayout( false ); diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index e7ac958d7564..581d5586a78b 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -537,7 +537,7 @@ protected: ) const; /** Prevent that (rounded) rectangles with wrapped text will always be - converted into SdrRectObj( OBJ_TEXT ). + converted into SdrRectObj( SdrObjKind::Text ). @return true means "conversion". */ diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx index 869023f06f7f..10f52d474977 100644 --- a/include/svx/fmtools.hxx +++ b/include/svx/fmtools.hxx @@ -43,7 +43,7 @@ namespace com::sun::star::sdbc { class SQLException; } namespace com::sun::star::sdbc { class XRowSet; } namespace com::sun::star::sdb { class SQLContext; } namespace com::sun::star::sdb { struct SQLErrorEvent; } - +enum class SdrObjKind : sal_uInt16; // common types @@ -160,7 +160,7 @@ public: void dispose(); }; -sal_Int16 getControlTypeByObject(const css::uno::Reference< css::lang::XServiceInfo>& _rxObject); +SdrObjKind getControlTypeByObject(const css::uno::Reference< css::lang::XServiceInfo>& _rxObject); // get the object type (OBJ_FM_...) from the services the object supports diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx b/include/svx/sidebar/SelectionAnalyzer.hxx index a7b8cba99d4c..349db88513b5 100644 --- a/include/svx/sidebar/SelectionAnalyzer.hxx +++ b/include/svx/sidebar/SelectionAnalyzer.hxx @@ -25,6 +25,7 @@ class SdrMarkList; class SdrObject; enum class SdrInventor : sal_uInt32; +enum class SdrObjKind : sal_uInt16; namespace svx::sidebar { @@ -52,20 +53,20 @@ public: private: static vcl::EnumContext::Context GetContextForObjectId_SC ( - const sal_uInt16 nObjectId); + const SdrObjKind nObjectId); static vcl::EnumContext::Context GetContextForObjectId_SD ( - const sal_uInt16 nObjectId, + const SdrObjKind nObjectId, const ViewType eViewType); static SdrInventor GetInventorTypeFromMark ( const SdrMarkList& rMarkList); - static sal_uInt16 GetObjectTypeFromMark ( + static SdrObjKind GetObjectTypeFromMark ( const SdrMarkList& rMarkList); - static sal_uInt16 GetObjectTypeFromGroup ( + static SdrObjKind GetObjectTypeFromGroup ( const SdrObject* pObj); static bool IsShapeType ( - const sal_uInt16 nType); + const SdrObjKind nType); static bool IsTextObjType ( - const sal_uInt16 nType); + const SdrObjKind nType); }; } // end of namespace svx::sidebar diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index ed8f0c08939a..cbdecfea5298 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -298,7 +298,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( SdrInventor nObjectInventor, sal_uInt16 nObjectIdentifier ); + static bool SupportsFormatPaintbrush( SdrInventor nObjectInventor, SdrObjKind nObjectIdentifier ); /** returns a format paint brush set from the current selection */ void TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ); diff --git a/include/svx/svdobjkind.hxx b/include/svx/svdobjkind.hxx index 827b35e3b339..187fd0d6ffb5 100644 --- a/include/svx/svdobjkind.hxx +++ b/include/svx/svdobjkind.hxx @@ -21,127 +21,134 @@ #include <com/sun/star/form/FormComponentType.hpp> -enum SdrObjKind +enum class SdrObjKind : sal_uInt16 { - OBJ_NONE = 0, /// abstract object (SdrObject) - OBJ_GRUP = 1, /// object group - OBJ_LINE = 2, /// line - OBJ_RECT = 3, /// rectangle (round corners optional) - OBJ_CIRC = 4, /// circle, ellipse - OBJ_SECT = 5, /// circle section - OBJ_CARC = 6, /// circle arc - OBJ_CCUT = 7, /// circle cut - OBJ_POLY = 8, /// polygon, PolyPolygon - OBJ_PLIN = 9, /// PolyLine - OBJ_PATHLINE = 10, /// open Bezier-curve - OBJ_PATHFILL = 11, /// closed Bezier-curve - OBJ_FREELINE = 12, /// open free-hand line - OBJ_FREEFILL = 13, /// closed free-hand line - OBJ_SPLNLINE = 14, /// natural cubic Spline (ni) - OBJ_SPLNFILL = 15, /// periodic cubic Spline (ni) - OBJ_TEXT = 16, /// text object - OBJ_TITLETEXT = 20, /// TitleText, special text object for StarDraw - OBJ_OUTLINETEXT = 21, /// OutlineText, special text object for StarDraw - OBJ_GRAF = 22, /// foreign graphic (StarView Graphic) - OBJ_OLE2 = 23, /// OLE object - OBJ_EDGE = 24, /// connector object - OBJ_CAPTION = 25, /// caption object - OBJ_PATHPOLY = 26, /// Polygon/PolyPolygon represented by SdrPathObj - OBJ_PATHPLIN = 27, /// Polyline represented by SdrPathObj - OBJ_PAGE = 28, /// object that represents a SdrPage - OBJ_MEASURE = 29, /// measurement object - OBJ_FRAME = 31, /// continuously activated OLE (PlugIn-Frame or similar) - OBJ_UNO = 32, /// Universal Network Object packed into SvDraw object - OBJ_CUSTOMSHAPE = 33, /// custom shape - OBJ_MEDIA = 34, /// media shape - OBJ_TABLE = 35, /// table + NONE = 0, /// abstract object (SdrObject) + Group = 1, /// object group + Line = 2, /// line + Rectangle = 3, /// rectangle (round corners optional) + CircleOrEllipse = 4, /// circle, ellipse + CircleSection = 5, /// circle section + CircleArc = 6, /// circle arc + CircleCut = 7, /// circle cut + Polygon = 8, /// polygon, PolyPolygon + PolyLine = 9, /// PolyLine + PathLine = 10, /// open Bezier-curve + PathFill = 11, /// closed Bezier-curve + FreehandLine = 12, /// open free-hand line + FreehandFill = 13, /// closed free-hand line + SplineLine = 14, /// natural cubic Spline (ni) + SplineFill = 15, /// periodic cubic Spline (ni) + Text = 16, /// text object + TitleText = 20, /// TitleText, special text object for StarDraw + OutlineText = 21, /// OutlineText, special text object for StarDraw + Graphic = 22, /// foreign graphic (StarView Graphic) + OLE2 = 23, /// OLE object + Edge = 24, /// connector object + Caption = 25, /// caption object + PathPoly = 26, /// Polygon/PolyPolygon represented by SdrPathObj + PathPolyLine = 27, /// Polyline represented by SdrPathObj + Page = 28, /// object that represents a SdrPage + Measure = 29, /// measurement object + OLEPluginFrame = 31, /// continuously activated OLE (PlugIn-Frame or similar) + UNO = 32, /// Universal Network Object packed into SvDraw object + CustomShape = 33, /// custom shape + Media = 34, /// media shape + Table = 35, /// table - OBJ_OLE2_APPLET = 100, - OBJ_OLE2_PLUGIN = 101, + OLE2Applet = 100, + OLE2Plugin = 101, // engine3d, arbitrarily place at 200 - E3D_SCENE_ID = 202, + E3D_Scene = 202, // E3D_OBJECT_ID should not be used, it's only a helper class for E3DScene and E3DCompoundObject - E3D_OBJECT_ID = 203, - E3D_CUBEOBJ_ID = 204, - E3D_SPHEREOBJ_ID = 205, - E3D_EXTRUDEOBJ_ID = 206, - E3D_LATHEOBJ_ID = 207, - E3D_COMPOUNDOBJ_ID = 208, - E3D_POLYGONOBJ_ID = 209, + E3D_Object = 203, + E3D_Cube = 204, + E3D_Sphere = 205, + E3D_Extrusion = 206, + E3D_Lathe = 207, + E3D_CompoundObject = 208, + E3D_Polygon = 209, + E3D_INVENTOR_FIRST = E3D_Scene, + E3D_INVENTOR_LAST = E3D_Polygon, // for form components, arbitrarily place at 300 - OBJ_FM_CONTROL = 300 + css::form::FormComponentType::CONTROL, - OBJ_FM_EDIT = 300 + css::form::FormComponentType::TEXTFIELD, - OBJ_FM_BUTTON = 300 + css::form::FormComponentType::COMMANDBUTTON, - OBJ_FM_FIXEDTEXT = 300 + css::form::FormComponentType::FIXEDTEXT, - OBJ_FM_LISTBOX = 300 + css::form::FormComponentType::LISTBOX, - OBJ_FM_CHECKBOX = 300 + css::form::FormComponentType::CHECKBOX, - OBJ_FM_COMBOBOX = 300 + css::form::FormComponentType::COMBOBOX, - OBJ_FM_RADIOBUTTON = 300 + css::form::FormComponentType::RADIOBUTTON, - OBJ_FM_GROUPBOX = 300 + css::form::FormComponentType::GROUPBOX, - OBJ_FM_GRID = 300 + css::form::FormComponentType::GRIDCONTROL, - OBJ_FM_IMAGEBUTTON = 300 + css::form::FormComponentType::IMAGEBUTTON, - OBJ_FM_FILECONTROL = 300 + css::form::FormComponentType::FILECONTROL, - OBJ_FM_DATEFIELD = 300 + css::form::FormComponentType::DATEFIELD, - OBJ_FM_TIMEFIELD = 300 + css::form::FormComponentType::TIMEFIELD, - OBJ_FM_NUMERICFIELD = 300 + css::form::FormComponentType::NUMERICFIELD, - OBJ_FM_CURRENCYFIELD = 300 + css::form::FormComponentType::CURRENCYFIELD, - OBJ_FM_PATTERNFIELD = 300 + css::form::FormComponentType::PATTERNFIELD, - OBJ_FM_HIDDEN = 300 + css::form::FormComponentType::HIDDENCONTROL, - OBJ_FM_IMAGECONTROL = 300 + css::form::FormComponentType::IMAGECONTROL, - OBJ_FM_FORMATTEDFIELD = 300 + css::form::FormComponentType::PATTERNFIELD + 1, - OBJ_FM_SCROLLBAR = 300 + css::form::FormComponentType::PATTERNFIELD + 2, - OBJ_FM_SPINBUTTON = 300 + css::form::FormComponentType::PATTERNFIELD + 3, - OBJ_FM_NAVIGATIONBAR = 300 + css::form::FormComponentType::PATTERNFIELD + 4, + FormControl = 300 + css::form::FormComponentType::CONTROL, + FormEdit = 300 + css::form::FormComponentType::TEXTFIELD, + FormButton = 300 + css::form::FormComponentType::COMMANDBUTTON, + FormFixedText = 300 + css::form::FormComponentType::FIXEDTEXT, + FormListbox = 300 + css::form::FormComponentType::LISTBOX, + FormCheckbox = 300 + css::form::FormComponentType::CHECKBOX, + FormCombobox = 300 + css::form::FormComponentType::COMBOBOX, + FormRadioButton = 300 + css::form::FormComponentType::RADIOBUTTON, + FormGroupBox = 300 + css::form::FormComponentType::GROUPBOX, + FormGrid = 300 + css::form::FormComponentType::GRIDCONTROL, + FormImageButton = 300 + css::form::FormComponentType::IMAGEBUTTON, + FormFileControl = 300 + css::form::FormComponentType::FILECONTROL, + FormDateField = 300 + css::form::FormComponentType::DATEFIELD, + FormTimeField = 300 + css::form::FormComponentType::TIMEFIELD, + FormNumericField = 300 + css::form::FormComponentType::NUMERICFIELD, + FormCurrencyField = 300 + css::form::FormComponentType::CURRENCYFIELD, + FormPatternField = 300 + css::form::FormComponentType::PATTERNFIELD, + FormHidden = 300 + css::form::FormComponentType::HIDDENCONTROL, + FormImageControl = 300 + css::form::FormComponentType::IMAGECONTROL, + FormFormattedField = 300 + css::form::FormComponentType::PATTERNFIELD + 1, + FormScrollbar = 300 + css::form::FormComponentType::PATTERNFIELD + 2, + FormSpinButton = 300 + css::form::FormComponentType::PATTERNFIELD + 3, + FormNavigationBar = 300 + css::form::FormComponentType::PATTERNFIELD + 4, // basctl, arbitrarily place at 400 - OBJ_DLG_CONTROL = 401, - OBJ_DLG_DIALOG = 402, - OBJ_DLG_PUSHBUTTON = 403, - OBJ_DLG_RADIOBUTTON = 404, - OBJ_DLG_CHECKBOX = 405, - OBJ_DLG_LISTBOX = 406, - OBJ_DLG_COMBOBOX = 407, - OBJ_DLG_GROUPBOX = 408, - OBJ_DLG_EDIT = 409, - OBJ_DLG_FIXEDTEXT = 410, - OBJ_DLG_IMAGECONTROL = 411, - OBJ_DLG_PROGRESSBAR = 412, - OBJ_DLG_HSCROLLBAR = 413, - OBJ_DLG_VSCROLLBAR = 414, - OBJ_DLG_HFIXEDLINE = 415, - OBJ_DLG_VFIXEDLINE = 416, - OBJ_DLG_DATEFIELD = 417, - OBJ_DLG_TIMEFIELD = 418, - OBJ_DLG_NUMERICFIELD = 419, - OBJ_DLG_CURRENCYFIELD = 420, - OBJ_DLG_FORMATTEDFIELD = 421, - OBJ_DLG_PATTERNFIELD = 422, - OBJ_DLG_FILECONTROL = 423, - OBJ_DLG_TREECONTROL = 424, - OBJ_DLG_SPINBUTTON = 425, - OBJ_DLG_GRIDCONTROL = 426, - OBJ_DLG_HYPERLINKCONTROL = 427, + BasicDialogControl = 401, + BasicDialogDialog = 402, + BasicDialogPushButton = 403, + BasicDialogRadioButton = 404, + BasicDialogCheckbox = 405, + BasicDialogListbox = 406, + BasicDialogCombobox = 407, + BasicDialogGroupBox = 408, + BasicDialogEdit = 409, + BasicDialogFixedText = 410, + BasicDialogImageControl = 411, + BasicDialogProgressbar = 412, + BasicDialogHorizontalScrollbar = 413, + BasicDialogVerticalScrollbar = 414, + BasicDialogHorizontalFixedLine = 415, + BasicDialogVerticalFixedLine = 416, + BasicDialogDateField = 417, + BasicDialogTimeField = 418, + BasicDialogNumericField = 419, + BasicDialogCurencyField = 420, + BasicDialogFormattedField = 421, + BasicDialogPatternField = 422, + BasicDialogFileControl = 423, + BasicDialogTreeControl = 424, + BasicDialogSpinButton = 425, + BasicDialogGridControl = 426, + BasicDialogHyperlinkControl = 427, - OBJ_DLG_FORMRADIO = 428, - OBJ_DLG_FORMCHECK = 429, - OBJ_DLG_FORMLIST = 430, - OBJ_DLG_FORMCOMBO = 431, - OBJ_DLG_FORMSPIN = 432, - OBJ_DLG_FORMVSCROLL = 433, - OBJ_DLG_FORMHSCROLL = 434, + BasicDialogFormRadio = 428, + BasicDialogFormCheck = 429, + BasicDialogFormList = 430, + BasicDialogFormCombo = 431, + BasicDialogFormSpin = 432, + BasicDialogFormVerticalScroll = 433, + BasicDialogFormHorizontalScroll = 434, // reportdesign, arbitrarily place at 500 - OBJ_RD_FIXEDTEXT = 501, - OBJ_RD_IMAGECONTROL = 502, - OBJ_RD_FORMATTEDFIELD = 503, - OBJ_RD_HFIXEDLINE = 504, - OBJ_RD_VFIXEDLINE = 505, - OBJ_RD_SUBREPORT = 506, + ReportDesignFixedText = 501, + ReportDesignImageControl = 502, + ReportDesignFormattedField = 503, + ReportDesignHorizontalFixedLine = 504, + ReportDesignVerticalFixedLine = 505, + ReportDesignSubReport = 506, // writer, arbitrarily place at 600 SwFlyDrawObjIdentifier = 601 }; +inline constexpr bool IsInventorE3D(SdrObjKind e) +{ + return e >= SdrObjKind::E3D_INVENTOR_FIRST && e <= SdrObjKind::E3D_INVENTOR_LAST; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index fc7280670c97..dd854468bb3f 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -143,10 +143,10 @@ public: void NbcSetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly); // special functions for Bezier-polygon handling - bool IsClosed() const { return meKind==OBJ_POLY || meKind==OBJ_PATHPOLY || meKind==OBJ_PATHFILL || meKind==OBJ_FREEFILL || meKind==OBJ_SPLNFILL; } - bool IsLine() const { return meKind==OBJ_PLIN || meKind==OBJ_PATHPLIN || meKind==OBJ_PATHLINE || meKind==OBJ_FREELINE || meKind==OBJ_SPLNLINE || meKind==OBJ_LINE; } - bool IsBezier() const { return meKind==OBJ_PATHLINE || meKind==OBJ_PATHFILL; } - bool IsSpline() const { return meKind==OBJ_SPLNLINE || meKind==OBJ_SPLNFILL; } + bool IsClosed() const { return meKind==SdrObjKind::Polygon || meKind==SdrObjKind::PathPoly || meKind==SdrObjKind::PathFill || meKind==SdrObjKind::FreehandFill || meKind==SdrObjKind::SplineFill; } + bool IsLine() const { return meKind==SdrObjKind::PolyLine || meKind==SdrObjKind::PathPolyLine || meKind==SdrObjKind::PathLine || meKind==SdrObjKind::FreehandLine || meKind==SdrObjKind::SplineLine || meKind==SdrObjKind::Line; } + bool IsBezier() const { return meKind==SdrObjKind::PathLine || meKind==SdrObjKind::PathFill; } + bool IsSpline() const { return meKind==SdrObjKind::SplineLine || meKind==SdrObjKind::SplineFill; } // close/open path // if opening, move end point by "nOpenDistance" diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index d192552d16ad..03c828db7493 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -184,9 +184,9 @@ protected: SdrOutliner* mpEditingOutliner; // Possible values for eTextKind are: - // OBJ_TEXT regular text frame - // OBJ_TITLETEXT TitleText for presentations - // OBJ_OUTLINETEXT OutlineText for presentations + // SdrObjKind::Text regular text frame + // SdrObjKind::TitleText TitleText for presentations + // SdrObjKind::OutlineText OutlineText for presentations // eTextKind only has meaning when bTextFrame=sal_True, since otherwise // we're dealing with a labeled graphical object SdrObjKind meTextKind; @@ -332,7 +332,7 @@ public: virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true); virtual bool AdjustTextFrameWidthAndHeight(); bool IsTextFrame() const { return mbTextFrame; } - bool IsOutlText() const { return mbTextFrame && (meTextKind==OBJ_OUTLINETEXT || meTextKind==OBJ_TITLETEXT); } + bool IsOutlText() const { return mbTextFrame && (meTextKind==SdrObjKind::OutlineText || meTextKind==SdrObjKind::TitleText); } /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false! bool IsAutoFit() const; /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false! diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx index 3c9e04d46af1..3107a483579d 100644 --- a/include/svx/unoapi.hxx +++ b/include/svx/unoapi.hxx @@ -34,6 +34,7 @@ class SdrPage; class SvxNumBulletItem; class SfxItemPool; enum class SdrInventor : sal_uInt32; +enum class SdrObjKind : sal_uInt16; /** * Creates a StarOffice API wrapper with the given type and inventor @@ -41,7 +42,7 @@ enum class SdrInventor : sal_uInt32; * * @throws css::uno::RuntimeException */ -SVXCORE_DLLPUBLIC rtl::Reference<SvxShape> CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer); +SVXCORE_DLLPUBLIC rtl::Reference<SvxShape> CreateSvxShapeByTypeAndInventor(SdrObjKind nType, SdrInventor nInventor, OUString const & referer); /** Returns a StarOffice API wrapper for the given SdrObject */ SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) noexcept; diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx index 4b00244a7b17..e69eb7ec8995 100644 --- a/include/svx/unopage.hxx +++ b/include/svx/unopage.hxx @@ -88,7 +88,7 @@ class SVXCORE_DLLPUBLIC SvxDrawPage : protected cppu::BaseMutex, virtual SdrObject *CreateSdrObject_( const css::uno::Reference< css::drawing::XShape >& xShape ); /// @throws css::uno::RuntimeException - static rtl::Reference<SvxShape> CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage = nullptr, OUString const & referer = OUString() ); + static rtl::Reference<SvxShape> CreateShapeByTypeAndInventor( SdrObjKind nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage = nullptr, OUString const & referer = OUString() ); // 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/include/svx/unoprov.hxx b/include/svx/unoprov.hxx index 0b03c7732bbc..f7ee83979f0d 100644 --- a/include/svx/unoprov.hxx +++ b/include/svx/unoprov.hxx @@ -27,22 +27,21 @@ #include <editeng/unoipset.hxx> #include <rtl/ref.hxx> #include <memory> - +#include <optional> class SvxItemPropertySet; class SfxItemPool; +enum class SdrObjKind : sal_uInt16; /** * class UHashMap */ - -#define UHASHMAP_NOTFOUND sal::static_int_cast< sal_uInt32 >(~0) class UHashMap { UHashMap() = delete; public: - static sal_uInt32 getId( const OUString& rCompareString ); - static OUString getNameFromId (sal_uInt32 nId); + static std::optional<SdrObjKind> getId( const OUString& rCompareString ); + static OUString getNameFromId (SdrObjKind nId); static css::uno::Sequence< OUString > getServiceNames(); }; @@ -92,12 +91,6 @@ public: const SvxItemPropertySet* GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool); }; -/** - * Globals - */ - -#define E3D_INVENTOR_FLAG (0x80000000) - /** * class SvxPropertySetInfoPool */ diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 20cbf28f6d89..a6ebdeed682d 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -210,8 +210,8 @@ public: svx::PropertyChangeNotifier& getShapePropertyChangeNotifier(); - void setShapeKind( sal_uInt32 nKind ); - sal_uInt32 getShapeKind() const; + void setShapeKind( SdrObjKind nKind ); + SdrObjKind getShapeKind() const; // styles need this static bool SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel const * pModel ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c35bc9b02220..55cea6049c83 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -5410,7 +5410,7 @@ void DrawingML::WriteFromTo(const uno::Reference<css::drawing::XShape>& rXShape, sal_Int16 nHalfWidth = aSize.Width / 2; sal_Int16 nHalfHeight = aSize.Height / 2; // aTopLeft needs correction for rotated customshapes - if (pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE) + if (pObj->GetObjIdentifier() == SdrObjKind::CustomShape) { // Center of bounding box of the rotated shape const auto aSnapRectCenter(pObj->GetSnapRect().Center()); diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx index 91fff4ae2342..9d60fe3594aa 100644 --- a/reportdesign/inc/RptDef.hxx +++ b/reportdesign/inc/RptDef.hxx @@ -74,7 +74,7 @@ typedef std::map<OUString, TPropertyConverter> TPropertyNamePair; /** returns the property name map for the given property id @param _nObjectId the object id */ -REPORTDESIGN_DLLPUBLIC const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId); +REPORTDESIGN_DLLPUBLIC const TPropertyNamePair& getPropertyNameMap(SdrObjKind _nObjectId); REPORTDESIGN_DLLPUBLIC css::uno::Reference< css::style::XStyle> getUsedStyle(const css::uno::Reference< css::report::XReportDefinition>& _xReport); template < typename T> T getStyleProperty(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const OUString& _sPropertyName) diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 1823c3c07527..abb56f534a58 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -78,14 +78,14 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj if (dynamic_cast< const OUnoObject* >(pObj) != nullptr) { OUnoObject& rUnoObj = dynamic_cast<OUnoObject&>(*pObj); - if (rUnoObj.GetObjIdentifier() == OBJ_RD_FIXEDTEXT) + if (rUnoObj.GetObjIdentifier() == SdrObjKind::ReportDesignFixedText) { uno::Reference<beans::XPropertySet> xControlModel(rUnoObj.GetUnoControlModel(),uno::UNO_QUERY); if ( xControlModel.is() ) xControlModel->setPropertyValue( PROPERTY_MULTILINE,uno::makeAny(true)); } else - bChangeOrientation = rUnoObj.GetObjIdentifier() == OBJ_RD_HFIXEDLINE; + bChangeOrientation = rUnoObj.GetObjIdentifier() == SdrObjKind::ReportDesignHorizontalFixedLine; rtl::Reference<SvxShapeControl> pShape = new SvxShapeControl( pObj ); xShape = static_cast<SvxShape_UnoImplHelper *>(pShape.get()); pShape->setShapeKind(pObj->GetObjIdentifier()); diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index e3cfb19d9037..dd83ccef4ba6 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -63,26 +63,26 @@ SdrObjKind OObjectBase::getObjectType(const uno::Reference< report::XReportCompo uno::Reference< lang::XServiceInfo > xServiceInfo( _xComponent , uno::UNO_QUERY ); OSL_ENSURE(xServiceInfo.is(),"Who deletes the XServiceInfo interface!"); if ( !xServiceInfo ) - return OBJ_NONE; + return SdrObjKind::NONE; if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT )) - return OBJ_RD_FIXEDTEXT; + return SdrObjKind::ReportDesignFixedText; if ( xServiceInfo->supportsService( SERVICE_FIXEDLINE )) { uno::Reference< report::XFixedLine> xFixedLine(_xComponent,uno::UNO_QUERY); - return xFixedLine->getOrientation() ? OBJ_RD_HFIXEDLINE : OBJ_RD_VFIXEDLINE; + return xFixedLine->getOrientation() ? SdrObjKind::ReportDesignHorizontalFixedLine : SdrObjKind::ReportDesignVerticalFixedLine; } if ( xServiceInfo->supportsService( SERVICE_IMAGECONTROL)) - return OBJ_RD_IMAGECONTROL; + return SdrObjKind::ReportDesignImageControl; if ( xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD )) - return OBJ_RD_FORMATTEDFIELD; + return SdrObjKind::ReportDesignFormattedField; if ( xServiceInfo->supportsService("com.sun.star.drawing.OLE2Shape") ) - return OBJ_OLE2; + return SdrObjKind::OLE2; if ( xServiceInfo->supportsService( SERVICE_SHAPE )) - return OBJ_CUSTOMSHAPE; + return SdrObjKind::CustomShape; if ( xServiceInfo->supportsService( SERVICE_REPORTDEFINITION ) ) - return OBJ_RD_SUBREPORT; - return OBJ_OLE2; + return SdrObjKind::ReportDesignSubReport; + return SdrObjKind::OLE2; } SdrObject* OObjectBase::createObject( @@ -93,13 +93,13 @@ SdrObject* OObjectBase::createObject( SdrObjKind nType = OObjectBase::getObjectType(_xComponent); switch( nType ) { - case OBJ_RD_FIXEDTEXT: + case SdrObjKind::ReportDesignFixedText: { OUnoObject* pUnoObj = new OUnoObject( rTargetModel, _xComponent, OUString("com.sun.star.form.component.FixedText"), - OBJ_RD_FIXEDTEXT); + SdrObjKind::ReportDesignFixedText); pNewObj = pUnoObj; uno::Reference<beans::XPropertySet> xControlModel(pUnoObj->GetUnoControlModel(),uno::UNO_QUERY); @@ -107,29 +107,29 @@ SdrObject* OObjectBase::createObject( xControlModel->setPropertyValue( PROPERTY_MULTILINE,uno::makeAny(true)); } break; - case OBJ_RD_IMAGECONTROL: + case SdrObjKind::ReportDesignImageControl: pNewObj = new OUnoObject( rTargetModel, _xComponent, OUString("com.sun.star.form.component.DatabaseImageControl"), - OBJ_RD_IMAGECONTROL); + SdrObjKind::ReportDesignImageControl); break; - case OBJ_RD_FORMATTEDFIELD: + case SdrObjKind::ReportDesignFormattedField: pNewObj = new OUnoObject( rTargetModel, _xComponent, OUString("com.sun.star.form.component.FormattedField"), - OBJ_RD_FORMATTEDFIELD); + SdrObjKind::ReportDesignFormattedField); break; - case OBJ_RD_HFIXEDLINE: - case OBJ_RD_VFIXEDLINE: + case SdrObjKind::ReportDesignHorizontalFixedLine: + case SdrObjKind::ReportDesignVerticalFixedLine: pNewObj = new OUnoObject( rTargetModel, _xComponent, OUString("com.sun.star.awt.UnoControlFixedLineModel"), nType); break; - case OBJ_CUSTOMSHAPE: + case SdrObjKind::CustomShape: pNewObj = OCustomShape::Create( rTargetModel, _xComponent); @@ -144,8 +144,8 @@ SdrObject* OObjectBase::createObject( DBG_UNHANDLED_EXCEPTION("reportdesign"); } break; - case OBJ_RD_SUBREPORT: - case OBJ_OLE2: + case SdrObjKind::ReportDesignSubReport: + case SdrObjKind::OLE2: pNewObj = OOle2Obj::Create( rTargetModel, _xComponent, @@ -222,11 +222,11 @@ namespace }; } -const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) +const TPropertyNamePair& getPropertyNameMap(SdrObjKind _nObjectId) { switch(_nObjectId) { - case OBJ_RD_IMAGECONTROL: + case SdrObjKind::ReportDesignImageControl: { static TPropertyNamePair s_aNameMap = []() { @@ -240,7 +240,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) return s_aNameMap; } - case OBJ_RD_FIXEDTEXT: + case SdrObjKind::ReportDesignFixedText: { static TPropertyNamePair s_aNameMap = []() { @@ -262,7 +262,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) }(); return s_aNameMap; } - case OBJ_RD_FORMATTEDFIELD: + case SdrObjKind::ReportDesignFormattedField: { static TPropertyNamePair s_aNameMap = []() { @@ -284,7 +284,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId) return s_aNameMap; } - case OBJ_CUSTOMSHAPE: + case SdrObjKind::CustomShape: { static TPropertyNamePair s_aNameMap = []() { @@ -477,7 +477,7 @@ OCustomShape::~OCustomShape() SdrObjKind OCustomShape::GetObjIdentifier() const { - return OBJ_CUSTOMSHAPE; + return SdrObjKind::CustomShape; } SdrInventor OCustomShape::GetObjInventor() const diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 15a7d2ed25b8..def0495c1b2e 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -131,7 +131,7 @@ namespace rptui /** All objects will be marked. */ - void SelectAll(const sal_uInt16 _nObjectType); + void SelectAll(const SdrObjKind _nObjectType); /// checks if a selection exists bool HasSelection() const; diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index cb86ce7cf235..726ac8012370 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -126,7 +126,7 @@ namespace rptui * \param _xSection the section where to create the formatted field * \param _sFunction the function which will be set at the data field. */ - void createControl(const css::uno::Sequence< css::beans::PropertyValue >& _aArgs,const css::uno::Reference< css::report::XSection>& _xSection,const OUString& _sFunction ,SdrObjKind _nObjectId = OBJ_RD_FORMATTEDFIELD); + void createControl(const css::uno::Sequence< css::beans::PropertyValue >& _aArgs,const css::uno::Reference< css::report::XSection>& _xSection,const OUString& _sFunction ,SdrObjKind _nObjectId = SdrObjKind::ReportDesignFormattedField); /** switch the report header/footer sectionon off with undo or without depending on the given id. * * \param _nId Can either be SID_REPORTHEADER_WITHOUT_UNDO or SID_REPORTFOOTER_WITHOUT_UNDO or SID_REPORTHEADERFOOTER. diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx index ad334f194234..03bb57199bac 100644 --- a/reportdesign/source/ui/inc/ReportSection.hxx +++ b/reportdesign/source/ui/inc/ReportSection.hxx @@ -104,7 +104,7 @@ namespace rptui /** All objects will be marked. */ - void SelectAll(const sal_uInt16 _nObjectType); + void SelectAll(const SdrObjKind _nObjectType); /** makes the grid visible * diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index c634dcf098f4..7e1716384548 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -100,7 +100,7 @@ namespace rptui /** All objects will be marked. */ - void SelectAll(const sal_uInt16 _nObjectType); + void SelectAll(const SdrObjKind _nObjectType); /** returns <TRUE/> when an object is marked */ diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index eab5c7dd3b8b..076943ff76fc 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -109,7 +109,7 @@ namespace rptui /** All objects will be marked. */ - void SelectAll(const sal_uInt16 _nObjectType); + void SelectAll(const SdrObjKind _nObjectType); /** returns <TRUE/> when an object is marked */ diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index c270aae409fc..f83e28ca8a24 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -171,7 +171,7 @@ namespace rptui /** All objects will be marked. */ - void SelectAll(const sal_uInt16 _nObjectType); + void SelectAll(const SdrObjKind _nObjectType); /** returns <TRUE/> when an object is marked */ diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index d5f48ca60ad0..066d330df338 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -878,7 +878,7 @@ SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage const & _rPage, SdrVie && (_bAllObjects || !_rView.IsObjMarked(pObjIter)) && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr)) { - if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == OBJ_CUSTOMSHAPE) + if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == SdrObjKind::CustomShape) { continue; } diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index c77c6d5a8eaa..ab213479b9f6 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -92,7 +92,7 @@ ODesignView::ODesignView( vcl::Window* pParent, ,m_pCurrentView(nullptr) ,m_aMarkIdle("reportdesign ODesignView Mark Idle") ,m_eMode( DlgEdMode::Select ) - ,m_eActObj( OBJ_NONE ) + ,m_eActObj( SdrObjKind::NONE ) ,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid ,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation ,m_bDeleted( false ) @@ -287,7 +287,7 @@ void ODesignView::SetMode( DlgEdMode _eNewMode ) { m_eMode = _eNewMode; if ( m_eMode == DlgEdMode::Select ) - m_eActObj = OBJ_NONE; + m_eActObj = SdrObjKind::NONE; m_aScrollWindow->SetMode(_eNewMode); } @@ -413,7 +413,7 @@ IMPL_LINK_NOARG( ODesignView, SplitHdl, SplitWindow*, void ) } } -void ODesignView::SelectAll(const sal_uInt16 _nObjectType) +void ODesignView::SelectAll(const SdrObjKind _nObjectType) { m_aScrollWindow->SelectAll(_nObjectType); } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d81d100bc129..9e1df7251c9d 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -598,27 +598,27 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_INSERT_DIAGRAM: aReturn.bEnabled = isEditable(); aReturn.bInvisible = !m_bChartEnabled; - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_OLE2; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::OLE2; break; case SID_FM_FIXEDTEXT: aReturn.bEnabled = isEditable(); - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_FIXEDTEXT; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignFixedText; break; case SID_INSERT_HFIXEDLINE: aReturn.bEnabled = isEditable(); - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_HFIXEDLINE; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignHorizontalFixedLine; break; case SID_INSERT_VFIXEDLINE: aReturn.bEnabled = isEditable(); - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_VFIXEDLINE; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignVerticalFixedLine; break; case SID_FM_EDIT: aReturn.bEnabled = isEditable(); - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_FORMATTEDFIELD; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignFormattedField; break; case SID_FM_IMAGECONTROL: aReturn.bEnabled = isEditable(); - aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_IMAGECONTROL; + aReturn.bChecked = getDesignView()->GetInsertObj() == SdrObjKind::ReportDesignImageControl; break; case SID_DRAWTBX_CS_BASIC: case SID_DRAWTBX_CS_BASIC1: @@ -1104,7 +1104,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > break; case SID_SELECTALL: - getDesignView()->SelectAll(OBJ_NONE); + getDesignView()->SelectAll(SdrObjKind::NONE); break; case SID_SELECTALL_IN_SECTION: { @@ -1118,10 +1118,10 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > InvalidateFeature( SID_OBJECT_SELECT ); break; case SID_SELECT_ALL_EDITS: - getDesignView()->SelectAll(OBJ_RD_FORMATTEDFIELD); + getDesignView()->SelectAll(SdrObjKind::ReportDesignFormattedField); break; case SID_SELECT_ALL_LABELS: - getDesignView()->SelectAll(OBJ_RD_FIXEDTEXT); + getDesignView()->SelectAll(SdrObjKind::ReportDesignFixedText); break; case SID_TERMINATE_INPLACEACTIVATION: { @@ -1196,37 +1196,37 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > break; case SID_INSERT_DIAGRAM: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_OLE2); + getDesignView()->SetInsertObj( SdrObjKind::OLE2); createDefaultControl(aArgs); InvalidateAll(); break; case SID_FM_FIXEDTEXT: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_RD_FIXEDTEXT ); + getDesignView()->SetInsertObj( SdrObjKind::ReportDesignFixedText ); createDefaultControl(aArgs); InvalidateAll(); break; case SID_INSERT_HFIXEDLINE: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_RD_HFIXEDLINE ); + getDesignView()->SetInsertObj( SdrObjKind::ReportDesignHorizontalFixedLine ); createDefaultControl(aArgs); InvalidateAll(); break; case SID_INSERT_VFIXEDLINE: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_RD_VFIXEDLINE ); + getDesignView()->SetInsertObj( SdrObjKind::ReportDesignVerticalFixedLine ); createDefaultControl(aArgs); InvalidateAll(); break; case SID_FM_EDIT: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_RD_FORMATTEDFIELD ); + getDesignView()->SetInsertObj( SdrObjKind::ReportDesignFormattedField ); createDefaultControl(aArgs); InvalidateAll(); break; case SID_FM_IMAGECONTROL: getDesignView()->SetMode( DlgEdMode::Insert ); - getDesignView()->SetInsertObj( OBJ_RD_IMAGECONTROL ); + getDesignView()->SetInsertObj( SdrObjKind::ReportDesignImageControl ); createDefaultControl(aArgs); InvalidateAll(); break; @@ -1380,7 +1380,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > else sType = aUrl.Complete.getToken(0,'.',nIndex); - getDesignView()->SetInsertObj( OBJ_CUSTOMSHAPE ,sType); + getDesignView()->SetInsertObj( SdrObjKind::CustomShape ,sType); createDefaultControl(aArgs); } InvalidateAll(); @@ -3010,7 +3010,7 @@ void OReportController::insertGraphic() { PROPERTY_IMAGEURL, Any(aDialog.GetPath()) }, { PROPERTY_PRESERVEIRI, Any(bLink) } })); - createControl(aArgs,xSection,OUString(),OBJ_RD_IMAGECONTROL); + createControl(aArgs,xSection,OUString(),SdrObjKind::ReportDesignImageControl); } } catch(const Exception&) @@ -3115,7 +3115,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co SdrObject* pNewControl = nullptr; uno::Reference< report::XReportComponent> xShapeProp; - if ( _nObjectId == OBJ_CUSTOMSHAPE ) + if ( _nObjectId == SdrObjKind::CustomShape ) { pNewControl = SdrObjFactory::MakeNewObject( *m_aReportModel, @@ -3128,7 +3128,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co OReportSection::createDefault(sCustomShapeType,pNewControl); pNewControl->SetLogicRect(tools::Rectangle(3000,500,6000,3500)); // switch height and width } - else if ( _nObjectId == OBJ_OLE2 || OBJ_RD_SUBREPORT == _nObjectId ) + else if ( _nObjectId == SdrObjKind::OLE2 || SdrObjKind::ReportDesignSubReport == _nObjectId ) { pNewControl = SdrObjFactory::MakeNewObject( *m_aReportModel, @@ -3156,7 +3156,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co nullptr, _nObjectId, SdrInventor::ReportDesign, - OBJ_RD_FIXEDTEXT, + SdrObjKind::ReportDesignFixedText, // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing // m_aReportModel seems pretty safe, it's done in other places, initialized @@ -3213,9 +3213,9 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co pObj->CreateMediator(true); - if ( _nObjectId == OBJ_RD_FIXEDTEXT ) // special case for fixed text + if ( _nObjectId == SdrObjKind::ReportDesignFixedText ) // special case for fixed text xUnoProp->setPropertyValue(PROPERTY_LABEL,uno::makeAny(OUnoObject::GetDefaultName(pObj))); - else if ( _nObjectId == OBJ_RD_VFIXEDLINE ) + else if ( _nObjectId == SdrObjKind::ReportDesignVerticalFixedLine ) { awt::Size aOlSize = xShapeProp->getSize(); xShapeProp->setSize(awt::Size(aOlSize.Height,aOlSize.Width)); // switch height and width @@ -3424,7 +3424,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) if ( !xField.is() ) continue; - SdrObjKind nOBJID = OBJ_NONE; + SdrObjKind nOBJID = SdrObjKind::NONE; sal_Int32 nDataType = sdbc::DataType::BINARY; xField->getPropertyValue(PROPERTY_TYPE) >>= nDataType; switch ( nDataType ) @@ -3432,14 +3432,14 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) case sdbc::DataType::BINARY: case sdbc::DataType::VARBINARY: case sdbc::DataType::LONGVARBINARY: - nOBJID = OBJ_RD_IMAGECONTROL; + nOBJID = SdrObjKind::ReportDesignImageControl; break; default: - nOBJID = OBJ_RD_FORMATTEDFIELD; + nOBJID = SdrObjKind::ReportDesignFormattedField; break; } - if ( !nOBJID ) + if ( nOBJID == SdrObjKind::NONE ) continue; Reference< util::XNumberFormatsSupplier > xSupplier = getReportNumberFormatter()->getNumberFormatsSupplier(); @@ -3463,7 +3463,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) xNumberFormats, nOBJID, SdrInventor::ReportDesign, - OBJ_RD_FIXEDTEXT, + SdrObjKind::ReportDesignFixedText, // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing // m_aReportModel seems pretty safe, it's done in other places, initialized @@ -3534,7 +3534,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) ... etc. - the rest is truncated