Bug Hunting Session
Bug 85127 - FILEOPEN: DOCX - Image border not imported when found in <v:shape> (VML)
Summary: FILEOPEN: DOCX - Image border not imported when found in <v:shape> (VML)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: OOXML-Shapes DOCX-Images OOXML-2007
  Show dependency treegraph
 
Reported: 2014-10-17 08:03 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-02-28 22:15 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Word 2007 vs LibO 4.4 (143.03 KB, image/png)
2014-10-17 08:03 UTC, Yousuf Philips (jay) (retired)
Details
stripped-down DOCX with only the picture (16.51 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-10-18 18:09 UTC, Luke
Details
screenshot from master (72.72 KB, image/png)
2017-09-22 12:29 UTC, Yousuf Philips (jay) (retired)
Details
MSo LO 6+ compared (48.44 KB, image/png)
2017-09-22 15:42 UTC, Timur
Details
Converted document to remove compat mode (20.57 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-09-28 17:19 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-10-17 08:03:03 UTC
Created attachment 107977 [details]
Word 2007 vs LibO 4.4

Steps:
1) Open attachment 100872 [details]
2) The image should have a 3/4pt styled black border of 0.75pt weight

Version: 4.4.0.0.alpha0+
Build ID: 15decb9b323029e764a89a78793862c8af74cbac
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-10-13_20:28:26
Comment 1 tommy27 2014-10-17 12:33:50 UTC
issue confirmed under Win7x64 using LibO 4.3.2.2
status -> NEW
Comment 2 Luke 2014-10-18 18:09:41 UTC Comment hidden (obsolete)
Comment 3 Cor Nouws 2014-10-18 19:40:02 UTC
indeed no border in 3.3.0 (thus different from bug 85179)
Comment 4 Luke 2014-12-27 02:43:47 UTC
Added Miklos since he's done so much work cleaning up border import issues.
Comment 5 Yogesh Bharate 2015-05-05 11:41:40 UTC Comment hidden (no-value)
Comment 6 Yogesh Bharate 2015-05-05 11:42:29 UTC Comment hidden (no-value)
Comment 7 Yousuf Philips (jay) (retired) 2015-05-05 12:41:23 UTC
Image doesnt have border in master.

Version: 5.0.0.0.alpha1+
Build ID: 59adad74084e9281887e3f78a225794f37b784d7
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-04-29_12:34:23
Comment 8 Robinson Tryon (qubit) 2015-12-09 18:45:02 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2017-09-21 20:51:46 UTC Comment hidden (no-value)
Comment 10 Xisco Faulí 2017-09-21 20:53:58 UTC Comment hidden (obsolete)
Comment 11 Yousuf Philips (jay) (retired) 2017-09-22 12:27:01 UTC
Image doesnt have border in master.

Version: 6.0.0.0.alpha0+
Build ID: 46fa042b94a0364c09482e8a09f8874119db231c
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 12 Yousuf Philips (jay) (retired) 2017-09-22 12:29:52 UTC
Created attachment 136469 [details]
screenshot from master
Comment 13 Timur 2017-09-22 15:42:46 UTC Comment hidden (obsolete)
Comment 14 Yousuf Philips (jay) (retired) 2017-09-22 16:01:32 UTC
(In reply to Timur from comment #13)
> Created attachment 136480 [details]
> MSo LO 6+ compared

Yes it works in attachment 108031 [details], as it was never broken in 4.4 when this bug was created, but it does not work in the original attachment 100872 [details] from the description.

> WFM with master~2017-09-19_13.09.06_LibreOfficeDev_6.0.0.0.alpha0_Win_x86
> Please write build date, not just builds.

My build is the daily updater build and according to the build id, it was built yesterday [2017-09-21].

https://cgit.freedesktop.org/libreoffice/core/commit/?id=46fa042b94a0364c09482e8a09f8874119db231c
Comment 15 Xisco Faulí 2017-09-22 22:50:44 UTC
(In reply to Yousuf Philips (jay) from comment #14)
> (In reply to Timur from comment #13)
> > Created attachment 136480 [details]
> > MSo LO 6+ compared
> 
> Yes it works in attachment 108031 [details], as it was never broken in 4.4
> when this bug was created, but it does not work in the original attachment
> 100872 [details] from the description.
> 
> > WFM with master~2017-09-19_13.09.06_LibreOfficeDev_6.0.0.0.alpha0_Win_x86
> > Please write build date, not just builds.
> 
> My build is the daily updater build and according to the build id, it was
> built yesterday [2017-09-21].
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=46fa042b94a0364c09482e8a09f8874119db231c

Hello Jay,

Thanks for the info.
Still reproducible in

Version: 6.0.0.0.alpha0+
Build ID: 46fa042b94a0364c09482e8a09f8874119db231c
CPU threads: 4; OS: Linux 4.10; UI render: GL; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 16 Luke 2017-09-26 04:02:01 UTC
MS Office 2007 reports that this file is opened in "compatibility mode". If I convert it to a native MSO 2007 OOXML format, the border is displayed in LO. So MSO 2003 docx? Is this a VML issue?
Comment 17 Yousuf Philips (jay) (retired) 2017-09-26 11:42:27 UTC
(In reply to Luke from comment #16)
> MS Office 2007 reports that this file is opened in "compatibility mode". If
> I convert it to a native MSO 2007 OOXML format, the border is displayed in
> LO. So MSO 2003 docx? Is this a VML issue?

The document meta data say it was last modified with word 2013. MSO 2003 doesnt have docx support natively. Yes a VML issue as its using the <w:pict> tag.

Here is the relevant XML

<w:pict>
 ...
 <v:shape ... stroked="t" strokecolor="windowText">
   <v:imagedata r:id="rId6" o:title="4" />
   <w10:wrap type="square" />
 </v:shape>
</w:pict>

So it is supposed to be stroked (stroked="t") in black[1]  (strokecolor="windowText"). Looking in Word, it has a stroke weight of 0.75pt, which is likely the default else there would have been a strokeweight attribute in the <v:shape> tag.

[1] https://opengrok.libreoffice.org/xref/core/sd/source/filter/eppt/pptx-epptooxml.cxx#2319
Comment 18 Yousuf Philips (jay) (retired) 2017-09-26 14:45:46 UTC
Saving the file in non-compatibility mode changes it from a <w:pict> tag with a <v:shape> child tag, to a <w:drawing> tag with a <a:graphic> grandchild tag.
Comment 19 QA Administrators 2018-09-27 02:42:59 UTC Comment hidden (obsolete)
Comment 20 Luke 2018-09-28 17:19:13 UTC
Created attachment 145253 [details]
Converted document to remove compat mode

Correctly imported when *not* in compatibility mode. 

Original bug doc still repo in Version: 6.2.0.0.alpha0+ (x64)
Build ID: 05b45cc9aa165f895beae0b8f9eb192243812999
Comment 21 Luke 2019-02-28 22:14:37 UTC
w:pict is a VML Object

http://www.datypic.com/sc/ooxml/e-w_pict-1.html