Issue 71596 - Saving a document with many objects anchored to character will place all objects at end of paragraph
Summary: Saving a document with many objects anchored to character will place all obje...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.0.4
Hardware: PC Windows XP
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-16 01:28 UTC by jpannequin
Modified: 2013-08-07 14:42 UTC (History)
1 user (show)

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


Attachments
XML structure of bad paragraph. (26.92 KB, image/jpeg)
2006-11-16 01:30 UTC, jpannequin
no flags Details
XML structure of good paragraph. (25.90 KB, image/png)
2006-11-16 01:30 UTC, jpannequin
no flags Details
XML structure of bad paragraph. (26.92 KB, image/png)
2006-11-16 01:31 UTC, jpannequin
no flags Details
The document, with a bad appearance for the frames. (15.14 KB, application/vnd.oasis.opendocument.text)
2006-11-16 01:32 UTC, jpannequin
no flags Details
The document, as it should look like. (77.71 KB, application/pdf)
2006-11-16 01:32 UTC, jpannequin
no flags Details
patch of the fix based on SRC680m193 (codeline for OOo 2.2 (6.17 KB, text/plain)
2006-12-01 10:32 UTC, Oliver-Rainer Wittmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jpannequin 2006-11-16 01:28:52 UTC
Version : 2.0.3 and 2.0.4
Description : I am working on a document with many small frames(here : 64). I
gave you an example of what it should look like, in the attached PDF file. In
the saved Open Document, the frames are not anchored to the character, but to
the end of the paragraph. This problem does not happen with every paragraph.

XML Description : In context.xml, it appears that the <draw:frame> elements are
gathered at the end of the <text:p> elements. They should mix with the
<text:span> elements. The attached images describe the structure of the XML, in
a good case and in a bad case.

Workaround : Edit the new document in one go (hoping the system will not crash)
and export it to PDF. Obviously not a good workaround for a long document.

Attached documents :
Bug OpenOffice 1 - Frame - Bad.jpeg : XML structure of bad paragraph.
Bug OpenOffice 1 - Frame - Good.jpeg : XML structure of good paragraph.
Doc1.doc : The document, with a bad appearance for the frames.
Doc1.pdf : The document, as it should look like.

This problem is similar in description to bug #70404. But I cannot reproduce bug
#70404. 

Thanks for looking into it.

PS : The small preview image of first page of the document in the Windows
Explorer looks good, with the frames at the right place. I guess it is generated
during the first save. !?!
Comment 1 jpannequin 2006-11-16 01:30:11 UTC
Created attachment 40606 [details]
XML structure of bad paragraph.
Comment 2 jpannequin 2006-11-16 01:30:41 UTC
Created attachment 40607 [details]
XML structure of good paragraph.
Comment 3 jpannequin 2006-11-16 01:31:02 UTC
Created attachment 40608 [details]
XML structure of bad paragraph.
Comment 4 jpannequin 2006-11-16 01:32:04 UTC
Created attachment 40609 [details]
The document, with a bad appearance for the frames.
Comment 5 jpannequin 2006-11-16 01:32:33 UTC
Created attachment 40610 [details]
The document, as it should look like.
Comment 6 jpannequin 2006-11-16 01:34:46 UTC
Mistake in the file type for the images : PNG and not JPEG.
Comment 7 michael.ruess 2006-11-16 11:02:28 UTC
MRU->OD: see attached odt. At the end of the third paragraph, there are a lot of
text objects anchord to the last character. Originally these were all placed at
different characters in the paragraph. When anchoring some of them back to other
characters, after saving and reloading the document they are all back at the
last character.
Looks, like there are only a certain numer of "to character" anchored objects
"allowed"...
Comment 8 Oliver-Rainer Wittmann 2006-11-16 12:49:58 UTC
accepted.
Comment 9 Oliver-Rainer Wittmann 2006-11-21 13:29:30 UTC
jpannequin point me with his debugging results to the right direction and thus,
I found the defect cause.

changing target to OOo 2.2
Comment 10 jpannequin 2006-11-21 13:34:52 UTC
It seems have found a solution. Could you send me a patch to the source, so that
I can test it as well ?
Thanks.
Comment 11 Oliver-Rainer Wittmann 2006-11-22 06:57:02 UTC
OD->jpannequin:
I've found the defect cause with the help of your investigations.
The solution is in progress, but give me a couple of days to finish it. I will
attach a corresponding patch.
Comment 12 Oliver-Rainer Wittmann 2006-12-01 10:31:04 UTC
fixed in cws swqbf90 - changed file:
/sw/source/core/layout/sortedobjsimpl.cxx, 1.8.90.1
Comment 13 Oliver-Rainer Wittmann 2006-12-01 10:32:34 UTC
Created attachment 41036 [details]
patch of the fix based on SRC680m193 (codeline for OOo 2.2
Comment 14 jpannequin 2006-12-01 10:59:15 UTC
Thanks for your work on the patch.

I am going to test it soon.
Comment 15 jpannequin 2006-12-01 12:42:10 UTC
Applying the patch on SRC680m2, without any problem.

The first quick test looks good. The frames attache to a character were
correctly saved.

I will do a bigger test later.
Comment 16 Oliver-Rainer Wittmann 2007-01-03 12:35:09 UTC
OD->MRU: Checked in internal installation set of cws swqbf90 - please verify.
Comment 17 michael.ruess 2007-01-08 13:03:43 UTC
Verified fix in CWS swqbf90.
Comment 18 michael.ruess 2007-02-01 14:23:52 UTC
Checked fix in SRC680m201 and OOF680m5.
Fix should also be available in OOF680m2, which is already available for download.