[Libreoffice-commits] online.git: 2 commits - loolwsd/bundled loolwsd/LOOLKit.cpp
Tor Lillqvist
tml at collabora.com
Wed Feb 17 13:28:56 UTC 2016
loolwsd/LOOLKit.cpp | 21 +++++++++++
loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 13 ++++++
2 files changed, 34 insertions(+)
New commits:
commit 46e2446db19f252c43f72bf2132d5152e77a6440
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Feb 17 15:28:00 2016 +0200
Update from LO master
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 5ce8610..e855b6a 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -197,6 +197,7 @@ typedef enum
*
* {
* "searchString": "...",
+ * "highlightAll": true|false, // this is a result of 'search all'
* "searchResultSelection": [
* {
* "part": "...",
@@ -279,6 +280,18 @@ typedef enum
* }
*/
LOK_CALLBACK_ERROR,
+
+ /**
+ * A part has been added to or removed from the document.
+ *
+ * {
+ * "action" : "PartInserted" | "PartDeleted"
+ * "part" : "Part Index"
+ * }
+ *
+ * Note: this is currently emitted by Impress.
+ */
+ LOK_CALLBACK_PARTS_COUNT_CHANGED
}
LibreOfficeKitCallbackType;
commit 446035ca69914a38df8b7cb06ce07ced0c2c54f8
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Feb 17 15:20:56 2016 +0200
Make the loTemplate path work inside the chroot, in the preinit case
Create a corresponding symlink inside the chroot.
Now a LOK_PREINIT=1 loolwsd starts up for me successfully. (Note: I
did not say whether it actually works. I don't know yet.)
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 8089bd2..0fe0608 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -661,6 +661,27 @@ void lokit_main(const std::string& childRoot,
File(jailPath).createDirectories();
+#ifdef LOOLKIT_NO_MAIN
+ // Create a symlink inside the jailPath so that the absolute pathname loTemplate, when
+ // interpreted inside a chroot at jailPath, points to loSubPath (relative to the chroot).
+ Path symlinkSource(jailPath, Path(loTemplate.substr(1)));
+
+ File(symlinkSource.parent()).createDirectories();
+
+ std::string symlinkTarget;
+ for (auto i = 0; i < Path(loTemplate).depth(); i++)
+ symlinkTarget += "../";
+ symlinkTarget += loSubPath;
+
+ Log::info("symlink(\"" + symlinkTarget + "\",\"" + symlinkSource.toString() + "\")");
+
+ if (symlink(symlinkTarget.c_str(), symlinkSource.toString().c_str()) == -1)
+ {
+ Log::error("Error: symlink(\"" + symlinkTarget + "\",\"" + symlinkSource.toString() + "\") failed");
+ throw Exception("symlink() failed");
+ }
+#endif
+
Path jailLOInstallation(jailPath, loSubPath);
jailLOInstallation.makeDirectory();
File(jailLOInstallation).createDirectory();
More information about the Libreoffice-commits
mailing list