Issue 56806 - WW: page background graphic lost on export
Summary: WW: page background graphic lost on export
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.0
Hardware: PC All
: P3 Trivial with 1 vote (vote)
Target Milestone: 4.0.0
Assignee: mayongl
QA Contact: issues@sw
: 57470 61470 85545 (view as issue list)
Depends on:
Reported: 2005-10-27 17:26 UTC by ierni
Modified: 2012-11-08 01:24 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

patch for ww8 background graphic export (1.55 KB, patch)
2012-06-15 10:01 UTC, zjchen
mayongl: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description ierni 2005-10-27 17:26:04 UTC
operating system: xp professional sp2

oo version: 1.9.122 and newers


1)       I made a document with a background transparent image in open office.

2)       I save it in Microsoft word 2000/xp version.

3)       I close the document

4)       When I open the .doc document the image will disappear, there is no 
more backround

 How can give you a sample in attacch?
Comment 1 michael.ruess 2005-10-27 21:04:57 UTC
Attachments could be added after you submitted the issue when you have another
look at it.

MRU->FLR: since Word 2003, MS also supports graphical page background in a way.
But not as good as OO. Perhaps we could support it in the filter at least as MS
does, so tht the graphic will not completely be lost.
Comment 2 michael.ruess 2005-11-08 07:20:21 UTC
*** Issue 57470 has been marked as a duplicate of this issue. ***
Comment 3 ace_dent 2006-02-01 12:36:38 UTC
*** Issue 61470 has been marked as a duplicate of this issue. ***
Comment 4 stjepan 2006-02-02 11:46:35 UTC
I think that background graphic is not lost on export, but on import. If you
make a document in OO Writer containing a background graphics and export it as a
doc file, you can normally open it in MS Word 2003, but if you try to open it in
OO Writer again, it will not import background graphic at all. (for details
please see <A HREF="show_bug.cgi?id=61470">Issue 61470</A>)

If export filter already exists, it would be fairly reasonable to add import
filter as well. It's not quite logical that I am able to successfully save a
document but not to correctly read it thereafter : )
Comment 5 Mathias_Bauer 2006-08-30 15:29:59 UTC
assigning to hbrinkm
Comment 6 michael.ruess 2008-01-28 11:13:51 UTC
*** Issue 85545 has been marked as a duplicate of this issue. ***
Comment 7 zjchen 2012-06-15 07:24:40 UTC
After investigation, I have figured out two defect regarding the background graphic when saving to doc file and loading again.

(1) import: Background graphic will be imported as drawing object and stored in draw model. The draw model need initialize before use but it does not. So the background will be lost when open the document.
(2) export:  MS WORD insert a background graphic as "tiled" fill picture. while AOO can set background graphic as "tiled" fill, "area" fill etc. we need to distinguish different kinds of background graphic. 

Regarding the spec in MS WORD, there is a property fBackground in 0x033F parameter. The property  means whether a shape is the background shape of a drawing. And the default background in MS WORD is tiled fill. So seems we can export the background as follows:
tiled fill in AOO: Set fBackground property true , it will be normal background in MS WORD;
area fill in AOO: Do not set fBackground property otherwise it will show as tiled fill. just export the picture and MS WORD will load it as a abnormal background but it still keep area fill. 
Other position in AOO: export as tiled fill.
Comment 8 zjchen 2012-06-15 10:01:44 UTC
Created attachment 78340 [details]
patch for ww8 background graphic export
Comment 9 zjchen 2012-06-15 13:17:41 UTC
test sample file in Issue 57470 and it works
Comment 10 mayongl 2012-06-19 06:35:59 UTC
Comment 11 mayongl 2012-06-21 08:18:44 UTC
Comment on attachment 78340 [details]
patch for ww8 background graphic export

Comment 12 mayongl 2012-07-10 02:11:48 UTC
Fixed in revision 1359457.

The background can be exported correctly now. 

But the background will always showed in area style due to another defect in import.
Comment 13 mayongl 2012-07-10 02:24:36 UTC
The import prolem is described in issue 74266.
Comment 14 zjchen 2012-07-10 02:35:21 UTC
I will have a further look and try to find a solution for issue 74266.
Comment 15 louqle 2012-11-08 01:24:00 UTC
verified in 1404513 on Win7, XP, Mac 10.7 and SLED 11 SP1 with steps:
1. new a SW in Aoo
2. set page background as color or select a graphic as background
3. save as .doc
4. reopen the .doc in Aoo