[Libreoffice-commits] online.git: 3 commits - Mobile/Mobile Mobile/Mobile.xcodeproj wsd/DocumentBroker.cpp wsd/LOOLWSD.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 8 15:04:32 UTC 2018
Mobile/Mobile.xcodeproj/project.pbxproj | 4 ++++
Mobile/Mobile/Document.mm | 1 +
wsd/DocumentBroker.cpp | 2 +-
wsd/LOOLWSD.cpp | 15 ++++++++++-----
4 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit 72f36be50939548cb2f341681fb9204be1486df9
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Oct 8 16:25:12 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Oct 8 16:47:15 2018 +0300
Set up the EditFileExtensions set also for the mobile app
Use the same discovery.xml and the ClientRequestDispatcher::
InitStaticFileContentCache() call as in Online, even if as such we
aren't serving any "static files" (like discovery.xml) to a WOPI
server in the mobile app case.
diff --git a/Mobile/Mobile.xcodeproj/project.pbxproj b/Mobile/Mobile.xcodeproj/project.pbxproj
index 368083543..ba0ef1ad2 100644
--- a/Mobile/Mobile.xcodeproj/project.pbxproj
+++ b/Mobile/Mobile.xcodeproj/project.pbxproj
@@ -53,6 +53,7 @@
BE8D85D4214055F3009F1860 /* fundamentalrc in Resources */ = {isa = PBXBuildFile; fileRef = BE8D85C6214055F3009F1860 /* fundamentalrc */; };
BE8D85D5214055F3009F1860 /* unorc in Resources */ = {isa = PBXBuildFile; fileRef = BE8D85C7214055F3009F1860 /* unorc */; };
BE8D85D6214055F3009F1860 /* rc in Resources */ = {isa = PBXBuildFile; fileRef = BE8D85C8214055F3009F1860 /* rc */; };
+ BE93D41F216B93D8007A39F4 /* discovery.xml in Resources */ = {isa = PBXBuildFile; fileRef = BE93D41E216B93D8007A39F4 /* discovery.xml */; };
BEA2835621467FDD00848631 /* Kit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEA2835521467FDD00848631 /* Kit.cpp */; };
BEA283582146945500848631 /* ChildSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEA283572146945500848631 /* ChildSession.cpp */; };
BEA2835A21470A1C00848631 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA2835921470A1C00848631 /* WebKit.framework */; };
@@ -116,6 +117,7 @@
BE8D85C6214055F3009F1860 /* fundamentalrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fundamentalrc; path = "$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/fundamentalrc"; sourceTree = "<group>"; };
BE8D85C7214055F3009F1860 /* unorc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = unorc; path = "$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/unorc"; sourceTree = "<group>"; };
BE8D85C8214055F3009F1860 /* rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rc; path = "$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/rc"; sourceTree = "<group>"; };
+ BE93D41E216B93D8007A39F4 /* discovery.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = discovery.xml; path = ../../../discovery.xml; sourceTree = "<group>"; };
BEA20D5721663BB60032F67B /* salgdiutils.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salgdiutils.cxx; path = "$(LOSRCDIR)/vcl/quartz/salgdiutils.cxx"; sourceTree = "<group>"; };
BEA20D5821663BB70032F67B /* ctfonts.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctfonts.cxx; path = "$(LOSRCDIR)/vcl/quartz/ctfonts.cxx"; sourceTree = "<group>"; };
BEA20D5921663BB70032F67B /* utils.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cxx; path = "$(LOSRCDIR)/vcl/quartz/utils.cxx"; sourceTree = "<group>"; };
@@ -251,6 +253,7 @@
BE00F89C21396585001CE2D4 /* loading.html */,
BE00F89D21396585001CE2D4 /* loleaflet-help.html */,
BE00F89621396585001CE2D4 /* loleaflet.html */,
+ BE93D41E216B93D8007A39F4 /* discovery.xml */,
);
path = Resources;
sourceTree = "<group>";
@@ -584,6 +587,7 @@
BE8D85CF214055F3009F1860 /* udkapi.rdb in Resources */,
BE8D85D5214055F3009F1860 /* unorc in Resources */,
BE8D85D1214055F3009F1860 /* services.rdb in Resources */,
+ BE93D41F216B93D8007A39F4 /* discovery.xml in Resources */,
BE00F8A021396585001CE2D4 /* loleaflet.html in Resources */,
BE8D85CA214055F3009F1860 /* offapi.rdb in Resources */,
BE8D773A2136762600AC58EA /* Assets.xcassets in Resources */,
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 49cb8c9f2..223edec5a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2554,10 +2554,15 @@ private:
const std::string urlsrc = "urlsrc";
const auto& config = Application::instance().config();
const std::string loleafletHtml = config.getString("loleaflet_html", "loleaflet.html");
- const std::string uriValue = ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()) ? "https://" : "http://")
- + std::string("%SERVER_HOST%")
- + LOOLWSD::ServiceRoot
- + "/loleaflet/" LOOLWSD_VERSION_HASH "/" + loleafletHtml + '?';
+ const std::string uriValue =
+#if ENABLE_SSL
+ ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()) ? "https://" : "http://")
+#else
+ "http://"
+#endif
+ + std::string("%SERVER_HOST%")
+ + LOOLWSD::ServiceRoot
+ + "/loleaflet/" LOOLWSD_VERSION_HASH "/" + loleafletHtml + '?';
InputSource inputSrc(discoveryPath);
DOMParser parser;
@@ -2926,9 +2931,9 @@ int LOOLWSD::innerMain()
if (ClientPortNumber == MasterPortNumber)
throw IncompatibleOptionsException("port");
+#endif
ClientRequestDispatcher::InitStaticFileContentCache();
-#endif
// Start the internal prisoner server and spawn forkit,
// which in turn forks first child.
commit de0d57faac3ec675a62ee8f864b2a23bc1810380
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Oct 8 16:25:02 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Oct 8 16:25:02 2018 +0300
Pass also permission=edit in the query URL
diff --git a/Mobile/Mobile/Document.mm b/Mobile/Mobile/Document.mm
index d6f0500b5..eadf653ec 100644
--- a/Mobile/Mobile/Document.mm
+++ b/Mobile/Mobile/Document.mm
@@ -38,6 +38,7 @@
NSURL *url = [[NSBundle mainBundle] URLForResource:@"loleaflet" withExtension:@"html"];
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
components.queryItems = @[ [NSURLQueryItem queryItemWithName:@"file_path" value:[NSString stringWithUTF8String:uri.c_str()]],
+ [NSURLQueryItem queryItemWithName:@"permission" value:@"edit"],
[NSURLQueryItem queryItemWithName:@"debug" value:@"true"]];
NSURLRequest *request = [[NSURLRequest alloc]initWithURL:components.URL];
[self.viewController.webView loadRequest:request];
commit f2644681d6a40a044e0e0411b12ad3f292d87e98
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Oct 8 16:09:04 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Oct 8 16:09:04 2018 +0300
Remove accidental whitespace
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index d3fcf7986..504912678 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -475,7 +475,7 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
std::string watermarkText;
std::chrono::duration<double> getInfoCallDuration(0);
- #ifndef MOBILEAPP
+#ifndef MOBILEAPP
WopiStorage* wopiStorage = dynamic_cast<WopiStorage*>(_storage.get());
if (wopiStorage != nullptr)
{
More information about the Libreoffice-commits
mailing list