[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-4' - 15 commits - common/Message.hpp cypress_test/integration_tests debian/changelog .gitreview ios/Mobile kit/ChildSession.cpp loleaflet/css loleaflet/html loleaflet/src loolwsd.spec.in loolwsd.xml.in net/Socket.cpp sysconfig.loolwsd wsd/LOOLWSD.cpp

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 19 10:28:38 UTC 2020


 .gitreview                                                             |    2 
 common/Message.hpp                                                     |    2 
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |    4 -
 debian/changelog                                                       |    6 ++
 ios/Mobile/Info.plist.in                                               |    2 
 kit/ChildSession.cpp                                                   |   22 ++++++++--
 loleaflet/css/toolbar.css                                              |   22 +++++++---
 loleaflet/html/loleaflet.html.m4                                       |    1 
 loleaflet/src/control/Control.DocumentNameInput.js                     |   11 +++++
 loleaflet/src/control/Control.UIManager.js                             |    2 
 loleaflet/src/control/Ruler.js                                         |    4 +
 loleaflet/src/layer/marker/ProgressOverlay.js                          |    7 +++
 loolwsd.spec.in                                                        |    2 
 loolwsd.xml.in                                                         |    5 +-
 net/Socket.cpp                                                         |   11 ++++-
 sysconfig.loolwsd                                                      |    7 ---
 wsd/LOOLWSD.cpp                                                        |   14 ++++--
 17 files changed, 93 insertions(+), 31 deletions(-)

New commits:
commit 542e28bf23747aa34f8fd5661150817bca93e0a8
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Jun 19 12:27:54 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:27:54 2020 +0200

    Bump package version to 4.2.4-5
    
    Change-Id: Ib2c32c6db3a676ba1057a4823c37fcb8afec7f89

diff --git a/debian/changelog b/debian/changelog
index a3139c31b..ca451348e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (4.2.4-5) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.4-5
+
+ -- Andras Timar <andras.timar at collabora.com>  Fri, 19 Jun 2020 12:30:00 +0200
+
 loolwsd (4.2.4-4) unstable; urgency=medium
 
   * https://cgit.freedesktop.org/libreoffice/online/log/?h=cp-4.2.4-4
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 67b759986..3918d5d1b 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:           loolwsd%{name_suffix}
 Name:           loolwsd
 %endif
 Version:        @PACKAGE_VERSION@
-Release:        4%{?dist}
+Release:        5%{?dist}
 Vendor:         %{vendor}
 Summary:        LibreOffice Online WebSocket Daemon
 License:        EULA
commit 54fd9180a3f51cc09bd7fa1b1dcfc781e7c2eec9
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Thu Jun 18 17:56:29 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:39 2020 +0200

    leaflet: show brand name on splashscreen
    
    Change-Id: Ie7d93a134e869e14b5e4c1f8599feb8a9e130c07
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96602
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit 10d75ea4e7cc515d3e2d68518f4c5ddd22241fd6)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96694
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/layer/marker/ProgressOverlay.js b/loleaflet/src/layer/marker/ProgressOverlay.js
index 7100243d8..090f8b078 100644
--- a/loleaflet/src/layer/marker/ProgressOverlay.js
+++ b/loleaflet/src/layer/marker/ProgressOverlay.js
@@ -3,6 +3,7 @@
  * L.ProgressOverlay is used to overlay progress images over the map.
  */
 
+ /* global brandProductName */
 L.ProgressOverlay = L.Layer.extend({
 
 	options: {
@@ -51,6 +52,12 @@ L.ProgressOverlay = L.Layer.extend({
 		this._container = L.DomUtil.create('div', 'leaflet-progress-layer');
 		this._spinner = L.DomUtil.create('div', 'leaflet-progress-spinner', this._container);
 		this._spinnerCanvas = L.DomUtil.create('canvas', 'leaflet-progress-spinner-canvas', this._spinner);
+
+		var productName = (typeof brandProductName !== 'undefined') ? brandProductName : 'LibreOffice Online (Unsupported)';
+		this._brandLabel = L.DomUtil.create('div', 'leaflet-progress-label', this._container);
+		this._brandLabel.innerHTML = productName;
+
+
 		this._label = L.DomUtil.create('div', 'leaflet-progress-label', this._container);
 		this._progress = L.DomUtil.create('div', 'leaflet-progress', this._container);
 		this._bar = L.DomUtil.create('span', '', this._progress);
commit e9841a99d5b5afb6ff2856eea9a6ff517b47bebe
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Jun 14 17:33:37 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:34 2020 +0200

    Add LOKit logging option to configuration file
    
    Environment variable in sysconfig.loolwsd was not good, because:
    1) it was a systemd antipattern
    2) this systemd environment file was not present on all distros
    3) we had to take care about this separately, when we did not start
       loolwsd from systemd
    
    Change-Id: I5c47668ca388c2f4b0afd6da8c575a3fb3cfab3b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96277
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 27e1d6e87..951b96079 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -49,7 +49,10 @@
     <logging>
         <color type="bool">true</color>
         <level type="string" desc="Can be 0-8, or none (turns off logging), fatal, critical, error, warning, notice, information, debug, trace" default="@LOOLWSD_LOGLEVEL@">@LOOLWSD_LOGLEVEL@</level>
-        <protocol type="bool" descr="Enable minimal client-site JS protocol logging from the start">@ENABLE_DEBUG_PROTOCOL@</protocol>
+        <protocol type="bool" desc="Enable minimal client-site JS protocol logging from the start">@ENABLE_DEBUG_PROTOCOL@</protocol>
+        <!-- lokit_sal_log example: Log WebDAV-related messages, that is interesting for debugging Insert - Image operation: "+TIMESTAMP+INFO.ucb.ucp.webdav+WARN.ucb.ucp.webdav"
+             See also: https://docs.libreoffice.org/sal/html/sal_log.html -->
+        <lokit_sal_log type="string" desc="Fine tune log messages from LOKit. Default is to suppress log messages from LOKit." default="-INFO-WARN">-INFO-WARN</lokit_sal_log>
         <file enable="@LOOLWSD_LOG_TO_FILE@">
             <property name="path" desc="Log file path.">@LOOLWSD_LOGFILE@</property>
             <property name="rotation" desc="Log file rotation strategy. See Poco FileChannel.">never</property>
diff --git a/sysconfig.loolwsd b/sysconfig.loolwsd
index 69e59adc5..a2747d27e 100644
--- a/sysconfig.loolwsd
+++ b/sysconfig.loolwsd
@@ -4,10 +4,3 @@
 ## Default:	""
 ## ServiceRestart: loolwsd
 #
-
-# warning/info logging from LOKit
-# read the documentation at https://docs.libreoffice.org/sal/html/sal_log.html
-# Example:
-# Log WebDAV-related messages, that is interesting for debugging Insert - Image operation
-# SAL_LOG="+TIMESTAMP+INFO.ucb.ucp.webdav+WARN.ucb.ucp.webdav"
-SAL_LOG="-INFO-WARN"
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index d15e25902..5c77a8a12 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -897,6 +897,7 @@ void LOOLWSD::initialize(Application& self)
             { "logging.file.property[7][@name]", "archive" },
             { "logging.file[@enable]", "false" },
             { "logging.level", "trace" },
+            { "logging.lokit_sal_log", "-INFO-WARN" },
             { "loleaflet_html", "loleaflet.html" },
             { "loleaflet_logging", "false" },
             { "net.listen", "any" },
@@ -994,6 +995,8 @@ void LOOLWSD::initialize(Application& self)
     // Set the log-level after complete initialization to force maximum details at startup.
     LogLevel = getConfigValue<std::string>(conf, "logging.level", "trace");
     setenv("LOOL_LOGLEVEL", LogLevel.c_str(), true);
+    std::string SalLog = getConfigValue<std::string>(conf, "logging.lokit_sal_log", "-INFO-WARN");
+    setenv("SAL_LOG", SalLog.c_str(), 0);
     const bool withColor = getConfigValue<bool>(conf, "logging.color", true) && isatty(fileno(stderr));
     if (withColor)
     {
commit 1e953e8f922d78c068943cbe1aa9fbe87e556f76
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Thu Jun 18 20:30:56 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:29 2020 +0200

    Fix insert local image for online
    
    Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f
    Signed-off-by: mert <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit d29c986e6ad8f30abc1975c945bad62bc75d89f7)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96635

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7e2a84e0d..4b27da4c8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1194,7 +1194,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const Stri
 
 #if !MOBILEAPP
         if (type == "graphic" || type == "selectbackground")
-            url = "file://" + std::string(JAILED_DOCUMENT_ROOT) + "insertfile/" + name;
+        {
+            std::string jailDoc = JAILED_DOCUMENT_ROOT;
+            if (NoCapsForKit)
+            {
+                jailDoc = Poco::URI(getJailedFilePath()).getPath();
+                jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT;
+            }
+            url = "file://" + jailDoc + "insertfile/" + name;
+        }
         else if (type == "graphicurl")
             URI::decode(name, url);
 #else
commit 157b46486e847afbebb72bdfeb82ed206b764abe
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Thu Jun 18 21:20:21 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:24 2020 +0200

    fix .gitreview for this branch
    
    Change-Id: Ie4e92529a73380ef13b6c4f6157cacc984a8fb79

diff --git a/.gitreview b/.gitreview
index 62b13043a..71d55941e 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=gerrit.libreoffice.org
 port=29418
 project=online
 defaultremote=logerrit
-defaultbranch=distro/collabora/co-4-2-4
+defaultbranch=distro/collabora/co-4-2
 
commit d63742cd422e2b9612e66d223e215197311982e2
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Thu Jun 18 07:27:08 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:20 2020 +0200

    wsd: Don't try to resolve an accepted IP address
    
    ...and pollute the logs with warnings if it fails.
    
    Change-Id: I71828205b8d020287f5b6d0bb82feb17c2fdd2f7
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96567
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit c76531061e3a9e1c13c6b6484a88059e8335caa1)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96585
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 93858ad28..d15e25902 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2208,14 +2208,17 @@ public:
                 addressToCheck = Util::trim(param);
                 try
                 {
-                    hostToCheck = Poco::Net::DNS::resolve(addressToCheck).name();
-                    allow &= allowPostFrom(addressToCheck) || StorageBase::allowedWopiHost(hostToCheck);
+                    if (!allowPostFrom(addressToCheck))
+                    {
+                        hostToCheck = Poco::Net::DNS::resolve(addressToCheck).name();
+                        allow &= StorageBase::allowedWopiHost(hostToCheck);
+                    }
                 }
                 catch (const Poco::Exception& exc)
                 {
                     LOG_WRN("Poco::Net::DNS::resolve(\"" << addressToCheck << "\") failed: " << exc.displayText());
-                    // We can't find out the hostname, check the IP only
-                    allow &= allowPostFrom(addressToCheck);
+                    // We can't find out the hostname, and it already failed the IP check
+                    allow = false;
                 }
                 if(!allow)
                 {
commit 00c8bdcc30fb052c5bb2899396a40e20f9e7551b
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Wed Jun 17 18:13:22 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:15 2020 +0200

    online: fix io error on saveas
    
    Change-Id: Icd91eacf2945c803660aaacb1d46d169b1f9bd86
    Signed-off-by: mert <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96570
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index d9bf41631..7e2a84e0d 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2022,8 +2022,16 @@ bool ChildSession::saveAs(const char* /*buffer*/, int /*length*/, const StringVe
             return false;
         }
 
-        // TODO do we need a tempdir here?
-        url = std::string("file://") + JAILED_DOCUMENT_ROOT + pathSegments[pathSegments.size() - 1];
+        std::string jailDoc = JAILED_DOCUMENT_ROOT;
+        if (NoCapsForKit)
+        {
+            jailDoc = Poco::URI(getJailedFilePath()).getPath();
+            jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT;
+        }
+
+        const std::string tmpDir = FileUtil::createRandomDir(jailDoc);
+        const Poco::Path filenameParam(pathSegments[pathSegments.size() - 1]);
+        url = std::string("file://") + jailDoc + tmpDir + "/" + filenameParam.getFileName();
         wopiFilename = wopiURL.getPath();
     }
 
commit cba2bd0553ff4faf6afc12f23a512b41a41e5eb9
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Wed Jun 17 09:12:16 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:10 2020 +0200

    loleaflet: Show presentation controls on tablets
    
    regression from an unknown commit
    
    Change-Id: Iad36563c9a6c7588f12610ccd2fe18eef38628bb
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96514
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Aron Budea <aron.budea at collabora.com>
    (cherry picked from commit a777fcc4d6dd8705c19d4598eda7614ff6c196fa)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96574
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.UIManager.js b/loleaflet/src/control/Control.UIManager.js
index 9c1b3e7f6..5cb657a25 100644
--- a/loleaflet/src/control/Control.UIManager.js
+++ b/loleaflet/src/control/Control.UIManager.js
@@ -90,7 +90,7 @@ L.Control.UIManager = L.Control.extend({
 			this.map.addControl(L.control.formulaBar());
 		}
 
-		if (isDesktop && docType === 'presentation') {
+		if (docType === 'presentation' && (isDesktop || window.mode.isTablet())) {
 			this.map.addControl(L.control.presentationBar());
 		}
 
commit a28b3281e0f4ac793d716a951a0097ee5143c452
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jun 17 14:45:48 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:05 2020 +0200

    cypress: these test are failing recently.
    
    Change-Id: Ifd947fb8135352816dd6aaf525cf2a384904e54e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96530
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit 4145a216ecfb45145e0d4df832f0dfd5169e5d70)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96586
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 01cb938fe..794fd5e4d 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -220,7 +220,7 @@ describe('Impress insertion wizard.', function() {
 		helper.expectTextForClipboard('Tap to edit text');
 	});
 
-	it('Insert date field (fixed).', function() {
+	it.skip('Insert date field (fixed).', function() {
 		mobileHelper.openInsertionWizard();
 
 		cy.contains('.menu-entry-with-icon', 'More Fields...')
@@ -241,7 +241,7 @@ describe('Impress insertion wizard.', function() {
 			.should('exist');
 	});
 
-	it('Insert date field (variable).', function() {
+	it.skip('Insert date field (variable).', function() {
 		mobileHelper.openInsertionWizard();
 
 		cy.contains('.menu-entry-with-icon', 'More Fields...')
commit 94d6478072a381c86580b9c64051254a651afdaa
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Mon Jun 15 19:56:59 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:25:00 2020 +0200

    jsonString: allow json messages without white-spaces after '{'
    
    The json generated by boost::property_tree::write_json() has no
    white-spaces around { , : } json-characters. We use write_json()
    extensively in core.git. Without this patch we will need work-arounds
    like inserting spaces in the json strings thus generated to work with
    online's Message::jsonString()
    
    Change-Id: I0f0631088f4a8b727301bde449884e03163093f0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96383
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    (cherry picked from commit bc7a0b262664032769b2dde3a31151f23ffd5235)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96417

diff --git a/common/Message.hpp b/common/Message.hpp
index cb27e2c97..7bbadd172 100644
--- a/common/Message.hpp
+++ b/common/Message.hpp
@@ -97,7 +97,7 @@ public:
     /// Returns the json part of the message, if any.
     std::string jsonString() const
     {
-        if (_tokens.size() > 1 && _tokens[1] == "{")
+        if (_tokens.size() > 1 && _tokens[1].size() && _tokens[1][0] == '{')
         {
             const size_t firstTokenSize = _tokens[0].size();
             return std::string(_data.data() + firstTokenSize, _data.size() - firstTokenSize);
commit 88aea567dcc502efbe8dd313a8bf1cdbeee2223d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jun 15 06:46:45 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:24:55 2020 +0200

    Guard against uncaught exception when tileContainer.style is undefined
    
    Happened at least for me in the iOS app.
    
    Change-Id: Ie6f2e30c757ed5dec92dc94da52f9a055731666b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96308
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index cca4e46ed..011b16488 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -409,7 +409,9 @@ L.Control.Ruler = L.Control.extend({
 				break;
 			}
 		}
-		var tileContainerXTranslate = parseInt(tileContainer.style.transform.match(/\(([-0-9]*)/)[1]);
+		var tileContainerXTranslate = 0;
+		if (tileContainer.style !== undefined)
+			tileContainerXTranslate = parseInt(tileContainer.style.transform.match(/\(([-0-9]*)/)[1]);
 		var mapPaneXTranslate = parseInt(mapPane.style.transform.match(/\(([-0-9]*)/)[1]);
 
 		var rulerOffset = mapPaneXTranslate + firstTileXTranslate + tileContainerXTranslate + (this.options.tileMargin * scale);
commit 88ffb709cfd6816fead5a74888bbbb333c37a82b
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jun 15 06:32:40 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:24:50 2020 +0200

    Bump the internal iOS app version number to 4.2.5
    
    Change-Id: I9460087ee7fb8237a9dea17b96a75a5a297f6a87
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96307
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/ios/Mobile/Info.plist.in b/ios/Mobile/Info.plist.in
index 2b716ded1..1b97d9a05 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -214,7 +214,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>4.2.4</string>
+	<string>4.2.5</string>
 	<key>CFBundleVersion</key>
 	<string>@IOSAPP_BUNDLE_VERSION@</string>
 	<key>LSRequiresIPhoneOS</key>
commit ae7f4460f37c8a1d0eab17f49a7971599e1d5146
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Jun 12 12:19:50 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:24:46 2020 +0200

    Snap needs a specific unix socket name.
    
    Change-Id: I7fd816eb6d23df0f27e40f345181833dbe85e022
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96181
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/net/Socket.cpp b/net/Socket.cpp
index ee76a5a1a..0d0b3ed0b 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -755,15 +755,22 @@ std::string LocalServerSocket::bind()
 {
     int rc;
     struct sockaddr_un addrunix;
+
+    // snap needs a specific socket name
+    std::string socketAbstractUnixName(SOCKET_ABSTRACT_UNIX_NAME);
+    const char* snapInstanceName = std::getenv("SNAP_INSTANCE_NAME");
+    if (snapInstanceName && snapInstanceName[0])
+        socketAbstractUnixName = std::string("0snap.") + snapInstanceName + ".loolwsd-";
+
     do
     {
         std::memset(&addrunix, 0, sizeof(addrunix));
         addrunix.sun_family = AF_UNIX;
-        std::memcpy(addrunix.sun_path, SOCKET_ABSTRACT_UNIX_NAME, sizeof(SOCKET_ABSTRACT_UNIX_NAME));
+        std::memcpy(addrunix.sun_path, socketAbstractUnixName.c_str(), socketAbstractUnixName.length());
         addrunix.sun_path[0] = '\0'; // abstract name
 
         std::string rand = Util::rng::getFilename(8);
-        memcpy(addrunix.sun_path + sizeof(SOCKET_ABSTRACT_UNIX_NAME) - 1, rand.c_str(), 8);
+        memcpy(addrunix.sun_path + socketAbstractUnixName.length(), rand.c_str(), 8);
 
         rc = ::bind(getFD(), (const sockaddr *)&addrunix, sizeof(struct sockaddr_un));
         LOG_TRC("Bind to location " << std::string(&addrunix.sun_path[1]) <<
commit 6ee16bdeaa198aa6232c6627d19516ee77cd5fa3
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Wed Jun 10 15:56:34 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:24:42 2020 +0200

    Desktop: Set max size for document name's width
    
    Change-Id: Ic35990efd9e240ed29ae9da1e72dcd6b58a4e933
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96053
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 13eb379d5..20fb595a0 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -149,6 +149,19 @@ w2ui-toolbar {
 #tb_formulabar_item_formula div table {
 		width: 100%;
 }
+#document-title-pencil.editable {
+	visibility: visible;
+	width: 24px;
+	height: 22px;
+	position: absolute;
+	left: 87%;
+	background: url('images/baseline-edit.svg') right center no-repeat, radial-gradient(circle, #fff 20%, #fff0 100%);
+	border-top: solid 3px white;
+}
+
+#document-title-pencil:not(.editable){
+	visibility: hidden;
+}
 
 #document-name-input {
 		font-size: 16px;
@@ -159,25 +172,25 @@ w2ui-toolbar {
 #document-name-input.editable {
 	border: none;
 	box-shadow: 0 0 0.1px 1px #ebebeb, 0 0 2px 1px #f0f0f0;
-	background-image: url('images/baseline-edit.svg');
 	background-position: right;
 	background-repeat: no-repeat;
+	padding-right: 24px;
+	max-width: 100%;
 }
 
 #document-name-input.editable:focus {
 		border: none;
 		box-shadow: inset 0 0 2px 1px #f0f0f0, 0 0 0.1px 1px #bbb;
 		background-color: white;
+		background-image: none;
 }
 
 #document-name-input.editable:hover:not(:focus) {
 		border: none;
 		box-shadow: 0 0 0.1px 1px #d7d7d7, 0 0 3px 2px #f0f0f0;
 		background-color: white;
-		background-image: url('images/baseline-edit.svg');
 		background-position: right;
 		background-repeat: no-repeat;
-		padding-right: 2px;
 }
 #tb_editbar_item_fold table.w2ui-button {
 	margin: 0px 14px 0px 4px !important;
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index d3c3e21de..f84271e62 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -145,6 +145,7 @@ m4_ifelse(MOBILEAPP,[true],
        <ul id="main-menu" class="sm sm-simple lo-menu readonly"></ul>
        <div id="document-titlebar">
          <div class="document-title">
+           <div id="document-title-pencil"></div>
            <input id="document-name-input" type="text" disabled="true" style="display: none"/>
          </div>
        </div>
diff --git a/loleaflet/src/control/Control.DocumentNameInput.js b/loleaflet/src/control/Control.DocumentNameInput.js
index 090cc25f9..28db57f41 100644
--- a/loleaflet/src/control/Control.DocumentNameInput.js
+++ b/loleaflet/src/control/Control.DocumentNameInput.js
@@ -65,7 +65,13 @@ L.Control.DocumentNameInput = L.Control.extend({
 	},
 
 	onDocLayerInit: function() {
-		$('#document-name-input').attr('size', $('#document-name-input').val().length);
+		var value = $('#document-name-input').val();
+		if (value.length < 27) {
+			$('#document-name-input').attr('size', value.length);
+		}
+		else {
+			$('#document-name-input').attr('size', '25');
+		}
 
 		// FIXME: Android app would display a temporary filename, not the actual filename
 		if (window.ThisIsTheAndroidApp) {
@@ -78,6 +84,7 @@ L.Control.DocumentNameInput = L.Control.extend({
 			// We can now set the document name in the menu bar
 			$('#document-name-input').prop('disabled', false);
 			$('#document-name-input').removeClass('editable');
+			$('#document-title-pencil').removeClass('editable');
 			$('#document-name-input').focus(function() { $(this).blur(); });
 			// Call decodecodeURIComponent twice: Reverse both our encoding and the encoding of
 			// the name in the file system.
@@ -99,12 +106,14 @@ L.Control.DocumentNameInput = L.Control.extend({
 			// Save As allowed
 			$('#document-name-input').prop('disabled', false);
 			$('#document-name-input').addClass('editable');
+			$('#document-title-pencil').addClass('editable');
 			$('#document-name-input').off('keypress', this.onDocumentNameKeyPress).on('keypress', this.onDocumentNameKeyPress.bind(this));
 			$('#document-name-input').off('focus', this.onDocumentNameFocus).on('focus', this.onDocumentNameFocus.bind(this));
 			$('#document-name-input').off('blur', this.documentNameCancel).on('blur', this.documentNameCancel.bind(this));
 		} else {
 			$('#document-name-input').prop('disabled', true);
 			$('#document-name-input').removeClass('editable');
+			$('#document-title-pencil').removeClass('editable');
 			$('#document-name-input').off('keypress', this.onDocumentNameKeyPress);
 		}
 	}
commit 85ace18ea6ac83c85a1113b40642c048756744a8
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Tue Jun 9 11:25:16 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 12:24:37 2020 +0200

    Desktop: Set (on LayerInit)  document name's size dynamically according to its value
    
    Change-Id: I5e15b50c4ecf51d8e713cfc0fe116b44294e1e45
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95904
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Pedro Silva <pedro.silva at collabora.com>
    Reviewed-by: Pedro Silva <pedro.silva at collabora.com>

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 45b1531ec..13eb379d5 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -154,7 +154,6 @@ w2ui-toolbar {
 		font-size: 16px;
 		border: 1px solid transparent;
 		background-color: transparent;
-		width: 200px;
 }
 
 #document-name-input.editable {
@@ -169,7 +168,6 @@ w2ui-toolbar {
 		border: none;
 		box-shadow: inset 0 0 2px 1px #f0f0f0, 0 0 0.1px 1px #bbb;
 		background-color: white;
-		width: 200px;
 }
 
 #document-name-input.editable:hover:not(:focus) {
@@ -179,8 +177,7 @@ w2ui-toolbar {
 		background-image: url('images/baseline-edit.svg');
 		background-position: right;
 		background-repeat: no-repeat;
-		padding-right: 20px;
-		width: 181px;
+		padding-right: 2px;
 }
 #tb_editbar_item_fold table.w2ui-button {
 	margin: 0px 14px 0px 4px !important;
diff --git a/loleaflet/src/control/Control.DocumentNameInput.js b/loleaflet/src/control/Control.DocumentNameInput.js
index ab22cd1a3..090cc25f9 100644
--- a/loleaflet/src/control/Control.DocumentNameInput.js
+++ b/loleaflet/src/control/Control.DocumentNameInput.js
@@ -65,6 +65,8 @@ L.Control.DocumentNameInput = L.Control.extend({
 	},
 
 	onDocLayerInit: function() {
+		$('#document-name-input').attr('size', $('#document-name-input').val().length);
+
 		// FIXME: Android app would display a temporary filename, not the actual filename
 		if (window.ThisIsTheAndroidApp) {
 			$('#document-name-input').hide();


More information about the Libreoffice-commits mailing list