Apache OpenOffice (AOO) Bugzilla – Issue 17629
Graphical objects in header and footer are incorrectly displayed when converting sxw to doc
Last modified: 2013-08-07 14:43:45 UTC
When I import a Microsoft Word document that has horizontal lines in the header and footer, and then I save it again as .doc, and open it MS Word, the lines aren't displayed correctly. They are then in the text area.
Reassigned to CMC
Can you attach a sample .sxw to this issue (http://www.openoffice.org/issues/createattachment.cgi?id=17629) so that I can reproduce the problem.
cmc->broxtor: broxtor can you attach an example document which shows this behaviour when loaded and saved again ? You can do this by visiting http://www.openoffice.org/issues/createattachment.cgi?id=17629 and comment on this bug by visiting http://www.openoffice.org/issues/show_bug.cgi?id=17629
Created attachment 8337 [details] rename file to header.doc. Comments are in the file.
Sorry you had to ask twice for this. I had misread the message the first time. I thought you had been able to reproduce this, but you hadn't. The uploaded file is actually an .doc file, but I had to change the extension,to make the uploading possible. So all you have to do is rename the file to .doc. Comments are in the file. Broxtor
cmc->mru: This looks well in SRX645m15, can you confirm that this is the case ?
Yes this works now. Drawing lines/objects in headers and footers hasn't been implemented in Writer until now. This is available for the community in OO 1.1 final.
Verified in internal build of OO 1.1.
Thank you very much!!! A step closer to saying goodbye to MS Word. (Only issue left for me is 1820)
I'm afraid I was happy to soon. When I tried this again in OOo RC3 on a Windows 95 system the problem still occured. To reproduce this take the following steps: 1. In MS Word 97 create a document that has lines in the header. 2. Save this file and open it in OOo Writer. 3. Save the file in OOo Writer as an MS Word file. 4. Open the file again in MS Word 97 and see what has happened.
MRU: Generally it works. But there still seems to be a problem in the Export.
Reopened.
MRU->CMC: open attached file (contains two drawing lines in the header, save it as WW8, reload -> the first line has an y-position of more than 3cm now.
Created attachment 9090 [details] New attachment
Strange, only seems to happen if two drawing objects share the same anchor paragraph and are in a header.
Created attachment 9171 [details] load me
Very odd indeed, but I think I see why this is happening. cmc->od: Place a breakpoint in sw\source\core\layout\fly.cxx in void SwFrm::CalcFlys( BOOL bPosOnly ) on line 2342 i.e. the line ((SwDrawContact*)GetUserCall(pO))->ChkPage(); and place a watch on the two values of... (long*)(pDrawObjs->pData)[0] (long*)(pDrawObjs->pData)[1] This is inside a loop of USHORT nCnt = GetDrawObjs()->Count(); for ( USHORT i = 0; i < nCnt; ++i ) { SdrObject *pO = (*GetDrawObjs())[i]; .... So the intent is clearly to handle each object in pDrawObjs one after another. Now load the last attached example output.doc which has two SdrObjects anchored to the same paragraph. The problem is that during the handling of the first object when i is 0, the call to ((SwDrawContact*)GetUserCall(pO))->ChkPage(); *changes* the order of the objects in pDrawObjs!, so in this simple example the first object is moved to pDrawObjs->pData[1] and the second is moved to pDrawObjs->pData[0]. So on the second loop when i is 1 the original first object gets processed again, and the original second not at all by this toplevel loop in SwFrm::CalcFlys. The crucial part of this loop for me is that it sets the position of the anchor into the rectange of the SdrObject. It looks like a layout bug to me, perhaps triggered by special handling for header/footer objects ?
OD (29.09.2003): accepted.
OD (13.10.2003): Changed files in cws sw7pp1b: /sw/source/core/layout/fly.cxx, 1.46.52.1.24.1
OD (21.10.2003): correction of fix: /sw/source/core/layout/fly.cxx, 1.46.52.1.24.2
OD->MRU: Checked in internal product patch build of cws sw7pp1b. Please verify.
Checked fix with CWS sw7pp1b.
Verified. Fix will be included in OO 1.1.1.
Checked fix with OO 1.1.1 build srx645m27.
Tried this with OOo 1.1.1b and Windows XP. Looking good!! Thanks!!