[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - 2 commits - loleaflet/admin loolwsd.xml.in wsd/Storage.cpp
mert (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 25 12:19:42 UTC 2019
loleaflet/admin/admin.html | 11 ++++++-----
loleaflet/admin/src/AdminSocketBase.js | 8 ++++++++
loolwsd.xml.in | 1 +
wsd/Storage.cpp | 4 ++++
4 files changed, 19 insertions(+), 5 deletions(-)
New commits:
commit ccc289dc44e214fd301c71251b328538412e4e82
Author: mert <mert.tumer at collabora.com>
AuthorDate: Mon Nov 25 15:03:49 2019 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Nov 25 12:18:31 2019 +0000
Added an option to override watermark texts
in loolwsd.xml. If set, watermarks will be the same
as entered for all the views instead of per view
watermarks sent in CheckFileInfo
Change-Id: I0943520423abc2567f44920f8679057b3cfbf01f
Reviewed-on: https://gerrit.libreoffice.org/83666
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 8ca7391f0593228ff7d41074bd5a5e09fe0a0918)
diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index faf305e5e..719493bf0 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -108,6 +108,7 @@
<watermark>
<opacity desc="Opacity of on-screen watermark from 0.0 to 1.0" type="double" default="0.2"></opacity>
+ <text desc="Watermark text to be displayed on the document if entered" type="string"></text>
</watermark>
<storage desc="Backend storage">
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 9b41c0798..ce1d38b62 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -645,6 +645,10 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
const Poco::Timestamp modifiedTime = iso8601ToTimestamp(lastModifiedTime, "LastModifiedTime");
setFileInfo(FileInfo({filename, ownerId, modifiedTime, size}));
+ std::string overrideWatermarks = LOOLWSD::getConfigValue<std::string>("watermark.text", "");
+ if (!overrideWatermarks.empty())
+ watermarkText = overrideWatermarks;
+
return std::unique_ptr<WopiStorage::WOPIFileInfo>(new WOPIFileInfo(
{userId, obfuscatedUserId, userName, userExtraInfo, watermarkText, templateSaveAs, templateSource,
canWrite, postMessageOrigin, hidePrintOption, hideSaveOption, hideExportOption,
commit 80ddda2efeede72b523ad0bfbd899d5f907049d9
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Nov 20 14:31:33 2019 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Nov 25 12:18:31 2019 +0000
IE11 - adminconsole, polyfill and HTML cleanup.
Change-Id: I1cbc24aeb3c0398f399702ac9749a204b1b59a56
diff --git a/loleaflet/admin/admin.html b/loleaflet/admin/admin.html
index 23423f2ea..3f4c14708 100644
--- a/loleaflet/admin/admin.html
+++ b/loleaflet/admin/admin.html
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <meta name="description" content="">
- <meta name="author" content="">
+ <meta name="description" content=""/>
+ <meta name="author" content=""/>
<title>LibreOffice Online - Admin console</title>
@@ -90,6 +90,7 @@
<h4><script>document.write(l10nstrings.strServerUptime)</script></h4>
</div>
</div>
+ </div>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li class="active">
diff --git a/loleaflet/admin/src/AdminSocketBase.js b/loleaflet/admin/src/AdminSocketBase.js
index 35480a388..a8c136d6d 100644
--- a/loleaflet/admin/src/AdminSocketBase.js
+++ b/loleaflet/admin/src/AdminSocketBase.js
@@ -4,6 +4,14 @@
*/
/* global _ Util vex Base */
+
+// polyfill startsWith for IE11
+if (typeof String.prototype.startsWith !== 'function') {
+ String.prototype.startsWith = function (str) {
+ return this.slice(0, str.length) === str;
+ };
+}
+
var AdminSocketBase = Base.extend({
socket: null,
More information about the Libreoffice-commits
mailing list