Issue 78373 - RPT: saving a generated report text document under a new name loses embedded graphics
Summary: RPT: saving a generated report text document under a new name loses embedded ...
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: recent-trunk
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: new_implementation
Depends on:
Blocks:
 
Reported: 2007-06-13 11:39 UTC by Frank Schönheit
Modified: 2012-03-01 22:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
document to reproduce the bug case (11.37 KB, application/vnd.sun.xml.base)
2007-06-13 11:40 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2007-06-13 11:39:19 UTC
- open the attached database document
- open the contained report for editing
- change the "Graphics" property of the contained image control (in the group
  header) so that it refers to an existing image on your system
- execute the report
=> a text document is created, which contains the proper graphics
- File / Save as
- save the text document under an arbitrary new name
=> the document switches to edit mode, and the embedded graphics is lost
Comment 1 Frank Schönheit 2007-06-13 11:40:03 UTC
Created attachment 45869 [details]
document to reproduce the bug case
Comment 2 Frank Schönheit 2007-06-13 11:40:34 UTC
This is a new implementation in CWS oj14. Adding keyword "new_implementation".
Comment 3 Frank Schönheit 2007-06-13 13:53:50 UTC
The Report Designer iTeam decided that this issue is a show stopper for the
release of the report designer. Targeting to 2.3, thus.
Comment 4 Frank Schönheit 2007-06-13 19:40:37 UTC
fs->tmorgner:
An assertion in the non-product build of the CWS gave me the right direction ...
(I *love* assertions):
In the META-INF\manifest.xml, you declare the embedded image to be of type
text/xml (manifest:media-type="text/xml"), which is plain false. Seems some code
in OOo is confused by this wrong media type.

I suggest you replace this with and empty media-type (this is what Writer itself
writes for embedded images), or replace it with the media type as obtained from
the MediaDescriptor (not sure at the moment whether the SOImageService already
offers API for this - the GraphicProvider which it uses internally *does* have
this information.
Comment 5 tmorgner 2007-06-13 19:52:33 UTC
well, the engine does not create a Manifest at all. So the engine is not the one
who assigns 'text/xml' to the content.

However, we can generate a manifest file, this should solve the problem.
Comment 6 Frank Schönheit 2007-06-13 19:58:30 UTC
Hmm - interesting, then where does this manifest come from? Somebody in OOo
seems to apply some magics here ...
Well, if you create this file in a proper way, this indeed would be the best
solution /me thinks.
Comment 7 tmorgner 2007-07-23 12:14:44 UTC
Fixed long time ago.
Comment 8 ocke.janssen 2007-08-01 07:17:05 UTC
Please verify. Thanks. 
You have to reload the document after you saved it. That seems to be another
issue in the writer code.
Comment 9 marc.neumann 2007-08-02 11:38:32 UTC
verified in CWS rpt23fix02

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Frpt23fix02
Comment 10 drewjensen.inbox 2007-08-20 13:37:24 UTC
Tested w/ 2.3m_1 SRB1.0 on XP

You do not need to reopen the file after saving to see the embedded grahpics, at
last not with XP?

Closing