Skip to content

Commit 96834fa

Browse files
author
Noel Grandin
committed
crashtesting fix
regression from commit 170a1df Author: Noel Grandin <[email protected]> Date: Thu Sep 25 10:47:48 2025 +0200 simplify use of EnhancedCustomShapeEngine Change-Id: Ic7f17e8bf05bc0462cf28c0420f4e58b6ec1c579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191957 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins
1 parent ebea2a0 commit 96834fa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sd/source/ui/dlg/sdtreelb.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -910,17 +910,17 @@ OUString SdPageObjsTLV::GetObjectName(
910910
OUString sObjName;
911911
if (pObject->GetObjIdentifier() == SdrObjKind::CustomShape)
912912
{
913-
#ifndef NDEBUG
914-
OUString aEngine(pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_ENGINE).GetValue());
915-
assert(aEngine.isEmpty() || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine");
916-
#endif
917913
// taken from SdrObjCustomShape::GetCustomShapeName
918-
OUString sShapeType;
919-
const SdrCustomShapeGeometryItem& rGeometryItem
920-
= pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
921-
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
922-
if (pAny && (*pAny >>= sShapeType))
923-
sObjName = SdResId(STR_NAVIGATOR_CUSTOMSHAPE) + u": " + sShapeType;
914+
OUString aEngine(pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_ENGINE).GetValue());
915+
if(aEngine.isEmpty() || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine")
916+
{
917+
OUString sShapeType;
918+
const SdrCustomShapeGeometryItem& rGeometryItem
919+
= pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
920+
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName(u"Type"_ustr);
921+
if (pAny && (*pAny >>= sShapeType))
922+
sObjName = SdResId(STR_NAVIGATOR_CUSTOMSHAPE) + u": " + sShapeType;
923+
}
924924
}
925925
else
926926
sObjName = pObject->TakeObjNameSingul();

0 commit comments

Comments
 (0)