[Libreoffice-commits] core.git: basctl/source chart2/source cui/source include/svx reportdesign/inc reportdesign/IwyuFilter_reportdesign.yaml reportdesign/source sc/source sd/qa sd/source solenv/clang-format svx/inc svx/source sw/inc sw/qa sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 6 16:17:05 UTC 2020
basctl/source/basicide/baside3.cxx | 2
basctl/source/dlged/dlged.cxx | 2
basctl/source/dlged/dlgedfac.cxx | 2
basctl/source/dlged/dlgedobj.cxx | 2
basctl/source/inc/dlged.hxx | 5
basctl/source/inc/dlgeddef.hxx | 42 ----
basctl/source/inc/dlgedobj.hxx | 2
chart2/source/controller/main/ChartController_Window.cxx | 2
chart2/source/controller/main/DrawCommandDispatch.cxx | 4
chart2/source/controller/main/DrawCommandDispatch.hxx | 3
cui/source/tabpages/textanim.cxx | 2
cui/source/tabpages/transfrm.cxx | 2
include/svx/cube3d.hxx | 2
include/svx/fmglob.hxx | 52 -----
include/svx/fmview.hxx | 4
include/svx/globl3d.hxx | 36 ---
include/svx/lathe3d.hxx | 2
include/svx/obj3d.hxx | 4
include/svx/scene3d.hxx | 2
include/svx/sphere3d.hxx | 2
include/svx/svdcrtv.hxx | 10 -
include/svx/svdoashp.hxx | 2
include/svx/svdobj.hxx | 45 ----
include/svx/svdobjkind.hxx | 147 +++++++++++++++
include/svx/svdocapt.hxx | 2
include/svx/svdocirc.hxx | 2
include/svx/svdoedge.hxx | 2
include/svx/svdograf.hxx | 2
include/svx/svdogrp.hxx | 2
include/svx/svdomeas.hxx | 2
include/svx/svdomedia.hxx | 2
include/svx/svdoole2.hxx | 2
include/svx/svdopage.hxx | 2
include/svx/svdopath.hxx | 2
include/svx/svdorect.hxx | 2
include/svx/svdotable.hxx | 2
include/svx/svdotext.hxx | 2
include/svx/svdouno.hxx | 2
include/svx/svdovirt.hxx | 2
include/svx/unopage.hxx | 3
include/svx/unoprov.hxx | 3
reportdesign/IwyuFilter_reportdesign.yaml | 3
reportdesign/inc/RptDef.hxx | 11 -
reportdesign/inc/RptObject.hxx | 22 +-
reportdesign/source/core/sdr/ReportDrawPage.cxx | 4
reportdesign/source/core/sdr/RptObject.cxx | 56 ++---
reportdesign/source/ui/inc/DesignView.hxx | 6
reportdesign/source/ui/inc/ReportController.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/report/DesignView.cxx | 2
reportdesign/source/ui/report/ReportController.cxx | 46 ++--
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 | 22 +-
sc/source/core/data/drwlayer.cxx | 5
sc/source/ui/drawfunc/fuconarc.cxx | 2
sc/source/ui/drawfunc/fuconpol.cxx | 2
sc/source/ui/drawfunc/fuconrec.cxx | 2
sc/source/ui/drawfunc/fuconuno.cxx | 4
sc/source/ui/inc/fuconuno.hxx | 2
sc/source/ui/inc/tabvwsh.hxx | 2
sc/source/ui/view/tabvwsh2.cxx | 10 -
sc/source/ui/view/tabvwshg.cxx | 2
sd/qa/unit/export-tests-ooxml1.cxx | 2
sd/qa/unit/export-tests-ooxml2.cxx | 12 -
sd/qa/unit/import-tests-smartart.cxx | 2
sd/qa/unit/tiledrendering/LOKitSearchTest.cxx | 16 -
sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 -
sd/source/core/sdpage.cxx | 5
sd/source/ui/app/sdxfer.cxx | 2
sd/source/ui/dlg/dlgolbul.cxx | 3
sd/source/ui/func/fuconarc.cxx | 4
sd/source/ui/func/fuconbez.cxx | 2
sd/source/ui/func/fuconrec.cxx | 2
sd/source/ui/func/fuconuno.cxx | 4
sd/source/ui/func/fuoaprms.cxx | 8
sd/source/ui/func/fuolbull.cxx | 2
sd/source/ui/inc/fuconuno.hxx | 2
sd/source/ui/view/drviews4.cxx | 2
sd/source/ui/view/drviewse.cxx | 2
sd/source/ui/view/viewshel.cxx | 2
solenv/clang-format/excludelist | 2
svx/inc/extrud3d.hxx | 2
svx/inc/pch/precompiled_svxcore.hxx | 8
svx/inc/polygn3d.hxx | 2
svx/source/dialog/graphctl.cxx | 4
svx/source/engine3d/cube3d.cxx | 4
svx/source/engine3d/extrud3d.cxx | 4
svx/source/engine3d/lathe3d.cxx | 4
svx/source/engine3d/obj3d.cxx | 6
svx/source/engine3d/objfac3d.cxx | 4
svx/source/engine3d/polygn3d.cxx | 4
svx/source/engine3d/scene3d.cxx | 4
svx/source/engine3d/sphere3d.cxx | 4
svx/source/form/fmexpl.cxx | 2
svx/source/form/fmobj.cxx | 5
svx/source/form/fmobjfac.cxx | 5
svx/source/form/fmshell.cxx | 4
svx/source/form/fmshimp.cxx | 2
svx/source/form/fmtools.cxx | 2
svx/source/form/fmview.cxx | 3
svx/source/form/fmvwimp.cxx | 15 -
svx/source/inc/fmobj.hxx | 2
svx/source/inc/fmvwimp.hxx | 6
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 6
svx/source/svdraw/svdcrtv.cxx | 6
svx/source/svdraw/svdedtv2.cxx | 2
svx/source/svdraw/svdedxv.cxx | 2
svx/source/svdraw/svdoashp.cxx | 4
svx/source/svdraw/svdobj.cxx | 57 ++---
svx/source/svdraw/svdocapt.cxx | 4
svx/source/svdraw/svdocirc.cxx | 2
svx/source/svdraw/svdoedge.cxx | 4
svx/source/svdraw/svdograf.cxx | 4
svx/source/svdraw/svdogrp.cxx | 6
svx/source/svdraw/svdomeas.cxx | 4
svx/source/svdraw/svdomedia.cxx | 4
svx/source/svdraw/svdoole2.cxx | 4
svx/source/svdraw/svdopage.cxx | 4
svx/source/svdraw/svdopath.cxx | 10 -
svx/source/svdraw/svdorect.cxx | 6
svx/source/svdraw/svdotext.cxx | 4
svx/source/svdraw/svdouno.cxx | 4
svx/source/svdraw/svdovirt.cxx | 2
svx/source/table/svdotable.cxx | 5
svx/source/unodraw/unopage.cxx | 12 -
svx/source/unodraw/unoprov.cxx | 2
svx/source/unodraw/unoshap2.cxx | 1
svx/source/unodraw/unoshape.cxx | 6
sw/inc/fesh.hxx | 6
sw/inc/view.hxx | 4
sw/qa/extras/uiwriter/uiwriter2.cxx | 2
sw/qa/uibase/shells/shells.cxx | 2
sw/source/core/draw/dflyobj.cxx | 2
sw/source/core/frmedt/feshview.cxx | 8
sw/source/core/inc/dflyobj.hxx | 4
sw/source/filter/ww8/ww8graf.cxx | 6
sw/source/uibase/inc/conform.hxx | 4
sw/source/uibase/ribbar/conform.cxx | 8
sw/source/uibase/ribbar/drawbase.cxx | 6
sw/source/uibase/shells/textdrw.cxx | 2
sw/source/uibase/uiview/view.cxx | 2
sw/source/uibase/uiview/viewdraw.cxx | 9
146 files changed, 516 insertions(+), 531 deletions(-)
New commits:
commit de78304d92140901d19a6ea17bdc1d568df955c4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 5 14:04:04 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 6 17:16:09 2020 +0100
make SdrObject Identifiers SdrObjKind enum members
with unique values so that, e.g.
if (pObj->GetObjIdentifier() == OBJ_LINE)
is only true if pObj is a SdrPathObj and not a E3dScene
Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index ab451f482a15..063828689a0f 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -391,7 +391,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
void DialogWindow::ExecuteCommand( SfxRequest& rReq )
{
const sal_uInt16 nSlotId(rReq.GetSlot());
- sal_uInt16 nInsertObj(0);
+ SdrObjKind nInsertObj(OBJ_NONE);
switch ( nSlotId )
{
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index b9da399830ac..533e2381f3e7 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -601,7 +601,7 @@ void DlgEditor::SetMode (Mode eNewMode )
}
-void DlgEditor::SetInsertObj( sal_uInt16 eObj )
+void DlgEditor::SetInsertObj(SdrObjKind eObj)
{
eActObj = eObj;
diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx
index 3063e7f29e00..38c8dc0d1a9c 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -221,6 +221,8 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* )
case OBJ_DLG_HYPERLINKCONTROL:
pNewObj = new DlgEdObj(aParams.rSdrModel, "com.sun.star.awt.UnoControlFixedHyperlinkModel", xDialogSFact );
break;
+ default:
+ break;
}
}
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 360c5b4d2d58..056006c4305e 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -768,7 +768,7 @@ SdrInventor DlgEdObj::GetObjInventor() const
return SdrInventor::BasicDialog;
}
-sal_uInt16 DlgEdObj::GetObjIdentifier() const
+SdrObjKind DlgEdObj::GetObjIdentifier() const
{
if ( supportsService( "com.sun.star.awt.UnoControlDialogModel" ))
{
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 6b83c402959b..82d3a14f605d 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -27,6 +27,7 @@
#include <o3tl/deleter.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <svl/hint.hxx>
+#include <svx/svdobjkind.hxx>
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
@@ -123,7 +124,7 @@ private:
std::unique_ptr<DlgEdFunc> pFunc;
DialogWindowLayout& rLayout;
Mode eMode;
- sal_uInt16 eActObj;
+ SdrObjKind eActObj;
bool bFirstDraw;
bool bCreateOK;
tools::Rectangle aPaintRect;
@@ -184,7 +185,7 @@ public:
bool KeyInput( const KeyEvent& rKEvt );
void SetMode (Mode eMode);
- void SetInsertObj( sal_uInt16 eObj );
+ void SetInsertObj(SdrObjKind eObj);
void CreateDefaultObject();
Mode GetMode() const { return eMode; }
bool IsCreateOK() const { return bCreateOK; }
diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx
index c19c3db282e1..0cb0a6dc8573 100644
--- a/basctl/source/inc/dlgeddef.hxx
+++ b/basctl/source/inc/dlgeddef.hxx
@@ -19,48 +19,10 @@
#pragma once
-namespace basctl
-{
+#include <svx/svdobjkind.hxx>
-enum
+namespace basctl
{
- OBJ_DLG_CONTROL = 1,
- OBJ_DLG_DIALOG = 2,
- OBJ_DLG_PUSHBUTTON = 3,
- OBJ_DLG_RADIOBUTTON = 4,
- OBJ_DLG_CHECKBOX = 5,
- OBJ_DLG_LISTBOX = 6,
- OBJ_DLG_COMBOBOX = 7,
- OBJ_DLG_GROUPBOX = 8,
- OBJ_DLG_EDIT = 9,
- OBJ_DLG_FIXEDTEXT = 10,
- OBJ_DLG_IMAGECONTROL = 11,
- OBJ_DLG_PROGRESSBAR = 12,
- OBJ_DLG_HSCROLLBAR = 13,
- OBJ_DLG_VSCROLLBAR = 14,
- OBJ_DLG_HFIXEDLINE = 15,
- OBJ_DLG_VFIXEDLINE = 16,
- OBJ_DLG_DATEFIELD = 17,
- OBJ_DLG_TIMEFIELD = 18,
- OBJ_DLG_NUMERICFIELD = 19,
- OBJ_DLG_CURRENCYFIELD = 20,
- OBJ_DLG_FORMATTEDFIELD = 21,
- OBJ_DLG_PATTERNFIELD = 22,
- OBJ_DLG_FILECONTROL = 23,
- OBJ_DLG_TREECONTROL = 24,
- OBJ_DLG_SPINBUTTON = 25,
- OBJ_DLG_GRIDCONTROL = 26,
- OBJ_DLG_HYPERLINKCONTROL = 27,
-
- OBJ_DLG_FORMRADIO = 28,
- OBJ_DLG_FORMCHECK = 29,
- OBJ_DLG_FORMLIST = 30,
- OBJ_DLG_FORMCOMBO = 31,
- OBJ_DLG_FORMSPIN = 32,
- OBJ_DLG_FORMVSCROLL = 33,
- OBJ_DLG_FORMHSCROLL = 34,
-
-};
// control properties
#define DLGED_PROP_BACKGROUNDCOLOR "BackgroundColor"
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index 37e5fc3209f3..8ae88ef5c80a 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -100,7 +100,7 @@ public:
DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
virtual SdrInventor GetObjInventor() const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual DlgEdObj* CloneSdrObject(SdrModel& rTargetModel) const override; // not working yet
void clonedFrom(const DlgEdObj* _pSource); // not working yet
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index c8c46ba7541f..51ebcbf9b567 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1985,7 +1985,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
( !m_pDrawViewWrapper->IsMarkedHit( aMousePos ) || !m_aSelection.isDragableObjectSelected() ) )
{
PointerStyle ePointerStyle = PointerStyle::DrawRect;
- SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() );
+ SdrObjKind eKind = m_pDrawViewWrapper->GetCurrentObjIdentifier();
switch ( eKind )
{
case OBJ_LINE:
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 00f5b2c51f73..5f2e1a73923d 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -347,7 +347,7 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
SolarMutexGuard aGuard;
m_pChartController->setDrawMode( eDrawMode );
- setInsertObj( sal::static_int_cast< sal_uInt16 >( eKind ) );
+ setInsertObj(eKind);
if ( bCreate )
{
pDrawViewWrapper->SetCreateMode();
@@ -397,7 +397,7 @@ void DrawCommandDispatch::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:StarShapes", COMMAND_ID_DRAWTBX_CS_STAR, CommandGroup::INSERT );
}
-void DrawCommandDispatch::setInsertObj( sal_uInt16 eObj )
+void DrawCommandDispatch::setInsertObj(SdrObjKind eObj)
{
DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
if ( pDrawViewWrapper )
diff --git a/chart2/source/controller/main/DrawCommandDispatch.hxx b/chart2/source/controller/main/DrawCommandDispatch.hxx
index 121808d231b6..febfa8338d40 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.hxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <svx/svdobjkind.hxx>
#include "FeatureCommandDispatchBase.hxx"
class SfxItemSet;
@@ -58,7 +59,7 @@ protected:
virtual void describeSupportedFeatures() override;
private:
- void setInsertObj( sal_uInt16 eObj );
+ void setInsertObj(SdrObjKind eObj);
SdrObject* createDefaultObject( const sal_uInt16 nID );
bool parseCommandURL( const OUString& rCommandURL, sal_uInt16* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index e5239dede67e..a7ee4b3aade9 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -70,7 +70,7 @@ void SvxTextTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
if (rMarkList.GetMarkCount() == 1)
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- eKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier());
+ eKind = pObj->GetObjIdentifier();
}
}
}
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 42b17b553cc2..cec57ecbbbe7 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -860,7 +860,7 @@ void SvxPositionSizeTabPage::Construct()
if(1 == rMarkList.GetMarkCount())
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const SdrObjKind eKind(static_cast<SdrObjKind>(pObj->GetObjIdentifier()));
+ const SdrObjKind eKind(pObj->GetObjIdentifier());
if((pObj->GetObjInventor() == SdrInventor::Default) &&
(OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) &&
diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx
index d9b660fa6e52..515e8331c044 100644
--- a/include/svx/cube3d.hxx
+++ b/include/svx/cube3d.hxx
@@ -67,7 +67,7 @@ public:
const basegfx::B3DVector& r3DSize);
E3dCubeObj(SdrModel& rSdrModel);
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
virtual E3dCubeObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/fmglob.hxx b/include/svx/fmglob.hxx
deleted file mode 100644
index 35f3460f19a3..000000000000
--- a/include/svx/fmglob.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_FMGLOB_HXX
-#define INCLUDED_SVX_FMGLOB_HXX
-
-#include <com/sun/star/form/FormComponentType.hpp>
-
-const sal_uInt16 OBJ_FM_CONTROL = css::form::FormComponentType::CONTROL;
- // for form components
-const sal_uInt16 OBJ_FM_EDIT = css::form::FormComponentType::TEXTFIELD;
-const sal_uInt16 OBJ_FM_BUTTON = css::form::FormComponentType::COMMANDBUTTON;
-const sal_uInt16 OBJ_FM_FIXEDTEXT = css::form::FormComponentType::FIXEDTEXT;
-const sal_uInt16 OBJ_FM_LISTBOX = css::form::FormComponentType::LISTBOX;
-const sal_uInt16 OBJ_FM_CHECKBOX = css::form::FormComponentType::CHECKBOX;
-const sal_uInt16 OBJ_FM_COMBOBOX = css::form::FormComponentType::COMBOBOX;
-const sal_uInt16 OBJ_FM_RADIOBUTTON = css::form::FormComponentType::RADIOBUTTON;
-const sal_uInt16 OBJ_FM_GROUPBOX = css::form::FormComponentType::GROUPBOX;
-const sal_uInt16 OBJ_FM_GRID = css::form::FormComponentType::GRIDCONTROL;
-const sal_uInt16 OBJ_FM_IMAGEBUTTON = css::form::FormComponentType::IMAGEBUTTON;
-const sal_uInt16 OBJ_FM_FILECONTROL = css::form::FormComponentType::FILECONTROL;
-const sal_uInt16 OBJ_FM_DATEFIELD = css::form::FormComponentType::DATEFIELD;
-const sal_uInt16 OBJ_FM_TIMEFIELD = css::form::FormComponentType::TIMEFIELD;
-const sal_uInt16 OBJ_FM_NUMERICFIELD = css::form::FormComponentType::NUMERICFIELD;
-const sal_uInt16 OBJ_FM_CURRENCYFIELD = css::form::FormComponentType::CURRENCYFIELD;
-const sal_uInt16 OBJ_FM_PATTERNFIELD = css::form::FormComponentType::PATTERNFIELD;
-const sal_uInt16 OBJ_FM_HIDDEN = css::form::FormComponentType::HIDDENCONTROL;
-const sal_uInt16 OBJ_FM_IMAGECONTROL = css::form::FormComponentType::IMAGECONTROL;
-const sal_uInt16 OBJ_FM_FORMATTEDFIELD = css::form::FormComponentType::PATTERNFIELD + 1;
-const sal_uInt16 OBJ_FM_SCROLLBAR = css::form::FormComponentType::PATTERNFIELD + 2;
-const sal_uInt16 OBJ_FM_SPINBUTTON = css::form::FormComponentType::PATTERNFIELD + 3;
-const sal_uInt16 OBJ_FM_NAVIGATIONBAR = css::form::FormComponentType::PATTERNFIELD + 4;
-
-#endif // _FM_FMGLOB_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 00cecc94d8be..13c1ec711745 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -91,9 +91,9 @@ public:
sal_Int32 _nYOffsetMM,
const css::uno::Reference< css::beans::XPropertySet >& _rxField,
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
- sal_uInt16 _nControlObjectID,
+ SdrObjKind _nControlObjectID,
SdrInventor _nInventor,
- sal_uInt16 _nLabelObjectID,
+ SdrObjKind _nLabelObjectID,
// tdf#118963 Need a SdrModel for SdrObject creation. To make the
// demand clear, hand over a SdrMldel&
diff --git a/include/svx/globl3d.hxx b/include/svx/globl3d.hxx
deleted file mode 100644
index 2eed87268988..000000000000
--- a/include/svx/globl3d.hxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_GLOBL3D_HXX
-#define INCLUDED_SVX_GLOBL3D_HXX
-
-#include <sal/types.h>
-
-const sal_uInt16 E3D_SCENE_ID = 2;
-const sal_uInt16 E3D_OBJECT_ID = 3; // should not be used, it's only a helper class for E3DScene and E3DCompoundObject
-const sal_uInt16 E3D_CUBEOBJ_ID = 4;
-const sal_uInt16 E3D_SPHEREOBJ_ID = 5;
-const sal_uInt16 E3D_EXTRUDEOBJ_ID = 6;
-const sal_uInt16 E3D_LATHEOBJ_ID = 7;
-const sal_uInt16 E3D_COMPOUNDOBJ_ID = 8;
-const sal_uInt16 E3D_POLYGONOBJ_ID = 9;
-
-#endif // INCLUDED_SVX_GLOBL3D_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx
index a14ae9a0ea6c..db2c868280ce 100644
--- a/include/svx/lathe3d.hxx
+++ b/include/svx/lathe3d.hxx
@@ -98,7 +98,7 @@ public:
bool GetCloseBack() const
{ return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK).GetValue(); }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual E3dLatheObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 5a51cc34c603..b9f43315d730 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -93,7 +93,7 @@ public:
virtual void RecalcSnapRect() override;
virtual SdrInventor GetObjInventor() const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void NbcMove(const Size& rSize) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
@@ -176,7 +176,7 @@ public:
virtual sal_uInt32 GetHdlCount() const override;
virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void RecalcSnapRect() override;
virtual E3dCompoundObject* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index e3fb1b5c779c..3ff3a5562e44 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -114,7 +114,7 @@ public:
// set flag to draw only selected
void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; }
bool GetDrawOnlySelected() const { return bDrawOnlySelected; }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcMove(const Size& rSize) override;
diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx
index 3bc2ab2f192c..0ee9bc0531b3 100644
--- a/include/svx/sphere3d.hxx
+++ b/include/svx/sphere3d.hxx
@@ -66,7 +66,7 @@ public:
sal_uInt32 GetVerticalSegments() const
{ return GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue(); }
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
virtual E3dSphereObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 6868e7ba1cb2..253d1060aba9 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -50,7 +50,7 @@ protected:
sal_Int32 nAutoCloseDistPix;
sal_Int32 nFreeHandMinDistPix;
SdrInventor nCurrentInvent; // set the current ones
- sal_uInt16 nCurrentIdent; // Obj for re-creating
+ SdrObjKind nCurrentIdent; // Obj for re-creating
bool b1stPointAsCenter : 1;
bool bUseIncompatiblePathCreateInterface : 1;
@@ -58,7 +58,7 @@ protected:
void ImpClearConnectMarker();
protected:
- bool ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
+ bool ImpBegCreateObj(SdrInventor nInvent, SdrObjKind nIdent, const Point& rPnt, OutputDevice* pOut,
sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject);
void ShowCreateObj(/*OutputDevice* pOut, bool bFull*/);
@@ -100,10 +100,10 @@ public:
// Determine whether a measurement tool activated
bool IsMeasureTool() const;
- void SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent=SdrInventor::Default);
- void TakeCurrentObj(sal_uInt16& nIdent, SdrInventor& nInvent) const { nInvent=nCurrentInvent; nIdent=nCurrentIdent; }
+ void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default);
+ void TakeCurrentObj(SdrObjKind& nIdent, SdrInventor& nInvent) const { nInvent=nCurrentInvent; nIdent=nCurrentIdent; }
SdrInventor GetCurrentObjInventor() const { return nCurrentInvent; }
- sal_uInt16 GetCurrentObjIdentifier() const { return nCurrentIdent; }
+ SdrObjKind GetCurrentObjIdentifier() const { return nCurrentIdent; }
// Beginning the regular Create
bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3);
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 040302faa4c0..2014e0998c2d 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -164,7 +164,7 @@ public:
};
bool IsDefaultGeometry( const DefaultType eDefaultType ) const;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void Move(const Size& rSiz) override;
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index bb09c6856d3e..bd528c9fe4cb 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -30,6 +30,7 @@
#include <svl/typedwhich.hxx>
#include <svx/DiagramDataInterface.hxx>
#include <svx/svdtypes.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svxdllapi.h>
#include <svx/shapeproperty.hxx>
#include <tools/link.hxx>
@@ -114,42 +115,6 @@ struct SVXCORE_DLLPUBLIC SdrObjectFreeOp;
// deleter is needed - here, SdrObject::Free needs to be used.
typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr;
-enum SdrObjKind {
- 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
- OBJ_MAXI
-};
-
enum class SdrInventor : sal_uInt32 {
Unknown = 0,
BasicDialog = sal_uInt32( 'D' | ('L' << 8) | ('G' << 16) | ('1' << 24) ),
@@ -410,7 +375,7 @@ public:
void AddReference(SdrVirtObj& rVrtObj);
void DelReference(SdrVirtObj& rVrtObj);
virtual SdrInventor GetObjInventor() const;
- virtual sal_uInt16 GetObjIdentifier() const;
+ virtual SdrObjKind GetObjIdentifier() const;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
// Layer interface
@@ -1048,7 +1013,7 @@ struct SVXCORE_DLLPUBLIC SdrObjectFreeOp
struct SdrObjCreatorParams
{
SdrInventor nInventor;
- sal_uInt16 nObjIdentifier;
+ SdrObjKind nObjIdentifier;
SdrModel& rSdrModel;
};
@@ -1066,7 +1031,7 @@ public:
static SdrObject* MakeNewObject(
SdrModel& rSdrModel,
SdrInventor nInventor,
- sal_uInt16 nObjIdentifier,
+ SdrObjKind nObjIdentifier,
const tools::Rectangle* pSnapRect = nullptr);
static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
@@ -1076,7 +1041,7 @@ private:
static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory(
SdrModel& rSdrModel,
SdrInventor nInventor,
- sal_uInt16 nIdentifier);
+ SdrObjKind nIdentifier);
SdrObjFactory() = delete;
};
diff --git a/include/svx/svdobjkind.hxx b/include/svx/svdobjkind.hxx
new file mode 100644
index 000000000000..827b35e3b339
--- /dev/null
+++ b/include/svx/svdobjkind.hxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/form/FormComponentType.hpp>
+
+enum SdrObjKind
+{
+ 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
+
+ OBJ_OLE2_APPLET = 100,
+ OBJ_OLE2_PLUGIN = 101,
+
+ // engine3d, arbitrarily place at 200
+ E3D_SCENE_ID = 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,
+
+ // 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,
+
+ // 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,
+
+ 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,
+
+ // 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,
+
+ // writer, arbitrarily place at 600
+ SwFlyDrawObjIdentifier = 601
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index 01b928b612ed..c313fb9a1bb4 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -83,7 +83,7 @@ public:
bool isSuppressGetBitmap() const { return mbSuppressGetBitmap; }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrCaptionObj* CloneSdrObject(SdrModel& rTargetModel) const override;
// implemented mainly for the purposes of Clone()
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
index dc0956388ed1..15c27ddbe10f 100644
--- a/include/svx/svdocirc.hxx
+++ b/include/svx/svdocirc.hxx
@@ -92,7 +92,7 @@ public:
SdrCircKind GetCircleKind() const { return meCircleKind; }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual OUString TakeObjNameSingul() const override;
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index d1f9558a0648..5d0116cb97d8 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -196,7 +196,7 @@ public:
SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &aCon1 : &aCon2); }
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual const tools::Rectangle& GetCurrentBoundRect() const override;
virtual const tools::Rectangle& GetSnapRect() const override;
virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 11ab6f115780..21ab9b3a2fb5 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -172,7 +172,7 @@ public:
void StartAnimation();
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index 7c44fa6afb4f..b63cf4b63d53 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -52,7 +52,7 @@ public:
virtual SdrObjList* getChildrenOfSdrObject() const override;
virtual void SetBoundRectDirty() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrLayerID GetLayer() const override;
virtual void NbcSetLayer(SdrLayerID nLayer) override;
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 3591a27c0d69..d72798e23111 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -83,7 +83,7 @@ public:
const Point& rPt2);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual SdrMeasureObj* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index 258a287509a4..9eab605e8ef4 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -48,7 +48,7 @@ public:
virtual bool HasTextEdit() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 85f0125c17b0..8c209ce7f281 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -134,7 +134,7 @@ public:
virtual SdrObjectUniquePtr getFullDragClone() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual OUString TakeObjNameSingul() const override;
virtual OUString TakeObjNamePlural() const override;
diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx
index af557b27be86..601b86d5480c 100644
--- a/include/svx/svdopage.hxx
+++ b/include/svx/svdopage.hxx
@@ -57,7 +57,7 @@ public:
// #i96598#
virtual void SetBoundRectDirty() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrPageObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrPageObj& operator=(const SdrPageObj& rObj);
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
index 6c8de0e5ae0b..5f56fd38e5ae 100644
--- a/include/svx/svdopath.hxx
+++ b/include/svx/svdopath.hxx
@@ -73,7 +73,7 @@ public:
const basegfx::B2DPolyPolygon& rPathPoly);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual SdrPathObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrPathObj& operator=(const SdrPathObj& rObj);
diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx
index 92c4e1d665cb..9480acdb103a 100644
--- a/include/svx/svdorect.hxx
+++ b/include/svx/svdorect.hxx
@@ -86,7 +86,7 @@ public:
const tools::Rectangle& rRect);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
virtual OUString TakeObjNameSingul() const override;
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index df713b66c951..98b9229df404 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -196,7 +196,7 @@ public:
virtual bool IsFontwork() const override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual void SetChanged() override;
virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 21a25330e913..9d74bffec93e 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -440,7 +440,7 @@ public:
virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
// needed to determine text anchor area
virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx
index 22f10d334a09..3796b086c8b9 100644
--- a/include/svx/svdouno.hxx
+++ b/include/svx/svdouno.hxx
@@ -73,7 +73,7 @@ public:
const css::uno::Reference< css::lang::XMultiServiceFactory >& rxSFac);
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrUnoObj* CloneSdrObject(SdrModel& rTargetModel) const override;
SdrUnoObj& operator= (const SdrUnoObj& rObj);
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index bede9e4356eb..a9864189da3f 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -60,7 +60,7 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual SdrInventor GetObjInventor() const override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrObjList* GetSubList() const override;
virtual const tools::Rectangle& GetCurrentBoundRect() const override;
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index 911be0c2a66e..a428254f6af7 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <editeng/mutxhelp.hxx>
#include <svx/svxdllapi.h>
+#include <svx/svdobjkind.hxx>
#include <cppuhelper/implbase7.hxx>
#include <comphelper/servicehelper.hxx>
@@ -83,7 +84,7 @@ class SVXCORE_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper7< css::dr
SdrObject *CreateSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape, bool bBeginning = false ) throw();
// Determine Type and Inventor
- static void GetTypeAndInventor( sal_uInt16& rType, SdrInventor& rInventor, const OUString& aName ) throw();
+ static void GetTypeAndInventor( SdrObjKind& rType, SdrInventor& rInventor, const OUString& aName ) throw();
// Creating a SdrObject using it's Description.
// Can be used by derived classes to support their owen Shapes (e.g. Controls).
diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx
index d69ddfca1d8b..7292bb1d5fdd 100644
--- a/include/svx/unoprov.hxx
+++ b/include/svx/unoprov.hxx
@@ -96,9 +96,6 @@ public:
* Globals
*/
-const sal_Int16 OBJ_OLE2_APPLET = 100;
-const sal_Int16 OBJ_OLE2_PLUGIN = 101;
-
#define E3D_INVENTOR_FLAG (0x80000000)
/**
diff --git a/reportdesign/IwyuFilter_reportdesign.yaml b/reportdesign/IwyuFilter_reportdesign.yaml
index df8d5db20e36..49d95b6f0143 100644
--- a/reportdesign/IwyuFilter_reportdesign.yaml
+++ b/reportdesign/IwyuFilter_reportdesign.yaml
@@ -1,9 +1,6 @@
---
assumeFilename: reportdesign/source/ui/report/ReportController.cxx
excludelist:
- reportdesign/inc/RptDef.hxx:
- # Needed for macro define
- - svx/fmglob.hxx
reportdesign/source/core/api/FormatCondition.cxx:
# Needed for COL_TRANSPARENT in REPORTCONTROLFORMAT_IMPL
- tools/color.hxx
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index fab7f9df7a57..f2dd5952684a 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -28,7 +28,7 @@
#include "dllapi.h"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/style/XStyle.hpp>
-#include <svx/fmglob.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svdtypes.hxx>
namespace com::sun::star {
@@ -45,15 +45,6 @@ constexpr SdrLayerID RPT_LAYER_FRONT (0);
constexpr SdrLayerID RPT_LAYER_BACK (1);
constexpr SdrLayerID RPT_LAYER_HIDDEN (2);
-
-
-#define OBJ_DLG_FIXEDTEXT (sal_uInt16(OBJ_MAXI) + 1)
-#define OBJ_DLG_IMAGECONTROL OBJ_FM_IMAGECONTROL
-#define OBJ_DLG_FORMATTEDFIELD (sal_uInt16(OBJ_MAXI) + 3)
-#define OBJ_DLG_HFIXEDLINE (sal_uInt16(OBJ_MAXI) + 4)
-#define OBJ_DLG_VFIXEDLINE (sal_uInt16(OBJ_MAXI) + 5)
-#define OBJ_DLG_SUBREPORT (sal_uInt16(OBJ_MAXI) + 6)
-
// allows the alignment and resizing of controls
enum class ControlModification
{
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 652ae055af8c..fa2c7c3890ed 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -114,7 +114,7 @@ public:
static SdrObject* createObject(
SdrModel& rTargetModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent);
- static sal_uInt16 getObjectType(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
+ static SdrObjKind getObjectType(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
};
// OCustomShape
@@ -139,7 +139,7 @@ public:
virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override;
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
private:
@@ -176,7 +176,7 @@ public:
static OOle2Obj* Create(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
- sal_uInt16 _nType)
+ SdrObjKind _nType)
{
return new OOle2Obj(rSdrModel, _xComponent, _nType);
}
@@ -184,7 +184,7 @@ public:
virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override;
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
// Clone() should make a complete copy of the object.
virtual OOle2Obj* CloneSdrObject(SdrModel& rTargetModel) const override;
@@ -198,11 +198,11 @@ private:
OOle2Obj(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
- sal_uInt16 _nType);
+ SdrObjKind _nType);
OOle2Obj(
SdrModel& rSdrModel,
const OUString& _sComponentName,
- sal_uInt16 _nType);
+ SdrObjKind _nType);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
@@ -214,7 +214,7 @@ private:
void impl_createDataProvider_nothrow( const css::uno::Reference< css::frame::XModel>& _xModel);
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
- sal_uInt16 m_nType;
+ SdrObjKind m_nType;
bool m_bOnlyOnce;
};
@@ -227,7 +227,7 @@ class REPORTDESIGN_DLLPUBLIC OUnoObject: public SdrUnoObj , public OObjectBase
friend class OObjectBase;
friend class DlgEdFactory;
- sal_uInt16 m_nObjectType;
+ SdrObjKind m_nObjectType;
// tdf#118730 remember if this object was created interactively (due to ::EndCreate being called)
bool m_bSetDefaultLabel;
@@ -235,12 +235,12 @@ protected:
OUnoObject(SdrModel& rSdrModel,
const OUString& _sComponentName,
const OUString& rModelName,
- sal_uInt16 _nObjectType);
+ SdrObjKind _nObjectType);
OUnoObject(
SdrModel& rSdrModel,
const css::uno::Reference< css::report::XReportComponent>& _xComponent,
const OUString& rModelName,
- sal_uInt16 _nObjectType);
+ SdrObjKind _nObjectType);
// protected destructor
virtual ~OUnoObject() override;
@@ -266,7 +266,7 @@ public:
static OUString GetDefaultName(const OUnoObject* _pObj);
virtual css::uno::Reference< css::uno::XInterface > getUnoShape() override;
- virtual sal_uInt16 GetObjIdentifier() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
virtual SdrInventor GetObjInventor() const override;
virtual OUnoObject* CloneSdrObject(SdrModel& rTargetModel) const override;
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index e3053e57fe4c..5c8da47c1cc6 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_DLG_FIXEDTEXT)
+ if (rUnoObj.GetObjIdentifier() == OBJ_RD_FIXEDTEXT)
{
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_DLG_HFIXEDLINE;
+ bChangeOrientation = rUnoObj.GetObjIdentifier() == OBJ_RD_HFIXEDLINE;
SvxShapeControl* pShape = new SvxShapeControl( pObj );
xShape = static_cast<SvxShape_UnoImplHelper *>(pShape);
pShape->setShapeKind(pObj->GetObjIdentifier());
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index df0062753b6f..427bf45aa16a 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -58,32 +58,32 @@ using namespace reportdesign;
using namespace container;
using namespace report;
-sal_uInt16 OObjectBase::getObjectType(const uno::Reference< report::XReportComponent>& _xComponent)
+SdrObjKind OObjectBase::getObjectType(const uno::Reference< report::XReportComponent>& _xComponent)
{
uno::Reference< lang::XServiceInfo > xServiceInfo( _xComponent , uno::UNO_QUERY );
OSL_ENSURE(xServiceInfo.is(),"Who deletes the XServiceInfo interface!");
if ( xServiceInfo.is() )
{
if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ))
- return OBJ_DLG_FIXEDTEXT;
+ return OBJ_RD_FIXEDTEXT;
if ( xServiceInfo->supportsService( SERVICE_FIXEDLINE ))
{
uno::Reference< report::XFixedLine> xFixedLine(_xComponent,uno::UNO_QUERY);
- return xFixedLine->getOrientation() ? OBJ_DLG_HFIXEDLINE : OBJ_DLG_VFIXEDLINE;
+ return xFixedLine->getOrientation() ? OBJ_RD_HFIXEDLINE : OBJ_RD_VFIXEDLINE;
}
if ( xServiceInfo->supportsService( SERVICE_IMAGECONTROL))
- return OBJ_DLG_IMAGECONTROL;
+ return OBJ_RD_IMAGECONTROL;
if ( xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD ))
- return OBJ_DLG_FORMATTEDFIELD;
+ return OBJ_RD_FORMATTEDFIELD;
if ( xServiceInfo->supportsService("com.sun.star.drawing.OLE2Shape") )
return OBJ_OLE2;
if ( xServiceInfo->supportsService( SERVICE_SHAPE ))
return OBJ_CUSTOMSHAPE;
if ( xServiceInfo->supportsService( SERVICE_REPORTDEFINITION ) )
- return OBJ_DLG_SUBREPORT;
+ return OBJ_RD_SUBREPORT;
return OBJ_OLE2;
}
- return 0;
+ return OBJ_NONE;
}
SdrObject* OObjectBase::createObject(
@@ -91,16 +91,16 @@ SdrObject* OObjectBase::createObject(
const uno::Reference< report::XReportComponent>& _xComponent)
{
SdrObject* pNewObj = nullptr;
- sal_uInt16 nType = OObjectBase::getObjectType(_xComponent);
+ SdrObjKind nType = OObjectBase::getObjectType(_xComponent);
switch( nType )
{
- case OBJ_DLG_FIXEDTEXT:
+ case OBJ_RD_FIXEDTEXT:
{
OUnoObject* pUnoObj = new OUnoObject(
rTargetModel,
_xComponent,
OUString("com.sun.star.form.component.FixedText"),
- OBJ_DLG_FIXEDTEXT);
+ OBJ_RD_FIXEDTEXT);
pNewObj = pUnoObj;
uno::Reference<beans::XPropertySet> xControlModel(pUnoObj->GetUnoControlModel(),uno::UNO_QUERY);
@@ -108,22 +108,22 @@ SdrObject* OObjectBase::createObject(
xControlModel->setPropertyValue( PROPERTY_MULTILINE,uno::makeAny(true));
}
break;
- case OBJ_DLG_IMAGECONTROL:
+ case OBJ_RD_IMAGECONTROL:
pNewObj = new OUnoObject(
rTargetModel,
_xComponent,
OUString("com.sun.star.form.component.DatabaseImageControl"),
- OBJ_DLG_IMAGECONTROL);
+ OBJ_RD_IMAGECONTROL);
break;
- case OBJ_DLG_FORMATTEDFIELD:
+ case OBJ_RD_FORMATTEDFIELD:
pNewObj = new OUnoObject(
rTargetModel,
_xComponent,
OUString("com.sun.star.form.component.FormattedField"),
- OBJ_DLG_FORMATTEDFIELD);
+ OBJ_RD_FORMATTEDFIELD);
break;
- case OBJ_DLG_HFIXEDLINE:
- case OBJ_DLG_VFIXEDLINE:
+ case OBJ_RD_HFIXEDLINE:
+ case OBJ_RD_VFIXEDLINE:
pNewObj = new OUnoObject(
rTargetModel,
_xComponent,
@@ -145,7 +145,7 @@ SdrObject* OObjectBase::createObject(
DBG_UNHANDLED_EXCEPTION("reportdesign");
}
break;
- case OBJ_DLG_SUBREPORT:
+ case OBJ_RD_SUBREPORT:
case OBJ_OLE2:
pNewObj = OOle2Obj::Create(
rTargetModel,
@@ -227,7 +227,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
{
switch(_nObjectId)
{
- case OBJ_DLG_IMAGECONTROL:
+ case OBJ_RD_IMAGECONTROL:
{
static TPropertyNamePair s_aNameMap = [&]()
{
@@ -241,7 +241,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
return s_aNameMap;
}
- case OBJ_DLG_FIXEDTEXT:
+ case OBJ_RD_FIXEDTEXT:
{
static TPropertyNamePair s_aNameMap = [&]()
{
@@ -263,7 +263,7 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
}();
return s_aNameMap;
}
- case OBJ_DLG_FORMATTEDFIELD:
+ case OBJ_RD_FORMATTEDFIELD:
{
static TPropertyNamePair s_aNameMap = [&]()
{
@@ -476,9 +476,9 @@ OCustomShape::~OCustomShape()
{
}
-sal_uInt16 OCustomShape::GetObjIdentifier() const
+SdrObjKind OCustomShape::GetObjIdentifier() const
{
- return sal_uInt16(OBJ_CUSTOMSHAPE);
+ return OBJ_CUSTOMSHAPE;
}
SdrInventor OCustomShape::GetObjInventor() const
@@ -574,7 +574,7 @@ OUnoObject::OUnoObject(
SdrModel& rSdrModel,
const OUString& _sComponentName,
const OUString& rModelName,
- sal_uInt16 _nObjectType)
+ SdrObjKind _nObjectType)
: SdrUnoObj(rSdrModel, rModelName)
,OObjectBase(_sComponentName)
,m_nObjectType(_nObjectType)
@@ -589,7 +589,7 @@ OUnoObject::OUnoObject(
SdrModel& rSdrModel,
const uno::Reference< report::XReportComponent>& _xComponent,
const OUString& rModelName,
- sal_uInt16 _nObjectType)
+ SdrObjKind _nObjectType)
: SdrUnoObj(rSdrModel, rModelName)
,OObjectBase(_xComponent)
,m_nObjectType(_nObjectType)
@@ -625,7 +625,7 @@ void OUnoObject::impl_initializeModel_nothrow()
}
}
-sal_uInt16 OUnoObject::GetObjIdentifier() const
+SdrObjKind OUnoObject::GetObjIdentifier() const
{
return m_nObjectType;
}
@@ -907,7 +907,7 @@ OUnoObject& OUnoObject::operator=(const OUnoObject& rObj)
OOle2Obj::OOle2Obj(
SdrModel& rSdrModel,
const uno::Reference< report::XReportComponent>& _xComponent,
- sal_uInt16 _nType)
+ SdrObjKind _nType)
: SdrOle2Obj(rSdrModel)
,OObjectBase(_xComponent)
,m_nType(_nType)
@@ -920,7 +920,7 @@ OOle2Obj::OOle2Obj(
OOle2Obj::OOle2Obj(
SdrModel& rSdrModel,
const OUString& _sComponentName,
- sal_uInt16 _nType)
+ SdrObjKind _nType)
: SdrOle2Obj(rSdrModel)
,OObjectBase(_sComponentName)
,m_nType(_nType)
@@ -933,7 +933,7 @@ OOle2Obj::~OOle2Obj()
{
}
-sal_uInt16 OOle2Obj::GetObjIdentifier() const
+SdrObjKind OOle2Obj::GetObjIdentifier() const
{
return m_nType;
}
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index 60ee506da7f7..15a7d2ed25b8 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -61,7 +61,7 @@ namespace rptui
std::shared_ptr<ONavigator> m_xReportExplorer;
Idle m_aMarkIdle;
DlgEdMode m_eMode;
- sal_uInt16 m_eActObj;
+ SdrObjKind m_eActObj;
Size m_aGridSizeCoarse;
Size m_aGridSizeFine;
bool m_bDeleted;
@@ -97,8 +97,8 @@ namespace rptui
OReportController& getController() const { return m_rReportController; }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType = OUString());
- sal_uInt16 GetInsertObj() const { return m_eActObj;}
+ void SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType = OUString());
+ SdrObjKind GetInsertObj() const { return m_eActObj;}
OUString const & GetInsertObjString() const;
DlgEdMode GetMode() const { return m_eMode; }
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 06ee94c3bd49..326c5ff0308c 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 ,sal_uInt16 _nObjectId = OBJ_DLG_FORMATTEDFIELD);
+ 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);
/** 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/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index d794a33f13a4..c634dcf098f4 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -74,7 +74,7 @@ namespace rptui
OScrollWindowHelper* getScrollWindow() const { return m_pParent; }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( sal_uInt16 eObj, const OUString& _sShapeType);
+ void SetInsertObj(SdrObjKind eObj, const OUString& _sShapeType);
OUString const & GetInsertObjString() const;
void setGridSnap(bool bOn);
void setDragStripes(bool bOn);
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index c166e1f759d5..eab5c7dd3b8b 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -84,7 +84,7 @@ namespace rptui
// forwards
void SetMode( DlgEdMode _eMode );
- void SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType);
+ void SetInsertObj(SdrObjKind eObj, const OUString& _sShapeType);
OUString const & GetInsertObjString() const;
void setGridSnap(bool bOn);
void setDragStripes(bool bOn);
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index e03ff63648df..c270aae409fc 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -148,7 +148,7 @@ namespace rptui
bool empty() const { return m_aSections.empty(); }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType);
+ void SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType);
const OUString& GetInsertObjString() const { return m_sShapeType;}
/** copies the current selection in this section
*/
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index dc85e34acd2d..e4eb5f653659 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -289,7 +289,7 @@ void ODesignView::SetMode( DlgEdMode _eNewMode )
m_aScrollWindow->SetMode(_eNewMode);
}
-void ODesignView::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
+void ODesignView::SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType )
{
m_eActObj = eObj;
m_aScrollWindow->SetInsertObj( eObj,_sShapeType );
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 0c2ba10ea590..cae05f329d5a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -600,23 +600,23 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
break;
case SID_FM_FIXEDTEXT:
aReturn.bEnabled = isEditable();
- aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_DLG_FIXEDTEXT;
+ aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_FIXEDTEXT;
break;
case SID_INSERT_HFIXEDLINE:
aReturn.bEnabled = isEditable();
- aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_DLG_HFIXEDLINE;
+ aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_HFIXEDLINE;
break;
case SID_INSERT_VFIXEDLINE:
aReturn.bEnabled = isEditable();
- aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_DLG_VFIXEDLINE;
+ aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_VFIXEDLINE;
break;
case SID_FM_EDIT:
aReturn.bEnabled = isEditable();
- aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_DLG_FORMATTEDFIELD;
+ aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_FORMATTEDFIELD;
break;
case SID_FM_IMAGECONTROL:
aReturn.bEnabled = isEditable();
- aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_DLG_IMAGECONTROL;
+ aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_RD_IMAGECONTROL;
break;
case SID_DRAWTBX_CS_BASIC:
case SID_DRAWTBX_CS_BASIC1:
@@ -1116,10 +1116,10 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
InvalidateFeature( SID_OBJECT_SELECT );
break;
case SID_SELECT_ALL_EDITS:
- getDesignView()->SelectAll(OBJ_DLG_FORMATTEDFIELD);
+ getDesignView()->SelectAll(OBJ_RD_FORMATTEDFIELD);
break;
case SID_SELECT_ALL_LABELS:
- getDesignView()->SelectAll(OBJ_DLG_FIXEDTEXT);
+ getDesignView()->SelectAll(OBJ_RD_FIXEDTEXT);
break;
case SID_TERMINATE_INPLACEACTIVATION:
{
@@ -1200,31 +1200,31 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
break;
case SID_FM_FIXEDTEXT:
getDesignView()->SetMode( DlgEdMode::Insert );
- getDesignView()->SetInsertObj( OBJ_DLG_FIXEDTEXT );
+ getDesignView()->SetInsertObj( OBJ_RD_FIXEDTEXT );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_INSERT_HFIXEDLINE:
getDesignView()->SetMode( DlgEdMode::Insert );
- getDesignView()->SetInsertObj( OBJ_DLG_HFIXEDLINE );
+ getDesignView()->SetInsertObj( OBJ_RD_HFIXEDLINE );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_INSERT_VFIXEDLINE:
getDesignView()->SetMode( DlgEdMode::Insert );
- getDesignView()->SetInsertObj( OBJ_DLG_VFIXEDLINE );
+ getDesignView()->SetInsertObj( OBJ_RD_VFIXEDLINE );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_FM_EDIT:
getDesignView()->SetMode( DlgEdMode::Insert );
- getDesignView()->SetInsertObj( OBJ_DLG_FORMATTEDFIELD );
+ getDesignView()->SetInsertObj( OBJ_RD_FORMATTEDFIELD );
createDefaultControl(aArgs);
InvalidateAll();
break;
case SID_FM_IMAGECONTROL:
getDesignView()->SetMode( DlgEdMode::Insert );
- getDesignView()->SetInsertObj( OBJ_DLG_IMAGECONTROL );
+ getDesignView()->SetInsertObj( OBJ_RD_IMAGECONTROL );
createDefaultControl(aArgs);
InvalidateAll();
break;
@@ -3012,7 +3012,7 @@ void OReportController::insertGraphic()
{ PROPERTY_IMAGEURL, Any(aDialog.GetPath()) },
{ PROPERTY_PRESERVEIRI, Any(bLink) }
}));
- createControl(aArgs,xSection,OUString(),OBJ_DLG_IMAGECONTROL);
+ createControl(aArgs,xSection,OUString(),OBJ_RD_IMAGECONTROL);
}
}
catch(const Exception&)
@@ -3099,7 +3099,7 @@ IMPL_LINK_NOARG( OReportController, OnExecuteReport, void*, void )
executeReport();
}
-void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,const uno::Reference< report::XSection>& _xSection,const OUString& _sFunction,sal_uInt16 _nObjectId)
+void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,const uno::Reference< report::XSection>& _xSection,const OUString& _sFunction,SdrObjKind _nObjectId)
{
SequenceAsHashMap aMap(_aArgs);
getDesignView()->setMarked(_xSection, true);
@@ -3131,7 +3131,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_DLG_SUBREPORT == _nObjectId )
+ else if ( _nObjectId == OBJ_OLE2 || OBJ_RD_SUBREPORT == _nObjectId )
{
pNewControl = SdrObjFactory::MakeNewObject(
*m_aReportModel,
@@ -3159,7 +3159,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
nullptr,
_nObjectId,
SdrInventor::ReportDesign,
- OBJ_DLG_FIXEDTEXT,
+ OBJ_RD_FIXEDTEXT,
// tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
// m_aReportModel seems pretty safe, it's done in other places, initialized
@@ -3216,9 +3216,9 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
pObj->CreateMediator(true);
- if ( _nObjectId == OBJ_DLG_FIXEDTEXT ) // special case for fixed text
+ if ( _nObjectId == OBJ_RD_FIXEDTEXT ) // special case for fixed text
xUnoProp->setPropertyValue(PROPERTY_LABEL,uno::makeAny(OUnoObject::GetDefaultName(pObj)));
- else if ( _nObjectId == OBJ_DLG_VFIXEDLINE )
+ else if ( _nObjectId == OBJ_RD_VFIXEDLINE )
{
awt::Size aOlSize = xShapeProp->getSize();
xShapeProp->setSize(awt::Size(aOlSize.Height,aOlSize.Width)); // switch height and width
@@ -3427,7 +3427,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
if ( !xField.is() )
continue;
- sal_uInt16 nOBJID = 0;
+ SdrObjKind nOBJID = OBJ_NONE;
sal_Int32 nDataType = sdbc::DataType::BINARY;
xField->getPropertyValue(PROPERTY_TYPE) >>= nDataType;
switch ( nDataType )
@@ -3435,10 +3435,10 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
case sdbc::DataType::BINARY:
case sdbc::DataType::VARBINARY:
case sdbc::DataType::LONGVARBINARY:
- nOBJID = OBJ_DLG_IMAGECONTROL;
+ nOBJID = OBJ_RD_IMAGECONTROL;
break;
default:
- nOBJID = OBJ_DLG_FORMATTEDFIELD;
+ nOBJID = OBJ_RD_FORMATTEDFIELD;
break;
}
@@ -3466,7 +3466,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
xNumberFormats,
nOBJID,
SdrInventor::ReportDesign,
- OBJ_DLG_FIXEDTEXT,
+ OBJ_RD_FIXEDTEXT,
// tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
// m_aReportModel seems pretty safe, it's done in other places, initialized
@@ -3537,7 +3537,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
xField->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if (pSectionViews[0] != pSectionViews[1] &&
- nOBJID == OBJ_DLG_FORMATTEDFIELD) // we want this nice feature only at FORMATTEDFIELD
+ nOBJID == OBJ_RD_FORMATTEDFIELD) // we want this nice feature only at FORMATTEDFIELD
{
uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY_THROW);
uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY_THROW);
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 674e72da8e9c..ed6f614b5859 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -89,7 +89,7 @@ void OReportWindow::dispose()
vcl::Window::dispose();
}
-void OReportWindow::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
+void OReportWindow::SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType )
{
m_aViewsWindow->SetInsertObj( eObj,_sShapeType);
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index a7a8fda02ad3..bb9691e8eabf 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -218,7 +218,7 @@ sal_uInt16 OScrollWindowHelper::getSectionCount() const
return m_aReportWindow->getSectionCount();
}
-void OScrollWindowHelper::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
+void OScrollWindowHelper::SetInsertObj(SdrObjKind eObj, const OUString& _sShapeType)
{
m_aReportWindow->SetInsertObj(eObj,_sShapeType);
}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index db2b44b6d731..2274e85ca529 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -330,7 +330,7 @@ sal_uInt16 OViewsWindow::getSectionCount() const
return static_cast<sal_uInt16>(m_aSections.size());
}
-void OViewsWindow::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
+void OViewsWindow::SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType )
{
for (const auto& rxSection : m_aSections)
rxSection->getReportSection().getSectionView().SetCurrentObj( eObj, SdrInventor::ReportDesign );
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx
index a0db6c64bc5d..bc68d60b896d 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -48,29 +48,29 @@ IMPL_STATIC_LINK(
{
switch( aParams.nObjIdentifier )
{
- case OBJ_DLG_FIXEDTEXT:
+ case OBJ_RD_FIXEDTEXT:
pNewObj = new OUnoObject(aParams.rSdrModel, SERVICE_FIXEDTEXT
,OUString("com.sun.star.form.component.FixedText")
- ,OBJ_DLG_FIXEDTEXT);
+ ,OBJ_RD_FIXEDTEXT);
break;
- case OBJ_DLG_IMAGECONTROL:
+ case OBJ_RD_IMAGECONTROL:
pNewObj = new OUnoObject(aParams.rSdrModel, SERVICE_IMAGECONTROL
,OUString("com.sun.star.form.component.DatabaseImageControl")
- ,OBJ_DLG_IMAGECONTROL);
+ ,OBJ_RD_IMAGECONTROL);
break;
- case OBJ_DLG_FORMATTEDFIELD:
+ case OBJ_RD_FORMATTEDFIELD:
pNewObj = new OUnoObject(aParams.rSdrModel, SERVICE_FORMATTEDFIELD
,OUString("com.sun.star.form.component.FormattedField")
- ,OBJ_DLG_FORMATTEDFIELD);
+ ,OBJ_RD_FORMATTEDFIELD);
break;
- case OBJ_DLG_VFIXEDLINE:
- case OBJ_DLG_HFIXEDLINE:
+ case OBJ_RD_VFIXEDLINE:
+ case OBJ_RD_HFIXEDLINE:
{
OUnoObject* pObj = new OUnoObject(aParams.rSdrModel, SERVICE_FIXEDLINE
,OUString("com.sun.star.awt.UnoControlFixedLineModel")
,aParams.nObjIdentifier);
pNewObj = pObj;
- if ( aParams.nObjIdentifier == OBJ_DLG_HFIXEDLINE )
+ if ( aParams.nObjIdentifier == OBJ_RD_HFIXEDLINE )
{
uno::Reference<beans::XPropertySet> xProp = pObj->getAwtComponent();
xProp->setPropertyValue( PROPERTY_ORIENTATION, uno::makeAny(sal_Int32(0)) );
@@ -80,8 +80,8 @@ IMPL_STATIC_LINK(
case OBJ_CUSTOMSHAPE:
pNewObj = new OCustomShape(aParams.rSdrModel, SERVICE_SHAPE);
break;
- case OBJ_DLG_SUBREPORT:
- pNewObj = new OOle2Obj(aParams.rSdrModel, SERVICE_REPORTDEFINITION, OBJ_DLG_SUBREPORT);
+ case OBJ_RD_SUBREPORT:
+ pNewObj = new OOle2Obj(aParams.rSdrModel, SERVICE_REPORTDEFINITION, OBJ_RD_SUBREPORT);
break;
case OBJ_OLE2:
pNewObj = new OOle2Obj(aParams.rSdrModel, "com.sun.star.chart2.ChartDocument", OBJ_OLE2);
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 4ef2e7d492c4..a9e177f01567 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -910,16 +910,13 @@ void ScDrawLayer::InitializeCellAnchoredObj(SdrObject* pObj, ScDrawObjData& rDat
const ScAnchorType aAnchorType = ScDrawLayer::GetAnchorType(*pObj);
if (aAnchorType == SCA_CELL_RESIZE)
{
- SdrPathObj* pLineObj = nullptr;
if (pObj->GetObjIdentifier() == OBJ_LINE)
- pLineObj = dynamic_cast<SdrPathObj*>(pObj);
- if (pLineObj)
{
// Horizontal lines might have wrong start and end anchor because of erroneously applied
// 180deg rotation (tdf#137446). Other lines have wrong end anchor. Coordinates in
// object are correct. Use them for recreating the anchor.
const basegfx::B2DPolygon aPoly(
- pLineObj->GetPathPoly().getB2DPolygon(0));
+ static_cast<SdrPathObj*>(pObj)->GetPathPoly().getB2DPolygon(0));
const basegfx::B2DPoint aB2DPoint0(aPoly.getB2DPoint(0));
const basegfx::B2DPoint aB2DPoint1(aPoly.getB2DPoint(1));
const Point aPointLT(FRound(std::min(aB2DPoint0.getX(), aB2DPoint1.getX())),
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index 8ae2002b0b49..368a1fd68c06 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -95,7 +95,7 @@ void FuConstArc::Activate()
break;
}
- pView->SetCurrentObj( sal::static_int_cast<sal_uInt16>( aObjKind ) );
+ pView->SetCurrentObj(aObjKind);
aOldPointer = pWindow->GetPointer();
rViewShell.SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index e622a3e84fb4..bdb6807dcd56 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -150,7 +150,7 @@ void FuConstPolygon::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(eKind));
+ pView->SetCurrentObj(eKind);
pView->SetEditMode(SdrViewEditMode::Create);
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index edb82a66d32a..3ef1a03752cb 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -195,7 +195,7 @@ void FuConstRectangle::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(aObjKind));
+ pView->SetCurrentObj(aObjKind);
aOldPointer = pWindow->GetPointer();
rViewShell.SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index 6614b93776ca..6f543e516878 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -27,14 +27,14 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell& rViewSh, vcl::Window* pWin,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
, nInventor(SdrInventor::Unknown)
- , nIdentifier(0)
+ , nIdentifier(OBJ_NONE)
{
const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR);
const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if( pInventorItem )
nInventor = static_cast<SdrInventor>(pInventorItem->GetValue());
if( pIdentifierItem )
- nIdentifier = pIdentifierItem->GetValue();
+ nIdentifier = static_cast<SdrObjKind>(pIdentifierItem->GetValue());
}
FuConstUnoControl::~FuConstUnoControl()
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index 80bce194635d..4353243eef6c 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -28,7 +28,7 @@ enum class SdrInventor : sal_uInt32;
class FuConstUnoControl final : public FuConstruct
{
SdrInventor nInventor;
- sal_uInt16 nIdentifier;
+ SdrObjKind nIdentifier;
public:
FuConstUnoControl(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 02b27c5cd2e3..480f4ca9c73b 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -94,7 +94,7 @@ class SC_DLLPUBLIC ScTabViewShell: public SfxViewShell, public ScDBFunc
private:
ObjectSelectionType eCurOST;
sal_uInt16 nDrawSfxId;
- sal_uInt16 nFormSfxId;
+ SdrObjKind eFormObjKind;
OUString sDrawCustom; // current custom shape type
std::unique_ptr<ScDrawShell> pDrawShell;
std::unique_ptr<ScDrawTextObjectBar> pDrawTextShell;
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 9e0a81600e8f..5a7bcc2088b6 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -94,12 +94,12 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_DRAW_SELECT )
nNewId = SID_OBJECT_SELECT;
- sal_uInt16 nNewFormId = 0;
+ SdrObjKind eNewFormObjKind = OBJ_NONE;
if (nNewId == SID_FM_CREATE_CONTROL)
{
const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if (pIdentifierItem)
- nNewFormId = pIdentifierItem->GetValue();
+ eNewFormObjKind = static_cast<SdrObjKind>(pIdentifierItem->GetValue());
}
OUString sStringItemValue;
@@ -128,12 +128,12 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
bEx = true;
}
else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
- nNewFormId == nFormSfxId || nNewFormId == 0 ) && !bSwitchCustom )
+ eNewFormObjKind == eFormObjKind || eNewFormObjKind == OBJ_NONE ) && !bSwitchCustom )
{
// #i52871# if a different custom shape is selected, the slot id can be the same,
// so the custom shape type string has to be compared, too.
- // SID_FM_CREATE_CONTROL with nNewFormId==0 (without parameter) comes
+ // SID_FM_CREATE_CONTROL with eNewFormObjKind==OBJ_NONE (without parameter) comes
// from FuConstruct::SimpleMouseButtonUp when deactivating
// Execute for the form shell, to deselect the controller
if ( nNewId == SID_FM_CREATE_CONTROL )
@@ -265,7 +265,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_FM_CREATE_CONTROL:
SetDrawFormShell(true);
pTabView->SetDrawFuncPtr(new FuConstUnoControl(*this, pWin, pView, pDoc, aNewReq));
- nFormSfxId = nNewFormId;
+ eFormObjKind = eNewFormObjKind;
break;
case SID_DRAWTBX_CS_BASIC :
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 007d437b7833..fa939bb6317c 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -20,7 +20,7 @@
#include <config_features.h>
#include <tools/urlobj.hxx>
-#include <svx/fmglob.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svdouno.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 7e47d964f7a0..861ca9517044 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -838,7 +838,7 @@ void SdOOXMLExportTest1::testTdf111884()
CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
// must be a group shape
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_GRUP), pShape->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_GRUP, pShape->GetObjIdentifier());
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index e71c4f5ec904..71f44a0776b6 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -400,7 +400,7 @@ void SdOOXMLExportTest2::testBnc822341()
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() );
+ CPPUNIT_ASSERT_EQUAL( OBJ_OLE2, pObj->GetObjIdentifier() );
}
utl::TempFile tempFile2;
@@ -433,7 +433,7 @@ void SdOOXMLExportTest2::testBnc822341()
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() );
+ CPPUNIT_ASSERT_EQUAL( OBJ_OLE2, pObj->GetObjIdentifier() );
}
xDocShRef->DoClose();
@@ -460,7 +460,7 @@ void SdOOXMLExportTest2::testMathObject()
const SdrPage *pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE("no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_OLE2, pObj->GetObjIdentifier());
}
utl::TempFile tempFile2;
@@ -480,7 +480,7 @@ void SdOOXMLExportTest2::testMathObject()
const SdrPage *pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE("no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_OLE2, pObj->GetObjIdentifier());
}
xDocShRef->DoClose();
@@ -507,7 +507,7 @@ void SdOOXMLExportTest2::testMathObjectPPT2010()
const SdrPage *pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE("no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_OLE2, pObj->GetObjIdentifier());
}
xDocShRef->DoClose();
@@ -2918,7 +2918,7 @@ void SdOOXMLExportTest2::testTdf129372()
const SdrObject* pObj = pPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() );
+ CPPUNIT_ASSERT_EQUAL( OBJ_OLE2, pObj->GetObjIdentifier() );
}
void SdOOXMLExportTest2::testShapeGlowEffect()
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 4a7da0915f24..6cb1e91f7307 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -1478,7 +1478,7 @@ void SdImportTestSmartArt::testTdf131553()
CPPUNIT_ASSERT(pObjGroup);
const SdrObject *pObj = pObjGroup->GetSubList()->GetObj(1);
CPPUNIT_ASSERT_MESSAGE("no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_OLE2, pObj->GetObjIdentifier());
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
index 07e50a93051b..a34914b88a60 100644
--- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
+++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
@@ -621,7 +621,7 @@ void LOKitSearchTest::testSearchIn2MixedObjects()
SdrObject* pObject = pPage->GetObj(0);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_TEXT), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pObject->GetObjIdentifier());
}
// Check Object 2
@@ -629,7 +629,7 @@ void LOKitSearchTest::testSearchIn2MixedObjects()
SdrObject* pObject = pPage->GetObj(1);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_GRAF), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_GRAF, pObject->GetObjIdentifier());
SdrGrafObj* pGraphicObject = dynamic_cast<SdrGrafObj*>(pObject);
CPPUNIT_ASSERT(pGraphicObject);
@@ -709,14 +709,14 @@ void LOKitSearchTest::testSearchIn6MixedObjects()
{
SdrObject* pObject = pPage->GetObj(0);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_TEXT), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pObject->GetObjIdentifier());
}
// Check Object 2
{
SdrObject* pObject = pPage->GetObj(1);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_GRAF), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_GRAF, pObject->GetObjIdentifier());
SdrGrafObj* pGraphicObject = dynamic_cast<SdrGrafObj*>(pObject);
CPPUNIT_ASSERT(pGraphicObject);
auto const& pVectorGraphicData = pGraphicObject->GetGraphic().getVectorGraphicData();
@@ -729,21 +729,21 @@ void LOKitSearchTest::testSearchIn6MixedObjects()
{
SdrObject* pObject = pPage->GetObj(2);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_CUSTOMSHAPE), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_CUSTOMSHAPE, pObject->GetObjIdentifier());
}
// Check Object 4
{
SdrObject* pObject = pPage->GetObj(3);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_CUSTOMSHAPE), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_CUSTOMSHAPE, pObject->GetObjIdentifier());
}
// Check Object 5
{
SdrObject* pObject = pPage->GetObj(4);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_GRAF), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_GRAF, pObject->GetObjIdentifier());
SdrGrafObj* pGraphicObject = dynamic_cast<SdrGrafObj*>(pObject);
CPPUNIT_ASSERT(pGraphicObject);
auto const& pVectorGraphicData = pGraphicObject->GetGraphic().getVectorGraphicData();
@@ -756,7 +756,7 @@ void LOKitSearchTest::testSearchIn6MixedObjects()
{
SdrObject* pObject = pPage->GetObj(5);
CPPUNIT_ASSERT(pObject);
- CPPUNIT_ASSERT_EQUAL(sal_uInt16(OBJ_GRAF), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_GRAF, pObject->GetObjIdentifier());
SdrGrafObj* pGraphicObject = dynamic_cast<SdrGrafObj*>(pObject);
CPPUNIT_ASSERT(pGraphicObject);
auto const& pVectorGraphicData = pGraphicObject->GetGraphic().getVectorGraphicData();
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 86c522723904..b71e91b6b820 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -405,7 +405,7 @@ void SdTiledRenderingTest::testPostKeyEvent()
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject = pActualPage->GetObj(0);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject->GetObjIdentifier());
SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pObject);
SdrView* pView = pViewShell->GetView();
pView->MarkObj(pTextObj, pView->GetSdrPageView());
@@ -433,7 +433,7 @@ void SdTiledRenderingTest::testPostMouseEvent()
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject = pActualPage->GetObj(0);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject->GetObjIdentifier());
SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pObject);
SdrView* pView = pViewShell->GetView();
pView->MarkObj(pTextObj, pView->GetSdrPageView());
@@ -1084,7 +1084,7 @@ void SdTiledRenderingTest::testCursorVisibility_SingleClick()
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject1 = pActualPage->GetObj(0);
CPPUNIT_ASSERT(pObject1 != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject1->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject1->GetObjIdentifier());
SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject1);
// Click once outside of the text (in the first quartile) => no editing.
@@ -1133,7 +1133,7 @@ void SdTiledRenderingTest::testCursorVisibility_DoubleClick()
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject1 = pActualPage->GetObj(0);
CPPUNIT_ASSERT(pObject1 != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject1->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject1->GetObjIdentifier());
SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject1);
// Double-click outside the text to enter edit mode.
@@ -1165,7 +1165,7 @@ void SdTiledRenderingTest::testCursorVisibility_MultiView()
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject1 = pActualPage->GetObj(0);
CPPUNIT_ASSERT(pObject1);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject1->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject1->GetObjIdentifier());
SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject1);
// Make sure that cursor state is not changed just because we create a second view.
@@ -1213,7 +1213,7 @@ void SdTiledRenderingTest::testCursorVisibility_Escape()
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject1 = pActualPage->GetObj(0);
CPPUNIT_ASSERT(pObject1 != nullptr);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TITLETEXT), pObject1->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TITLETEXT, pObject1->GetObjIdentifier());
SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject1);
// Click once on the text to start editing.
@@ -1504,7 +1504,7 @@ void SdTiledRenderingTest::testTdf103083()
SdPage* pActualPage = pViewShell->GetActualPage();
SdrObject* pObject1 = pActualPage->GetObj(1);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_OUTLINETEXT), pObject1->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_OUTLINETEXT, pObject1->GetObjIdentifier());
SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject1);
SdrView* pView = pViewShell->GetView();
@@ -2280,7 +2280,7 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
CPPUNIT_ASSERT(pObject);
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObject);
CPPUNIT_ASSERT(pTextObj);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TEXT), pTextObj->GetObjIdentifier());
+ CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pTextObj->GetObjIdentifier());
// This test is unreliable: it gives alternating results for the following coordinates.
// As a compromise, instead of disabling it altogether, we allow for both sets of values.
const Point aPos = pTextObj->GetLastBoundRect().TopLeft();
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 15f2be5fc22e..fb670e9585d4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1508,7 +1508,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
continue;
bool bPresStyle = pObj->GetStyleSheet() && (pObj->GetStyleSheet()->GetFamily() == SfxStyleFamily::Page);
- SdrObjKind eSdrObjKind = static_cast< SdrObjKind >( pObj->GetObjIdentifier() );
+ SdrObjKind eSdrObjKind = pObj->GetObjIdentifier();
switch( eKind )
{
@@ -1910,7 +1910,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
if (mbScaleObjects)
{
- SdrObjKind eObjKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier());
+ SdrObjKind eObjKind = pObj->GetObjIdentifier();
if (bIsPresObjOnMaster)
{
@@ -2191,6 +2191,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
case OBJ_MEDIA: eObjKind = PresObjKind::Media; break;
case OBJ_GRAF: eObjKind = PresObjKind::Graphic; break;
case OBJ_OLE2: eObjKind = PresObjKind::Object; break;
+ default: break;
}
}
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index c473468e1dfe..a5d599de1a1e 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -35,7 +35,7 @@
#include <editeng/outlobj.hxx>
#include <sot/storage.hxx>
#include <editeng/editobj.hxx>
-#include <svx/fmglob.hxx>
+#include <svx/svdobjkind.hxx>
#include <svx/svdouno.hxx>
#include <svx/ImageMapInfo.hxx>
#include <sot/formats.hxx>
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 0f8f46c4a5fd..5065ced24d20 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -68,7 +68,6 @@ OutlineBulletDlg::OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAtt
SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj();
if( pObj->GetObjInventor() == SdrInventor::Default )
{
-
switch(pObj->GetObjIdentifier())
{
case OBJ_TITLETEXT:
@@ -77,6 +76,8 @@ OutlineBulletDlg::OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAtt
case OBJ_OUTLINETEXT:
bOutliner = true;
break;
+ default:
+ break;
}
}
}
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index e42db7025863..2d2fa73574b3 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -92,7 +92,7 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
SdrCircObj* pNewCircle =
new SdrCircObj(
mpView->getSdrModelFromSdrView(),
- ToSdrCircKind(static_cast<SdrObjKind>(mpView->GetCurrentObjIdentifier())),
+ ToSdrCircKind(mpView->GetCurrentObjIdentifier()),
aNewRectangle,
static_cast<::tools::Long>(pPhiStart->GetValue () * 10.0),
static_cast<::tools::Long>(pPhiEnd->GetValue () * 10.0));
@@ -193,7 +193,7 @@ void FuConstructArc::Activate()
break;
}
- mpView->SetCurrentObj(static_cast<sal_uInt16>(aObjKind));
+ mpView->SetCurrentObj(aObjKind);
FuConstruct::Activate();
}
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index dffec4d18d99..a28bb06eb959 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -333,7 +333,7 @@ void FuConstructBezierPolygon::Activate()
break;
}
- mpView->SetCurrentObj(static_cast<sal_uInt16>(eKind));
+ mpView->SetCurrentObj(eKind);
FuConstruct::Activate();
}
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index b74547587fc3..958ed8042c81 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -424,7 +424,7 @@ void FuConstructRectangle::Activate()
break;
}
- mpView->SetCurrentObj(static_cast<sal_uInt16>(aObjKind));
+ mpView->SetCurrentObj(aObjKind);
FuConstruct::Activate();
}
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index 6edfaaa769c9..27d3ae247b25 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -45,7 +45,7 @@ FuConstructUnoControl::FuConstructUnoControl (
SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
, nInventor(SdrInventor::Unknown)
- , nIdentifier(0)
+ , nIdentifier(OBJ_NONE)
{
}
@@ -67,7 +67,7 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq )
if( pInventorItem )
nInventor = static_cast<SdrInventor>(pInventorItem->GetValue());
if( pIdentifierItem )
- nIdentifier = pIdentifierItem->GetValue();
+ nIdentifier = static_cast<SdrObjKind>(pIdentifierItem->GetValue());
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list