Bug 84199 - FILEOPEN: Vector-based hand writing picture objects not visible
Summary: FILEOPEN: Vector-based hand writing picture objects not visible
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: 3.6.7.2 release
Hardware: Other All
: medium normal
Assignee: Chris Sherlock
QA Contact:
URL:
Whiteboard: filter:docx bibisected
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2014-09-22 20:57 UTC by Jay Philips
Modified: 2014-12-29 14:32 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
sample doc (94.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-09-22 20:57 UTC, Jay Philips
Details
pdf export of the sample file in Word 2007 (66.97 KB, application/pdf)
2014-09-22 20:59 UTC, Jay Philips
Details
3.6.6.2 vs 3.6.7.2 screenshot (59.04 KB, image/png)
2014-10-20 20:43 UTC, tommy27
Details

Description Jay Philips 2014-09-22 20:57:38 UTC
Created attachment 106692 [details]
sample doc

Steps:
1) Open attached file
2) Notice that it is blank
3) Test same file in MS Word

Tested in 4.4 master on Linux.
Comment 1 Jay Philips 2014-09-22 20:59:06 UTC
Created attachment 106693 [details]
pdf export of the sample file in Word 2007
Comment 2 Jay Philips 2014-09-23 10:37:40 UTC
The author of the document stated that they created these hand writing objects using a Windows PC tablet with active digitizer pen, but that this could also be achieved with any touch screen using Word's pen tools.
Comment 3 tommy27 2014-10-20 20:42:06 UTC
tested under Win7x64
DocX reader 1.0 can read the file which is shown as blank in LibO 4.4.0.0+ master, 4.3.2.2 

I tested older releases and I can tell that image looks almost fine in 3.6.6.2, then image starts disappearing in 3.6.7.2 and is definitively gone in 4.0.4.2 (I don't have early 4.0.x releases to test)

here's the list of bugfixes in 3.6.7.2:
https://wiki.documentfoundation.org/Releases/3.6.7/RC1
https://wiki.documentfoundation.org/Releases/3.6.7/RC2

maybe we can see something suspect that caused the regression
Comment 4 tommy27 2014-10-20 20:43:17 UTC
Created attachment 108136 [details]
3.6.6.2 vs 3.6.7.2 screenshot
Comment 5 Jay Philips 2014-10-20 22:36:04 UTC
Thanks for checking older versions as that didnt come to mind when i filed this one. Just assumed it never was able to render it. :)
Comment 6 Xisco Faulí 2014-10-21 10:37:28 UTC
bibisected:

3c257431da2650bf0d4ca7460af1b082c773816d is the first bad commit
commit 3c257431da2650bf0d4ca7460af1b082c773816d
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Nov 27 14:49:38 2013 +0000

    source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
    
    commit 1581b1fc3ac82a7bd62df968226e98604a4ca52d
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Mon Nov 25 17:24:39 2013 +0100
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Mon Nov 25 17:32:36 2013 +0100
    
        CppunitTest_sw_ooxmlexport: make it possible to use ..._TEST_ONLY with -Werror
    
        Change-Id: I451f81495a8e8535c8e0194198602ee5732164c6

:100644 100644 c290891590efa4fb28a6f86ef0cbe29a4b8baeff 8a8a92069ddd70a98210a44a33f652a4c3d06df4 M	ccache.log
:100644 100644 d0fcf4dc73a5a91def3e71fad9035807fbe84906 34c3ffcb2c754173b10dd0b1766dc5e2daecf91e M	commitmsg
:100644 100644 95386163339b3b232c8b0232a7d819ff40328f91 60671c4bff3b778b99dccbb9ca02b6d06a34b333 M	make.log
:040000 040000 8758436160d305aca069f7ba2a13436b30690d61 3a872c6b5794222bcd89d77b1ee2c7f6f75cac7d M	opt

# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# bad: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect bad 641c999c8334a92273589d1a7931e8733fb265ef
# bad: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect bad 641c999c8334a92273589d1a7931e8733fb265ef
# good: [281e169052453119b46507f37bbb6cdebc45904c] source-hash-6ab3148d965be12592e8927b4c7868634e714932
git bisect good 281e169052453119b46507f37bbb6cdebc45904c
# good: [281e169052453119b46507f37bbb6cdebc45904c] source-hash-6ab3148d965be12592e8927b4c7868634e714932
git bisect good 281e169052453119b46507f37bbb6cdebc45904c
# bad: [3c257431da2650bf0d4ca7460af1b082c773816d] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
git bisect bad 3c257431da2650bf0d4ca7460af1b082c773816d
# first bad commit: [3c257431da2650bf0d4ca7460af1b082c773816d] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
Comment 7 Matthew Francis 2014-12-29 11:07:56 UTC
The behaviour appears to have changed across the below two commits

Adding Cc: to kendy@collabora.com. Could you possibly take a look at this? Thanks


commit 9d3c0aa1e64ae97ddc305df3873f977051f0b317
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Nov 20 21:17:50 2013 +0100

    Related fdo#61272: Revert "wmf-mm-text.diff: Fix WMF rendering, n#417818"
    
    This approach to WMF breaks EMF reading, need to revert it, and fix a
    different way.
    
    This reverts commit db1b08d217ebbdd1b0296e1da260bf314a77acf5.
    
    Conflicts:
        vcl/source/filter/wmf/winmtf.cxx
        vcl/source/filter/wmf/winmtf.hxx
    
    Change-Id: I8f779791153f2e1faa086c91b82b3e8b93304f3b

commit 198b17dc5e182dfb2e5c930458764c7b3e6c914f
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Nov 20 21:11:24 2013 +0100

    Related fdo#61272: Revert "wmf-mm-text-1.diff: Fix WMF rendering, n#417818"
    
    This approach to WMF breaks EMF reading, need to revert it, and fix a
    different way.
    
    This reverts commit 16eaa5e7c1208034bb3244fea9e6d9491ccb5501.
    
    Conflicts:
        vcl/source/filter/wmf/winmtf.cxx
    
    Change-Id: I59076d0a65d91ba3a1f3ebb48d8f7a542859d351
Comment 8 Chris Sherlock 2014-12-29 14:19:45 UTC
The Beziers in some of the embedded EMFs have 12 points! That's just not possible, because the number of points must be:

(number of curves x 3) + 1

As per the spec in [MS-EMF], see section 2.3.5.17.

Whether that is the issue, I don't know. But it does tend to indicate some issues with the EMF file, however we should actually just detect this and ignore the extraneous points in the Bezier.
Comment 9 Chris Sherlock 2014-12-29 14:27:40 UTC
Oh, I see. After that record there is a close figure record. Good to know about this, because I'll quote what Microsoft say in their own documentation about MS-EMF:

  2.3.5.17 EMR_POLYBEZIER16 Record

  Count (4 bytes): A 32-bit unsigned integer that specifies the total number of
  points. This value MUST be one more than three times the number of curves to be
  drawn, because each Bezier curve requires two control points and an endpoint,
  and the initial curve requires an additional starting point.

They neglected to mention that if you have this close figure record directly after then it acts as the extra point they mentioned - you need to use the first point as the end-point.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.