That was the answer, I have never touched the Manifest. That still means a lot of re-writing, but at least I won't be stuck in OO 2.4 forever :)
Your code was close, but the odfManifest call would not operate on the container directly. I had to save the document and then reopen the manifest, make changes, and save the .odt file again.
# stuff happens
$document->createImageElement("$time",
size =>"13.76,9.53",
attachment => $par,
import => $testimage,
style => "Graphics", );
# more stuff happens
# create the .odt file
$document->save();
# Now, re-open that file's manifest
my $manifest = OpenOffice::OODoc::odfManifest(file => $odtfile);
$manifest->setEntry($document->imageLink($time), "image/png");
# and save it back
$manifest->save();
And it works! I can now add images into my reports again without OpenOffice 3.2 complaining. Considering the fact that most of my reports are imported images, this was a real problem for me.
Thank you, Jean-Marie, for your help and great module!
- oakbox (Richard Still)
|