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 2021/11/29 12:44:31 UTC
[Bug 65709] addOlePackage Add a picture object double click picture will deform
https://bz.apache.org/bugzilla/show_bug.cgi?id=65709
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
There's no way to stop Office to replace the embedded package manager symbol.
The deformation of the icon is based on the replaced image and different
dimension of it.
So try one of ...
* set AnchorType to MOVE_DONT_RESIZE
* invest time in creating a icon close to the one a double-click would generate
and set * or check, if the shape can be added via an OneCellAnchor.
So instead of ...
> final int oleIdx = wb.addOlePackage(content.getBytes(), objectName, objectName + fileExtension, objectName + fileExtension);
> final Drawing<?> pat = sheet.createDrawingPatriarch();
> final ClientAnchor anchor = pat.createAnchor(0, 0, 0, 0, colNo, rowNo, colNo + 1, rowNo + 2);//tweak cell ranges to minimize image distortion
> anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
... you/we need to check how to attach a OneCellAnchor [1]
I close this issue now, as this belongs better in the mailing list
[1]
https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_oneCellAnchor_topic_ID0EYKLPB.html
--
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