summaryrefslogtreecommitdiff
path: root/svx/source/customshapes/EnhancedCustomShape2d.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-30 20:33:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-07 14:22:07 +0100
commit8295a3344704ce9a18489933c499a50c403f1a3d (patch)
tree92a10017311909e3010624b39acddfcf7d3eba00 /svx/source/customshapes/EnhancedCustomShape2d.cxx
parent8accfa30343195b5d7cfd111301677a6a9b6a21b (diff)
remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enum
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 1f05a3782a7c..9f3b91297bd9 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2585,7 +2585,7 @@ void EnhancedCustomShape2d::CreateSubPath(
aClosedPolyPolygon.setClosed(true);
SdrPathObjUniquePtr pFill(new SdrPathObj(
mrSdrObjCustomShape.getSdrModelFromSdrObject(),
- OBJ_POLY,
+ SdrObjKind::Polygon,
aClosedPolyPolygon));
SfxItemSet aTempSet(*this);
aTempSet.Put(makeSdrShadowItem(false));
@@ -2602,7 +2602,7 @@ void EnhancedCustomShape2d::CreateSubPath(
// Thus, use a type that fits the polygon
SdrPathObjUniquePtr pStroke(new SdrPathObj(
mrSdrObjCustomShape.getSdrModelFromSdrObject(),
- aNewB2DPolyPolygon.isClosed() ? OBJ_POLY : OBJ_PLIN,
+ aNewB2DPolyPolygon.isClosed() ? SdrObjKind::Polygon : SdrObjKind::PolyLine,
aNewB2DPolyPolygon));
SfxItemSet aTempSet(*this);
aTempSet.Put(makeSdrShadowItem(false));
@@ -2622,7 +2622,7 @@ void EnhancedCustomShape2d::CreateSubPath(
// see comment above about OBJ_PLIN
pObj.reset(new SdrPathObj(
mrSdrObjCustomShape.getSdrModelFromSdrObject(),
- aNewB2DPolyPolygon.isClosed() ? OBJ_POLY : OBJ_PLIN,
+ aNewB2DPolyPolygon.isClosed() ? SdrObjKind::Polygon : SdrObjKind::PolyLine,
aNewB2DPolyPolygon));
aTempSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
}
@@ -2631,7 +2631,7 @@ void EnhancedCustomShape2d::CreateSubPath(
aNewB2DPolyPolygon.setClosed(true);
pObj.reset(new SdrPathObj(
mrSdrObjCustomShape.getSdrModelFromSdrObject(),
- OBJ_POLY,
+ SdrObjKind::Polygon,
aNewB2DPolyPolygon));
}