[Libreoffice-commits] online.git: wsd/DocumentBroker.hpp wsd/Storage.cpp

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 29 11:12:47 UTC 2019


 wsd/DocumentBroker.hpp |    2 ++
 wsd/Storage.cpp        |   10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 29b603a34f9dfbf4ecd9d504fd2836472fa3c9a5
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Nov 28 18:09:58 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Nov 29 12:12:30 2019 +0100

    Fix build for MOBILEAPP
    
    No Admin.hpp needed (which would cause a conflicting definitions of a
    class called Document when compiling Kit.cpp).
    
    No locks "supported" in the way the code expects for WOPI-like things.
    
    Change-Id: Ie43311af054f2940576ce9b2b13520f24887628e
    Reviewed-on: https://gerrit.libreoffice.org/84018
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 91daee6a2..19c88e4c4 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -33,7 +33,9 @@
 
 #include "common/SigUtil.hpp"
 
+#if !MOBILEAPP
 #include "Admin.hpp"
+#endif
 
 // Forwards.
 class PrisonerRequestDispatcher;
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index e8b769d3f..484751352 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -462,14 +462,20 @@ std::map<std::string, std::string> GetQueryParams(const Poco::URI& uri)
 
 } // anonymous namespace
 
+#endif // !MOBILEAPP
+
 void LockContext::initSupportsLocks()
 {
+#if MOBILEAPP
+    _supportsLocks = false;
+#else
     if (_supportsLocks)
         return;
 
     // first time token setup
     _supportsLocks = true;
     _lockToken = "lool-lock" + Util::rng::getHexString(8);
+#endif
 }
 
 bool LockContext::needsRefresh(const std::chrono::steady_clock::time_point &now) const
@@ -490,6 +496,8 @@ void LockContext::dumpState(std::ostream& os)
     os << "    last locked: " << Util::getSteadyClockAsString(_lastLockTime) << "\n";
 }
 
+#if !MOBILEAPP
+
 std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Authorization& auth, LockContext &lockCtx)
 {
     // update the access_token to the one matching to the session
@@ -1100,6 +1108,6 @@ StorageBase::SaveResult WebDAVStorage::saveLocalFileToStorage(
     return StorageBase::SaveResult(StorageBase::SaveResult::OK);
 }
 
-#endif
+#endif // !MOBILEAPP
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list