Bug 39256 - Deficiencies in WMF importer implementation
Summary: Deficiencies in WMF importer implementation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Libreoffice (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 05:57 UTC by Valek Filippov
Modified: 2014-11-27 17:04 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Example file for issues #5 and #6 (2.09 KB, image/x-wmf)
2011-07-15 05:57 UTC, Valek Filippov
Details
Example file for issue #7 (654 bytes, image/x-wmf)
2011-07-15 05:58 UTC, Valek Filippov
Details
Example file for issues #1 to #4 (4.10 KB, image/x-wmf)
2011-07-15 05:59 UTC, Valek Filippov
Details
Example file for issue #8 and #9 (1.74 KB, image/x-wmf)
2011-07-15 06:01 UTC, Valek Filippov
Details
Example file for issue #8 and #9 (1.75 KB, image/x-wmf)
2011-07-15 06:02 UTC, Valek Filippov
Details
How "capjoin.wmf" should look like (23.36 KB, image/png)
2011-07-15 06:03 UTC, Valek Filippov
Details
How "ppgpfm2.wmf" should look like (5.24 KB, image/png)
2011-07-15 06:03 UTC, Valek Filippov
Details
How "1p0000001.wmf" looks like in MS Office (4.86 KB, image/png)
2011-07-15 06:05 UTC, Valek Filippov
Details
How "fulltest.wmf" should look like (11.16 KB, image/png)
2011-07-15 06:06 UTC, Valek Filippov
Details
Hatch patterns at different zoom level, to verify how it should work (8.59 KB, image/png)
2011-07-15 06:07 UTC, Valek Filippov
Details

Description Valek Filippov 2011-07-15 05:57:41 UTC
Created attachment 49137 [details]
Example file for issues #5 and #6

Below is a list of issues found in LibO WMF importer.

"fulltest.wmf"
--------------------------------
1. Hatches are ignored in CreateBrushIndirect record.
(Check "2.2.1.1 Brush Object" of [MS-WMF] document, HatchStyle enum should be used only if BrushStyle is BS_HATCHED)

2. CreateDIBPatternBrush doesn't seem to be implemented

3. SetBKColor seem to be misinterpreted as Fill (Brush) color

4. SetBKMode seems to be ignored (see "2.3.5.15 META_SETBKMODE Record" and "2.1.1.20 MixMode Enumeration"). Probably it's an effect of ignored hatches.


"1p0000001.wmf"
--------------------------------
5. CreateFontInderect -- Escapement and Orientation each treated as Escapement  . The middle row in a matrix should not be rotated. For GM_ADVANCED mode each symbol in that row could be rotated individually, MS Office 2007 doesn't rotate it at all.
 
6. MS "Symbol" encoding and/or "MT Extra" fonts are not converted.
(matrix braces symbols should be translated from non-standard encoding/font to UTF).


"capjoin.wmf"
--------------------------------
7. Caps/Join seems to be ignored in CreatePenIndirect.


"ppgfm2.wmf"
--------------------------------
8. SetPolyfillMode Mode 2 -- "winding" ("2.3.5.20 META_SETPOLYFILLMODE Record" and "2.1.1.25 PolyFillMode Enumeration") seems to be ignored.
Also compare "ppgfm2.wmf" and "ppg.wmf" (the difference is record #10 in "ppgfm2.wmf")

9. Pen width seems to be ignored for PolyPolygon.
Comment 1 Valek Filippov 2011-07-15 05:58:28 UTC
Created attachment 49138 [details]
Example file for issue #7
Comment 2 Valek Filippov 2011-07-15 05:59:27 UTC
Created attachment 49139 [details]
Example file for issues #1 to #4

(from libwmf test files)
Comment 3 Valek Filippov 2011-07-15 06:01:26 UTC
Created attachment 49141 [details]
Example file for issue #8 and #9

(default SetPolyfillMode, it matches with LibO defaults => works fine)
Comment 4 Valek Filippov 2011-07-15 06:02:18 UTC
Created attachment 49142 [details]
Example file for issue #8 and #9

(SetPolyfillMode to 'winding', it doesn't match with LibO defaults => incorrect result)
Comment 5 Valek Filippov 2011-07-15 06:03:04 UTC
Created attachment 49143 [details]
How "capjoin.wmf" should look like
Comment 6 Valek Filippov 2011-07-15 06:03:44 UTC
Created attachment 49144 [details]
How "ppgpfm2.wmf" should look like
Comment 7 Valek Filippov 2011-07-15 06:05:19 UTC
Created attachment 49145 [details]
How "1p0000001.wmf" looks like in MS Office

For compatibility with MSO it's probably better to ignore Orientation value.
Comment 8 Valek Filippov 2011-07-15 06:06:03 UTC
Created attachment 49146 [details]
How "fulltest.wmf" should look like
Comment 9 Valek Filippov 2011-07-15 06:07:52 UTC
Created attachment 49147 [details]
Hatch patterns at different zoom level, to verify how it should work
Comment 10 Rainer Bielefeld Retired 2011-07-24 08:04:56 UTC
@Valek Filippov
I do not see a good chance that someone will find the time to check your observations, it's simply too painful to find through. I will not try to find out what you might have seen however using your sample documents with unknown LibO versions and OS and how it might have looked with an other application and what .png might be the corresponding one  ...

May I ask you to read  hints on <http://wiki.documentfoundation.org/BugReport> carefully?
Then please:
- Create separate reports for each problem
- Attach a sample document (not only screenshot) demonstrating the problem
- Attachscreenshots with comments (you can add information using LibO DRAW
  and then attach your screenshot with comments as PDF) if necessary. 
  These screenshots should compare your result with LibO and an other program
  in 1 document, you see in tester8's document in Bug "38580 - EMF/EMF+ file: 
  import issue" how that can be done
- Contribute a step by step instruction containing every key press and every 
  mouse click how to reproduce your problem
- add information 
  -- what exactly is unexpected (The visible effect and the expected root
  -- and why do you believe it's unexpected
  -- concerning your PC (especially: video card)
  -- concerning your OS
  -- concerning your LibO version and localization (UI language)
  –- Libo settings that might be related to your problems 
    (video hardware acceleration ...)
  -- how you launch LibO and how you opened the sample document
  –- If you can contribute an OOo Issue that might be useful
  -- everything else crossing your mind after you read a.m. URL

Can you please file Bug reports with status UNCONFIRMED if your are not absolutely sure that you contributed all required background information and that the problem will be reproducible with information you can provide? 
Thank you!
Comment 11 Valek Filippov 2011-07-24 10:53:07 UTC
2 Rainer Bielefeld
Thank you for your valuable comment.
I guess you are the person who would fix those issues if bugs were submitted as you described.
Unfortunately I had a wrong assumption, that the only person who _probably_ will work on that is Radek Doulik. That's why I discussed with him on IRC how he prefers this to be reported: one bug per visual discrepancy, one per WMF record, one per test file or all in one. Anyway, I shouldn't make it as he told, right? "Ask and ignore the answer!", sounds as a good idea!

You are also absolutely right about LibO version...
I should NOT assume that
- if those issues were here 4 years ago (when I filed a bug for OO.o something.something version),
- if it's still here in 3.3.something,
- and there was no changes in WMF code recently,
when it's "ANY" version.
Right?
How could I know and claim that it's not fixed automagically in the git HEAD...

And you know what... I agree with you about "an other application". How could one guess, what is the application for compatibility with which LibO needs improvements in WMF support? It could be Borland Paradox, Apache or OpenVMS...
Sorry by mistake I put something misleading in the comment #7 and (oh. sh...) in description to issue #5 ...

Now for other lines in "Then please:"

> - Attach a sample document (not only screenshot) demonstrating the problem

Oh... LibO saves screenshots in WMF format, I didn't know that.
Great feature by the way... Does it vectorize content by tracing it?
Is it good enough to vectorize photos of my friends to cut stamps on plotter
as xmas presents?

>- Attachscreenshots with comments (you can add information using LibO DRAW

You are mostly right. I described which WMF records have what types of issues.
Attachments were not  needed at all. They actually distract attention from the problem. Of course you know what WMF records are and what they do, so instead of puzzling with images to figure out what is different and why, you can go directly to fix mentioned record's implementations!
Will take it into account.

>- Contribute a step by step instruction containing every key press and every 
>  mouse click how to reproduce your problem
Err.. I thought that whoever (ah, now I know it will be you) is going to fix it have some basic idea about opening files in application he or she makes fixes for. That was a wrong assumption again, sorry about that.
What do you think about screencasts?
Should I cover application installation, how to run it, folder navigation, basics of saving attachments from bugzilla by using web browser?
Just in case developers need that...

>  -- what exactly is unexpected (The visible effect and the expected root
Probably you lost me here. "Hatches are ignored in CreateBrushIndirect record".
Doesn't it sound like "what exactly is unexpected"?
May be some of my expectations are wrong though (same as assumptions).

>  -- and why do you believe it's unexpected
Ah... up to wrong expectations (see above), I assume basic MF records should be implemented for MF importer to be useful.
Yeah.. very arguable position... 'Usefulness' is not quantitative metric...
Let's say you win this one too.

> -- concerning your PC (especially: video card)
>  –- Libo settings that might be related to your problems 
>    (video hardware acceleration ...)

That's sooo creative... 'SetPolyfillMode is ignored because of VideoCard'...
I have to think about it...

> -- concerning your OS
WMF importer code seems to be the same on all platforms.
Anyway, you are right. It's not fair to leave any place for doubts.
With all that history of my mis-assumptions and mis-expectations, I worry to assume that it could be just one bug for any OS, or identical bugs one per OS (I deduce that 'one per' wins over 'all in one' based on your comment! See? I'm learning new things today! =) Thank you very much!)

> concerning your LibO version and localization (UI language)
Yes, yes... Fully agree with you. Wrong assumption again, commented at the start. Just a question... one bug per localisation, right? For each and every of them, just in case.

> how you launch LibO and how you opened the sample document
Now I'm not even sure I did launch it.
One bug per method of launching for each way to open for each LibO application, no matter results are always the same, correct?
We are not going to confuse developers with qualificators like "all" and "any".
English is not a native language for some of them, so they probably from the group of people who don't understand what's funny about "any key" anecdote.

> If you can contribute an OOo Issue that might be useful
Who cares about 4 years old one?
Oh... that's was wrong assumption, right?
Two actually: do not assume ppl don't care and do not assume rodo remembers old bug.

> everything else crossing your mind after you read a.m. URL
Yeah... There is one thing I should take into account first of all:
I'm NOT an OO.o/LibO user, hence there is no reason to report bugs.

> Can you please file Bug reports with status UNCONFIRMED if your are not
Please, please, don't involve me into discussion about "default status for bugs opened for LibreOffice". I'm not interested to participate and/or be counted for, against or instead.

>Thank you!
My pleasure.

P.S.
I'm working on the set of EMF testing files to make a review of EMF/EMF+ support in different applications. I had plans to file a bug for LibO related to EMF implementation, but it looks like I'm completely out of the skills to report bugs.
So, do it yourself and/or ask tester8 for help. I know you can easily generate original content, make comprehensive review and properly file bugs based on it.
So do it! That would save time for everybody.

P.P.S
And to be honest, I don't care if anybody will fix issues listed in that bug or not. Feel free to close or remove it.
I will not comment here any more, want to discuss -- join #libreoffice-dev.
Comment 12 Björn Michaelsen 2011-12-23 12:21:40 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 13 Björn Michaelsen 2011-12-23 17:01:37 UTC
needinfo keyword redundant by needinfo status.
Comment 14 Valek Filippov 2012-04-07 11:45:06 UTC
Björn, it has all required info (since time this bug was filed).

If no one is going to work on it, close it with WONTFIX, so I could make a note for myself to not consider LibO implementation in the future tests.
Comment 15 Florian Reisinger 2012-08-14 13:58:07 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 16 Florian Reisinger 2012-08-14 13:59:25 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 17 Florian Reisinger 2012-08-14 14:04:00 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 18 Florian Reisinger 2012-08-14 14:06:13 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 19 Florian Reisinger 2012-08-15 06:42:13 UTC
Okay thank you for your info, but I, as well as Rainer, have the problem to reproduce the bug. Is it possible to make a simpler test case, like

In test1.zip are two files
1) File to insert into LibreOffice
2) PNG how it should look like
3) Maybe a description what is the difference,  if it is difficult to see.

I am very sorry, but without that info I am not able to set it to NEW...
Comment 20 Valek Filippov 2012-08-15 11:26:31 UTC
> Okay thank you for your info, but I, as well as Rainer, have the problem to
> reproduce the bug. Is it possible to make a simpler test case, like

You are kidding me, right?

Open file "fulltest.wmf" (attachment "Example file for issues #1 to #4"), compare it with attachment "How "fulltest.wmf" should look like".

If you don't see the difference, close this bug with any resolution.
Comment 21 Florian Reisinger 2012-08-15 12:44:29 UTC
I will try it ASAP...

It was just to complicated, but I will give it a try....
Comment 22 Valek Filippov 2012-08-15 13:00:43 UTC
> It was just to complicated, but I will give it a try....

That's because it's targeted to any person who knows about WMF format internals. I'm sure Caolan or Radek would have no problem with it.

In case you would like to make your hands dirty:
[MS-WMF] http://msdn.microsoft.com/en-us/library/cc250370%28v=PROT.13%29.aspx
Comment 23 sasha.libreoffice 2012-09-28 11:34:37 UTC
Reproduced problem with first attachment in 3.6.1 on Fedora 64 bit
(other not tested, I guess that problems remain)
Comment 24 Tobias Heilig 2012-12-22 11:20:31 UTC
Sorry but I am out of office until January 6th, 2013.
All messages will be forwarded to my personal email address.
In very urgent cases I will respond.

Best regards, merry Christmas, and a happy new year,
    Tobias Heilig
    – Software Development –
--
Sensor-Technik Wiedemann GmbH
Am Baerenwald 6
87600 Kaufbeuren
GERMANY

Phone           +49 (0) 8341 9505-724
Fax             +49 (0) 8341 9505-55
E-Mail          tobias.heilig@sensor-technik.de
WWW             www.sensor-technik.de<http://www.sensor-technik.de>

Registered with: Amtsgericht Kempten, HRB Nr. 1863
Managing Directors: Katharina and Wolfgang Wiedemann




During the Christmas period, we will shutdown from the 22nd of December until the 6th of January.

We thank you for a successful and harmonious year working together, and for the trust you have placed in us in 2012. We wish you a peaceful holiday and happiness and success in the New Year.



Your STW/KMW Team
Comment 25 Timur 2014-11-24 11:47:55 UTC
I think this bug should be meta bug for WMF/EMF problems, or there should be another meta bug for that. Those problems are numerous.


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.