Apache OpenOffice (AOO) Bugzilla – Issue 30149
Wrong location of images in imported Hebrew file
Last modified: 2017-05-20 11:13:53 UTC
MSWord 2003 file with two images- When opened in OOo 680m38, the images move into a wrong location: * The top image moves from the far right to the left, and is incurrectly halfway centered. * the buttom image move from being aligned with the left part of the trext, to the edge of the page.
Created attachment 15858 [details] the problem file
DL->MRU: Could you please handle this?
MRU->AMA: Word does not change the directions for positioning when in RTL context. OO Writer does. So in my eyes, there are two possibilities to fix the problem of frame/graphic position in CTL Word doc's. 1. the import must recalculate the position dependent on the width/margins of the page text area or 2. A kind of compatibility flag will be introduced for this.
*** Issue 28653 has been marked as a duplicate of this issue. ***
*** Issue 28659 has been marked as a duplicate of this issue. ***
*** Issue 25255 has been marked as a duplicate of this issue. ***
Please add keywords: ms_interoperability
My name is Oleg Reebakov. I work for Tk Open Systems company in Jerusalem. We delop the Hebrew OpenOffice.org versions. I have started to investigate this Issue. I have few directions so I am planning to fix this issue unless I hear from you otherwise.
ayaniger -> ama: The file originally attached to this issue has been imported correctly for some time now, however placement of images in RTL documents is still not always correct. Example: when importing the attached Word document (picture_RTL.doc) with an image centered in an RTL paragraph, the picture appears at the right edge instead of in the center. This does not happen if the direction is changed to LTR. I was able to fix the placement by applying the attached patch (ww8par6.cxx.diff) to my m86 development environment under Linux RH9. The file being patched, sw/source/filter/ww8/ww8par6.cxx has not changed from m86 to m97. Could you review the patch?
Created attachment 25466 [details] Contains picture, centered
Created attachment 25467 [details] Screen shot of the file as it appears in OOo
Created attachment 25468 [details] Screen shot of the file as it appears in Word
Created attachment 25469 [details] Proposed patch
Note: the OOo screenshot is from m95.
OD->ayaniger: Thx for your contribution to OOo. I've reviewed your patch. As I see you only disabled the introduced conversion of Microsoft Word RTL horizontal position into the Writer RTL horizontal position. This conversion is done in the assumption that the Microsoft Word RTL horizontal position is given in LTR mode. This is true for the given document <2724401.doc> and the document <109311-Contemporary Letter_MS Word.doc>. For these documents the conversion is needed, otherwise the horizontal object positions will be wrong. Thus, there must be a difference between these documents and the document you had attached. Probably its the Microsoft Word version, which created the documents. With which version do you created your document? I' ll will try to find out with which version the other documents are created. If we have find out the difference, we have to adjust your patch and only suppress the conversion of the horizontal position under the found out circumstances.
Created attachment 25595 [details] another WW8 document in RTL with horizontal positions in LTR mode
ayaniger -> od: The document I attached, picture_RTL.doc, was created by removing lots of other stuff form a different Word document, then saving in Word 2000. I don't know which version of Word was used to create the original uncut document. (I got the same behavior, when I saved under Word 2002 instead of Word 2000.) However, when I tried to created a new document, with a different picture, I couldn't reproduce the problem, either in Word 2000 or Word 2002. The pictures were imported correctly. Is there something unusual about the picture in picture_RTL.doc that I'm missing? Or is it because of the version of Word used to create the original uncut document?
OD->ayaniger: Sorry for answering soo late, but I was busy. Thank you for checking new Microsoft Word 2000 and 2002 documents. I checked a new Microsoft Word 2003 document and everything is fine. Means the introduce position conversion has to be performed to get the correct positions in the Writer. I also changed the given document <picture_RTL.doc> with Microsoft Word 2003 - I've set another horizontal position at the picture. Also, for this resulting document the position conversion has to be performed. Thus, a deeper look into the document <picture_RTL.doc> is needed. I'll have to investigate the single property modifiers given in the document - probably one of them states that the object positions are given in RTL. Probably your suggestion is correct and there is something special at the picture. My current planning and workload reveals that this investigation has to wait at least 4-5 weeks. Probably you can have a deeper look into the file format.
I can confirm the problem still exits with oo.org 2.4.0 on Debian. Please update the version info and re-terget. Thanks.
Import of the bugdoc submitted by sforbes has been fixed by the patch to issue 96267. The import of picture_RTL.doc is still a problem, though there might be something unusual about this picture as od suggested.
Reset assigne to the default "issues@openoffice.apache.org".