From 8295a3344704ce9a18489933c499a50c403f1a3d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Dec 2021 20:33:52 +0200 Subject: remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enum We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/engine3d/lathe3d.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx/source/engine3d/lathe3d.cxx') diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index e811d0eebfeb..4880193f8159 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -114,7 +114,7 @@ void E3dLatheObj::SetDefaultAttributes(const E3dDefaultAttributes& rDefault) SdrObjKind E3dLatheObj::GetObjIdentifier() const { - return E3D_LATHEOBJ_ID; + return SdrObjKind::E3D_Lathe; } E3dLatheObj* E3dLatheObj::CloneSdrObject(SdrModel& rTargetModel) const @@ -186,7 +186,7 @@ std::unique_ptr E3dLatheObj::GetBreakObj() // create PathObj basegfx::B3DPolyPolygon aLathePoly3D(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(maPolyPoly2D)); basegfx::B2DPolyPolygon aTransPoly(TransformToScreenCoor(aLathePoly3D)); - std::unique_ptr pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), OBJ_PLIN, aTransPoly)); + std::unique_ptr pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), SdrObjKind::PolyLine, aTransPoly)); // Set Attribute SfxItemSet aSet(GetObjectItemSet()); -- cgit