Bug 75539 - DOC import filter mismatch of shape size
Summary: DOC import filter mismatch of shape size
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: Other All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:6.0.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Shapes
  Show dependency treegraph
 
Reported: 2014-02-26 18:07 UTC by Svante Schubert
Modified: 2018-04-26 15:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Microsoft test document with shape created MSO15/Office 2013 (48.50 KB, application/msword)
2014-02-26 18:07 UTC, Svante Schubert
Details
tooWideShape2013.doc: unit test showing various problems. (48.00 KB, application/msword)
2017-09-05 18:52 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Svante Schubert 2014-02-26 18:07:09 UTC
Created attachment 94779 [details]
Microsoft test document with shape created MSO15/Office 2013

A DOC shape with a page width is being imported in LibreOffice 4.2.1.1 and earlier to have a width of 69cm (at least it is written in the ODF XML), see
svg:width="69.129cm

within

<draw:custom-shape text:anchor-type="as-char" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P5" svg:width="69.129cm" svg:height="0.054cm">


Could be a decimal point error ;) Works in Apache OpenOffice 4.0.1.
Comment 1 Julien Nabet 2014-02-26 19:41:03 UTC
On pc Debian x86-64 with master sources updated today, I can reproduce this.

Svante: just to confirm, should be 6.9129cm?
Comment 2 Svante Schubert 2014-02-26 19:46:34 UTC
Sorry, it was only a rough guess. I loaded the document with MSO15 and the custom shape was a horizontal line as wide as the page, which is exactly 16cm.

Neverthelss I do not know how the layout works, the value might be influenced by other measures as the page borders, etc.

Best to look into the original MS document and make certain a roundtrip works (MSO->LO->MSO):)

Thanks for looking into it!
Svante
Comment 3 Joel Madero 2015-05-02 15:44:16 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-06-21 13:17:05 UTC
Compared to Word viewer LibO indeed shows it as too long.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 5 QA Administrators 2016-09-20 10:11:28 UTC Comment hidden (obsolete)
Comment 6 Justin L 2017-09-04 20:56:28 UTC
confirmed a still very long looking line shape in LO 6.0dev. Looking at the positioning and size properties it reports being 16cm long, and hitting OK makes it properly sized.

Shows up in bibisect-43max as long in 3.6, but as a tiny dot before that. Unfortunately I could not identify the commit that affected the length, since it covers about 1.5 months of commits.

# bad: [a71a4447320f177181c9cff9f7c6fd93802cbd8e] source-hash-9afb6e1e38c362a768e8e981f7b03cf8bcaf22cf
# good: [894d6fd8932770422f37b8f562717c846fef6a1b] source-hash-61d78aca81f08ac3a0f9eb65799d04d56fbad312

# possible first bad commit: [a71a4447320f177181c9cff9f7c6fd93802cbd8e] source-hash-9afb6e1e38c362a768e8e981f7b03cf8bcaf22cf
# possible first bad commit: [c6a69c23e32b372e1f279f1a5ea6aa0a6cf52968] source-hash-cac1f33e839469d884730350e46a21d92fb442f2
# possible first bad commit: [1273b9e25faacf414c611503c2a11283af274044] source-hash-cf04745f7a027594fd64a493c276a8280dbccfe1
# possible first bad commit: [0a0d80b18dc905ee56faaad81c2d6839f8e0172d] source-hash-4ba8147f61fadb4e8ae7abc0ad5c9e928edf4baa
# possible first bad commit: [2cb4591ac9908e86e6e0844714ce74f2c5f0d813] source-hash-8201c8a5f680947c2e855504be321afb1e5bc06a
# possible first bad commit: [ef67f79d5c082070b3185286da0bacd714bb61b4] source-hash-099198a4224778fe6e43f5dc13b5b9b1b4dc828c
# possible first bad commit: [e4c742a9e244bd7ebeabc50c90182df28ac3daaf] source-hash-c52ba433491afbca70aa1977a624c795bdd5b9ef
# possible first bad commit: [aed6d9e275e4560aa251d23dd7ba6a0a725afab7] source-hash-c77918bb03974ff9be90c889f77e62ea0755052f
# possible first bad commit: [638cb54cb50a2b1269009db83f70792cf5076abc] source-hash-877c96a601e6e50d0c7a8f704d57baec22f089c5
# possible first bad commit: [e87a0055deae2c9e25ae1d1a365cec8418b785ce] source-hash-67ff63988f3b8eef2cc2b5bdf917918b93c3f070
# possible first bad commit: [5b4693bb72eca5e38e3f56d036bca425c9a21b37] source-hash-e3633f60b349022994e291aa3d1a0c90c3403b2e
# possible first bad commit: [d101b9946a6a04e65e3923038503436c790b7e12] source-hash-18e6e7d929c2be209407ed2e56b8ec4d5e6c4900
# possible first bad commit: [96a055e15ee7171a28888973a3c3a7307dd9867f] source-hash-9ca02a663c3eee2698eb360dd5dc7afb1951e743
# possible first bad commit: [113bce8fc413d543d6e00747ebe924e83788f810] source-hash-24c125f4de208e4093198d32e2e3b7faae4470fa
# possible first bad commit: [8b099bdbf262cdc405279bb8058b1beb14e3e8f3] source-hash-ef7a460fa51140782b7ad4d87aa782ca007c56ca
# possible first bad commit: [74328ea761f699662228f05e71c6214af2abf719] source-hash-35be7d7574cd0f45a18ee5838dd14cb1040890d4
# possible first bad commit: [3e74c2f3e7426e024d76ddb46945fdda53eb695e] source-hash-3a35fd8f1c6b176e675b998a82526636aad5a00b
# possible first bad commit: [b2c3b987024faeeabd2e45187cb08b5eee4c4629] source-hash-a90d7788a4b9aca4378cd1660293403db3d399ac
# possible first bad commit: [8a39227e344637eb7154a10ac825d211e64d584c] source-hash-f5080ebb7022c9f5d7d7fdca4fe9d19f9bb8cabf
# possible first bad commit: [7cbcdae3f616c42e345dc92dfd17c957eecdccb9] source-hash-bb36072c92687a954a38aeca7fb9945f8e7cca13
# possible first bad commit: [b119645386363b75d60215f91775cba82c1c6126] source-hash-3b328186706e6819acfea7b3a6dc8c9d3b6f9693
# possible first bad commit: [09b0c68ed3c0cb7a96ac98146a67e9540df994c8] source-hash-d50f02bec4a70bd26a518e4e76f4a876454ab937
# possible first bad commit: [a0225eee14bbecc662d5e82894b0f7738c75ff23] source-hash-1aa91a2d8e7db5cebff5b47f3005f1acff64d25e
# possible first bad commit: [13312242b4c33dfbbf82238d6e47bbefdaf22f32] source-hash-33f5acad371bcf838011b3629450e6dcd405a4e9
# possible first bad commit: [e1ec404400a4c6531a5d49d89631d1acc599071d] source-hash-5708f2bfa70db0479ddbf9b454329cd81e0f509d
# possible first bad commit: [54177448b4716be474746c4a676f39d8038caf03] source-hash-fd58025dc7379126738cf73908ec10e809348e6a
# possible first bad commit: [d3f11a2232b85bc3ab3e69000f571c0eba1930fd] source-hash-0bbf79005a697c6781047c01f05eb660836a18e1
Comment 7 Justin L 2017-09-05 00:39:01 UTC
Other clues pointed to this as the very likely commit for LO 3.6
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5845298e615a599d5edc7c42275b52ae954250e8

author Luboš Luňák 2012-05-28 15:21:10 (GMT)
commit 5845298e615a599d5edc7c42275b52ae954250e8 
fix horizontal rule width in .doc documents (bnc#757118)
Comment 8 Justin L 2017-09-05 18:52:22 UTC
Created attachment 136044 [details]
tooWideShape2013.doc: unit test showing various problems.

proposed fix: https://gerrit.libreoffice.org/41957

There are several more problems noticed with this unit test. It adds 0.09inches to the height each round-trip. Additionally, it doesn't support the hralign for center/left/right.
Comment 9 Justin L 2017-09-05 20:56:55 UTC
(In reply to Justin L from comment #8)
> There are several more problems noticed with this unit test. It adds
> 0.09inches to the height each round-trip.

6.0 regression reported in bug 112247
Comment 10 Commit Notification 2017-09-13 02:17:19 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75539 ww8import: fix horizontalLine percentage

It will be available in 6.0.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 11 Xisco Faulí 2017-10-13 22:04:45 UTC
A polite ping to Justin L: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Comment 12 Xisco Faulí 2017-11-13 08:49:50 UTC
@Justin, should this issue be closed or is there some work to do yet?
Comment 13 Justin L 2017-11-13 10:52:07 UTC
Let's just leave this .doc one open. Bug 97648 deals with similar .docx issues. If additional fixes (like left/right alignment) are solved in 6.1, then leaving this open will remind me to attempt the same for .doc.
Comment 14 Justin L 2017-12-16 17:04:20 UTC
(In reply to Justin L from comment #13)
>If additional fixes (like left/right alignment) are solved in 6.1

Similar docx not solvable. Closing this as fixed.