Bug 81263 - FILEOPEN: wrong image and shapes position in .doc
Summary: FILEOPEN: wrong image and shapes position in .doc
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: Other All
: high major
Assignee: Justin L
URL:
Whiteboard: interoperability target:5.4.0 target:...
Keywords: bibisected, bisected, filter:doc, regression
: 96263 102496 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-12 10:25 UTC by mahesh patil
Modified: 2021-04-09 10:42 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
problem with image and shape position (60.00 KB, application/msword)
2014-07-12 10:25 UTC, mahesh patil
Details
PDF version of the DOC as viewed in DocsPal.com (351.92 KB, application/pdf)
2015-07-20 11:34 UTC, tommy27
Details
screenshot of the DOC as shown by LibO (353.23 KB, image/png)
2015-07-20 11:37 UTC, tommy27
Details
Content dissapears in this file (38.00 KB, application/msword)
2016-11-28 19:52 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahesh patil 2014-07-12 10:25:25 UTC
Created attachment 102666 [details]
problem with image and shape position

image and predefined shapes position is wrong.
Comment 1 tommy27 2014-07-15 05:36:29 UTC
I confirm misplacement of shapes in page 3 of your document under Win7x64 using LibO 4.2.5.2

MS Word Viewer shows correct positioning
Comment 2 QA Administrators 2015-07-18 17:44:20 UTC Comment hidden (obsolete)
Comment 3 tommy27 2015-07-20 11:34:53 UTC
Created attachment 117339 [details]
PDF version of the DOC as viewed in DocsPal.com
Comment 4 tommy27 2015-07-20 11:37:38 UTC
Created attachment 117340 [details]
screenshot of the DOC as shown by LibO
Comment 5 tommy27 2015-07-20 11:47:24 UTC
still reproducible with LibO 4.4.5.1 and 5.1.0.0.alpha1+ (x64)

Build ID: 5a61d7f049a81d6e747d9d097f364ae45f58697b
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-07-16_01:06:26
Locale: en-US (it_IT)

compare PDF and screenshot.
basically the image is moved to the bottom along with the shapes.

bug was not present in LibO 4.2.4.2 and appeared in 4.2.5.2
so it's a regression caused by one of these fixes:

https://wiki.documentfoundation.org/Releases/4.2.5/RC1
https://wiki.documentfoundation.org/Releases/4.2.5/RC2

needs bibisecting
Comment 6 Robinson Tryon (qubit) 2015-12-14 05:32:34 UTC Comment hidden (obsolete)
Comment 7 Joel Madero 2015-12-14 20:29:36 UTC
 61023f2c6c2d5a7c36b6a410b041e8aa397c59d8 is the first bad commit
commit 61023f2c6c2d5a7c36b6a410b041e8aa397c59d8
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 20:09:29 2015 +0800

    source-hash-3755c87d0426a499d4755e82d8fbc77caa240764
    
    commit 3755c87d0426a499d4755e82d8fbc77caa240764
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Mon May 26 12:04:39 2014 +0200
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Mon May 26 12:20:47 2014 +0200
    
        bnc#863018 WW8 import: fix upper margin of multi-page floating table
    
        A vert orient position was already handled in case a floating table was
        imported as a TextFrame, but in case we didn't do that, the vert orient
        position was simply lost.
    
        Fix this by importing it as the upper margin of the table (assuming that
        the position is relative from the anchor position).
    
        Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5

:040000 040000 9ec9ec8666008daa3a9dace7c3fff4006ab86d58 27c0461e0ea1c6bc9ed7ce8c95a592f235439a87 M	opt

# bad: [cf6ea17155fabb2a120ba07c150735591ac861d7] source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2
# good: [fc71ac001f16209654d15ef8c1c4018aa55769f5] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
git bisect start 'latest' 'oldest'
# bad: [8cf60cc706948588e2f33a6d98b7c55d454e362a] source-hash-f340f0454627939f1830826fb5cc53a90e6c62a4
git bisect bad 8cf60cc706948588e2f33a6d98b7c55d454e362a
# bad: [d9885f526fc7a09cc8f9f8ee643af1b966be24bb] source-hash-d1465c64c6f64ad8dd25e40cdc69649b24b305ea
git bisect bad d9885f526fc7a09cc8f9f8ee643af1b966be24bb
# bad: [e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a] source-hash-dc9cc46f3223aff3f85d3ce9696178a5f4d3d087
git bisect bad e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a
# bad: [abcc1a4b07f3ef8bfeeed62b1902d8ba927e21d6] source-hash-aa48af57531851a16204381854f1ee19ebb63a6a
git bisect bad abcc1a4b07f3ef8bfeeed62b1902d8ba927e21d6
# good: [d993382687e6c349bb91f9e023bb323ad6601a19] source-hash-2448ed63610dffa54d4ec988628a3f7e29a3ecf4
git bisect good d993382687e6c349bb91f9e023bb323ad6601a19
# good: [37b67dba760dff2566d7d6d81c6e60c559ba9124] source-hash-83f760d566d61a563025ec0ca38a2f9793e0d211
git bisect good 37b67dba760dff2566d7d6d81c6e60c559ba9124
# bad: [13073f467d446b70956905b9bca85a387daca928] source-hash-25cea66f6ac06897379b6d98fdf2e443e1d3e001
git bisect bad 13073f467d446b70956905b9bca85a387daca928
# skip: [778d2210f57c434c625aa50eadfc35c32ab4277a] source-hash-3381dfec2c7e601ecd3d71725ecba184bd5b7cae
git bisect skip 778d2210f57c434c625aa50eadfc35c32ab4277a
# bad: [c1de159ea531884197b335b1738f1432631b19f6] source-hash-318ffa88240f55adef906df673614123d19f35a3
git bisect bad c1de159ea531884197b335b1738f1432631b19f6
# bad: [e27c95edf42cd783c077e5ffcf5e3d9faedf5492] source-hash-d8f958a201a8c6320684ad2e03fd15dfba818520
git bisect bad e27c95edf42cd783c077e5ffcf5e3d9faedf5492
# good: [972e54d85285a4bbcabc9bf5420fb896e0d38a29] source-hash-5b2aaefb896dfe50d9cd1551ef46cacaddcf92b7
git bisect good 972e54d85285a4bbcabc9bf5420fb896e0d38a29
# good: [bec60ae374ca7e88c85ac49500338403815380fc] source-hash-a84173738175a07429278b9010f1fbcf70aac74c
git bisect good bec60ae374ca7e88c85ac49500338403815380fc
# bad: [61023f2c6c2d5a7c36b6a410b041e8aa397c59d8] source-hash-3755c87d0426a499d4755e82d8fbc77caa240764
git bisect bad 61023f2c6c2d5a7c36b6a410b041e8aa397c59d8
# good: [347df710b3e03def48c7c89577e25bda0afb8ef7] source-hash-09c0a96eb3ea8d48e99ed50ae7d13d23f70a0c6c
git bisect good 347df710b3e03def48c7c89577e25bda0afb8ef7
# first bad commit: [61023f2c6c2d5a7c36b6a410b041e8aa397c59d8] source-hash-3755c87d0426a499d4755e82d8fbc77caa240764
Comment 8 Aron Budea 2016-09-01 04:33:22 UTC
First bad commit verified, adding bisected keyword. Bug still present in v5.2.1.2.
Adding Miklos to CC, please take a look.
Comment 9 Xisco Faulí 2016-09-24 14:33:15 UTC
*** Bug 96263 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2016-09-26 09:26:15 UTC
Adding Cc: to Miklos Vajna
Comment 11 Timur 2016-09-26 16:35:07 UTC
*** Bug 96277 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2016-11-28 19:52:55 UTC
Created attachment 129092 [details]
Content dissapears in this file

Another sample affected by the same commit where all the content dissapears
Comment 13 Justin L 2016-12-24 09:10:44 UTC
Setting earliest version to 4.4 alpha (which is actually earlier than 4.2.5) since we find this in bibisect44max.

The problem here is that fmtornt.hxx:GetPos() returns SwTwips(-526), but ulspitem.hxx:SetUpper uses sal_uInt16 (65010).

https://gerrit.libreoffice.org/32400

That fixes:
attachment 102666 [details] from this current bug  (Document copy.doc)
attachment 129092 [details] from comment 12 (test.doc)
attachment 121108 [details] from duplicate bug 96263 comment 5 (NTK-Keltainen-kortti13.doc)

attachment 121064 [details] from duplicate bug 96277 (Pentutarkistus_elltarkistus_2015.doc)
 = NOT FIXED AT ALL!!!  Reopening.
Comment 14 Commit Notification 2016-12-24 09:57:45 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=604cf7024fce29143150ab77b2f14b59a45e61eb

tdf#81263 ww8par6: only use valid sal_uInt16 values for ULSpace

It will be available in 5.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2017-01-02 13:02:28 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=70b3dd697cb248fb56830db691269fe9e78c57fb&h=libreoffice-5-3

tdf#81263 ww8par6: only use valid sal_uInt16 values for ULSpace

It will be available in 5.3.0.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2017-01-02 16:24:45 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=74ce6ebe51027ecd742b651d095c455417595908&h=libreoffice-5-2

tdf#81263 ww8par6: only use valid sal_uInt16 values for ULSpace

It will be available in 5.2.5.

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

Affected users are encouraged to test the fix and report feedback.
Comment 17 vihsa 2017-03-11 05:18:58 UTC
verified.
Version: 5.4.0.0.alpha0+ / Build ID: febc116 / ls-4001 / android 5.1

image and predefined shapes position is similar to docspal pdf file attachment.
Comment 18 Timur 2021-04-09 10:42:19 UTC
*** Bug 102496 has been marked as a duplicate of this bug. ***