Bug 61459 - HSLFShape.getShapeName() returns name of shapeType and not the shape name
Summary: HSLFShape.getShapeName() returns name of shapeType and not the shape name
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.17-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-26 21:06 UTC by Andreas Beeker
Modified: 2018-04-20 13:46 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2017-08-26 21:06:28 UTC
The summary says it all ...

The shape name needs to be retrieved by:

EscherComplexProperty ep = HSLFShape.getEscherProperty(shape.getEscherOptRecord(), EscherProperties.GROUPSHAPE__SHAPENAME);
String name;
if (ep != null) {
   name = StringUtil.getFromUnicodeLE(ep.getComplexData());
} else {
   name = shape.getShapeName()+shape.getShapeId();
}

See also https://stackoverflow.com/questions/45855232
I'll apply the changes when POI 3.17 is out.
Comment 1 Andreas Beeker 2018-04-20 13:46:21 UTC
Applied via r1829656