Created attachment 192456 [details] fdo77725_mso2003.pdf: printed to PDF using word 2003 Using sw/qa/extras/ooxmlexport/data/fdo77725.docx as the example file, prior to 7.0 we only imported a (wrong) black background for the textbox, and after that it was black with white dots. It should be white with black dots. The pattern was imported since commit 9283cd9e13cd3e0dd7d6b831d930128931862a40 Author: Attila Bakos on Wed Apr 8 14:50:07 2020 +0200 tdf#78749 DOCX: import VML background image
Created attachment 192457 [details] 159626_textbox_fill_pattern.docx: a textbox example Sorry - I'm confusing myself. Comment 0 indicates the problem I am describing, but it is for the page background (which is not yet importing). So I'm including the sample file I created that shows the same problem in a textbox. Fixing one should fix the other. I'm not sure if patterns work anywhere else. They don't seem to apply to paragraphs or characters, and are not supported yet by Tables. I'm a bit surprised though that no one else has yet reported this ImplementationError.
Current theory: the parameters all import correctly, but it is the image itself that is the problem. It is a tiny image (8*8) that is almost all black in comment 0 and comment 1. I take it that black is meant to represent where the background color is applied, and white represents what should be the foreground color. Apparently we treat it the exact opposite way. (We also don't apply the imported colors at all.) Note that this is VML (created in Word <= 2007 for textboxes I assume). Word 2010 uses DrawingML for textboxes which we import (and export) fine. The problem is that for page background, VML is always used, even by Word 2019. So the importance is still relatively high.
(In reply to Justin L from comment #2) > (We also don't apply the imported colors at all.) sw/qa/core/data/ooxml/pass/fdo79131.docx is a nice example of a shape ("Inline") with a coloured pattern fill.
(In reply to Justin L from comment #2) > Current theory: it is the image itself that is the problem. > black is meant to represent where the background color is applied, > and white represents what should be the foreground color. Correct. LO does it totally different internally. https://gerrit.libreoffice.org/c/core/+/163106 takes care of import.
Now I'm really confusing myself. Comment 0's PDF (and MSO itself) does NOT show a pattern background (even though it is defined). It is only when you go into the page background properties that the definition is noticed, and when applied takes effect. fdo77725 is a minimized version of chart2's PieChartDataLabels.docx, which also does NOT show the pattern background.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/07521972bcd1cfbbd15b2f60ada84ffc69f8f997 tdf#159626 vml pattern import: add color, fix back/foreground It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 192690 [details] fdo79131_mso2010.pdf: word-art with a mostly yellow pattern fill: how it looks in MSO 2010 So, in the end comment 0's example was a very "good" one, even if not at all visually impressive. It prevented me from making a bad mistake. A much more visually appealing example is sw/qa/core/data/ooxml/pass/fdo79131.docx