Bug 60683 - Frame position reference lost when inporting .DOC file
Summary: Frame position reference lost when inporting .DOC file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Justin L
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: DOC-Frames
  Show dependency treegraph
 
Reported: 2013-02-11 18:53 UTC by Luiz Angelo Daros de Luca
Modified: 2023-05-26 19:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
.doc file with frames (25.00 KB, application/msword)
2013-02-11 18:53 UTC, Luiz Angelo Daros de Luca
Details
.odt file (14.48 KB, application/vnd.oasis.opendocument.text)
2013-02-11 18:55 UTC, Luiz Angelo Daros de Luca
Details
the original position in .pdf (105.61 KB, application/pdf)
2013-02-11 18:56 UTC, Luiz Angelo Daros de Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo Daros de Luca 2013-02-11 18:53:08 UTC
Created attachment 74642 [details]
.doc file with frames

Hello,

LO writer, when openning a .doc file, converts wrongly the frame position references. For example, respectively:

In Word (numbers are in cm):
1) horizontal centered in page, vertical 0 from paragraph
2) horizontal centered in collumn, vertical 3 from margin
3) horizontal centered in margin, vertical 3 from paragraph
4) horizontal centered in margin, vertical 8 from page
5) horizontal centered in margin, vertical 6 from margin

become in Writer:

1) horizontal centered in paragraph area (misplaced), vertical 2.5 (which is page margin) from page (position OK but not relative anymore)
2) centered collumn in paragraph area (which is OK), vertical 3 from margin (which is OK)
3) horizontal centered in page text area (OK), vertical 4 from margin (why margin now?)
4) horizontal centered in page text area (OK), vertical 8 from page(OK)
5) horizontal centered in page text area (OK), vertical 9.4 from page (why???)

Only case 4) is 100% OK.

All cases can be fixed by manually updating the frame position after the file was openned. I'll attach the .doc, .odt and a .pdf file

BTW, the component used inside the doc seems to be an old one, not used anymore. I could not create it using a new M$ Office but only coping from an old document. Also, after libreoffice saves it, the frame component was converted to
a textbox, with different properties.
Comment 1 Luiz Angelo Daros de Luca 2013-02-11 18:55:59 UTC
Created attachment 74643 [details]
.odt file

The file format, whether .doc or .odt, after libreoffice saved it does not matter too much. The results are the same. Even M$ Office respects the problems introduced by libreoffice. The new doc looks the same on both suites.
Comment 2 Luiz Angelo Daros de Luca 2013-02-11 18:56:57 UTC
Created attachment 74644 [details]
the original position in .pdf
Comment 3 Jorendc 2013-03-04 23:05:21 UTC
Thanks for reporting!

I can confirm this behavior using Mac OSX 10.8.2 with LibreOffice 4.0.1.2

(In reply to comment #0)
> BTW, the component used inside the doc seems to be an old one, not used
> anymore. I could not create it using a new M$ Office but only coping from an
> old document. Also, after libreoffice saves it, the frame component was
> converted to
> a textbox, with different properties.

Therefore I mark this as Minor Low.

Kind regards,
Joren
Comment 4 QA Administrators 2015-04-19 03:23:22 UTC Comment hidden (obsolete)
Comment 5 Luiz Angelo Daros de Luca 2015-04-19 04:47:05 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2016-09-20 09:24:48 UTC Comment hidden (obsolete)
Comment 7 Luiz Angelo Daros de Luca 2016-12-12 18:55:18 UTC
Still on 5.2.3.3
Comment 8 QA Administrators 2018-10-02 02:55:44 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-10-02 03:51:01 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2022-10-06 04:10:33 UTC Comment hidden (obsolete, spam)
Comment 11 Justin L 2023-05-25 18:43:41 UTC
repro 7.6+
LO seems to be reversing the horizontal and vertical page/paragraph position. I want to look into this...
Comment 12 Justin L 2023-05-26 15:37:14 UTC
(In reply to Luiz Angelo Daros de Luca from comment #0)
> 5) horizontal centered in page text area (OK), vertical 9.4 from page (why???)
The last one (V:6) is converted to "entire page" intentionally by commit 63f4b9e4f69ad2148209b946846b4efbfff90d92
Author: Oliver Bolte on Wed Jul 18 13:47:14 2007 +0000
od 1.174.86.1: #148498# - WW8 import: adjustment/conversion of certain vertical alignment of absolute postioned objects.

Proposed fix for the first two (which inherit from a style) is at https://gerrit.libreoffice.org/c/core/+/152331

The rest seem OK to me.
Comment 13 Commit Notification 2023-05-26 19:53:07 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d42f519be7bcc8e194899a6b3225bcee7e54bc16

tdf#60683 tdf#55946 doc import: use style's anchor info

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.