You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/03/21 16:37:34 UTC

[Bug 59180] XSSFGraphicFrame hides anchor from XSSFShape

https://bz.apache.org/bugzilla/show_bug.cgi?id=59180

Tony BenBrahim <to...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Tony BenBrahim <to...@gmail.com> ---
Workaround above did not work in one case of three (wrong parent returned by
chart.getParent().

I ended up using this (ugly but works)

if (shape instanceof XSSFGraphicFrame) {
    try {
    final Field anchorField = XSSFShape.class.getDeclaredField("anchor");
    anchorField.setAccessible(true);
    final XSSFClientAnchor anchor = (XSSFClientAnchor) anchorField.get(shape);
        renderGraphicsFrame...
    } catch (NoSuchFieldException | SecurityException | IllegalAccessException
|
 IllegalArgumentException e) {
    LOG.info("unable to extract anchor for chart", e);
   }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org