[Libreoffice-commits] online.git: loleaflet/css loleaflet/html wsd/FileServer.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 12 10:55:05 UTC 2018


 loleaflet/css/loleaflet.css      |    1 +
 loleaflet/html/loleaflet.html.m4 |    2 +-
 wsd/FileServer.cpp               |    6 +++---
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit a514abff884f95547ca5dbe97bdcab403d5b5d34
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Nov 12 11:53:12 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Nov 12 11:53:42 2018 +0100

    document signing: fix disabled case for Calc/Impress
    
    If the document-container has an explicit style attribute, then this
    breaks Calc (only Writer was tested before). This restores the correct
    Writer/Calc/Impress behavior when the setting is false and keeps correct
    behavior with Writer when the setting is true.
    
    Change-Id: I310660e88af4407e521529ec41b5dcb604108bd9

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 38a87695a..0920701cc 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -2,6 +2,7 @@
 	border-top: 1px solid #B6B6B6;
 	background: #DFDFDF;
 	position: absolute;
+	top: 70px;
 	bottom: 33px;
 	right: 0px;
 	left: 0px;
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index f05ed2f27..3d8eb1a1d 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -110,7 +110,7 @@ ifelse(MOBILEAPP,[true],
 
     <div id="spreadsheet-row-column-frame"></div>
 
-    <div id="document-container" style="top: ifelse(MOBILEAPP,[true],[70px],[<!--%DOCUMENT_CONTAINER_TOP%-->]);">
+    ifelse(MOBILEAPP,[true],[<div id="document-container">],[<!--%DOCUMENT_CONTAINER%-->])
 
       <div id="map"></div>
     </div>
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index d56975470..0129070eb 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -640,15 +640,15 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::
 
     // Customization related to document signing.
     std::string documentSigningDiv;
-    std::string documentContainerTop("70px");
+    std::string documentContainerTop("<div id=\"document-container\">");
     const auto documentSigning = config.getBool("per_document.document_signing", false);
     if (documentSigning)
     {
         documentSigningDiv = "<div id=\"document-signing-bar\"></div>";
-        documentContainerTop = "100px";
+        documentContainerTop = "<div id=\"document-container\" style=\"top: 100px;\">";
     }
     Poco::replaceInPlace(preprocess, std::string("<!--%DOCUMENT_SIGNING_DIV%-->"), documentSigningDiv);
-    Poco::replaceInPlace(preprocess, std::string("<!--%DOCUMENT_CONTAINER_TOP%-->"), documentContainerTop);
+    Poco::replaceInPlace(preprocess, std::string("<!--%DOCUMENT_CONTAINER%-->"), documentContainerTop);
 
     const auto loleafletLogging = config.getString("loleaflet_logging", "false");
     Poco::replaceInPlace(preprocess, std::string("%LOLEAFLET_LOGGING%"), loleafletLogging);


More information about the Libreoffice-commits mailing list