Hello Ralf,

Thanks for your feedback.

The way to provide your solution is to create an issue via
https://issues.apache.org/jira/browse/ODFTOOLKIT and after login using the
red create button on the top.

The perfect case would be to provide two (subversion) patches:

   1. The first patch just to show the problem. It should contain one ore
   more regression test(s) indicating the facets of the issue.
   For this, you best extend an existing test, e.g. in your case

   
<ODFTOOLKIT_HOME>/simple/src/test/java/org/odftoolkit/simple/draw/ImageTest.java
   Anyone might apply this first patch to reproduce the problem.
   2. The second patch should solve the problem, which we would apply on
   top of the first regression test patch.

With both patches, all regression tests should run smoothly.
There might be cases where it is hard to test, but in general the above
would be my perfect solution.

Looking forward to your contribution, Ralf!
Svante

PS: How can we improve our documentation, shall we add the above directly
to
http://incubator.apache.org/odftoolkit/get-involved.html
or create a new subpage like 'create JIRA issue' for this?


ᐧ

2017-04-17 2:25 GMT+02:00 Ralf Heydenreich <[email protected]>:

> Hi all,
> if I try to replace an image by an ImageSelection, the image handle
> isn't released after writing the data into ODF.
>
> Short example:
>
> // get selection
> ImageSelection sel = new ImageSelection(getTextSelection(
> paragraphElement));
>
> // replace image from URI
> Image img = sel.replaceWithImage(uri);
>
> Node parentNode = getNode().getParentNode();
> parentNode.insertBefore(img.getFrame().getDrawFrameElement(), getNode());
>
> Now, the image could not be deleted by another process. I think, the
> reason is in method
> org.odftoolkit.simple.draw.Image#configureInsertedImage. The InputStream
> isn't closed explicitly. I couldn't examine my solution because I can't
> get run the current ODF toolkit (I'm using version 0.8.2). If I use
> 0.9.0 my application fails with Wstax exception (parser isn't found
> because I'm using the library inside an OSGi bundle).
>
> Btw, I've created a solution for replacing placeholders in an ODF
> document (including tables and - of cours - images). But I don't know
> how to contribute this solution into the actual release.
>
> Would be glad if you could help me.
>
> TIA,
> Ralf.
>

Reply via email to