Bug 44552 - fill patterns not supported
Summary: fill patterns not supported
Status: RESOLVED FIXED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libvisio (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Object-Fill-Pattern
  Show dependency treegraph
 
Reported: 2012-01-07 04:49 UTC by Bruno Girin
Modified: 2017-10-30 11:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Visio files that shows all possible fill patterns (50.00 KB, application/vnd.visio)
2012-01-07 04:49 UTC, Bruno Girin
Details
PNG output from Visio showing what the diagram should look like (58.57 KB, image/png)
2012-01-07 04:50 UTC, Bruno Girin
Details
PNG output from LibreOffice showing what LO imports (58.07 KB, image/png)
2012-01-07 04:50 UTC, Bruno Girin
Details
A visio file that I cannot open with LibreOffice draw (889.00 KB, application/vnd.visio)
2013-06-29 19:33 UTC, clark.x.zhang
Details
xz compressed flat odg file (129.11 KB, application/x-xz)
2013-06-30 11:26 UTC, Fridrich Strba
Details
screenshot (172.13 KB, image/png)
2016-02-02 14:47 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Girin 2012-01-07 04:49:31 UTC
Created attachment 55254 [details]
Visio files that shows all possible fill patterns

Libvisio currently doesn't support fill patterns (apart from patterns 25 to 40 which are really gradients). See attached a Visio file that includes all fill patterns supported by Visio 2007.
Comment 1 Bruno Girin 2012-01-07 04:50:06 UTC
Created attachment 55255 [details]
PNG output from Visio showing what the diagram should look like
Comment 2 Bruno Girin 2012-01-07 04:50:36 UTC
Created attachment 55256 [details]
PNG output from LibreOffice showing what LO imports
Comment 3 Fridrich Strba 2012-01-11 02:39:03 UTC
Indeed, we are not supporting the fill patterns as of yet. Nevertheless, it could be a good entry-level task to try to emulate them in LO, then see what ODF snippets they correspond to and then extend the VSDXContentCollector::_fillAndShadowProperties function.
Comment 4 Valek Filippov 2012-07-13 05:35:44 UTC
Could it be ported from libcdr?
Comment 5 clark.x.zhang 2013-06-29 19:33:08 UTC
Created attachment 81720 [details]
A visio file that I cannot open with LibreOffice draw

Hi, I have a visio file that can be opened in Visio and cannot be opened in LibreOffice.  Can you help me figure out what's wrong with this file?
Thanks for your help, Clark
Comment 6 Valek Filippov 2013-06-29 21:17:54 UTC
(In reply to comment #5)
> Created attachment 81720 [details]
> A visio file that I cannot open with LibreOffice draw

Could you please open a separate bug for it?


2Fridrich, looks like normal v11 file.
Comment 7 Fridrich Strba 2013-06-30 11:20:20 UTC
(In reply to comment #5)
> Hi, I have a visio file that can be opened in Visio and cannot be opened in
> LibreOffice.  Can you help me figure out what's wrong with this file?

I agree with Valek that opening of a new bug in this kind of situations is desirable. Nonetheless, I fixed in libvisio the bug that prevented the file from being open. There is still a little problem. The structure of the file makes libvisio completely misperform. On my i7 laptop:

fstrba@strba420:~/Downloads> date && vsd2raw Metabolsim.vsd >/dev/null && date
Sun 30 Jun 11:42:42 CEST 2013
Sun 30 Jun 12:57:01 CEST 2013

It is mainly due to the fact that the page has 5k+ shapes and we keep them in memory until the last one, since Visio does not show then in the order they are in the file. I will look how to diminish the memory consumption. In the meantime, I attach here the converted document for your use.
Comment 8 Fridrich Strba 2013-06-30 11:26:22 UTC
Created attachment 81736 [details]
xz compressed flat odg file
Comment 9 QA Administrators 2015-04-19 03:23:21 UTC Comment hidden (obsolete)
Comment 10 Fridrich Strba 2015-12-14 10:09:52 UTC
This commit in libvisio:
http://cgit.freedesktop.org/libreoffice/libvisio/commit/?id=8ce3cd43bfb1190574296b7fad873fe3fa16007d
and this commit in libodfgen:
http://sourceforge.net/p/libwpd/libodfgen/ci/7ff2703c1a06af58523446b415824785e878ef35/
implement the basic hatching.
It is not perfect and the patterns 8, 9, 10, 11, 12, 17, 18 and 24 are bogus emulation, just to have some fill, but I will consider this bug closed and improvements with patches can be done in a new bug :)
BTW, some patterns will have to be emulated by inverting the background and foreground colours.
Comment 11 Yousuf Philips (jay) (retired) 2016-02-02 14:47:15 UTC
Created attachment 122332 [details]
screenshot

Though the patterns are now displayed correctly in Draw, a user can manipulate the pattern in the Area dialog.
Comment 12 Yousuf Philips (jay) (retired) 2016-02-15 21:24:56 UTC
(In reply to Yousuf (Jay) Philips from comment #11)
> Though the patterns are now displayed correctly in Draw, a user can
> manipulate the pattern in the Area dialog.

Typo, it should have been cant. :D