Bug 78301 - FILESAVE: Custom Watermark height and width has invalid values after Roundtrip in .docx
Summary: FILESAVE: Custom Watermark height and width has invalid values after Roundtri...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Umesh Kadam
URL:
Whiteboard: BSA target:4.4.0
Keywords: regression
Depends on:
Blocks: 66373
  Show dependency treegraph
 
Reported: 2014-05-05 13:40 UTC by pallavi.jadhav
Modified: 2015-06-08 17:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Contains only Watermark (39.86 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-05 13:40 UTC, pallavi.jadhav
Details
Contains watermark (41.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-06 05:23 UTC, pallavi.jadhav
Details
Screenshot comparison between Original and RT file (307.92 KB, image/png)
2014-05-06 05:23 UTC, pallavi.jadhav
Details
Test document (10.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-06-26 13:04 UTC, Rohit Deshmukh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pallavi.jadhav 2014-05-05 13:40:52 UTC
Created attachment 98488 [details]
Contains only Watermark

Steps to reproduce :
1] Open attached DOCX in LibreOffice
2] Perform save_as DOCX
3] Open saved file in MS Office 2010

Current behavior :
Watermark font size is changed(decreased).

Expected behavior :
Watermark size should not be changed.

XML description :
In RT, header1.xml,
an xml element <v:shape> has attribute "style" which has wrong value.
If replaced value of style attribute from original to RT, Rt opens up correctly.
Comment 1 tommy27 2014-05-05 14:42:02 UTC
please attach comparative screenshot.
moreover define exactly which LibO version are you using and which one is the first you saw the bug.
Comment 2 Jorendc 2014-05-05 16:59:30 UTC
(In reply to comment #1)
> please attach comparative screenshot.
> moreover define exactly which LibO version are you using and which one is
> the first you saw the bug.

@Tommy: the developers of synerzip do report their own found bugs and fix them theirselfs. They do create a bug report to keep track of it, and for verification. Therefore we don't need to handle all this information (when did it happen etc etc). If they need assistance (bibisecting) etc, they always can ask of course.

@Pallavi: I'll mark your bug as NEW. I don't see a watermark after roundtripping and opening using Word 2013. Maybe the font size is decreased that much.

Tested using Windows 8.1 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: 82a623fb08afc72decb78f061b751a43ae503678
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-05_06:37:16

Kind regards,
Joren
Comment 3 tommy27 2014-05-05 17:04:29 UTC
Ok Joren, I did not know about the synerzip team.
Comment 4 pallavi.jadhav 2014-05-06 05:23:03 UTC
Created attachment 98535 [details]
Contains watermark
Comment 5 pallavi.jadhav 2014-05-06 05:23:52 UTC
Created attachment 98536 [details]
Screenshot comparison between Original and RT file
Comment 6 pallavi.jadhav 2014-05-06 05:26:57 UTC
@Joren, @Tommy : I have attached another Watermark file with Color changed to Grey, so that difference in RT will be visible.
I have also attached screenshot comparison for the reference.
Comment 7 Rohit Deshmukh 2014-06-21 03:56:27 UTC
It's a regression.

I checked on last commit for watermark. It's working fine, LO able to import the watermark with appropriate height and width.

Commit :: 

Author: Ravindra Vidhate <ravindra.vidhate@synerzip.com>
Date:   Wed Mar 5 11:38:22 2014 +0530

    fdo#35324: Text and picture water are not imported  and not preserved in RT.
    
    Problem : Open docx file which has Text/Picture as water mark.
    1. The text is not imported properly also picture water mark is also considered as shape.
    2. It writes the watermarks in Document.xml, while it should write in only Header.xml.
    
    Conflicts:
        sw/qa/extras/ooxmlexport/ooxmlexport.cxx
    
    Reviewed on:
        https://gerrit.libreoffice.org/8457
    
    Change-Id: Ic988858da25a4cba3ae16e614d920e2e16053a5f
Comment 8 Joel Madero 2014-06-21 16:54:39 UTC
Removing bibisect request as this is a synerzip bug report
Comment 9 Joel Madero 2014-06-21 16:59:06 UTC
Sorry about that - bibisecting now will have it done shortly
Comment 10 Joel Madero 2014-06-21 17:25:06 UTC
From comment 7 I don't know why a bibisect is needed. I've been trying to get one but there is a series of problems with watermarks that make bibisecting a bit rough. If you still need a bibisect despite comment 7 which appears to identify the commit - add bibisectrequest again and I'll try once more. Thanks
Comment 11 Rohit Deshmukh 2014-06-21 17:32:14 UTC
@Joel:
Thank you for trying. Its realted to height and width of watermark.

I added " BSA bibisectrequest " to bug.

Thank you,
Rohit D
Comment 12 Rohit Deshmukh 2014-06-23 15:14:16 UTC
@Joel:
Hi all,
I found the commit which causes issue.

    commit 120e469d176026ceb59abbf74d2ad255323cbc9a
    Author: Armin Le Grand <alg@apache.org>
    Date: Thu Sep 19 10:11:03 2013 +0000

i#115391 better support for MinTextSize settings

... for TextShapes and CustomShapes

Conflicts:
include/svx/svdotext.hxx
svx/source/sdr/properties/customshapeproperties.cxx
svx/source/svdraw/svdoashp.cxx
svx/source/svdraw/svdotext.cxx
svx/source/svdraw/svdotxdr.cxx
svx/source/svdraw/svdotxtr.cxx

Change-Id: Ie6f490801b6887568135ed5f83c8bbe7ab6daa08
Comment 13 Rohit Deshmukh 2014-06-26 13:04:12 UTC
Created attachment 101801 [details]
Test document
Comment 14 Commit Notification 2014-08-04 07:35:59 UTC
Umesh Kadam committed a patch related to this issue.
It has been pushed to "master":

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

fdo#78301 : Size of word-arts change during import.



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 Jorendc 2014-09-01 08:33:15 UTC
Fix applied + Unit test -> RESOLVED FIXED

Also verified it using Mac OSX 10.9 with LibreOffice Version: 4.4.0.0.alpha0+
Build ID: 59f1e330f0ecbb7d2387c1569c19fd055c162f8f
TinderBox: MacOSX-10.9-x86_64@53, Branch:master, Time: 2014-08-30_07:21:40