Issue 48434

Summary: Graphics disappear after saving as odt
Product: Writer Reporter: caolanm
Component: codeAssignee: michael.ruess
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: issues, j.w.r.degoede
Version: 680m97   
Target Milestone: ---   
Hardware: All   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample source file none

Description caolanm 2005-04-29 11:16:44 UTC
-open the attached sxw
-scroll to page 10 - 11, notice the figures
-save as odt
-scroll all the way down to end
-scroll back to page 10-11: The figures show as "read-error"
Comment 1 caolanm 2005-04-29 11:20:09 UTC
Created attachment 25642 [details]
sample source file
Comment 2 Oliver-Rainer Wittmann 2005-04-29 12:02:10 UTC
first investigation reveals that the lost graphics are embedded metafiles.
During save whose unique ID is re-calculated for the determination of a unique
filename for the graphic file. The resulting graphic filename differs from the
one in the source file. Thus, the Writer can't re-read the graphic filename
again, because it uses the 'old' graphic filename.
But, reload of the file brings back the embedded graphics. Following save action
doesn't lose the graphic again.

The cause of the different unique IDs for the embedded metafile could be
(suggestion from THB), that we improved our metafile import and thus, have
more/other information about the metafile as in OOo 1.1.x to generate the unique ID

Note: issue 48108 is somehow related, because the same defect is shown, but it
seems to be different defect causes.

OD->MRU: Please set appropriate target and assign the issue to me, Thx.
Comment 3 michael.ruess 2005-04-29 12:47:58 UTC
Reassigned to OD. Targeted to OO 2.0.1 at first. Will discuss 2.0 target with TZ.
Comment 4 Oliver-Rainer Wittmann 2005-04-29 13:42:42 UTC
I've found a solution for the Writer code to workaround the changing embedded
graphic filename:
If original known embedded graphic filename doesn't exist in the document
storage, try to determine the new embedded graphic filename. This could be done
with the knowledge, that an embedded graphic file is stored with its unique ID
in the document storage.
Comment 5 Oliver-Rainer Wittmann 2005-05-04 09:48:11 UTC
As discussed this MRU, target will stay on OOo 2.0.1
Comment 6 Oliver-Rainer Wittmann 2005-05-04 11:20:41 UTC
fixed in cws swqbugfixes30 - changed files:
/sw/inc/ndgrf.hxx, 1.14.80.1
/sw/source/core/graphic/ndgrf.cxx, 1.28.64.1

Note: This fallback also functions as a workaround for the defect of issue 48108
Comment 7 Oliver-Rainer Wittmann 2005-05-31 08:07:38 UTC
OD->MRU:
Checked in internal installation set of cws swqbugfixes30 - please verify.

re-open issue and reassign to mru@openoffice.org
Comment 8 Oliver-Rainer Wittmann 2005-05-31 08:07:44 UTC
reassign to mru@openoffice.org
Comment 9 Oliver-Rainer Wittmann 2005-05-31 08:07:48 UTC
reset resolution to FIXED
Comment 10 michael.ruess 2005-06-09 11:33:22 UTC
Verified fix in CWS swqbugfixes30.
Comment 11 Oliver-Rainer Wittmann 2005-06-28 11:58:27 UTC
Reopen, because cws swqbugfixes30 will be canceled.
Fix will be integrated into cws swqbf34.
Comment 12 Oliver-Rainer Wittmann 2005-06-28 12:25:15 UTC
fixed in cws swqbf34 - changed files:
/sw/inc/ndgrf.hxx, 1.14.156.1
/sw/source/core/graphic/ndgrf.cxx, 1.29.84.1
Comment 13 Oliver-Rainer Wittmann 2005-06-29 11:31:44 UTC
fix reviewed by FME.
Comment 14 Oliver-Rainer Wittmann 2005-07-04 10:09:51 UTC
OD->MRU:
Checked in internal installation of cws swqbf34 - please verify.
Comment 15 michael.ruess 2005-07-06 12:39:59 UTC
Corrected "Target Milestone" to OO 2.0.
Comment 16 michael.ruess 2005-07-07 12:29:19 UTC
Verified fix in CWS swqbf34.
Comment 17 michael.ruess 2005-07-22 16:02:04 UTC
Checked fix in 680m119 build.