Bug 116874

Summary: PDF: FILESAVE: Any text left in 'Sign with watermark' 'text' appears even if 'Sign with watermark' is no longer checked
Product: LibreOffice Reporter: David <dave>
Component: Printing and PDF exportAssignee: Xisco Faulí <xiscofauli>
Status: RESOLVED FIXED    
Severity: normal CC: xiscofauli
Priority: medium    
Version: 4.1 all versions   
Hardware: All   
OS: All   
Whiteboard: target:6.1.0
Crash report or crash signature: Regression By:

Description David 2018-04-08 07:39:20 UTC
Its pretty self explanatory:

I created an image in Draw.
I clicked File -> Export as PDF
On the 'General' tab I checked the box 'Sign with watermark'
I typed some text in the box labeled 'Text' under the above option
_____

I then changed my mind and unchecked the 'Sign with watermark' box but did so without clearing the contents of the text box first.  The text I had entered was greyed-out and I was unable to change it without re-checking the 'Sign with watermark' option box.  Since the option was disabled I left the text box filled.
_____

I clicked 'Export' and chose a filename and location to save to as is the norm.

When I viewed my PDF the text that I had entered as a watermark before disabling the option, and which stayed in the un-editable greyed-out box, appeared across my image anyway.

To fix this, if I change my mind about a watermark I have to make sure the text box is cleared before disabling the feature.

Conclusion:
It seems that the 'Sign with watermark' check box doesn't so much control the feature, as one would expect, but rather simply controls whether or not text can be typed into the box that the watermark feature reads from. Furthermore one could conclude that the watermark feature itself is controlled not by the state of the "Sign with watermark" check box, as would be expected, but rather by whether or not the 'Text' box sub-option contains any data.
Comment 1 MM 2018-04-08 12:04:03 UTC
Confirmed on windows 7 x64 with Version: 6.0.3.2 (x64)
Build ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU threads: 3; OS: Windows 6.1; UI render: default

When disabling the checkbox, the watermark is still included in the pdf.
Comment 2 Xisco Faulí 2018-04-11 14:29:41 UTC
Reproduced back to

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Xisco Faulí 2018-04-11 14:44:08 UTC
Patch submitted to master -> https://gerrit.libreoffice.org/#/c/52732/
Comment 4 Commit Notification 2018-04-13 07:30:58 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#116874: Don't sign with watermark if the checkbox is disabled

It will be available in 6.1.0.

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.