[Libreoffice-commits] online.git: 3 commits - android/app common/Log.hpp configure.ac wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 13 16:39:15 UTC 2019
android/app/src/main/cpp/CMakeLists.txt.in | 14 +++++-----
android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java | 2 -
common/Log.hpp | 2 -
configure.ac | 6 ++++
wsd/LOOLWSD.cpp | 8 ++---
wsd/LOOLWSD.hpp | 5 +++
6 files changed, 24 insertions(+), 13 deletions(-)
New commits:
commit e3b17cdc3c1a282473c0b34282e4b8fc99286e31
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Feb 13 17:34:59 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Feb 13 17:36:19 2019 +0100
android: Don't try to read discovery.xml, it's not needed on mobile.
With this, the actual loolwsd startup does not crash any more, so let's
enable it :-) Of course it still does not work yet.
Change-Id: I5a1ee7adac64c57f1aa5b597c3dbdc0089a1ac11
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java
index 5a692cb62..504b7592a 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java
@@ -25,7 +25,7 @@ public class MainActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- //createLOOLWSD();
+ createLOOLWSD();
final WebView browser = findViewById(R.id.browser);
browser.setWebViewClient(new WebViewClient());
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 1f7ab0556..ba1d3f134 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2713,12 +2713,11 @@ private:
/// Process the discovery.xml file and return as string.
static std::string getDiscoveryXML()
{
-#if defined __linux && MOBILEAPP
- // discovery.xml is in the top directory
- std::string discoveryPath = Path(Application::instance().commandPath()).parent().parent().toString() + "discovery.xml";
+#if MOBILEAPP
+ // not needed for mobile
+ return std::string();
#else
std::string discoveryPath = Path(Application::instance().commandPath()).parent().toString() + "discovery.xml";
-#endif
if (!File(discoveryPath).exists())
{
// http://server/hosting/discovery.xml
@@ -2767,6 +2766,7 @@ private:
DOMWriter writer;
writer.writeNode(ostrXML, docXML);
return ostrXML.str();
+#endif
}
/// Create the /hosting/capabilities JSON and return as string.
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 9fc6577c7..a0a43910e 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -95,9 +95,14 @@ public:
/// Return true iff extension is marked as view action in discovery.xml.
static bool IsViewFileExtension(const std::string& extension)
{
+#if MOBILEAPP
+ (void) extension;
+ return false; // mark everything editable on mobile
+#else
std::string lowerCaseExtension = extension;
std::transform(lowerCaseExtension.begin(), lowerCaseExtension.end(), lowerCaseExtension.begin(), ::tolower);
return EditFileExtensions.find(lowerCaseExtension) == EditFileExtensions.end();
+#endif
}
/// Returns the value of the specified application configuration,
commit 7b48434d0d68b833c10b4d9614c75830630af986
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Feb 13 17:33:53 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Feb 13 17:33:53 2019 +0100
android: Better logname for the native part.
Change-Id: I25d091075def09b605d8fcd8cf4f956b6569f90d
diff --git a/common/Log.hpp b/common/Log.hpp
index f89300110..bdc654b39 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -251,7 +251,7 @@ namespace Log
std::ostringstream oss_(Log::prefix(b_, sizeof(b_) - 1, LVL), std::ostringstream::ate); \
oss_ << std::boolalpha << X; \
LOG_END(oss_, FILEP); \
- ((void)__android_log_print(ANDROID_LOG_DEBUG, "libreoffice", "%s %s", LVL, oss_.str().c_str()))
+ ((void)__android_log_print(ANDROID_LOG_DEBUG, "loolwsd", "%s %s", LVL, oss_.str().c_str()))
#else
commit 7a0209c7aa6e927894459e3fd6f992c11eb32125
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Feb 13 17:28:01 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Feb 13 17:28:01 2019 +0100
android: Link against the debug POCO libraries if --enable-debug.
Change-Id: Ic7dc3076a12fe9a0faf4dec5c0f5b0b3a5a171c3
diff --git a/android/app/src/main/cpp/CMakeLists.txt.in b/android/app/src/main/cpp/CMakeLists.txt.in
index 8a1c4a925..66d61d0ab 100644
--- a/android/app/src/main/cpp/CMakeLists.txt.in
+++ b/android/app/src/main/cpp/CMakeLists.txt.in
@@ -39,11 +39,11 @@ target_link_libraries(androidapp
android
log
@LIBPNG_LIBS@/liblibpng.a
- @POCOLIB@/libPocoEncodings.a
- @POCOLIB@/libPocoNet.a
- @POCOLIB@/libPocoRedis.a
- @POCOLIB@/libPocoUtil.a
- @POCOLIB@/libPocoXML.a
- @POCOLIB@/libPocoJSON.a
- @POCOLIB@/libPocoFoundation.a
+ @POCOLIB@/libPocoEncodings at POCODEBUG@.a
+ @POCOLIB@/libPocoNet at POCODEBUG@.a
+ @POCOLIB@/libPocoRedis at POCODEBUG@.a
+ @POCOLIB@/libPocoUtil at POCODEBUG@.a
+ @POCOLIB@/libPocoXML at POCODEBUG@.a
+ @POCOLIB@/libPocoJSON at POCODEBUG@.a
+ @POCOLIB@/libPocoFoundation at POCODEBUG@.a
)
diff --git a/configure.ac b/configure.ac
index 32cf66d8f..34db534e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,6 +237,7 @@ fi
LOBUILDDIR=
POCOINCLUDE=
POCOLIB=
+POCODEBUG=
if test \( "$enable_iosapp" = "yes" -a `uname -s` = "Darwin" \) -o \( "$enable_androidapp" = "yes" \); then
AC_MSG_CHECKING([for LibreOffice build tree to build against])
if test -z "$with_lo_builddir"; then
@@ -276,10 +277,15 @@ if test \( "$enable_iosapp" = "yes" -a `uname -s` = "Darwin" \) -o \( "$enable_a
else
AC_MSG_ERROR([This is not a Poco lib directory: $POCOLIB])
fi
+
+ if test "$ENABLE_DEBUG" = "true" ; then
+ POCODEBUG=d
+ fi
fi
AC_SUBST(LOBUILDDIR)
AC_SUBST(POCOINCLUDE)
AC_SUBST(POCOLIB)
+AC_SUBST(POCODEBUG)
LIBPNG_INCLUDES="$with_libpng_includes"
LIBPNG_LIBS="$with_libpng_libs"
More information about the Libreoffice-commits
mailing list