Bug 58819 - FILESAVE as .docx: loss of page background picture (watermark)
Summary: FILESAVE as .docx: loss of page background picture (watermark)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.3 release
Hardware: Other All
: medium major
Assignee: Miklos Vajna
QA Contact:
URL:
Whiteboard: BSA target:4.2.0
Keywords:
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-12-28 06:40 UTC by prasanna.barate
Modified: 2013-10-28 01:47 UTC (History)
5 users (show)

See Also:


Attachments
screen shot for steps (1.66 MB, application/zip)
2012-12-28 06:40 UTC, prasanna.barate
Details
simple test document (31.54 KB, application/vnd.oasis.opendocument.text)
2013-06-12 12:54 UTC, Michael Meeks
Details
sample watermark as a customshape (13.42 KB, application/vnd.oasis.opendocument.text)
2013-06-12 15:31 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description prasanna.barate 2012-12-28 06:40:02 UTC
Created attachment 72203 [details]
screen shot for steps

Problem description: 

Steps to reproduce:
1. create new text document in lo(libreoffice)....
2. insert the watermark (menu-> Format -> page -> background -> As->Graphics -> select image (browse) -> Type -> area ->apply
3. save the file with .docx extension....
4. reopen the same file

Current behavior:
 when we reopen file with watermark it does not show the watermark.
Expected behavior:
  watermark must be present while reopening file.

              
Operating System: Ubuntu
Version: 4.1.0.0.alpha0+ Master
Comment 1 Rainer Bielefeld Retired 2012-12-28 08:04:28 UTC
[Reproducible] with arbitrary background picture and server  installation of  "LOdev  4.0.0.0.beta1+   -  ENGLISH UI / German Locale  [Build ID: 6d4a55bf38a1c470c49f904dbbddf94eb2f6154)]"  {tinderbox: Win-x86@6, pull time 2012-12-17 08:36:40} on German WIN7 Home Premium (64bit) with own separate User Profile 

It does not matter whether I save as MSO2007 or OOXML.
When I open saved document with OOo 4 or MS, WORD Viewer I do not see a page background.
Works fine for save as .doc.
It seems that the picture really will be lost, the document with a 148KB picture will be saved as a 4KB .docx.

Same with LibO 3.6.4, 3.5.7., 3.3.3, it seems that never worked.
Comment 2 Michael Meeks 2013-01-10 10:16:47 UTC
If this never really worked in 3.6 etc. it should be a MAB for 3.6 not 4.0 - moving it there.
Comment 3 Michael Meeks 2013-06-12 10:47:55 UTC
Miklos - you did some work with docx and watermarks recently; having said that - there are a number of pieces that we can't round-trip successfully to docx - and it's unclear to me that this should be a MAB. Thoughts ?
Comment 4 Miklos Vajna 2013-06-12 12:40:52 UTC
It's not clear to me what we're expected here, the title speaks about watermark (that's a kind of a customshape), but the description is about graphics as page background (i.e. a bitmap), which is a different thing.

Prasanna, could you please attach an ODT document where saving that as DOCX reproduces the issue?
Comment 5 Michael Meeks 2013-06-12 12:54:57 UTC
Created attachment 80726 [details]
simple test document
Comment 6 Michael Meeks 2013-06-12 12:55:16 UTC
attached based on the instructions in comment 1 :-)
Comment 7 prasanna.barate 2013-06-12 13:21:21 UTC
Hi ... Now i dont have that libreoffice . So it takes time to create such
file .and set libreoffice code
On 12-Jun-2013 6:10 PM, <bugzilla-daemon@freedesktop.org> wrote:

>  Miklos Vajna <vmiklos@suse.cz> changed bug 58819<https://bugs.freedesktop.org/show_bug.cgi?id=58819>
>  What Removed Added  Status NEW NEEDINFO
>
>  *Comment # 4 <https://bugs.freedesktop.org/show_bug.cgi?id=58819#c4> on bug
> 58819 <https://bugs.freedesktop.org/show_bug.cgi?id=58819> from Miklos
> Vajna <vmiklos@suse.cz> *
>
> It's not clear to me what we're expected here, the title speaks about watermark
> (that's a kind of a customshape), but the description is about graphics as page
> background (i.e. a bitmap), which is a different thing.
>
> Prasanna, could you please attach an ODT document where saving that as DOCX
> reproduces the issue?
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You reported the bug.
>
>
Comment 8 prasanna.barate 2013-06-12 13:28:23 UTC
Our issue is ,if we open the docx file in libreoffice which has watermark
in it . Then watermark losses its own properties like transperancy and bla
bla .. so we atleast try so set that watermark image to the background or
behind the text ..
In microsoft office when we add watermark then corresponding image is added
into header part .. on other hand we dont ..
its all about ..
i think now you are clear with my changes



On Wed, Jun 12, 2013 at 6:51 PM, Prasanna Barate <
prasanna.barate@synerzip.com> wrote:

> Hi ... Now i dont have that libreoffice . So it takes time to create such
> file .and set libreoffice code
> On 12-Jun-2013 6:10 PM, <bugzilla-daemon@freedesktop.org> wrote:
>
>>  Miklos Vajna <vmiklos@suse.cz> changed bug 58819<https://bugs.freedesktop.org/show_bug.cgi?id=58819>
>>  What Removed Added  Status NEW NEEDINFO
>>
>>  *Comment # 4 <https://bugs.freedesktop.org/show_bug.cgi?id=58819#c4> on bug
>> 58819 <https://bugs.freedesktop.org/show_bug.cgi?id=58819> from Miklos
>> Vajna <vmiklos@suse.cz> *
>>
>> It's not clear to me what we're expected here, the title speaks about watermark
>> (that's a kind of a customshape), but the description is about graphics as page
>> background (i.e. a bitmap), which is a different thing.
>>
>> Prasanna, could you please attach an ODT document where saving that as DOCX
>> reproduces the issue?
>>
>>  ------------------------------
>> You are receiving this mail because:
>>
>>    - You reported the bug.
>>
>>
Comment 9 Miklos Vajna 2013-06-12 15:01:28 UTC
Michael: this is really odd, i can export that file fine in ww8 format, but then even Word itself can't save it as docx without formatting loss: the graphic loses its scaling and becomes tiled. :-/

Prasanna, could you please attach the *original* problematic docx file (before you worked around the problem with using a graphics background)? I'm asking as the import side of this got improved recently, so if you create a standard watermark using Word, it should be imported fine. See here for a daily build:

http://dev-builds.libreoffice.org/daily/master/

In other words, if exporting a document like http://cgit.freedesktop.org/libreoffice/core/plain/sw/qa/extras/ooxmlimport/data/watermark.docx would help with your problem, I can give it a try. I have no idea how could a small scaled background image like attachment 80726 [details] be exported to docx properly.
Comment 10 Miklos Vajna 2013-06-12 15:31:19 UTC
Created attachment 80731 [details]
sample watermark as a customshape

Saving this as docx doesn't work either ATM, but I think that's doable.
Comment 11 Commit Notification 2013-06-13 10:22:55 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c7e237045df1e0ed01c47ce85923cd182a101bc7

fdo#58819 VML export: handle objects anchored in the header / footer



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-06-13 15:17:53 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1f2e2563a60bfc3a4c5b81b99beb8eef674d13f2

fdo#58819 initial VML export of ESCHER_Prop_gtextUNICODE



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2013-06-13 15:18:12 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=175d28d564ff552cd3d73c3b087216bc82a763a1

fdo#58819 VML export of mso-position-*



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2013-06-13 15:35:09 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a1dda85b46592b46ae290da43964b22eb0a84e29

fdo#58819 VML export of ESCHER_Prop_Rotation



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2013-06-15 08:51:05 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=559d194d80a20b17ba6aa6f94a7749bcc59c871e

fdo#58819 DOCX VML export: fix shape size for rotated shapes



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2013-06-15 08:51:24 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=12322f5fd2a67e3f21029ac3511aa54d96fc1cab

fdo#58819 VML export of ESCHER_Prop_fNoLineDrawDash



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2013-06-15 08:51:43 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=98f90fdecc030b3789c0811cff8603709e5fec30

fdo#58819 VML export of ESCHER_Prop_gtextFont



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2013-06-15 08:52:03 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43b057760472c0131a83227cf4d35db2bca2d0e4

fdo#58819 VML export of ESCHER_Prop_fillOpacity



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2013-06-15 09:19:05 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e2e45e25a7bab0bc00a9562bf7e66b328d15a6d3

Related: fdo#58819 VML import: shape types not starting with a hashmark are OK



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2013-06-15 11:43:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ada0b8f71eb9a5b0cf2d8d3e323727f8925a491

fdo#58819 testcase



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Bjarki Kristinsson 2013-07-09 16:33:10 UTC
After trying both the test document and background document that are attached I am still able to reproduce the bug.

Steps to reproduce:

1. Open either of those two documents
2. File -> Save As
3. Select .docx
4. Select the "Use Microsoft Word 2007/2010 XML format"
5. Close LibreOffice and re-open the docx.

The size of the document also shrinks massively, 32k odt file ->  4k docx file.

Running on Ubuntu 13.04 64 bit

Version: 4.1.1.0.0+
Build ID: 2d398166a937b494da7e7b198d2a00d20393a10
TinderBox: Linux-x86_64@31-Release-Configuration-RHEL5-Baseline, Branch:libreoffice-4-1, Time: 2013-07-05_22:37:43
Comment 22 tommy27 2013-07-09 16:43:04 UTC
@Bjarki
as far as I see the fix was pushed to LibO master (future 4.2 release) so it's not available in LibO 4.1 pre-release yet.

you should download a recent master build from here:
http://dev-builds.libreoffice.org/daily/master/ 

then check if the bug is still reproducible.
if not, you could ask the developer to backport the fix into the 4.1.x branch.
Comment 23 Bjarki Kristinsson 2013-07-09 18:04:22 UTC
Correct you are sir. I re-ran the test with:

Version: 4.2.0.0.alpha0+
Build ID: 4374e5c80525cd1a9d9ab04714ccbf2543a912ce
(master~2013-07-08_23.43.08_LibreOfficeDev_4.2.0.0.alpha0_Win_x86)

running Windows 8 64 bit.

And it appears the bug has been fixed, I was unable to reproduce it.

On a side note, I couldn't seem to find a install for Debian/Ubuntu (DEBS) in that master directory, only Fedora (RPM), hence I had to try this on Windows. Is there something I am missing there?
Comment 24 Michael Meeks 2013-07-09 20:27:59 UTC
There was some thought we could back-port that to libreoffice-4-1 for 4.1.1 or something - but it's quite a lot of commits :-) Nice to know it's working on master though.