Skip to content

Commit

Permalink
wsd: support line-breaks in watermark text
Browse files Browse the repository at this point in the history
New-line breaks can now be inserted in the watermark
text using
. This helps break long watermark texts
at desired points and therefore make watermarks more
readable.

Change-Id: Ifee6faa06c9fb1fac38e5a4036c2e225829d796d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
  • Loading branch information
Ashod authored and kendy committed Nov 11, 2020
1 parent 4185c5f commit 3dff047
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kit/Watermark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Watermark final
Watermark(const std::shared_ptr<lok::Document>& loKitDoc, const std::string& text,
double opacity)
: _loKitDoc(loKitDoc)
, _text(text)
, _text(Util::replace(text, "\\n", "\n"))
, _font("Carlito")
, _alphaLevel(opacity)
, _width(0)
Expand Down

0 comments on commit 3dff047

Please sign in to comment.