[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    [Bug 65709] addOlePackage Add a picture object double click picture will deform
From:       bugzilla () apache ! org
Date:       2021-11-29 12:44:31
Message-ID: bug-65709-47293-0616WlEbgK () https ! bz ! apache ! org/bugzilla/
[Download RAW message or body]

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

Andreas Beeker <kiwiwings@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Andreas Beeker <kiwiwings@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic