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/02/23 22:26:06 UTC
[Bug 59056] New: It is no longer possible to render indivual shapes
of a org.apache.poi.hslf.usermodel.HSLFSlide
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
Bug ID: 59056
Summary: It is no longer possible to render indivual shapes of
a org.apache.poi.hslf.usermodel.HSLFSlide
Product: POI
Version: 3.14-dev
Hardware: Macintosh
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
Assignee: dev@poi.apache.org
Reporter: openholger@gmail.com
org.apache.poi.hslf.usermodel.HSLFShape#draw is no longer implemented, which
makes it impossible to render individual shapes.
In poi v3.12 it was still possible to render indidual Shapes (e.g. for text
because org.apache.poi.hslf.model.TextShape#draw was overriding the placeholder
org.apache.poi.hslf.model.Shape#draw and provided rendering logic). However in
3.13 and later org.apache.poi.hslf.usermodel.HSLFShape#draw is not overridden
anywhere but also does not provide any rendering logic.
To avoid any confusion: Rending of complete slides still works via
org.apache.poi.hslf.usermodel.HSLFSlide#draw the regression is only affecting
individual shape rendering with Graphics2D.
--
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
[Bug 59056] [Patch] Render individual slideshow shapes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
--- Comment #4 from Andreas Beeker <ki...@apache.org> ---
Created attachment 33601
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33601&action=edit
Patch for drawing single shapes
--
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
[Bug 59056] It is no longer possible to render individual shapes of
a org.apache.poi.hslf.usermodel.HSLFSlide
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
Javen O'Neal <on...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|It is no longer possible to |It is no longer possible to
|render indivual shapes of a |render individual shapes of
|org.apache.poi.hslf.usermod |a
|el.HSLFSlide |org.apache.poi.hslf.usermod
| |el.HSLFSlide
--
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
[Bug 59056] [Patch] Render individual slideshow shapes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Andreas Beeker <ki...@apache.org> ---
added via r1732974
--
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
[Bug 59056] It is no longer possible to render indivual shapes of a
org.apache.poi.hslf.usermodel.HSLFSlide
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
--- Comment #2 from holgerbrandl <ho...@gmail.com> ---
My usecase is http://opencards.info/ where I need to partially render slides.
To do so I was using in the past the following code
https://github.com/holgerbrandl/opencards/blob/8fe5ac6ec4af1603352f1a2a935657fb09371971/src/info/opencards/pptintegration/PPTSlideRenderPanel.java#L65
Since with v3.13 the method org.apache.poi.hslf.usermodel.HSLFShape#draw is not
implemented by any of the subclasses, so rendering of individual slides does
not work anymore.
With v3.12 and earlier I was using org.apache.poi.hslf.model.Shape#draw which
itself was also not doing anything but it was overridden by
org.apache.poi.hslf.model.Background
org.apache.poi.hslf.model.Picture
org.apache.poi.hslf.model.ShapeGroup
org.apache.poi.hslf.model.SimpleShape
org.apache.poi.hslf.model.TextShape
Thanks to your answer I discovered the workaround of doing
DrawFactory.getInstance(graphics).getDrawable(shape).draw(graphics);
instead of the previous approach of
shape.draw(graphics);
See here
https://github.com/holgerbrandl/opencards/blob/poi_3.13/src/info/opencards/pptintegration/PPTSlideRenderPanel.java#L91
Still, org.apache.poi.hslf.usermodel.HSLFShape#draw should imho either simply
implement this workaround or be removed from the api (since it's non-functional
at the moment).
--
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
[Bug 59056] [Patch] Render individual slideshow shapes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
Summary|It is no longer possible to |[Patch] Render individual
|render individual shapes of |slideshow shapes
|a |
|org.apache.poi.hslf.usermod |
|el.HSLFSlide |
Component|HSLF |SL Common
--- Comment #3 from Andreas Beeker <ki...@apache.org> ---
You are right, I've missed that draw method.
What do you think about the patch?
--
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
[Bug 59056] [Patch] Render individual slideshow shapes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
--- Comment #5 from holgerbrandl <ho...@gmail.com> ---
Patch looks very good to me. Thanks!
--
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
[Bug 59056] It is no longer possible to render indivual shapes of a
org.apache.poi.hslf.usermodel.HSLFSlide
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59056
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
Hardware|Macintosh |All
--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
Please elaborate a bit more your use-case - best would be some kind of example
where the rendering is to be inserted.
How would you change org.apache.poi.sl.draw.DrawTextShape to suit your needs?
The background for this change is, the common sl change, which refactors the
rendering code from X/HSLF to a separate package hierarchy. You can even
provide your own org.apache.poi.sl.draw.DrawFactory to provide custom
rendering.
Please be aware X/HSLF still has scratchpad state, so api breaks aren't a
regression.
My goal is to keep the common sl interfaces (org.apache.poi.sl.*) downward
compatible, but this isn't necessarily true for the X/HSLF implementation
classes - usually the HSLF api will be migrated towards XSLF.
--
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