diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-30 20:33:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-07 14:22:07 +0100 |
commit | 8295a3344704ce9a18489933c499a50c403f1a3d (patch) | |
tree | 92a10017311909e3010624b39acddfcf7d3eba00 /svx/source/form/fmobjfac.cxx | |
parent | 8accfa30343195b5d7cfd111301677a6a9b6a21b (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/form/fmobjfac.cxx')
-rw-r--r-- | svx/source/form/fmobjfac.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx index 16bc622d7e31..6ef433414af0 100644 --- a/svx/source/form/fmobjfac.cxx +++ b/svx/source/form/fmobjfac.cxx @@ -117,93 +117,93 @@ IMPL_STATIC_LINK(FmFormObjFactory, MakeObject, SdrObjCreatorParams, aParams, Sdr switch ( aParams.nObjIdentifier ) { - case OBJ_FM_EDIT: + case SdrObjKind::FormEdit: sServiceSpecifier = FM_COMPONENT_EDIT; break; - case OBJ_FM_BUTTON: + case SdrObjKind::FormButton: sServiceSpecifier = FM_COMPONENT_COMMANDBUTTON; break; - case OBJ_FM_FIXEDTEXT: + case SdrObjKind::FormFixedText: sServiceSpecifier = FM_COMPONENT_FIXEDTEXT; break; - case OBJ_FM_LISTBOX: + case SdrObjKind::FormListbox: sServiceSpecifier = FM_COMPONENT_LISTBOX; break; - case OBJ_FM_CHECKBOX: + case SdrObjKind::FormCheckbox: sServiceSpecifier = FM_COMPONENT_CHECKBOX; break; - case OBJ_FM_RADIOBUTTON: + case SdrObjKind::FormRadioButton: sServiceSpecifier = FM_COMPONENT_RADIOBUTTON; break; - case OBJ_FM_GROUPBOX: + case SdrObjKind::FormGroupBox: sServiceSpecifier = FM_COMPONENT_GROUPBOX; break; - case OBJ_FM_COMBOBOX: + case SdrObjKind::FormCombobox: sServiceSpecifier = FM_COMPONENT_COMBOBOX; break; - case OBJ_FM_GRID: + case SdrObjKind::FormGrid: sServiceSpecifier = FM_COMPONENT_GRID; break; - case OBJ_FM_IMAGEBUTTON: + case SdrObjKind::FormImageButton: sServiceSpecifier = FM_COMPONENT_IMAGEBUTTON; break; - case OBJ_FM_FILECONTROL: + case SdrObjKind::FormFileControl: sServiceSpecifier = FM_COMPONENT_FILECONTROL; break; - case OBJ_FM_DATEFIELD: + case SdrObjKind::FormDateField: sServiceSpecifier = FM_COMPONENT_DATEFIELD; break; - case OBJ_FM_TIMEFIELD: + case SdrObjKind::FormTimeField: sServiceSpecifier = FM_COMPONENT_TIMEFIELD; aInitialProperties.emplace_back( FM_PROP_TIMEMAX, makeAny( tools::Time( 23, 59, 59, 999999999 ).GetUNOTime() ) ); break; - case OBJ_FM_NUMERICFIELD: + case SdrObjKind::FormNumericField: sServiceSpecifier = FM_COMPONENT_NUMERICFIELD; break; - case OBJ_FM_CURRENCYFIELD: + case SdrObjKind::FormCurrencyField: sServiceSpecifier = FM_COMPONENT_CURRENCYFIELD; break; - case OBJ_FM_PATTERNFIELD: + case SdrObjKind::FormPatternField: sServiceSpecifier = FM_COMPONENT_PATTERNFIELD; break; - case OBJ_FM_HIDDEN: + case SdrObjKind::FormHidden: sServiceSpecifier = FM_COMPONENT_HIDDEN; break; - case OBJ_FM_IMAGECONTROL: + case SdrObjKind::FormImageControl: sServiceSpecifier = FM_COMPONENT_IMAGECONTROL; break; - case OBJ_FM_FORMATTEDFIELD: + case SdrObjKind::FormFormattedField: sServiceSpecifier = FM_COMPONENT_FORMATTEDFIELD; break; - case OBJ_FM_NAVIGATIONBAR: + case SdrObjKind::FormNavigationBar: sServiceSpecifier = FM_SUN_COMPONENT_NAVIGATIONBAR; break; - case OBJ_FM_SCROLLBAR: + case SdrObjKind::FormScrollbar: sServiceSpecifier = FM_SUN_COMPONENT_SCROLLBAR; aInitialProperties.emplace_back( FM_PROP_BORDER, makeAny( sal_Int16(0) ) ); break; - case OBJ_FM_SPINBUTTON: + case SdrObjKind::FormSpinButton: sServiceSpecifier = FM_SUN_COMPONENT_SPINBUTTON; aInitialProperties.emplace_back( FM_PROP_BORDER, makeAny( sal_Int16(0) ) ); break; |