[Libreoffice-commits] core.git: configure.ac

2017-08-01 Thread brainbreaker
 configure.ac |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 7f369c730a7e6ab834f67c294e4091378f3b99ce
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jul 27 18:21:55 2017 +0530

android: remove unused GCC related code from configure.ac

Change-Id: Ib54e31a4d01721fbb47e3c9f63d3a7c6a6b53a8f
Reviewed-on: https://gerrit.libreoffice.org/40488
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 51f336a9b83f..962cc2591733 100644
--- a/configure.ac
+++ b/configure.ac
@@ -351,7 +351,7 @@ AC_ARG_WITH(android-ndk,
 AC_ARG_WITH(android-ndk-toolchain-version,
 AS_HELP_STRING([--with-android-ndk-toolchain-version],
 [Specify which toolchain version to use, of those present in the
-Android NDK you are using. The default is 4.9 currently.]), ,)
+Android NDK you are using. The default is clang 5.0 currently.]), ,)
 
 AC_ARG_WITH(android-sdk,
 AS_HELP_STRING([--with-android-sdk],
@@ -530,9 +530,9 @@ if test -n "$with_android_ndk"; then
 test -z "$RANLIB" && 
RANLIB=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-ranlib
 test -z "$STRIP" && STRIP=$ANDROID_BINUTILS_BIN/$android_gnu_prefix-strip
 
-# When using the 4.6 or newer toolchain, use the gold linker
+# When using the clang toolchain, use the gold linker
 case "$with_android_ndk_toolchain_version" in
-4.[[6789]]*|[[56789]].*|clang*)
+clang*)
 if test "$host_cpu" = arm -a "$ENABLE_LTO" != TRUE; then
 ANDROIDCFLAGS="$ANDROIDCFLAGS -fuse-ld=gold"
 fi
@@ -566,18 +566,12 @@ if test -n "$with_android_ndk"; then
 
 if test -z "$CC"; then
 case "$with_android_ndk_toolchain_version" in
-4.*)
-CC="$ANDROID_COMPILER_BIN/$android_gnu_prefix-gcc $ANDROIDCFLAGS"
-;;
 clang*)
 CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS"
 esac
 fi
 if test -z "$CXX"; then
 case "$with_android_ndk_toolchain_version" in
-4.*)
-CXX="$ANDROID_COMPILER_BIN/$android_gnu_prefix-g++ 
$ANDROIDCXXFLAGS"
-;;
 clang*)
 CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-07-19 Thread brainbreaker
 configure.ac |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c57631351c2acf9fd47050ec6e73a09dcc7d95bd
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Mon Jul 10 23:41:21 2017 +0530

android:Update configure.ac to support NDK 15.1.x

Change-Id: I07ec4df7cb5aaf4b491fac1202d2607af9f56968
Reviewed-on: https://gerrit.libreoffice.org/39780
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 6344d6ebf56d..119cdea487ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,16 +381,16 @@ if test -n "$with_android_ndk"; then
 fi
 case $ANDROID_NDK_VERSION in
 r9*|r10*)
-AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.0.*])
+AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.x*])
 ;;
 11.1.*|12.1.*|13.1.*|14.1.*)
-AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.0.*])
+AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.x.*])
 ;;
-15.0.*)
+15.0.*|15.1.*)
 ;;
 *)
-AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* have been used successfully. Proceed at your own risk.])
-add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* have been used successfully. Proceed at your own risk."
+AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* and 15.1.* have been used successfully. Proceed at your own 
risk.])
+add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* and 15.1.* have been used successfully. Proceed at your own 
risk."
 ;;
 esac
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source drawinglayer/source include/android oox/source sc/source vcl/source vcl/unx writerfilter/source

2017-07-18 Thread brainbreaker
 desktop/source/lib/init.cxx   |   20 
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx |   11 --
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx   |   12 --
 include/android/compatibility.hxx |   68 ++
 oox/source/export/drawingml.cxx   |   11 --
 sc/source/core/data/attrib.cxx|   14 --
 sc/source/filter/excel/xetable.cxx|   12 --
 vcl/source/filter/sgvspln.cxx |   11 --
 vcl/source/gdi/CommonSalLayout.cxx|   12 --
 vcl/unx/generic/gdi/cairotextrender.cxx   |   11 --
 writerfilter/source/rtftok/rtfsdrimport.cxx   |   11 --
 11 files changed, 79 insertions(+), 114 deletions(-)

New commits:
commit e530689ef6ba79a26162670580ba28f9b09eb689
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jul 13 09:43:23 2017 +0530

Clean up android specific template functions defined in std namespace

Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b
Reviewed-on: https://gerrit.libreoffice.org/39890
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c57c4e4d6760..fd62da29d704 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -85,6 +85,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -102,25 +103,6 @@ using namespace vcl;
 using namespace desktop;
 using namespace utl;
 
-#if defined(ANDROID)
-namespace std
-{
-template
-std::string to_string(T x)
-{
-std::ostringstream stream;
-stream << x;
-return stream.str();
-}
-
-long stol( const std::string& str, std::size_t* /*pos*/ = 0, int base = 10 )
-{
-char* end;
-return strtol(str.c_str(), , base);
-}
-}
-#endif
-
 static LibLibreOffice_Impl *gImpl = nullptr;
 static std::weak_ptr< LibreOfficeKitClass > gOfficeClass;
 static std::weak_ptr< LibreOfficeKitDocumentClass > gDocumentClass;
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx 
b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index ce0ed78e3fbc..84ea9fff10ca 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -26,21 +26,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 
-#if defined(ANDROID)
-namespace std
-{
-template
-T round(T x)
-{
-return ::round(x);
-}
-}
-#endif
 
 namespace drawinglayer
 {
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 2ac5bbc0c8d6..4f9d16f76629 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -54,20 +54,10 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
-#if defined(ANDROID)
-namespace std
-{
-template
-T round(T x)
-{
-return ::round(x);
-}
-}
-#endif
-
 using namespace com::sun::star;
 
 namespace drawinglayer
diff --git a/include/android/compatibility.hxx 
b/include/android/compatibility.hxx
new file mode 100644
index ..d52d1bdb2455
--- /dev/null
+++ b/include/android/compatibility.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#if defined(ANDROID)
+namespace std
+{
+
+inline double fmax(double x, double y)
+{
+return ::fmax(x, y);
+}
+
+inline long stol( const std::string& str, std::size_t* /*pos*/ = 0, int base = 
10 )
+{
+char* end;
+return strtol(str.c_str(), , base);
+}
+
+template
+T round(T x)
+{
+return ::round(x);
+}
+
+template
+T trunc(T x)
+{
+return ::trunc(x);
+}
+
+template
+T lround(T x)
+{
+return ::lround(x);
+}
+
+template
+T copysign(T x, T y)
+{
+return ::copysign(x, y);
+}
+
+template  std::string to_string(const T& rNumber)
+{
+std::ostringstream aStream;
+aStream <<

[Libreoffice-commits] core.git: configure.ac

2017-07-13 Thread brainbreaker
 configure.ac |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit a4667cbbb9b490323ddf58a24e6223ffefb5611b
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jun 22 23:06:58 2017 +0530

android: Remove GCC support for building

Change-Id: Ia1b267ca3777a2a42c66d808322e03d631fac968
Reviewed-on: https://gerrit.libreoffice.org/39125
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index eca31bf115ea..6344d6ebf56d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,17 +416,13 @@ if test -n "$with_android_ndk"; then
 fi
 
 case "$with_android_ndk_toolchain_version" in
-4.6|4.7|4.8|4.9)
-
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$with_android_ndk_toolchain_version
-ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
-;;
-clang3.3|clang3.4|clang5.0)
+clang5.0)
 
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.9
 ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm
 ANDROID_USING_CLANG=true
 ;;
 *)
-AC_MSG_ERROR([Unrecognized value for the 
--with-android-ndk-toolchain-version option])
+AC_MSG_ERROR([Unrecognized value for the 
--with-android-ndk-toolchain-version option. Building for Android is only 
supported with Clang 5.*])
 esac
 
 if test ! -d $ANDROID_BINUTILS_DIR; then
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-07-12 Thread brainbreaker
 configure.ac |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 20dcd4730deeb60cb39ed28e8d0f690fdba0d482
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jun 22 22:54:32 2017 +0530

android: Set clang as default compiler for building

This commit is to follow the one which adds support
for clang 5.0 for building.

Change-Id: I8461e08372322dc24d4786a2f6b96e647b3a4d6b
Reviewed-on: https://gerrit.libreoffice.org/39123
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 5fa82f7cbb8f..eca31bf115ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,8 +411,8 @@ if test -n "$with_android_ndk"; then
 fi
 
 if test -z "$with_android_ndk_toolchain_version"; then
-# Default to gcc 4.9
-with_android_ndk_toolchain_version=4.9
+# Default to Clang 5.0
+with_android_ndk_toolchain_version=clang5.0
 fi
 
 case "$with_android_ndk_toolchain_version" in
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2017-07-12 Thread brainbreaker
 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a1aa4f84cff24e7d92ae3e03058bd3ccb6fec60c
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Jul 11 20:55:59 2017 +0530

Supress unused variable warning in gcc arm bridge

Change-Id: I78c9d6b5e6af73965cb422dfdbaec5a7f9b57fac
Reviewed-on: https://gerrit.libreoffice.org/39829
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index 44da1cd15089..a025c82f3e59 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -157,6 +157,7 @@ namespace CPPU_CURRENT_NAMESPACE
 {
 pair< t_rtti_map::iterator, bool > insertion(
 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) 
);
+(void) insertion;
 assert(insertion.second && "### inserting new rtti failed?!");
 }
 else
@@ -199,6 +200,7 @@ namespace CPPU_CURRENT_NAMESPACE
 
 pair< t_rtti_map::iterator, bool > insertion(
 m_generatedRttis.insert( t_rtti_map::value_type( 
unoName, rtti ) ) );
+(void) insertion;
 assert(insertion.second && "### inserting new generated 
rtti failed?!");
 }
 else // taking already generated rtti
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-07-11 Thread brainbreaker
 configure.ac |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d81cf50a6fe2d4d03b9056679758a14404a03f12
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jun 22 22:49:38 2017 +0530

android: update configure.ac for supporting Clang5.0

Change-Id: Ia99f3b4a8c9aba506938b8c3669c74b5dc1b4c16
Reviewed-on: https://gerrit.libreoffice.org/39122
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 5d34221b7232..5fa82f7cbb8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,9 +420,9 @@ if test -n "$with_android_ndk"; then
 
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$with_android_ndk_toolchain_version
 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
 ;;
-clang3.3|clang3.4)
-
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.8
-
ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
+clang3.3|clang3.4|clang5.0)
+
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.9
+ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm
 ANDROID_USING_CLANG=true
 ;;
 *)
@@ -474,7 +474,7 @@ if test -n "$with_android_ndk"; then
 # as is the case when using the ndk-bundle as installed with android 
studio
 
ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR="${with_android_ndk_toolchain_version}/"
 if test -n "$ANDROID_USING_CLANG"; then
-ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.8/
+ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=4.9/
 fi
 fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-07-10 Thread brainbreaker
 configure.ac |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 271882910107e177bc98af877f9c8b9f89c09795
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jun 22 23:42:48 2017 +0530

android: update configure.ac to support building only with NDK>=15

Change-Id: I638019895921082b9da36315c2f6d3ed98e5249a
Reviewed-on: https://gerrit.libreoffice.org/39127
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 0eb7ed7150a1..5d34221b7232 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,12 +381,16 @@ if test -n "$with_android_ndk"; then
 fi
 case $ANDROID_NDK_VERSION in
 r9*|r10*)
+AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.0.*])
 ;;
-11.1.*|12.1.*|13.1.*|14.1.*|15.0*)
+11.1.*|12.1.*|13.1.*|14.1.*)
+AC_MSG_ERROR([Bulding for Android is only supported with NDK versions 
above 15.0.*])
+;;
+15.0.*)
 ;;
 *)
-AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 15.0.* have been used successfully. Proceed at your own risk.])
-add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 15.0.* have been used successfully. Proceed at your own risk."
+AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* have been used successfully. Proceed at your own risk.])
+add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
version 15.0.* have been used successfully. Proceed at your own risk."
 ;;
 esac
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source configure.ac

2017-06-23 Thread brainbreaker
 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_arm/share.hxx   |2 +-
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx |3 ++-
 configure.ac  |3 +--
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3bb8ec7cc5c1dba74216ea42b94bf2284bf286d0
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Wed Jun 21 17:30:40 2017 +0530

android: Fix bridges/ module for building with Clang

Change-Id: If8bcda3aa8c3a3e46cd98e5ae797486f32db9822
Reviewed-on: https://gerrit.libreoffice.org/39050
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 61a24879da09..b695cabcf4df 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -402,7 +402,7 @@ namespace
 }
 TYPELIB_DANGER_RELEASE( pTD );
 }
-} // else perform queryInterface()
+} SAL_FALLTHROUGH; // else perform queryInterface()
 default:
 eRet = cpp2uno_call(
 pCppI, aMemberDescr.get(),
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index 459db19ef4b3..492f1b699b9f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index ee8c17fc62a5..c8e079efbc12 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -168,6 +168,7 @@ void MapReturn(sal_uInt32 r0, sal_uInt32 r1, 
typelib_TypeDescriptionReference *
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
 pRegisterReturn[1] = r1;
+SAL_FALLTHROUGH;
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
 case typelib_TypeClass_ENUM:
@@ -702,7 +703,7 @@ void unoInterfaceProxyDispatch(
 }
 TYPELIB_DANGER_RELEASE( pTD );
 }
-} // else perform queryInterface()
+} SAL_FALLTHROUGH; // else perform queryInterface()
 default:
 // dependent dispatch
 cpp_call(
diff --git a/configure.ac b/configure.ac
index 60c4a91bb8b2..36f6ccebf452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,7 +417,6 @@ if test -n "$with_android_ndk"; then
 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
 ;;
 clang3.3|clang3.4)
-AC_MSG_WARN([Building with the Clang tool-chain is known to break in 
the bridges module, fix that please])
 
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.8
 
ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
 ANDROID_USING_CLANG=true
@@ -559,7 +558,7 @@ if test -n "$with_android_ndk"; then
 fi
 
 if test $host_cpu = arm; then
-ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I 
$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include
 
-I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/armeabi-v7a/include"
+ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I 
$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include
 -I 
$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/armeabi-v7a/include
 -I $ANDROID_NDK_HOME/sources/cxx-stl/gabi++/include"
 elif test $host_cpu = mips; then
 ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I 
$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}include
 
-I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/${ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR}libs/mips/include"
 else # x86
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/bin

2017-06-22 Thread brainbreaker
 solenv/bin/native-code.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 05447e09f511a6a754a3671451b29a3b6b3f458f
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Wed Jun 21 17:00:33 2017 +0530

add factory function mapping for libspelllo archive

Change-Id: I7cbea9381bc993e7894603c731ab0ac54e80d4b4
Reviewed-on: https://gerrit.libreoffice.org/39049
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 0d13b67fd6ac..f29be571e22f 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -60,7 +60,8 @@ core_factory_list = [
 ("libodfflatxmllo.a", "odfflatxml_component_getFactory"),
 ("libxmlscriptlo.a", "xmlscript_component_getFactory"),
 ("libmcnttype.a", "mcnttype_component_getFactory"),
-("libvcllo.a", "vcl_component_getFactory")
+("libvcllo.a", "vcl_component_getFactory"),
+("libspelllo.a", "spell_component_getFactory")
 ]
 
 core_constructor_list = [
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/source

2017-06-21 Thread brainbreaker
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |   11 
+-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit eeb65fabd4c94e1ce69996890a4fb9badc11e778
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Apr 27 19:06:43 2017 +0530

Listen for changes in editing preference settings

This commit gives the ability to listen for changes in
editing preference settings to LibreOfficeMainActivity.
This makes sure that value of mIsExperimentalMode
boolean is correct in any condition.

Change-Id: Ie2a931e63fad30262ad2f870b6c06f707db96618
Reviewed-on: https://gerrit.libreoffice.org/37033
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index b653c437c644..b4f8dc77f60b 100755
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -52,7 +52,7 @@ import java.util.List;
 /**
  * Main activity of the LibreOffice App. It is started in the UI thread.
  */
-public class LibreOfficeMainActivity extends AppCompatActivity {
+public class LibreOfficeMainActivity extends AppCompatActivity implements 
SettingsListenerModel.OnSettingsPreferenceChangedListener {
 
 private static final String LOGTAG = "LibreOfficeMainActivity";
 private static final String DEFAULT_DOC_PATH = "/assets/example.odt";
@@ -109,6 +109,7 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity {
 Log.w(LOGTAG, "onCreate..");
 super.onCreate(savedInstanceState);
 
+SettingsListenerModel.getInstance().setListener(this);
 SharedPreferences sPrefs = 
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
 mIsExperimentalMode = sPrefs.getBoolean(ENABLE_EXPERIMENTAL_PREFS_KEY, 
false);
 
@@ -667,6 +668,14 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity {
 return !isDrawerOpen && !isDrawerLocked;
 }
 
+@Override
+public void settingsPreferenceChanged(SharedPreferences sharedPreferences, 
String key) {
+if (key.matches(ENABLE_EXPERIMENTAL_PREFS_KEY)) {
+Log.d(LOGTAG, "Editing Preference Changed");
+mIsExperimentalMode = 
sharedPreferences.getBoolean(ENABLE_EXPERIMENTAL_PREFS_KEY, false);
+}
+}
+
 private class DocumentPartClickListener implements 
android.widget.AdapterView.OnItemClickListener {
 @Override
 public void onItemClick(AdapterView parent, View view, int 
position, long id) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/o3tl

2017-06-21 Thread brainbreaker
 include/o3tl/safeint.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2149d4a88e9dc88c30e7475f8ea317e5c7b78529
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Jun 20 15:14:32 2017 +0530

android:update safeint header to use the else implementation with clang

Clang toolchain does not defines the __builtin_mul_overflow for 32-bit
ARM. So, fallback to else implementation of checked_multiply when
building Android with Clang

Change-Id: I6120606f521ce121541a5b7f1150229258012d55
Reviewed-on: https://gerrit.libreoffice.org/39005
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx
index ce144d22d9ea..80a152b83290 100644
--- a/include/o3tl/safeint.hxx
+++ b/include/o3tl/safeint.hxx
@@ -29,7 +29,7 @@ template inline bool checked_multiply(T a, T b, 
T& result)
 return !msl::utilities::SafeMultiply(a, b, result);
 }
 
-#elif (defined __GNUC__ && __GNUC__ >= 5) || 
(__has_builtin(__builtin_mul_overflow))
+#elif (defined __GNUC__ && __GNUC__ >= 5) || 
(__has_builtin(__builtin_mul_overflow) && !(defined ANDROID && defined 
__clang__))
 
 template inline bool checked_multiply(T a, T b, T& result)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cppuhelper/source

2017-06-20 Thread brainbreaker
 cppuhelper/source/paths.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a6a447b08dd3959747181fe5350db68acc8c7481
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Jun 20 15:50:21 2017 +0530

android:Supress the Clang's unneeded-internal-declaration warning

Change-Id: I76359e98a41206f914c3c05149f0a7eeeff1acc8
Reviewed-on: https://gerrit.libreoffice.org/39007
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index f96044bd3c24..7add3ac72de7 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -36,6 +36,7 @@
 
 namespace {
 
+#ifndef ANDROID
 rtl::OUString get_this_libpath() {
 static rtl::OUString s_uri;
 if (s_uri.isEmpty()) {
@@ -55,7 +56,7 @@ rtl::OUString get_this_libpath() {
 }
 return s_uri;
 }
-
+#endif
 }
 
 rtl::OUString cppu::getUnoIniUri() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-06-15 Thread brainbreaker
 configure.ac |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d628e193a93dfcd429e30a05baf9e730c44f768e
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Jun 15 09:08:15 2017 +0530

android: Bump NDK version to 15 in configure.ac

This commits updates the NDK version warning
in confiure.ac for NDK r15 as it is now tested
for building Android.

Change-Id: I6b138ce36e246ae035cf994808d17be3b4d47112
Reviewed-on: https://gerrit.libreoffice.org/38811
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index d3d1542ba99e..e82c61d86424 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,11 +382,11 @@ if test -n "$with_android_ndk"; then
 case $ANDROID_NDK_VERSION in
 r9*|r10*)
 ;;
-11.1.*|12.1.*|13.1.*|14.1.*)
+11.1.*|12.1.*|13.1.*|14.1.*|15.0*)
 ;;
 *)
-AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 14.1.* have been used successfully. Proceed at your own risk.])
-add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 14.1.* have been used successfully. Proceed at your own risk."
+AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 15.0.* have been used successfully. Proceed at your own risk.])
+add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 15.0.* have been used successfully. Proceed at your own risk."
 ;;
 esac
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2017-06-14 Thread brainbreaker
 bridges/source/cpp_uno/gcc3_linux_arm/share.hxx   |   19 +--
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx |7 ---
 2 files changed, 21 insertions(+), 5 deletions(-)

New commits:
commit e88584fed0d4f063ec80b9013f8a6e0cb97aa462
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Jun 13 17:56:37 2017 +0530

Clean up declaration of __cxa_get_globals in linux_arm bridge

This is the Linux/arm version of commit
5ba3d1740b03efa394b2d2bf34fb8a8d3db2331d, which did the same for the
Linux/x86_64 bridge.
Clang rejects the incompatible declarations of the
same extern "C" function in different namespaces.
This commit redeclares __cxa_get_globals so as to support
clang for building Android in future.

Change-Id: I4d733d3835d0dea5784701143f4ea1bc5d5ff363
Reviewed-on: https://gerrit.libreoffice.org/38735
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index 99cf7766a0c4..459db19ef4b3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -18,13 +18,21 @@
  */
 #ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ARM_SHARE_HXX
 #define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ARM_SHARE_HXX
-#include "uno/mapping.h"
+#include "sal/config.h"
 
 #include 
 #include 
 #include 
 #include 
 
+#include 
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+
+#include "config_cxxabi.h"
+#include "uno/mapping.h"
+
 namespace CPPU_CURRENT_NAMESPACE
 {
 
@@ -70,9 +78,16 @@ namespace CPPU_CURRENT_NAMESPACE
 __cxa_exception *propagatingExceptions;
 #endif
 };
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+}
 
+#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
+namespace __cxxabiv1 {
+extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
+}
+#endif
 
+namespace CPPU_CURRENT_NAMESPACE
+{
 void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 void fillUnoException(
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 8942d1f948bd..ee8c17fc62a5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -569,10 +569,11 @@ static void cpp_call(
 }
 catch (...)
 {
-//__asm__ __volatile__ ("sub sp, sp, #2048\n");
-
 // fill uno exception
-fillUnoException( 
CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, 
pThis->getBridge()->getCpp2Uno() );
+fillUnoException(
+  reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >(
+__cxxabiv1::__cxa_get_globals())->caughtExceptions,
+*ppUnoExc, pThis->getBridge()->getCpp2Uno());
 
 // temporary params
 for ( ; nTempIndices--; )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac connectivity/source

2017-06-03 Thread brainbreaker
 configure.ac|6 +++---
 connectivity/source/drivers/jdbc/JStatement.cxx |5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit a21ec27fe5d8de3455522deeedc2dc43cb41c073
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Fri Jun 2 22:01:25 2017 +0530

android: Update configure.ac for NDK r14b version

This commits updates the NDK version warning
in confiure.ac for NDK r14b as it is now tested
for building Android.
Also, Modify code in JStatement.cxx to suppress the warning
of ignoring return value which turns into error with
--enable-werror argument.

Change-Id: I40b264c2f39788948dbf947073de63c3347184f9
Reviewed-on: https://gerrit.libreoffice.org/38359
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index d920cfaef5e3..24df1493171d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,11 +382,11 @@ if test -n "$with_android_ndk"; then
 case $ANDROID_NDK_VERSION in
 r9*|r10*)
 ;;
-11.1.*|12.1.*|13.1.*)
+11.1.*|12.1.*|13.1.*|14.1.*)
 ;;
 *)
-AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 13.1.* have been used successfully. Proceed at your own risk.])
-add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 13.1.* have been used successfully. Proceed at your own risk."
+AC_MSG_WARN([Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 14.1.* have been used successfully. Proceed at your own risk.])
+add_warning "Untested android NDK version $ANDROID_NDK_VERSION, only 
versions r9* til 14.1.* have been used successfully. Proceed at your own risk."
 ;;
 esac
 
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx 
b/connectivity/source/drivers/jdbc/JStatement.cxx
index 24a0910f6910..275dfcaeb7e9 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -133,8 +133,9 @@ Sequence< Type > SAL_CALL 
java_sql_Statement_Base::getTypes(  )
 Sequence< Type > aOldTypes = java_sql_Statement_BASE::getTypes();
 if ( m_pConnection.is() && !m_pConnection->isAutoRetrievingEnabled() )
 {
-std::remove(aOldTypes.getArray(),aOldTypes.getArray() + 
aOldTypes.getLength(),
-cppu::UnoType::get());
+auto it = std::remove(aOldTypes.getArray(),aOldTypes.getArray() + 
aOldTypes.getLength(),
+ cppu::UnoType::get());
+(void)it;
 aOldTypes.realloc(aOldTypes.getLength() - 1);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/source

2017-04-19 Thread brainbreaker
 android/source/AndroidManifest.xml   |2 
 android/source/res/layout/activity_main.xml  |8 +-
 android/source/res/layout/toolbar_bottom.xml |5 +
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |   35 
+-
 4 files changed, 29 insertions(+), 21 deletions(-)

New commits:
commit 78098b8494be7123bc4a8b50faa13445e5afd8ce
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Mon Mar 27 22:26:47 2017 +0530

Add BottomSheetBehavior to formatting toolbar

This commit adds the BottomSheetBehavior to the
formatting toolbar appearing from bottom.
CoordinatorLayout replaces the RelativeLayout in activity_main
and bottom toolbar is made the child of it.
Also, Add 'adjustPan' option to LibreOfficeMainActivity's
windowSoftInputMode flag so as to prevent soft keyboard
from pushing the views up

Change-Id: Icc1177ac238bc7c482a69daec4e629fe6d93
Reviewed-on: https://gerrit.libreoffice.org/35768
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
Tested-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index d0fde624572d..56fe63d62008 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -25,7 +25,7 @@
 android:name=".LibreOfficeMainActivity"
 android:label="@string/app_name"
 
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize"
-android:windowSoftInputMode="adjustResize" >
+android:windowSoftInputMode="adjustPan|adjustResize" >
 
 
 
diff --git a/android/source/res/layout/activity_main.xml 
b/android/source/res/layout/activity_main.xml
index 923ed5644595..1ad3e3836f24 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -6,9 +6,10 @@
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:background="#fff"
-tools:context=".LibreOfficeMainActivity" >
+tools:context=".LibreOfficeMainActivity">
 
-
 
@@ -27,7 +28,6 @@
 
 
@@ -69,7 +69,7 @@
 android:layout_width="match_parent"
 android:layout_height="match_parent"/>
 
-
+
 
 
+tools:showIn="@layout/activity_main"
+app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
+app:behavior_hideable="true"
+app:behavior_peekHeight="0dp">
 
 ___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/source

2017-04-18 Thread brainbreaker
 android/source/res/values/strings.xml |   16 -
 android/source/src/java/org/libreoffice/LOKitTileProvider.java|4 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |  125 
+++---
 android/source/src/java/org/libreoffice/ui/FileUtilities.java |5 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   49 
+++
 5 files changed, 97 insertions(+), 102 deletions(-)

New commits:
commit d70636a3145c72fe7f34c0a73f3784f99dc329ee
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Apr 6 15:00:33 2017 +0530

Discard StorageAccessFramework for creating new documents

This commit adds the ability to create a new document using
existing file system browsing in the app.
Usage of StorageAccessFramework to create new document
has been ditched as it is not backward compatible.

Change-Id: I852c3de337613cb01e689d532476d2c5f932c1b3
Reviewed-on: https://gerrit.libreoffice.org/36195
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
Tested-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index a554c84b4aef..4495ca584927 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -16,9 +16,11 @@
 More Info
 Press back again to quit
 
+New Write
 New Impress
 New Sheet
 New Draw
+untitled
 
 LibreOffice Browser
 Search
@@ -94,7 +96,8 @@
 Save complete
 Saving the document…
 Save incomplete. Were there any 
changes?
-File created in Documents folder
+"Created new file - "
+Unable to create new file, please 
check entered file name.
 
 
 Storage provider settings
@@ -118,15 +121,14 @@
 Choose Directory
 Invalid directory path
 
-
+
 Save the document before 
closing?
 SAVE
-CANCEL
+Cancel
 NO
-New Write
-
-Saved file -
-Unable to create new file, please check 
entered file name.
 
+
+Enter file name
+CREATE
 
 
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 1996a1b5bedd..29def6e97794 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -142,7 +142,7 @@ class LOKitTileProvider implements TileProvider {
 @Override
 public void run() {
 // There was some error
-mContext.showSaveStatusToast(true);
+mContext.showSaveStatusMessage(true);
 }
 });
 }
@@ -150,7 +150,7 @@ class LOKitTileProvider implements TileProvider {
 @Override
 public void run() {
 // There was no error
-mContext.showSaveStatusToast(false);
+mContext.showSaveStatusMessage(false);
 }
 });
 }
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 3e41a7dda98f..267fce39315e 100755
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -10,12 +10,11 @@ import android.content.SharedPreferences;
 import android.content.res.AssetFileDescriptor;
 import android.content.res.AssetManager;
 import android.graphics.RectF;
-import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
-import android.os.Environment;
 import android.os.Handler;
 import android.preference.PreferenceManager;
+import android.support.design.widget.Snackbar;
 import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.Toolbar;
@@ -76,16 +75,12 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity {
 private DocumentPartViewListAdapter mDocumentPartViewListAdapter;
 private int partIndex=-1;
 private File mInputFile;
-private String newFileName = "untitled";
-private String newFilePath = "/storage/emulated/0/Documents/";
 private DocumentOverlay mDocumentOverlay;
 private File mTempFile = null;
-private String newDocumentType = null;
 private FormattingController mFormattingController;
 private ToolbarController mToolbarController;
 private FontController mFontController;
 private SearchController mSearchController;
-private static final int PICKFOLDER_RESULT_CODE = 1;
 
 public GeckoLayerClient getLayerClient() {
 return mLayerClient;
@@ -134,20 +129,35 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity {
 mFontController = new FontController(this);
 

[Libreoffice-commits] core.git: android/source

2017-03-30 Thread brainbreaker
 android/source/res/drawable/ic_subscript.xml  |   10 
 android/source/res/drawable/ic_superscript.xml|   20 
+
 android/source/res/layout/toolbar_bottom.xml  |   22 
+-
 android/source/src/java/org/libreoffice/FormattingController.java |9 
 4 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit 72b9fe1d470ea0d22f433598b1d2f68d1be12057
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Mar 28 01:02:29 2017 +0530

Add superscript and subscript text formatting options

This commit adds superscript and subscript text formatting
options in formatting toolbar

Change-Id: Id6966eb11b71b269431a21f46bd7c597fdcdb08c
Reviewed-on: https://gerrit.libreoffice.org/35778
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/android/source/res/drawable/ic_subscript.xml 
b/android/source/res/drawable/ic_subscript.xml
new file mode 100644
index ..7a379cf5007f
--- /dev/null
+++ b/android/source/res/drawable/ic_subscript.xml
@@ -0,0 +1,10 @@
+http://schemas.android.com/apk/res/android;>
+
+
+
diff --git a/android/source/res/drawable/ic_superscript.xml 
b/android/source/res/drawable/ic_superscript.xml
new file mode 100644
index ..aa18a305d2cb
--- /dev/null
+++ b/android/source/res/drawable/ic_superscript.xml
@@ -0,0 +1,20 @@
+http://schemas.android.com/apk/res/android;
+android:width="24dp"
+android:height="24dp"
+android:viewportWidth="24.0"
+android:viewportHeight="24.0">
+
+
+
diff --git a/android/source/res/layout/toolbar_bottom.xml 
b/android/source/res/layout/toolbar_bottom.xml
index 15ff06886efe..c412678f7817 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -121,7 +121,7 @@
 android:id="@+id/font_size_spinner"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
-android:layout_weight="0.80"
+android:layout_weight="0.60"
 android:minHeight="50dip" />
 
 
 
+
+
+
+
 
 
 
diff --git a/android/source/src/java/org/libreoffice/FormattingController.java 
b/android/source/src/java/org/libreoffice/FormattingController.java
index cecb0dd469e4..b7e5398963dc 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -32,6 +32,9 @@ import org.libreoffice.kit.Document;
 
 
mContext.findViewById(R.id.button_font_shrink).setOnClickListener(this);
 mContext.findViewById(R.id.button_font_grow).setOnClickListener(this);
+
+mContext.findViewById(R.id.button_subscript).setOnClickListener(this);
+
mContext.findViewById(R.id.button_superscript).setOnClickListener(this);
 }
 
 @Override
@@ -90,6 +93,12 @@ import org.libreoffice.kit.Document;
 case R.id.button_font_grow:
 LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, 
".uno:Grow"));
 break;
+case R.id.button_subscript:
+LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, 
".uno:SubScript"));
+break;
+case R.id.button_superscript:
+LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, 
".uno:SuperScript"));
+break;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/Bootstrap android/source desktop/source

2017-03-30 Thread brainbreaker
 android/Bootstrap/src/org/libreoffice/kit/Document.java   |2 
 android/source/build.gradle   |2 
 android/source/res/anim/fab_close.xml |   18 
 android/source/res/anim/fab_open.xml  |   19 
 android/source/res/drawable/ic_add_black_24dp.xml |9 
 android/source/res/layout/activity_document_browser.xml   |  213 
+-
 android/source/res/values/strings.xml |9 
 android/source/src/java/org/libreoffice/LOEvent.java  |   17 
 android/source/src/java/org/libreoffice/LOKitShell.java   |   12 
 android/source/src/java/org/libreoffice/LOKitThread.java  |   58 ++
 android/source/src/java/org/libreoffice/LOKitTileProvider.java|   24 +
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |  132 
--
 android/source/src/java/org/libreoffice/TileProvider.java |6 
 android/source/src/java/org/libreoffice/ToolbarController.java|6 
 android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |  123 
+
 desktop/source/lib/lokandroid.cxx |2 
 17 files changed, 586 insertions(+), 68 deletions(-)

New commits:
commit 1503769fe15c122ff2bb8f6f7e7b4ab72656ddc2
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Tue Mar 14 19:12:20 2017 +0530

tdf#106325 - No way to create a new Document

This commit will add the ability to create a new document.
A FAB is used in home screen which on expansion gives
four options namely new writer document, new impress,
new Sheet or new Draw. Two new events loadNewDocument
and saveDocumentAs have been added.
Another major change includes the use of constraint layout
in LOUIActivity layout as it decreases nesting of views and
improves the app performance. This was needed because
of the new FAB layouts being added.
Support for vector drawables has been enabled.

Change-Id: Ia3ea17f73c0d8514f8ddb7b9a1cbd2ce7de6ac08
Reviewed-on: https://gerrit.libreoffice.org/35183
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java 
b/android/Bootstrap/src/org/libreoffice/kit/Document.java
index a7d3f04938bb..7cf99413644c 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Document.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java
@@ -147,7 +147,7 @@ public class Document {
 
 public native void setClientZoom(int nTilePixelWidth, int 
nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight);
 
-private native void saveAs(String url, String format, String options);
+public native void saveAs(String url, String format, String options);
 
 private native void paintTileNative(ByteBuffer buffer, int canvasWidth, 
int canvasHeight, int tilePositionX, int tilePositionY, int tileWidth, int 
tileHeight);
 
diff --git a/android/source/build.gradle b/android/source/build.gradle
index d5fc5c932be0..302d34a54754 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -26,6 +26,7 @@ dependencies {
 compile 
files("${liboWorkdir}/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar")
 compile 'com.android.support:appcompat-v7:25.1.0'
 compile 'com.android.support:design:25.1.0'
+compile 'com.android.support.constraint:constraint-layout:1.0.2'
 }
 
 android {
@@ -64,6 +65,7 @@ android {
 // ToDo: fix openssl stuff to not block targeting 23 or later
 targetSdkVersion 22
 manifestPlaceholders = [installLocation: "preferExternal"]
+vectorDrawables.useSupportLibrary = true
 }
 buildTypes {
 debug {
diff --git a/android/source/res/anim/fab_close.xml 
b/android/source/res/anim/fab_close.xml
new file mode 100644
index ..ba13b0f038be
--- /dev/null
+++ b/android/source/res/anim/fab_close.xml
@@ -0,0 +1,18 @@
+
+http://schemas.android.com/apk/res/android;
+android:fillAfter="true">
+
+
+
+
diff --git a/android/source/res/anim/fab_open.xml 
b/android/source/res/anim/fab_open.xml
new file mode 100644
index ..9099d8b53c80
--- /dev/null
+++ b/android/source/res/anim/fab_open.xml
@@ -0,0 +1,19 @@
+
+http://schemas.android.com/apk/res/android;
+android:fillAfter="true">
+
+
+
+
diff --git a/android/source/res/drawable/ic_add_black_24dp.xml 
b/android/source/res/drawable/ic_add_black_24dp.xml
new file mode 100644
index ..0258249cc482
--- /dev/null
+++ b/android/source/res/drawable/ic_add_black_24dp.xml
@@ -0,0 +1,9 @@
+http://schemas.android.com/apk/res/andr

[Libreoffice-commits] core.git: android/source

2017-03-12 Thread brainbreaker
 android/source/res/layout/file_explorer_grid_item.xml |4 
 android/source/res/layout/file_list_item.xml  |8 
 android/source/res/values/arrays.xml  |1 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |  153 
++
 4 files changed, 41 insertions(+), 125 deletions(-)

New commits:
commit 686651c30a9697463c9910f71736abe607efb270
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Mon Feb 27 18:02:56 2017 +0530

Combine List Item & Grid Item Adapters of File Explorer View

 This commit will combine the code of ListItemAdapter &
  GridItemAdapter in LibreOfficeUIActivity to one
  ExplorerItemAdapter which will handle both the view
  types.

Change-Id: I45c1f5124afee82ff0b78f13609acd37be87fde1
Reviewed-on: https://gerrit.libreoffice.org/34680
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git a/android/source/res/layout/file_explorer_grid_item.xml 
b/android/source/res/layout/file_explorer_grid_item.xml
index 5604fe2..e64fdc2 100644
--- a/android/source/res/layout/file_explorer_grid_item.xml
+++ b/android/source/res/layout/file_explorer_grid_item.xml
@@ -14,7 +14,7 @@
 android:orientation="vertical" >
 
 
 
 
 
 
 
 0
 1
 
-
 
 Everything
 Documents
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 40726c3..a4daa45 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -268,13 +268,8 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 
 FileUtilities.sortFiles(filePaths, sortMode);
 // refresh view
-if (viewMode == GRID_VIEW) {
-fileRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));
-fileRecyclerView.setAdapter(new GridItemAdapter(this, filePaths));
-} else {
-fileRecyclerView.setLayoutManager(new LinearLayoutManager(this));
-fileRecyclerView.setAdapter(new ListItemAdapter(this, filePaths));
-}
+fileRecyclerView.setLayoutManager(isViewModeList() ? new 
LinearLayoutManager(this) : new GridLayoutManager(this, 3));
+fileRecyclerView.setAdapter(new ExplorerItemAdapter(this, filePaths));
 // close drawer if it was open
 drawerLayout.closeDrawer(navigationDrawer);
 }
@@ -328,6 +323,10 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 }
 }
 
+private boolean isViewModeList(){
+return viewMode == LIST_VIEW;
+}
+
 private void switchToDocumentProvider(IDocumentProvider provider) {
 
 new AsyncTask<IDocumentProvider, Void, Void>() {
@@ -875,15 +874,14 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 }
 }
 
-
-class ListItemAdapter extends 
RecyclerView.Adapter {
+class ExplorerItemAdapter extends 
RecyclerView.Adapter {
 
 private Activity mActivity;
 private List filePaths;
 private final long KB = 1024;
 private final long MB = 1048576;
 
-ListItemAdapter(Activity activity, List filePaths) {
+ExplorerItemAdapter(Activity activity, List filePaths) {
 this.mActivity = activity;
 this.filePaths = filePaths;
 }
@@ -891,7 +889,7 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 @Override
 public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
 View item = LayoutInflater.from(parent.getContext())
-.inflate(R.layout.file_list_item, parent, false);
+.inflate(isViewModeList() ? R.layout.file_list_item : 
R.layout.file_explorer_grid_item, parent, false);
 return new ViewHolder(item);
 }
 
@@ -917,24 +915,6 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 });
 
 holder.filenameView.setText(file.getName());
-
-if (!file.isDirectory()) {
-String size;
-long length = filePaths.get(position).getSize();
-if (length < KB){
-size = Long.toString(length) + "B";
-} else if (length < MB){
-size = Long.toString(length/KB) + "KB";
-} else {
-size = Long.toString(length/MB) + "MB";
-}
-holder.fileSizeView.setText(size);
- 

[Libreoffice-commits] core.git: android/source

2017-02-27 Thread brainbreaker
 android/source/AndroidManifest.xml 
|2 
 android/source/res/values/strings.xml  
|4 -
 android/source/src/java/org/libreoffice/storage/IDocumentProvider.java 
|7 +
 
android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java
   |5 +
 
android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java
 |6 +
 
android/source/src/java/org/libreoffice/storage/external/OTGDocumentsProvider.java
 |7 +
 
android/source/src/java/org/libreoffice/storage/local/LocalDocumentsProvider.java
  |5 +
 android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java 
|5 +
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java  
|   39 ++
 9 files changed, 78 insertions(+), 2 deletions(-)

New commits:
commit 5ada20b3588f76cad5b7f39442147fca3d63bec7
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Sun Feb 26 02:27:43 2017 +0530

Improve the Document Provider UX

This commit improves the user experience of different
Document Providers in the app.
In case ext sd card is not present, the option is disabled
in Navigation Menu.
If the device does not support USB OTG,
the option is disabled.
LibreOfficeUIActivity registers a broadcast receiver
in onCreate which detects if a USB device is connected
and directs the user to Settings page to configure it.
In case of errors in configuration in any case,
user is directed to Settings activity after appropriate toast.

Change-Id: I680f78a679e2071ce8330c8168d7aa4e95041723
Reviewed-on: https://gerrit.libreoffice.org/34650
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 7e35208..601f478 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -4,6 +4,8 @@
 
 
 
+
+
 
 
 
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index ff4a183..9832d8b 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -65,12 +65,13 @@
 External SD
 OTG device (experimental)
 Remote server
+USB connected, configure your 
device.
 
 Cannot connect to ownCloud 
server. Check your configuration.
 Cannot log into ownCloud server. 
Check your configuration.
 Unspecified error connecting to 
ownCloud server. Check your configuration and/or try later.
 
-Invalid root file. Check your 
configuration.
+Invalid root file. Check your 
sd card configuration.
 Invalid root file. Check your 
external sd card and/or configuration.
 Invalid root file. Check your OTG device 
and/or configuration.
 
@@ -118,5 +119,4 @@
 NO
 
 
-
 
diff --git 
a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java 
b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
index edb026f..2b0460a 100644
--- a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
+++ b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
@@ -54,4 +54,11 @@ public interface IDocumentProvider {
  * @return Unique ID for a document provider instance.
  */
 int getId();
+
+/**
+ * Checks if the Document Provider is available or not.
+ *
+ * @return A boolean value based on provider availability.
+ */
+boolean checkProviderAvailability();
 }
diff --git 
a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java
 
b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java
index abbfca9..4ce77f0 100644
--- 
a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java
+++ 
b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java
@@ -148,6 +148,11 @@ public class ExtsdDocumentsProvider implements 
IExternalDocumentProvider,
 }
 
 @Override
+public boolean checkProviderAvailability() {
+return 
Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) && 
Environment.isExternalStorageRemovable();
+}
+
+@Override
 public void onSharedPreferenceChanged(SharedPreferences preferences, 
String key) {
 if 
(key.equals(DocumentProviderSettingsActivity.KEY_PREF_EXTERNAL_SD_PATH_URI)) {
 rootPathURI = preferences.getString(key, "");
diff --git 
a/android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java
 
b/android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java
index 0ded177..1ac3440 10064

[Libreoffice-commits] core.git: android/source

2017-02-16 Thread brainbreaker
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ba0f920cc141eb6ab896f650e9ac7b25ffe073a5
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Sun Feb 12 11:42:38 2017 +0530

Fixed the runtime crash of app by catching exception

Steps to reproduce crash: Click on remote server option in navigation menu, 
in case of invalid server URL it will show a toast. Then click on Storage 
Provider Settings once and press back, app will crash throwing runtime 
exception.
The exception is not catched anywhere so Java runtime exits the app

Change-Id: I2bccca633e62fec82c868661f14765596c4b83f1
Reviewed-on: https://gerrit.libreoffice.org/34166
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 6921eeb..3393484 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -147,6 +147,8 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 recentFiles.add(documentProvider.createFromUri(new 
URI(recentFileString)));
 } catch (URISyntaxException e) {
 e.printStackTrace();
+} catch (RuntimeException e){
+e.printStackTrace();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/source

2017-02-15 Thread brainbreaker
 android/source/res/layout/file_list_item.xml|   19 ++-
 android/source/res/layout/item_recent_files.xml |   16 ++--
 android/source/res/values/dimens.xml|3 +++
 android/source/res/values/themes.xml|2 +-
 4 files changed, 28 insertions(+), 12 deletions(-)

New commits:
commit 36a43c356e33ce97017801dc25f711b576486a11
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Sun Feb 12 22:29:21 2017 +0530

Fixed the margins of list items of File Recycler View

Screenshots of the change:-
Before:
1. https://s19.postimg.org/bbs91keyr/Screenshot_20170212_182941.png
2. https://s19.postimg.org/k5j5io1xf/Screenshot_20170212_183334.png
Now:
1. https://s19.postimg.org/4o08spkub/Screenshot_20170212_222359.png
2. https://s19.postimg.org/5p0hhu1tv/Screenshot_20170212_222406.png

Change-Id: I3137ce2648c4dda30d7bbe93245618a83e9048c0
Reviewed-on: https://gerrit.libreoffice.org/34175
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git a/android/source/res/layout/file_list_item.xml 
b/android/source/res/layout/file_list_item.xml
index 7d703be..a2dcfdb 100644
--- a/android/source/res/layout/file_list_item.xml
+++ b/android/source/res/layout/file_list_item.xml
@@ -9,14 +9,19 @@
 xmlns:tools="http://schemas.android.com/tools;
 android:layout_width="match_parent"
 android:layout_height="48dp"
-android:orientation="horizontal" >
+android:orientation="horizontal"
+android:layout_marginStart="@dimen/list_item_margin"
+android:layout_marginLeft="@dimen/list_item_margin"
+android:layout_marginEnd="@dimen/list_item_margin"
+android:layout_marginRight="@dimen/list_item_margin">
 
 
+android:layout_weight="2"
+android:ellipsize="end"
+android:maxLines="1"/>
 
+android:layout_weight="2"
+android:ellipsize="end"
+android:maxLines="1"/>
 
 
diff --git a/android/source/res/layout/item_recent_files.xml 
b/android/source/res/layout/item_recent_files.xml
index fa966d8..b374ba5 100644
--- a/android/source/res/layout/item_recent_files.xml
+++ b/android/source/res/layout/item_recent_files.xml
@@ -12,23 +12,27 @@
 android:layout_height="48dp"
 android:orientation="horizontal"
 android:background="?android:attr/selectableItemBackground"
+android:layout_marginStart="@dimen/list_item_margin"
+android:layout_marginLeft="@dimen/list_item_margin"
+android:layout_marginEnd="@dimen/list_item_margin"
+android:layout_marginRight="@dimen/list_item_margin"
 tools:ignore="UseCompoundDrawables">
 
 
 
-
-
 
-
-
\ No newline at end of file
+style="@style/ListItemText"
+android:maxLines="1"
+android:ellipsize="end"/>
+
diff --git a/android/source/res/values/dimens.xml 
b/android/source/res/values/dimens.xml
index 1e5d771..7c48f2b 100644
--- a/android/source/res/values/dimens.xml
+++ b/android/source/res/values/dimens.xml
@@ -5,4 +5,7 @@
 30dp
 44dp
 2dp
+8dp
+8dp
+32dp
 
diff --git a/android/source/res/values/themes.xml 
b/android/source/res/values/themes.xml
index e5287a8..4036d97 100644
--- a/android/source/res/values/themes.xml
+++ b/android/source/res/values/themes.xml
@@ -8,7 +8,7 @@
 
 <item name="android:gravity">center</item>
 <item name="android:textColor">@android:color/black</item>
-<item name="android:textSize">15sp</item>
+<item name="android:textSize">14sp</item>
 
 
 

[Libreoffice-commits] core.git: android/source

2017-02-10 Thread brainbreaker
 android/source/res/values/strings.xml  |2 ++
 android/source/res/xml/libreoffice_preferences.xml |1 +
 2 files changed, 3 insertions(+)

New commits:
commit a68d00189988c2ed8a5ed246af60a1c967449a2e
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Thu Feb 9 18:29:06 2017 +0530

Default Value added to File Explorer View Preference

Change-Id: Ibbca76cae7fb189d94c37397ad49e9cff2755cd2
Reviewed-on: https://gerrit.libreoffice.org/34082
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index 6bdbe26..197aeab 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -20,6 +20,7 @@
 Search
 List
 Grid
+0
 Filter by
 Sort by
 Smallest first
@@ -111,4 +112,5 @@
 NO
 
 
+
 
diff --git a/android/source/res/xml/libreoffice_preferences.xml 
b/android/source/res/xml/libreoffice_preferences.xml
index 4d80f28..5dd5a70 100644
--- a/android/source/res/xml/libreoffice_preferences.xml
+++ b/android/source/res/xml/libreoffice_preferences.xml
@@ -16,6 +16,7 @@
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/source

2017-02-09 Thread brainbreaker
 android/source/res/menu/view_menu.xml |9 -
 android/source/res/xml/libreoffice_preferences.xml|2 
 android/source/src/java/org/libreoffice/SettingsActivity.java |   25 
+++-
 android/source/src/java/org/libreoffice/SettingsListenerModel.java|   56 
++
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   42 
++-
 5 files changed, 90 insertions(+), 44 deletions(-)

New commits:
commit f1c844fed0fdf898fd6d027529cb2570eb52bec5
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Wed Feb 8 01:38:40 2017 +0530

Explorer File View option in Settings working now

Explorer file view option in Settings is working now.
To listen to the preference updates in the app
a custom class SettingsListernerModel has been added.
SettingsListenerModel.java file contains the methods
to instantiate and set OnSettingPreferenceChangedListener
in the implementing class.
LibreOfficeUIActivity implements this listener
and it is triggered by onSharedPreferenceChanged() method
in SettingsActivity.
This class can also be used to listen to other preference changes
in Settings.

Change-Id: I063024df01cf183d2a6211648e32805795af20a9
Reviewed-on: https://gerrit.libreoffice.org/34012
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git a/android/source/res/menu/view_menu.xml 
b/android/source/res/menu/view_menu.xml
index fe28da2..3c0003b 100644
--- a/android/source/res/menu/view_menu.xml
+++ b/android/source/res/menu/view_menu.xml
@@ -7,24 +7,15 @@
 android:title="@string/sort"
 android:icon="@drawable/ic_sort_black_24dp"
 app:showAsAction="ifRoom">
-
 
-
 
 
 
-
-
 
-
 
-
-
-
 
 
+android:summary="View files as a grid or in a list."/>
 
 http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.libreoffice;
+
+import android.content.SharedPreferences;
+
+public class SettingsListenerModel {
+
+public interface OnSettingsPreferenceChangedListener {
+void settingsPreferenceChanged(SharedPreferences sharedPreferences, 
String key);
+}
+
+private static SettingsListenerModel mInstance;
+private OnSettingsPreferenceChangedListener mListener;
+private SharedPreferences sharedPreferences;
+private String key;
+
+private SettingsListenerModel() {}
+
+public static SettingsListenerModel getInstance() {
+if(mInstance == null) {
+mInstance = new SettingsListenerModel();
+}
+return mInstance;
+}
+
+public void setListener(OnSettingsPreferenceChangedListener listener) {
+mListener = listener;
+}
+
+public void changePreferenceState(SharedPreferences sharedPreferences, 
String key) {
+if(mListener != null) {
+this.sharedPreferences = sharedPreferences;
+this.key = key;
+notifyPreferenceChange(sharedPreferences, key);
+}
+}
+
+public SharedPreferences getSharedPreferences() {
+return sharedPreferences;
+}
+
+public String getKey(){
+return key;
+}
+
+private void notifyPreferenceChange(SharedPreferences preferences, String 
key) {
+mListener.settingsPreferenceChanged(preferences, key);
+}
+}
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index c842abc..4720785 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -54,6 +54,7 @@ import org.libreoffice.AboutDialogFragment;
 import org.libreoffice.LibreOfficeMainActivity;
 import org.libreoffice.R;
 import org.libreoffice.SettingsActivity;
+import org.libreoffice.SettingsListenerModel;
 import org.libreoffice.storage.DocumentProviderFactory;
 import org.libreoffice.storage.DocumentProviderSettingsActivity;
 import org.libreoffice.storage.IDocumentProvider;
@@ -72,8 +73,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-public class LibreOfficeUIActivity extends AppCompatActivity {
-private static final String LOGTAG = 
LibreOfficeUIActivity.class.getSimpleName();
+public class LibreOfficeUIActivity extends AppCompatActivity implements 
SettingsListenerModel.OnSettingsPreferenceChangedListener{
+private String LOGTAG = LibreOfficeUIActivity.class.getSimpleName();
 private SharedPreferences prefs;
 private int filterMode = FileUtilities.ALL;
 private int viewMode;
@@ -116,9 +117,8 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity {
 documentProviderFactory = DocumentProviderFact

[Libreoffice-commits] core.git: android/source

2017-02-06 Thread brainbreaker
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3f19e2763803898a8ea9e788c300378a447507e6
Author: brainbreaker <gautamprajapat...@gmail.com>
Date:   Mon Feb 6 12:00:08 2017 +0530

Retaining the default file explorer view

Change-Id: I273ee17fc94e9d6e3b73ca0b9a4853a632123bd0
Reviewed-on: https://gerrit.libreoffice.org/33946
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithid...@gmail.com>

diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index efec500..5b79495 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -537,10 +537,12 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity {
 viewMode = LIST_VIEW;
 item.setTitle(R.string.grid_view); // Button points to 
next view.
 item.setIcon(R.drawable.light_view_as_grid);
+prefs.edit().putInt(EXPLORER_VIEW_TYPE_KEY, 
LIST_VIEW).apply();
 } else {
 viewMode = GRID_VIEW;
 item.setTitle(R.string.list_view); // Button points to 
next view.
 item.setIcon(R.drawable.light_view_as_list);
+prefs.edit().putInt(EXPLORER_VIEW_TYPE_KEY, 
GRID_VIEW).apply();
 }
 createUI();
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits