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

2023-11-30 Thread Michael Weghorn (via logerrit)
 android/source/res/layout/about.xml  |2 -
 android/source/res/values-de/strings.xml |2 -
 android/source/res/values-tr/strings.xml |2 -
 android/source/res/values/strings.xml|2 -
 android/source/src/java/org/libreoffice/AboutDialogFragment.java |   14 
+++---
 5 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 3ee963afc7dfae473d5368e88a2caa847f7450f8
Author: Michael Weghorn 
AuthorDate: Thu Nov 30 12:54:54 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 14:40:08 2023 +0100

android: Simplify vendor info handling for about dialog

Similar to

Change-Id: Iaa78f5a6020bea4ed80a1b41d3b23cc8d313813c
Author: Michael Weghorn 
Date:   Thu Nov 30 12:00:52 2023 +0100

android: Simplify version info handling for about dialog

, also simplify the handling of the vendor info text by
retrieving the text from the string resource right away.

Change-Id: I7d56b1814454be2bc8d13e01265f0a0db6d865be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160147
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/about.xml 
b/android/source/res/layout/about.xml
index 8cce41cf076d..30f1ed3d95ae 100644
--- a/android/source/res/layout/about.xml
+++ b/android/source/res/layout/about.xml
@@ -38,7 +38,6 @@
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:textIsSelectable="true"
-android:text="@string/app_vendor"
 android:textSize="18sp"/>
 
 
diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java 
b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
index de2e48ffbdde..b215ab5e7601 100644
--- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java
+++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
@@ -40,8 +40,7 @@ public class AboutDialogFragment extends DialogFragment {
 int defaultColor = textView.getTextColors().getDefaultColor();
 textView.setTextColor(defaultColor);
 
-// Take care of placeholders in the version and vendor text views.
-TextView vendorView = messageView.findViewById(R.id.about_vendor);
+// Take care of placeholders and set text in version and vendor text 
views.
 try
 {
 String versionName = getActivity().getPackageManager()
@@ -55,8 +54,8 @@ public class AboutDialogFragment extends DialogFragment {
 TextView versionView = 
messageView.findViewById(R.id.about_version);
 versionView.setText(versionString);
 
versionView.setMovementMethod(LinkMovementMethod.getInstance());
-String vendor = vendorView.getText().toString();
-vendor = vendor.replace("$VENDOR", tokens[2]);
+TextView vendorView = 
messageView.findViewById(R.id.about_vendor);
+String vendor = 
getString(R.string.app_vendor).replace("$VENDOR", tokens[2]);
 vendorView.setText(vendor);
 }
 else
@@ -64,7 +63,6 @@ public class AboutDialogFragment extends DialogFragment {
 }
 catch (PackageManager.NameNotFoundException e)
 {
-vendorView.setText("");
 }
 
 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
commit 4958e21332c19a8bc1704ff71489c2c991efb05c
Author: Michael Weghorn 
AuthorDate: Thu Nov 30 12:00:52 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 14:39:59 2023 +0100

android: Simplify version info handling for about dialog

* Don't set and retrieve the placeholder text in/from
  the TexView in the about dialog, but use the string
  resource directly.
* Add the HTML code directly in the string resource,
  rather than having to fiddle with that in the Java
  code.

With this in place, only the version name and the
commit hash need to be replaced.

Since there is no placeholder text in the text view,
it's also no longer necessary to explicitly set an
empty string in case of an exception.

Change-Id: Iaa78f5a6020bea4ed80a1b41d3b23cc8d313813c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160146
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/about.xml 
b/android/source/res/layout/about.xml
index 8968c00d2695..8cce41cf076d 100644
--- a/android/source/res/layout/about.xml
+++ b/android/source/res/layout/about.xml
@@ -14,7 +14,6 @@
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:textIsSelectable="true"
-android:text="@string/app_version"
 android:textSize="18sp"/>
 
 LibreOffice-Viewer-Einstellungen
 
 LibreOffice Viewer \'Beta\'

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

2023-11-30 Thread Michael Weghorn (via logerrit)
 android/source/build.gradle |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 97166cb9e0b4687f7e4998d36457f74b76edb6d7
Author: Michael Weghorn 
AuthorDate: Wed Nov 29 13:33:33 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 12:17:52 2023 +0100

android: Update compileSdk/targetSdkVersion to 34

API version 33 refers to Android 14.

I didn't notice anything requiring changes
when going over the release notes for all apps running on
Android 14 [1] and apps targeting Android 14 [2].

(Taking a look whether making use of the new possibility to
request/grant partial access to photos and videos [3]
for the "Insert" -> "Select Photo" feature
and testing the app with the newly available 200% text
scaling [4] might make sense at some point, but is unrelated
to bumping the versions as done in this commit.)

[1] https://developer.android.com/about/versions/14/behavior-changes-all
[2] https://developer.android.com/about/versions/14/behavior-changes-14
[3] 
https://developer.android.com/about/versions/14/behavior-changes-all#partial-photo-video-access
[4] 
https://developer.android.com/about/versions/14/behavior-changes-all#non-linear-font-scaling

Change-Id: I2778d8c181daa92530c769a168a9e186b6ea079c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160086
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 9157e896ad59..ea93633489c7 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -39,7 +39,7 @@ dependencies {
 
 android {
 namespace 'org.libreoffice'
-compileSdk 33
+compileSdk 34
 // uses non-conventional source layout, so need to reconfigure accordingly
 // ToDo move to conventional layout, so stuff can be stripped down.
 sourceSets {
@@ -55,7 +55,7 @@ android {
 }
 defaultConfig {
 // minSdkVersion is set in liboSettings.gradle
-targetSdkVersion 33
+targetSdkVersion 34
 // multidex needed when > 65,536 methods referenced with minSdKVersion 
< 21
 // s. https://developer.android.com/studio/build/multidex
 multiDexEnabled true
commit 8fea1b20383574dd1be86c3dbad20361604c9828
Author: Michael Weghorn 
AuthorDate: Wed Nov 29 12:15:11 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 12:17:44 2023 +0100

android: Update Android Gradle Plugin to 8.1.4

This is a prerequisite for updating the compile and target
SDK versions to API level 34, which requires and AGP minimum
version of 8.1.1.

Change-Id: I27d12ec3c9bc3dac8a5df18459a57f1a1e990197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160085
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/build.gradle b/android/source/build.gradle
index e623c9305e2b..9157e896ad59 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -21,7 +21,7 @@ buildscript {
 google()
 }
 dependencies {
-classpath 'com.android.tools.build:gradle:8.1.0'
+classpath 'com.android.tools.build:gradle:8.1.4'
 }
 }
 


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

2023-11-30 Thread Michael Weghorn (via logerrit)
 android/source/AndroidManifest.xml |2 +-
 android/source/res/layout/toolbar_bottom.xml   |6 +++---
 android/source/res/layout/toolbar_color_picker.xml |2 +-
 android/source/res/values/colors.xml   |1 -
 android/source/res/values/themes.xml   |5 ++---
 5 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 84996f452f86cb6e83ae0d86c1612e3f3c616a17
Author: Michael Weghorn 
AuthorDate: Tue Nov 28 12:20:55 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 12:16:17 2023 +0100

tdf#124480 android: Use theme bg color for bottom toolbars

Instead of hard-coding the background color
for the 2 toolbars shown at the bottom
(`toolbar_bottom` and the color picker), use
"colorPrimary" from the theme.

Stop overriding "colorPrimary" in
`LibreOfficeTheme.Toolbar`, which would otherwise
result in a hard-coded white color being used again.

This makes those toolbars show up in a darker color
when dark theme is enabled.

Stop hard-coding the font color of the items in
the "Style" tab in the bottom toolbar to black, but
use the primary font color instead, so a light color
is automatically used when using the dark theme.

Change-Id: Ib09ca47e8695903cdfa9f4eb100dc88ecae652a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160069
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/toolbar_bottom.xml 
b/android/source/res/layout/toolbar_bottom.xml
index 3fcd3bfc0fd0..ca9e0cf6e454 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -7,7 +7,7 @@
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:layout_alignParentBottom="true"
-android:background="@color/toolbar_background"
+android:background="?attr/colorPrimary"
 android:elevation="3dp"
 android:orientation="vertical"
 app:popupTheme="@style/LibreOfficeTheme.Toolbar"
@@ -391,7 +391,7 @@
 android:paddingTop="12dp"
 android:textSize="14sp"
 android:gravity="center_vertical"
-android:textColor="@color/fontBlack"
+
android:textColor="?android:attr/textColorPrimary"
 android:layout_alignParentLeft="true"
 
 />
@@ -420,7 +420,7 @@
 android:paddingTop="12dp"
 android:textSize="14sp"
 android:gravity="center_vertical"
-android:textColor="@color/fontBlack"
+
android:textColor="?android:attr/textColorPrimary"
 android:layout_alignParentLeft="true"
 
 />
diff --git a/android/source/res/layout/toolbar_color_picker.xml 
b/android/source/res/layout/toolbar_color_picker.xml
index 6a8f81b2a842..351542b1d2d0 100644
--- a/android/source/res/layout/toolbar_color_picker.xml
+++ b/android/source/res/layout/toolbar_color_picker.xml
@@ -6,7 +6,7 @@
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:layout_alignParentBottom="true"
-android:background="@color/toolbar_background"
+android:background="?attr/colorPrimary"
 android:elevation="3dp"
 android:orientation="vertical"
 app:popupTheme="@style/LibreOfficeTheme.Toolbar"
diff --git a/android/source/res/values/colors.xml 
b/android/source/res/values/colors.xml
index 3defb9a3ea83..791c0f23da23 100644
--- a/android/source/res/values/colors.xml
+++ b/android/source/res/values/colors.xml
@@ -93,7 +93,6 @@
 #D1D9E1
 
 #3e3e3e
-#ff
 
 #26a69a
 
diff --git a/android/source/res/values/themes.xml 
b/android/source/res/values/themes.xml
index 08b544797dea..bf815b5c659f 100644
--- a/android/source/res/values/themes.xml
+++ b/android/source/res/values/themes.xml
@@ -12,7 +12,6 @@
 
 
 
-@color/toolbar_background
 
 
 
commit d82a9cb8d6a1e11663f19a85cfb98ce9a94692be
Author: Michael Weghorn 
AuthorDate: Tue Nov 28 11:52:37 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 12:16:10 2023 +0100

tdf#124480 android: Support dark theme

Support dark theme by inheriting from the
corresponding "AppCompat.DayNight" themes rather than
forcing the use of a light theme by using the
"AppCompat.Light" variants, s.a. [1].

With this in place, the app will automatically use a
dark theme for the Android UI controls when that's
enabled in the 

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

2023-11-30 Thread Michael Weghorn (via logerrit)
 android/source/res/drawable/label_background.xml|4 ++--
 android/source/res/layout/activity_document_browser.xml |   15 +++
 android/source/res/layout/activity_main.xml |3 +--
 android/source/res/layout/item_recent_files.xml |1 -
 android/source/res/values/themes.xml|2 +-
 5 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 9e7df5bdf2c0e9585f01c16bbb5a377fe64299ca
Author: Michael Weghorn 
AuthorDate: Tue Nov 28 10:23:06 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 30 12:16:02 2023 +0100

tdf#124480 android: Replace hard-coded bg color with themeable one

or drop explicitly setting background color where the
one from the parent widget should be used.

See also

https://developer.android.com/develop/ui/views/theming/darktheme#themes-styles

Change-Id: I21dc4b7c45e2cc5add96d603abe5e781d4e09992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160067
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/drawable/label_background.xml 
b/android/source/res/drawable/label_background.xml
index 1e097857537a..3e5b7b1cb907 100644
--- a/android/source/res/drawable/label_background.xml
+++ b/android/source/res/drawable/label_background.xml
@@ -2,8 +2,8 @@
 http://schemas.android.com/apk/res/android;>
 
 
-
+
 
 
 
-
\ No newline at end of file
+
diff --git a/android/source/res/layout/activity_document_browser.xml 
b/android/source/res/layout/activity_document_browser.xml
index e47426871f72..b8c00cf973d0 100644
--- a/android/source/res/layout/activity_document_browser.xml
+++ b/android/source/res/layout/activity_document_browser.xml
@@ -119,7 +119,7 @@
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:clickable="true"
-app:backgroundTint="@color/background_normal"
+app:backgroundTint="?attr/colorBackgroundFloating"
 app:fabSize="normal"
 app:layout_constraintBottom_toBottomOf="parent"
 app:layout_constraintRight_toRightOf="parent"
@@ -151,7 +151,7 @@
 android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
 android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
 android:clickable="true"
-app:backgroundTint="@color/background_normal"
+app:backgroundTint="?attr/colorBackgroundFloating"
 app:fabSize="mini"
 app:srcCompat="@drawable/writer"
 app:useCompatPadding="true" />
@@ -183,7 +183,7 @@
 android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
 android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
 android:clickable="true"
-app:backgroundTint="@color/background_normal"
+app:backgroundTint="?attr/colorBackgroundFloating"
 app:fabSize="mini"
 app:srcCompat="@drawable/impress"
 app:useCompatPadding="true" />
@@ -215,7 +215,7 @@
 android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
 android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
 android:clickable="true"
-app:backgroundTint="@color/background_normal"
+app:backgroundTint="?attr/colorBackgroundFloating"
 app:fabSize="mini"
 app:srcCompat="@drawable/calc"
 app:useCompatPadding="true" />
@@ -247,7 +247,7 @@
 android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
 android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
 android:clickable="true"
-app:backgroundTint="@color/background_normal"
+app:backgroundTint="?attr/colorBackgroundFloating"
 app:fabSize="mini"
 app:srcCompat="@drawable/draw"
 app:useCompatPadding="true" />
diff --git a/android/source/res/layout/item_recent_files.xml 
b/android/source/res/layout/item_recent_files.xml
index b374ba56f04f..f13839b44b73 100644
--- a/android/source/res/layout/item_recent_files.xml
+++ b/android/source/res/layout/item_recent_files.xml
@@ -11,7 +11,6 @@
 android:layout_width="match_parent"
 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"
diff --git a/android/source/res/values/themes.xml 
b/android/source/res/values/themes.xml
index 8576f9c221ec..e26bee22eb31 100644
--- a/android/source/res/values/themes.xml
+++ b/android/source/res/values/themes.xml
@@ -7,7 +7,7 @@
 
 
 center_vertical
-@android:color/black
+

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

2023-11-27 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java |   17 
++
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 7c7e044f3cd6adc8ce639d01dc083827cdd87266
Author: Michael Weghorn 
AuthorDate: Mon Nov 27 10:55:51 2023 +0100
Commit: Michael Weghorn 
CommitDate: Mon Nov 27 14:04:13 2023 +0100

tdf#158398 android: Center Calc header text

Center the header text in the Calc header cell, to
make better use of the space. This is in line with
what the desktop version also does.

Setting the text alignment to `Paint.Align.CENTER`
is sufficient for centering horizontally.
There's no equivalent for centering vertically, so
calculate the position based on the text bounds.

Change-Id: Ia8d5d8434b703cb7daecd34ae70405883f22f0d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159988
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java 
b/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
index 1b2db6f65796..eec0b5e4a88d 100644
--- a/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
+++ b/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
@@ -4,6 +4,7 @@ import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Paint.Style;
+import android.graphics.Rect;
 import android.graphics.RectF;
 import android.text.TextPaint;
 
@@ -11,6 +12,7 @@ public class CalcHeaderCell extends CommonCanvasElement {
 private final TextPaint mTextPaint = new TextPaint();
 private final Paint mBgPaint = new Paint();
 private final RectF mBounds;
+private final Rect mTextBounds = new Rect();
 private final String mText;
 
 public CalcHeaderCell(float left, float top, float width, float height, 
String text, boolean selected) {
@@ -26,7 +28,10 @@ public class CalcHeaderCell extends CommonCanvasElement {
 mBgPaint.setAlpha(100);  // hard coded for now
 mTextPaint.setColor(Color.GRAY);
 mTextPaint.setTextSize(24f); // hard coded for now
+mTextPaint.setTextAlign(Paint.Align.CENTER);
 mText = text;
+
+mTextPaint.getTextBounds(mText, 0, mText.length(), mTextBounds);
 }
 
 /**
@@ -49,6 +54,6 @@ public class CalcHeaderCell extends CommonCanvasElement {
 @Override
 public void onDraw(Canvas canvas) {
 canvas.drawRect(mBounds, mBgPaint);
-canvas.drawText(mText, mBounds.left, mBounds.bottom, mTextPaint);
+canvas.drawText(mText, mBounds.centerX(), mBounds.centerY() - 
mTextBounds.centerY(), mTextPaint);
 }
 }
commit 808a94d85928545d8c8128f52116509c1ff8c121
Author: Michael Weghorn 
AuthorDate: Mon Nov 27 10:49:32 2023 +0100
Commit: Michael Weghorn 
CommitDate: Mon Nov 27 14:04:04 2023 +0100

android: Make CalcHeaderCell fields final

Change-Id: I7e14145569428a2803f9376cf719e524aa8963a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159987
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java 
b/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
index c1f8e74e7ba2..1b2db6f65796 100644
--- a/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
+++ b/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java
@@ -8,10 +8,10 @@ import android.graphics.RectF;
 import android.text.TextPaint;
 
 public class CalcHeaderCell extends CommonCanvasElement {
-private TextPaint mTextPaint = new TextPaint();
-private Paint mBgPaint = new Paint();
-private RectF mBounds;
-private String mText;
+private final TextPaint mTextPaint = new TextPaint();
+private final Paint mBgPaint = new Paint();
+private final RectF mBounds;
+private final String mText;
 
 public CalcHeaderCell(float left, float top, float width, float height, 
String text, boolean selected) {
 mBounds = new RectF(left, top, left + width, top + height);
@@ -51,4 +51,4 @@ public class CalcHeaderCell extends CommonCanvasElement {
 canvas.drawRect(mBounds, mBgPaint);
 canvas.drawText(mText, mBounds.left, mBounds.bottom, mTextPaint);
 }
-}
\ No newline at end of file
+}


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

2023-11-22 Thread Michael Weghorn (via logerrit)
 android/source/res/layout/activity_main.xml |   10 ++
 android/source/res/values/dimens.xml|1 -
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 55936f6ad8fb73d8b78a843de378758cc31009ad
Author: Michael Weghorn 
AuthorDate: Wed Nov 22 09:42:16 2023 +0100
Commit: Michael Weghorn 
CommitDate: Wed Nov 22 15:37:30 2023 +0100

android: Set autofill hints in Calc toolbar

Set autofill hints for the address and formula
text edits in the Android Viewer Calc toolbar as
described at [1] to address warnings that Android
Studio shows about these not being specified.

[1] https://developer.android.com/reference/androidx/autofill/HintConstants

Change-Id: I1ac7a5babddf3c328145b9f2194d10bb701aa4f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159810
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/activity_main.xml 
b/android/source/res/layout/activity_main.xml
index c03f0c93aea9..cb43a43a3e1e 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -46,7 +46,8 @@
 android:layout_weight="0"
 android:inputType="textNoSuggestions"
 android:imeOptions="actionDone|actionGo"
-android:visibility="gone"/>
+android:visibility="gone"
+android:importantForAutofill="no" />
 
 
+android:visibility="gone"
+android:importantForAutofill="no" />
 
 
 
commit abed55b1ea7f04a0a522d54e369d170a71045cd5
Author: Michael Weghorn 
AuthorDate: Wed Nov 22 09:27:45 2023 +0100
Commit: Michael Weghorn 
CommitDate: Wed Nov 22 15:37:18 2023 +0100

tdf#158307 android a11y: Auto-detect toolbar height

Instead of hard-coding a toolbar height for the
cell address and formula bar in Calc, use
`android:layout_height="wrap_content"`, so the height
is determined based on the font size.
This avoids the text getting cut off when a large
font size has been selected in Android's accessibility
settings.

Change-Id: I9bfbe2b7a1db39ac11d9ed0ab15290f974782489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159809
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/layout/activity_main.xml 
b/android/source/res/layout/activity_main.xml
index bd444f9fe79f..c03f0c93aea9 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -42,7 +42,7 @@
 256dp
 48dp
 24dp
-40dp
 96dp
 -11dp
 -7dp


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

2023-11-09 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |   15 
--
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |2 -
 2 files changed, 17 deletions(-)

New commits:
commit f324220e8772799ecf2b21cb6084757c0e56953f
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:13:22 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 13:18:17 2023 +0100

android: Drop Robocop comment

Robocop is a tool for UI-testing fore Firefox on Android [1],
but not used for LibreOffice Viewer, so drop the misleading
comment.

[1] https://wiki.mozilla.org/Auto-tools/Projects/Robocop

Change-Id: I270735b2258f18691f60865c683856d58a94bb04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159199
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 7c2dda766d0a..2e1a897b62e7 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -35,8 +35,6 @@ import org.mozilla.gecko.OnSlideSwipeListener;
  *
  * This view delegates to LayerRenderer to actually do the drawing. Its role 
is largely that of a
  * mediator between the LayerRenderer and the LayerController.
- *
- * Note that LayerView is accessed by Robocop via reflection.
  */
 public class LayerView extends FrameLayout {
 private static String LOGTAG = LayerView.class.getName();
commit aef1b023d5ccd3cf532f98f921734b22e4a027ed
Author: Michael Weghorn 
AuthorDate: Thu Nov 9 08:09:47 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 13:18:11 2023 +0100

android: Drop never-assigned to LayerRenderer#mPixelBuffer

That member was never assigned a value but only read
from by code claiming to be "used by robocop for testing purposes".

[1] describes Robocop as a UI-level testing framework for Firefox
for Android, which we don't use, so drop the class member and
related test code.

[1] https://wiki.mozilla.org/Auto-tools/Projects/Robocop

Change-Id: I467296874d4295060cc9670d1f1c8b0dfeb77523
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159198
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 6f013612384e..6ea7dd0edc10 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -51,9 +51,6 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
 
 private CopyOnWriteArrayList mExtraLayers = new 
CopyOnWriteArrayList();
 
-/* Used by robocop for testing purposes */
-private IntBuffer mPixelBuffer;
-
 // Used by GLES 2.0
 private int mProgram;
 private int mPositionHandle;
@@ -451,18 +448,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 // If a layer update requires further work, schedule another redraw
 if (!mUpdated)
 mView.requestRender();
-
-/* Used by robocop for testing purposes */
-IntBuffer pixelBuffer = mPixelBuffer;
-if (mUpdated && pixelBuffer != null) {
-synchronized (pixelBuffer) {
-pixelBuffer.position(0);
-GLES20.glReadPixels(0, 0, 
(int)mScreenContext.viewport.width(),
-(int)mScreenContext.viewport.height(), 
GLES20.GL_RGBA,
-GLES20.GL_UNSIGNED_BYTE, pixelBuffer);
-pixelBuffer.notify();
-}
-}
 }
 }
 }


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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java   |   
13 --
 android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java |
4 +--
 2 files changed, 3 insertions(+), 14 deletions(-)

New commits:
commit f4358578251e35f92115ece0998c132ca3b402de
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:56:34 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:53 2023 +0100

android: Drop unused GLController#checkForLostContext

Change-Id: Ia9f313a1937d4d491b76e9e5d6e4689eeb20431b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159183
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index d31d84a51da9..45600e9f1e7c 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -99,17 +99,6 @@ public class GLController {
 return mEGL.eglSwapBuffers(mEGLDisplay, mEGLSurface);
 }
 
-public boolean checkForLostContext() {
-if (mEGL.eglGetError() != EGL11.EGL_CONTEXT_LOST) {
-return false;
-}
-
-mEGLDisplay = null;
-mEGLConfig = null;
-mEGLContext = null;
-mEGLSurface = null;
-return true;
-}
 public synchronized int getWidth() {
 return mWidth;
 }
commit 46c0c489904b2037a3ce381be95998fd7f6cdefb
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:40:57 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:44 2023 +0100

android: Cast to GL10 in getter, not callers

Better have a clear method signature than callers
relying on implementation details.

Change-Id: I4532f67aee8f8eac723401e43d3b6856ba37b346
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159182
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 57ec2589b857..d31d84a51da9 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -84,7 +84,7 @@ public class GLController {
 }
 }
 
-public GL getGL()   { return mEGLContext.getGL(); }
+public GL10 getGL() { return (GL10) mEGLContext.getGL(); }
 public EGLDisplay getEGLDisplay()   { return mEGLDisplay; }
 public EGLConfig getEGLConfig() { return mEGLConfig;  }
 public EGLContext getEGLContext()   { return mEGLContext; }
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java 
b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
index a5b2ed79cbd3..5c74d56a004b 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
@@ -110,7 +110,7 @@ public class RenderControllerThread extends Thread 
implements LayerView.Listener
 }
 GLSurfaceView.Renderer renderer = getRenderer();
 if (renderer != null) {
-renderer.onDrawFrame((GL10) controller.getGL());
+renderer.onDrawFrame(controller.getGL());
 }
 controller.swapBuffers();
 }
@@ -118,7 +118,7 @@ public class RenderControllerThread extends Thread 
implements LayerView.Listener
 private void doSizeChanged() {
 GLSurfaceView.Renderer renderer = getRenderer();
 if (renderer != null) {
-renderer.onSurfaceChanged((GL10) controller.getGL(), width, 
height);
+renderer.onSurfaceChanged(controller.getGL(), width, height);
 }
 }
 


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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java  |   18 
+++---
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |9 ++---
 2 files changed, 10 insertions(+), 17 deletions(-)

New commits:
commit b6e5a8d60b8c63983000b41711941dc1c5b38102
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:37:06 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:32 2023 +0100

android: Use local var instead of 'mGL' member

It's never used except where it's also previously
assigned, so use a local variable instead.

Even the getter `GLController#getGL` gets
it from the EGLContext instead of using the
member.

Change-Id: Icec909f6e3e508a16fb455e81474bb336dc09362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159181
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 2c503ab8b302..57ec2589b857 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -28,8 +28,6 @@ public class GLController {
 private EGLContext mEGLContext;
 private EGLSurface mEGLSurface;
 
-private GL mGL;
-
 private static final int LOCAL_EGL_OPENGL_ES2_BIT = 4;
 
 private static final int[] CONFIG_SPEC = {
@@ -82,7 +80,6 @@ public class GLController {
 getEGLError());
 }
 
-mGL = null;
 mEGLContext = null;
 }
 }
@@ -111,7 +108,6 @@ public class GLController {
 mEGLConfig = null;
 mEGLContext = null;
 mEGLSurface = null;
-mGL = null;
 return true;
 }
 public synchronized int getWidth() {
@@ -159,11 +155,10 @@ public class GLController {
 getEGLError());
 }
 
-mGL = mEGLContext.getGL();
-
 if (mView.getRenderer() != null) {
-mView.getRenderer().onSurfaceCreated((GL10)mGL, mEGLConfig);
-mView.getRenderer().onSurfaceChanged((GL10)mGL, mWidth, mHeight);
+GL10 gl = (GL10) mEGLContext.getGL();
+mView.getRenderer().onSurfaceCreated(gl, mEGLConfig);
+mView.getRenderer().onSurfaceChanged(gl, mWidth, mHeight);
 }
 }
 
@@ -208,11 +203,10 @@ public class GLController {
 "surface! " + getEGLError());
 }
 
-mGL = mEGLContext.getGL();
-
 if (mView.getRenderer() != null) {
-mView.getRenderer().onSurfaceCreated((GL10)mGL, mEGLConfig);
-mView.getRenderer().onSurfaceChanged((GL10)mGL, mView.getWidth(), 
mView.getHeight());
+GL10 gl = (GL10) mEGLContext.getGL();
+mView.getRenderer().onSurfaceCreated(gl, mEGLConfig);
+mView.getRenderer().onSurfaceChanged(gl, mView.getWidth(), 
mView.getHeight());
 }
 }
 
commit e4a56c1996aeba2b7a8b022833198f2a6086eb17
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:24:38 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:18 2023 +0100

android: Use local var instead of class member

It's only used in this one place.

Change-Id: Ia11ebc2ea60c4015698ac00bbec6711a20c0a22e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159168
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 875b3fddd756..792cb0422eb2 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -48,7 +48,6 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
 private FloatBuffer mCoordBuffer;
 private RenderContext mLastPageContext;
 private int mMaxTextureSize;
-private int mBackgroundColor;
 
 private CopyOnWriteArrayList mExtraLayers = new 
CopyOnWriteArrayList();
 
@@ -384,14 +383,14 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 GLES20.glDisable(GLES20.GL_SCISSOR_TEST);
 
 /* Update background color. */
-mBackgroundColor = Color.WHITE;
+final int backgroundColor = Color.WHITE;
 
 /* Clear to the page background colour. The bits set here need to
  * match up with those used in 
gfx/layers/opengl/LayerManagerOGL.cpp.
  */
-GLES20.glClearColor(((mBackgroundColor>>16)&0xFF) / 255.0f,
-((mBackgroundColor>>8)&0xFF) / 255.0f,
-(mBackgroundColor&0xFF) / 255.0f,
+GLES20.glClearColor(((backgroundColor >> 16) & 0xFF) / 255.0f,
+((backgroundColor >> 

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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |   43 
--
 1 file changed, 43 deletions(-)

New commits:
commit 3cedd0780e590cdfab9f2b7657187bea1627
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:20:13 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:09 2023 +0100

android: Drop unused LayerRenderer#Frame#getMaskForLayer

Unused since

commit 96a498b44c0a0ca48ac9938d9414191850d47d18
Date:   Fri Dec 19 16:24:02 2014 +0900

android: remove screenshot layer

Change-Id: I3b83596bb854cb4bdfc6281ca487c8be15bc61d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 26fbfc79a895..875b3fddd756 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -380,45 +380,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 mUpdated &= layer.update(mPageContext); // called on 
compositor thread
 }
 
-/** Retrieves the bounds for the layer, rounded in such a way that it
- * can be used as a mask for something that will render underneath it.
- * This will round the bounds inwards, but stretch the mask towards any
- * near page edge, where near is considered to be 'within 2 pixels'.
- * Returns null if the given layer is null.
- */
-private Rect getMaskForLayer(Layer layer) {
-if (layer == null) {
-return null;
-}
-
-RectF bounds = RectUtils.contract(layer.getBounds(mPageContext), 
1.0f, 1.0f);
-Rect mask = RectUtils.roundIn(bounds);
-
-// If the mask is within two pixels of any page edge, stretch it 
over
-// that edge. This is to avoid drawing thin slivers when masking
-// layers.
-if (mask.top <= 2) {
-mask.top = -1;
-}
-if (mask.left <= 2) {
-mask.left = -1;
-}
-
-// Because we're drawing relative to the page-rect, we only need to
-// take into account its width and height (and not its origin)
-int pageRight = mPageRect.width();
-int pageBottom = mPageRect.height();
-
-if (mask.right >= pageRight - 2) {
-mask.right = pageRight + 1;
-}
-if (mask.bottom >= pageBottom - 2) {
-mask.bottom = pageBottom + 1;
-}
-
-return mask;
-}
-
 public void drawBackground() {
 GLES20.glDisable(GLES20.GL_SCISSOR_TEST);
 
commit 61bfc27f0495ab0427453e6d6078c3abe4777f56
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:15:59 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:55:01 2023 +0100

android: Drop LayerRenderer#Frame#mFrameStartTime

The member is assigned a value that is never used, so just drop it.

Might have been more useful before

commit 8734422b0b85b54c3fccc2b678171ed174c2b8bd
Date:   Mon Feb 23 20:53:35 2015 +0900

android: remove DrawTimingQueue and PanningPerfAPI

Change-Id: Ieec958c0d5a75fc47af467c73b218d6150ceaab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159166
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index b9d27291f1b3..26fbfc79a895 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -304,8 +304,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 }
 
 public class Frame {
-// The timestamp recording the start of this frame.
-private long mFrameStartTime;
 // A fixed snapshot of the viewport metrics that this frame is using 
to render content.
 private ImmutableViewportMetrics mFrameMetrics;
 // A rendering context for page-positioned layers, and one for 
screen-positioned layers.
@@ -348,8 +346,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 }
 
 public void beginDrawing() {
-mFrameStartTime = SystemClock.uptimeMillis();
-
 TextureReaper.get().reap();
 TextureGenerator.get().fill();
 


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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |9 
-
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 120e76b45b3ded439f8be0e6dc4d1e306b231e30
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 17:11:49 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:53 2023 +0100

android: Inline LayerRenderer#createFrame

No need for an extra method just to call the ctor,
and which is only used once.

Change-Id: Ide909ad81c78dc822a721771ee068e0240750089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159165
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index d7c2e7506548..b9d27291f1b3 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -223,7 +223,7 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
  */
 @Override
 public void onDrawFrame(GL10 gl) {
-Frame frame = createFrame(mView.getLayerClient().getViewportMetrics());
+Frame frame = new Frame(mView.getLayerClient().getViewportMetrics());
 synchronized (mView.getLayerClient()) {
 frame.beginDrawing();
 frame.drawBackground();
@@ -267,10 +267,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 return shader;
 }
 
-public Frame createFrame(ImmutableViewportMetrics metrics) {
-return new Frame(metrics);
-}
-
 class FadeRunnable implements Runnable {
 private boolean mStarted;
 private long mRunAt;
commit 8b3f0a66b4bf40eedc8c8a601b625c050388a29b
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:45:46 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:44 2023 +0100

android: Add "@Override"

... to make clear that these are overriden methods from
the `GLSurfaceView.Renderer` interface.

Change-Id: I7ffc47ee8a7ca4b481f7d28c0a5084c89d9c7ae8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159164
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index b4834d081583..d7c2e7506548 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -146,6 +146,7 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 mVertScrollLayer.destroy();
 }
 
+@Override
 public void onSurfaceCreated(GL10 gl, EGLConfig config) {
 createDefaultProgram();
 activateDefaultProgram();
@@ -220,6 +221,7 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 /**
  * Called whenever a new frame is about to be drawn.
  */
+@Override
 public void onDrawFrame(GL10 gl) {
 Frame frame = createFrame(mView.getLayerClient().getViewportMetrics());
 synchronized (mView.getLayerClient()) {
@@ -249,6 +251,7 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
  mCoordBuffer);
 }
 
+@Override
 public void onSurfaceChanged(GL10 gl, final int width, final int height) {
 GLES20.glViewport(0, 0, width, height);
 }


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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |4 --
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |   15 
--
 2 files changed, 1 insertion(+), 18 deletions(-)

New commits:
commit ae61af836428c3ccb5606e2697ce8eab19ac9860
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:36:48 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:34 2023 +0100

android: Drop misleading comments wrt methods invoked via JNI

These methods are not invoked via JNI for LibreOffice Viewer.
It might have been true for Fennec/Gecko, but isn't here, so
drop the misleading comments.

Change-Id: Ib3187b129f076f42706b3097f9535a7cca7ad55f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159163
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index b1aea3616d6c..b4834d081583 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -348,7 +348,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 return pageRect;
 }
 
-/** This function is invoked via JNI; be careful when modifying 
signature. */
 public void beginDrawing() {
 mFrameStartTime = SystemClock.uptimeMillis();
 
@@ -425,7 +424,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 return mask;
 }
 
-/** This function is invoked via JNI; be careful when modifying 
signature. */
 public void drawBackground() {
 GLES20.glDisable(GLES20.GL_SCISSOR_TEST);
 
@@ -474,7 +472,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 rootLayer.draw(mPageContext);
 }
 
-/** This function is invoked via JNI; be careful when modifying 
signature. */
 public void drawForeground() {
 /* Draw any extra layers that were added (likely plugins) */
 if (mExtraLayers.size() > 0) {
@@ -498,7 +495,6 @@ public class LayerRenderer implements 
GLSurfaceView.Renderer {
 mHorizScrollLayer.draw(mPageContext);
 }
 
-/** This function is invoked via JNI; be careful when modifying 
signature. */
 public void endDrawing() {
 // If a layer update requires further work, schedule another redraw
 if (!mUpdated)
commit 30a981cc2061b374361bbf8862ec3889b06acf88
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:31:38 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:24 2023 +0100

android: Drop unused LayerView#registerCxxCompositor

The comment saying it's called via JNI is not true
for LibreOffice Viewer, is probably from Gecko/Fennec
days like the ones for previously dropped methods.

Now that the method is gone, `mContext` no longer
needs to be static, so make it non-static and drop
the corresponding TODO comment.

Change-Id: I32db3728234715bc29af1ad757c715003c70ca4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159162
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 5429d09cbb1d..7c2dda766d0a 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -53,8 +53,7 @@ public class LayerView extends FrameLayout {
 
 private Listener mListener;
 private OnInterceptTouchListener mTouchIntercepter;
-//TODO static because of registerCxxCompositor() function, should be fixed 
in the future
-private static LibreOfficeMainActivity mContext;
+private LibreOfficeMainActivity mContext;
 
 public LayerView(Context context, AttributeSet attrs) {
 super(context, attrs);
@@ -267,18 +266,6 @@ public class LayerView extends FrameLayout {
 return mSurfaceView.getHolder();
 }
 
-/** This function is invoked by Gecko (compositor thread) via JNI; be 
careful when modifying signature. */
-public static GLController registerCxxCompositor() {
-try {
-LayerView layerView = mContext.getLayerClient().getView();
-layerView.mListener.compositorCreated();
-return layerView.getGLController();
-} catch (Exception e) {
-Log.e(LOGTAG, "Error registering compositor!", e);
-return null;
-}
-}
-
 public interface Listener {
 void compositorCreated();
 void renderRequested();


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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java |   17 
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java|   21 
--
 2 files changed, 38 deletions(-)

New commits:
commit d088e3cfc582beeabb26257f689c7e4e83e7e731
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:27:48 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:16 2023 +0100

android: Drop unused LayerView#{g,s}etPaintState

... and the now also unused `mPaintState` member and
related constants.

Change-Id: Iefd40ca4a72d32807b136830833e88e250f8f38b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159161
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 955bcde316f9..5429d09cbb1d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -47,8 +47,6 @@ public class LayerView extends FrameLayout {
 private InputConnectionHandler mInputConnectionHandler;
 private LayerRenderer mRenderer;
 
-/* Must be a PAINT_xxx constant */
-private int mPaintState = PAINT_NONE;
 private boolean mFullScreen = false;
 
 private SurfaceView mSurfaceView;
@@ -58,12 +56,6 @@ public class LayerView extends FrameLayout {
 //TODO static because of registerCxxCompositor() function, should be fixed 
in the future
 private static LibreOfficeMainActivity mContext;
 
-/* Flags used to determine when to show the painted surface. The integer
- * order must correspond to the order in which these states occur. */
-public static final int PAINT_NONE = 0;
-public static final int PAINT_BEFORE_FIRST = 1;
-public static final int PAINT_AFTER_FIRST = 2;
-
 public LayerView(Context context, AttributeSet attrs) {
 super(context, attrs);
 mContext = (LibreOfficeMainActivity) context;
@@ -217,19 +209,6 @@ public class LayerView extends FrameLayout {
 return mRenderer;
 }
 
-/* paintState must be a PAINT_xxx constant. The state will only be changed
- * if paintState represents a state that occurs after the current state. */
-public void setPaintState(int paintState) {
-if (paintState > mPaintState) {
-Log.d(LOGTAG, "LayerView paint state set to " + paintState);
-mPaintState = paintState;
-}
-}
-
-public int getPaintState() {
-return mPaintState;
-}
-
 public LayerRenderer getRenderer() {
 return mRenderer;
 }
commit 0a5bf928d936443bf1ff84118a9790a9b334801c
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:19:48 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:08 2023 +0100

android: Drop unused GLController#waitForValidSurface

The method is unused, so drop it, and also the now never
read `mSurfaceValid` member.

Likely, the comment that the method is invoked via JNI
was never valid for LibreOffice Viewer, but is from Gecko/Fennec
days, similar to the case in the previous commit,

Change-Id I54dd33a2ce30ebdc375a7c1fefacca6e99d2f571
Author: Michael Weghorn 
Date:   Wed Nov 8 15:10:19 2023 +0100

android: Drop unused GLController#resumeCompositorIfValid etc.

Change-Id: I165d2c7ebf5b9ce940b608d738d9a10d5bef69ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159160
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 76af0e78fc4d..2c503ab8b302 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -20,7 +20,6 @@ public class GLController {
 
 private LayerView mView;
 private int mGLVersion;
-private boolean mSurfaceValid;
 private int mWidth, mHeight;
 
 private EGL10 mEGL;
@@ -45,7 +44,6 @@ public class GLController {
 public GLController(LayerView view) {
 mView = view;
 mGLVersion = 2;
-mSurfaceValid = false;
 }
 
 public void setGLVersion(int version) {
@@ -116,19 +114,6 @@ public class GLController {
 mGL = null;
 return true;
 }
-
-// Wait until we are allowed to use EGL functions on the Surface backing
-// this window. This function is invoked by JNI
-public synchronized void waitForValidSurface() {
-while (!mSurfaceValid) {
-try {
-wait();
-} catch (InterruptedException e) {
-throw new RuntimeException(e);
-}
-}
-}
-
 public synchronized int getWidth() {
 return mWidth;
 }
@@ -138,14 +123,12 @@ public class GLController {
 }
 
 

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

2023-11-08 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java   |   
27 --
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java  |
1 
 android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java |
5 -
 3 files changed, 33 deletions(-)

New commits:
commit 32423989263e17b8fdd1b8952180e025c50ed1bd
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 15:10:19 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:54:01 2023 +0100

android: Drop unused GLController#resumeCompositorIfValid etc.

The comment claiming that this function is invoked
by JNI was true when the method was added upstream
in Fennec/Gecko in commit [1]

commit ae9420729da323d02a3f2f02d5a4b3043a619007
Author: Kartikaya Gupta 
Date:   Fri Jul 13 10:19:46 2012 -0400

Bug 769269 - Update the graphics code to be able to deal with 
blowing away the layer controller, client, and view and creating them afresh. 
r=ajuma

, but it's not true for the copy here in
Android Viewer, so drop the unused method
and `RenderControllerThread#compositionResumeRequested`
that would only have been called from there and wouldn't
have done anything anyway.

[1] 
https://github.com/mozilla/gecko-dev/commit/ae9420729da323d02a3f2f02d5a4b3043a619007

Change-Id: I54dd33a2ce30ebdc375a7c1fefacca6e99d2f571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159159
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 533980979683..76af0e78fc4d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -117,13 +117,6 @@ public class GLController {
 return true;
 }
 
-// This function is invoked by JNI
-public synchronized void resumeCompositorIfValid() {
-if (mSurfaceValid) {
-mView.getListener().compositionResumeRequested(mWidth, mHeight);
-}
-}
-
 // Wait until we are allowed to use EGL functions on the Surface backing
 // this window. This function is invoked by JNI
 public synchronized void waitForValidSurface() {
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index c3f639ddf7d1..955bcde316f9 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -304,7 +304,6 @@ public class LayerView extends FrameLayout {
 void compositorCreated();
 void renderRequested();
 void compositionPauseRequested();
-void compositionResumeRequested(int width, int height);
 void surfaceChanged(int width, int height);
 }
 
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java 
b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
index 06f82f158366..a5b2ed79cbd3 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
@@ -81,11 +81,6 @@ public class RenderControllerThread extends Thread 
implements LayerView.Listener
 queue.add(RenderCommand.SURFACE_DESTROYED);
 }
 
-@Override
-public void compositionResumeRequested(int width, int height) {
-
-}
-
 @Override
 public void surfaceChanged(int width, int height) {
 this.width = width;
commit 9032551306bfac623984bed0031cbd6b8bfe54fb
Author: Michael Weghorn 
AuthorDate: Wed Nov 8 14:11:54 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Nov 9 07:53:52 2023 +0100

android: Drop unused GLController#provideEGLSurface

It was already unused when added in

commit a6ecd8b2a9f0f3eaa66388861a6dcc6260ec72b9
Date:   Thu Jun 26 11:22:21 2014 +0200

LOAndroid3: ant/make for building, Bootstrap project

The method looks similar to the first half of
`GLController#provideEGLSurface` and is unused,
so drop  it.

Change-Id: I0cabfddefcdcca97048cb6f494590afdde5c1dc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159158
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index e296f4760f68..533980979683 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -240,26 +240,6 @@ public class GLController {
 }
 }
 
-/**
- * Provides an EGLSurface without assuming ownership of this surface.
- * This class does not keep 

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

2023-02-17 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |   71 ---
 1 file changed, 5 insertions(+), 66 deletions(-)

New commits:
commit 60e804f31cf2a9a3a36a4eb6551b7924253c479a
Author: Michael Weghorn 
AuthorDate: Fri Feb 17 08:59:13 2023 +0100
Commit: Michael Weghorn 
CommitDate: Fri Feb 17 12:06:41 2023 +

android: Drop unused TextureView

It's unused since

commit 3860bff1013f9608b934c4cdb9ddb8d2dbbc3e52
Date:   Fri Dec 19 16:25:23 2014 +0900

android: never use TextureView for now (for performance reasons)

Get align with latest Fennec code which also has this disabled.

Change-Id: Ie4c27935bacd29218207e47593f073bdce0cf7e3

Change-Id: I808ce73928120c10f4e3721a11b1e74bac3a413c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 9d3502528670..c3f639ddf7d1 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -11,14 +11,12 @@ import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.PixelFormat;
-import android.graphics.SurfaceTexture;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
-import android.view.TextureView;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
@@ -54,7 +52,6 @@ public class LayerView extends FrameLayout {
 private boolean mFullScreen = false;
 
 private SurfaceView mSurfaceView;
-private TextureView mTextureView;
 
 private Listener mListener;
 private OnInterceptTouchListener mTouchIntercepter;
@@ -67,41 +64,16 @@ public class LayerView extends FrameLayout {
 public static final int PAINT_BEFORE_FIRST = 1;
 public static final int PAINT_AFTER_FIRST = 2;
 
-boolean shouldUseTextureView() {
-// we can only use TextureView on ICS or higher
-/*if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
-Log.i(LOGTAG, "Not using TextureView: not on ICS+");
-return false;
-}
-
-try {
-// and then we can only use it if we have a hardware accelerated 
window
-Method m = View.class.getMethod("isHardwareAccelerated", new 
Class[0]);
-return (Boolean) m.invoke(this);
-} catch (Exception e) {
-Log.i(LOGTAG, "Not using TextureView: caught exception checking 
for hw accel: " + e.toString());
-return false;
-}*/
-return false;
-}
-
 public LayerView(Context context, AttributeSet attrs) {
 super(context, attrs);
 mContext = (LibreOfficeMainActivity) context;
 
-if (shouldUseTextureView()) {
-mTextureView = new TextureView(context);
-mTextureView.setSurfaceTextureListener(new 
SurfaceTextureListener());
+mSurfaceView = new SurfaceView(context);
+addView(mSurfaceView, ViewGroup.LayoutParams.MATCH_PARENT, 
ViewGroup.LayoutParams.MATCH_PARENT);
 
-addView(mTextureView, ViewGroup.LayoutParams.MATCH_PARENT, 
ViewGroup.LayoutParams.MATCH_PARENT);
-} else {
-mSurfaceView = new SurfaceView(context);
-addView(mSurfaceView, ViewGroup.LayoutParams.MATCH_PARENT, 
ViewGroup.LayoutParams.MATCH_PARENT);
-
-SurfaceHolder holder = mSurfaceView.getHolder();
-holder.addCallback(new SurfaceListener());
+SurfaceHolder holder = mSurfaceView.getHolder();
+holder.addCallback(new SurfaceListener());
 holder.setFormat(PixelFormat.RGB_565);
-}
 
 mGLController = new GLController(this);
 }
@@ -313,10 +285,7 @@ public class LayerView extends FrameLayout {
 }
 
 public Object getNativeWindow() {
-if (mSurfaceView != null)
-return mSurfaceView.getHolder();
-
-return mTextureView.getSurfaceTexture();
+return mSurfaceView.getHolder();
 }
 
 /** This function is invoked by Gecko (compositor thread) via JNI; be 
careful when modifying signature. */
@@ -364,29 +333,6 @@ public class LayerView extends FrameLayout {
 }
 }
 
-private class SurfaceTextureListener implements 
TextureView.SurfaceTextureListener {
-public void onSurfaceTextureAvailable(SurfaceTexture surface, int 
width, int height) {
-// We don't do this for surfaceCreated above because it is always 
followed by a surfaceChanged,
-// but that is not the case here.
-if (mRenderControllerThread != null) {
-  

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

2023-01-18 Thread Michael Weghorn (via logerrit)
 android/source/res/values-de/strings.xml  |1 
 android/source/res/values/strings.xml |1 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |2 -
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   14 
+-
 4 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f5e4a54f8c2d5b6ba570219322b08be6815ff31a
Author: Michael Weghorn 
AuthorDate: Wed Jan 18 12:20:34 2023 +0100
Commit: Michael Weghorn 
CommitDate: Wed Jan 18 13:03:54 2023 +

android: Hide UI to creat new files for SDK version < 19

Just like for the the case where editing is disabled
(s. Change-Id I2f8c86f5db96a5135ff8a66a7a7078b664d05a5e,
"android: Only offer creating docs when editing enabled"),
just hide the UI to create new files when running on devices
that don't support `Intent.ACTION_CREATE_DOCUMENT`, rather
than showing the button, but then showing a message that
creating files is not supported once the button is clicked.

Change-Id: Ifedf40e22dc8906557d5364ecf9ec3a9db2315e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145736
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/values-de/strings.xml 
b/android/source/res/values-de/strings.xml
index 41e8f6e2c7b1..30dd48ceb16e 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -156,7 +156,6 @@
 PDF-Export nicht möglich
 Speichern nicht möglich
 Ihr Gerät unterstützt Drucken 
nicht
-Erstellen neuer Dokumente 
auf diesem Gerät nicht verfügbar, benötigt Android-SDK-Version >= 19.
 Fehler
 Name für Abschnitt eingeben
 Bmp ist null!
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index 207be1c2c150..2cce872808e9 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -156,7 +156,6 @@
 Unable to export to pdf
 Unable to save file
 Your device does not support 
printing
-Creating new files not 
supported on this device, requires Android SDK version >= 19.
 Error
 Enter a part name
 Bmp is null!
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 05a0c2f8ef21..0539a920b307 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -180,9 +180,11 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 
 editFAB = findViewById(R.id.editFAB);
 editFAB.setOnClickListener(this);
-// allow creating new docs only when experimental editing is enabled
+// allow creating new docs only when experimental editing is enabled 
and
+// Intent.ACTION_CREATE_DOCUMENT (used in 'createNewFileDialog') is 
available (SDK version >= 19)
 SharedPreferences preferences = 
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
-boolean bAllowCreatingDocs = BuildConfig.ALLOW_EDITING && 
preferences.getBoolean(LibreOfficeMainActivity.ENABLE_EXPERIMENTAL_PREFS_KEY, 
false);
+final boolean bEditingEnabled = BuildConfig.ALLOW_EDITING && 
preferences.getBoolean(LibreOfficeMainActivity.ENABLE_EXPERIMENTAL_PREFS_KEY, 
false);
+final boolean bAllowCreatingDocs = bEditingEnabled && 
Build.VERSION.SDK_INT >= 19;
 editFAB.setVisibility(bAllowCreatingDocs ? View.VISIBLE : 
View.INVISIBLE);
 
 impressFAB = findViewById(R.id.newImpressFAB);
@@ -451,12 +453,6 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 public void onClick(View v) {
 int id = v.getId();
 if (id == R.id.editFAB) {
-// Intent.ACTION_CREATE_DOCUMENT, used in 'createNewFileDialog' 
requires SDK version 19
-if (Build.VERSION.SDK_INT < 19) {
-Toast.makeText(this,
-getString(R.string.creating_new_files_not_supported), 
Toast.LENGTH_SHORT).show();
-return;
-}
 if (isFabMenuOpen) {
 collapseFabMenu();
 } else {
commit 5e4bcb501f2cefaa495e59de7decbdf5a1f69d51
Author: Michael Weghorn 
AuthorDate: Wed Jan 18 12:10:43 2023 +0100
Commit: Michael Weghorn 
CommitDate: Wed Jan 18 13:03:46 2023 +

android: Only offer creating docs when editing enabled

Hide the UI to create new documents unless the
experimental editing mode is enabled. There is
little use in creating new empty documents when there
is no way to edit them...

Change-Id: I2f8c86f5db96a5135ff8a66a7a7078b664d05a5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

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

2023-01-17 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOKitThread.java |
8 +++--
 android/source/src/java/org/mozilla/gecko/ZoomConstraints.java   |   
14 
 android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java |   
16 ++
 3 files changed, 10 insertions(+), 28 deletions(-)

New commits:
commit 377a8c8ed7dd997d1ac96918b69f805880d208af
Author: Michael Weghorn 
AuthorDate: Tue Jan 17 08:40:41 2023 +0100
Commit: Michael Weghorn 
CommitDate: Tue Jan 17 11:08:27 2023 +

tdf#153058 android: Use "fit page" for min zoom level

So far, Android Viewer was using "fit page width"
as minimum zoom level, meaning that it was impossible
to zoom out to see the full page, e.g. when opening
a doc with page size A4 portrait and using
the device in landscape mode.

Change the minimum zoom level to take the page
height into account as well, i.e. adapt the minimum
zoom level to be "fit whole page" to allow doing that.

However, keep applying "fit page width" as
zoom level when double-tapping, by using
the "fit page width" zoom level as new
default zoom level and applying the default
instead of the minimum zoom level on
double-tap.
("Fit page width" is probably more desirable
than "fit whole page" at least when used on small
devices, at least in all cases where
writing is in horizontal direction, so the user
can see the current portion of text and scroll
down to continue reading/writing.)

Use on double-tap is currently the only use for the
default zoom level, the only previous occurence
was effectively unused since

commit 9ab43aebad67383057d2cc3f754ce2193fa78b4e
Date:   Wed Dec 4 17:18:20 2019 +0100

android: Allow zooming for Calc as well

and finally dropped with
Change-Id I702874f1d9161e5cef660bb4c4a0b7864d6e3c09
("android: Drop superfluous ZoomConstraints#mAllow{,DoubleTap}Zoom").

Change-Id: Ica5d8207bc19a81173143fcb5c3747dc89f9fa81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145658
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java 
b/android/source/src/java/org/libreoffice/LOKitThread.java
index 27568ace5599..fd40c3089102 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -184,9 +184,11 @@ class LOKitThread extends Thread {
 private void updateZoomConstraints() {
 if (mTileProvider == null) return;
 mLayerClient = mContext.getLayerClient();
-// Set min zoom to the page width so that you cannot zoom below page 
width
-final float minZoom = 
mLayerClient.getViewportMetrics().getWidth()/mTileProvider.getPageWidth();
-mLayerClient.setZoomConstraints(new ZoomConstraints(1f, minZoom, 0f));
+// Set default zoom to the page width and min zoom so that the whole 
page is visible
+final float pageHeightZoom = 
mLayerClient.getViewportMetrics().getHeight() / mTileProvider.getPageHeight();
+final float pageWidthZoom = 
mLayerClient.getViewportMetrics().getWidth() / mTileProvider.getPageWidth();
+final float minZoom = Math.min(pageWidthZoom, pageHeightZoom);
+mLayerClient.setZoomConstraints(new ZoomConstraints(pageWidthZoom, 
minZoom, 0f));
 }
 
 /**
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index ef3d28e8ebb3..f1973d980e32 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -983,7 +983,7 @@ class JavaPanZoomController
 PointF pointOfTap = getMotionInDocumentCoordinates(motionEvent);
 ImmutableViewportMetrics metrics = getMetrics();
 float newZoom = metrics.getZoomFactor() >=
-DOUBLE_TAP_THRESHOLD ? 
mTarget.getZoomConstraints().getMinZoom() : DOUBLE_TAP_THRESHOLD;
+DOUBLE_TAP_THRESHOLD ? 
mTarget.getZoomConstraints().getDefaultZoom() : DOUBLE_TAP_THRESHOLD;
 // calculate new top_left point from the point of tap
 float ratio = newZoom/metrics.getZoomFactor();
 float newLeft = pointOfTap.x - 1/ratio * (pointOfTap.x - 
metrics.getOrigin().x / metrics.getZoomFactor());
commit 7c399767053b1cc6f68beccfbbb084c2891fe05e
Author: Michael Weghorn 
AuthorDate: Tue Jan 17 08:31:54 2023 +0100
Commit: Michael Weghorn 
CommitDate: Tue Jan 17 11:08:21 2023 +

android: Drop superfluous ZoomConstraints#mAllow{,DoubleTap}Zoom

Both members are always set to true since

commit 9ab43aebad67383057d2cc3f754ce2193fa78b4e
Date:   Wed Dec 4 17:18:20 2019 +0100

android: Allow zooming for 

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

2023-01-06 Thread Michael Weghorn (via logerrit)
 android/source/gradle/wrapper/gradle-wrapper.jar|binary
 android/source/gradle/wrapper/gradle-wrapper.properties |4 
 android/source/gradlew  |  294 +---
 android/source/gradlew.bat  |   53 +-
 4 files changed, 210 insertions(+), 141 deletions(-)

New commits:
commit d6c54b3d4ee757958f9040a84dfbde0ab25f59bf
Author: Michael Weghorn 
AuthorDate: Thu Jan 5 21:00:58 2023 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 6 09:06:36 2023 +

android: Enable checksum verification for gradle download

Follow the F-Droid Bot suggestion in [1] and set the checksum
from [2] in gradle-wrapper.properties, so a downloaded gradle
distribution will be verified against that, s. doc at [3].

Command used from within the `android/source` directory:

./gradlew wrapper --distribution-type all 
--gradle-distribution-sha256-sum 
cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0

Note that this is the checksum for the gradle distribution,
not the gradle wrapper (which is mentioned in
Change-Id I3f466061aba55c5704fe251eee7e8c73f7d316aa instead.)

Also note that Android Studio does not fully support
the "distributionSha256Sum" attribute and requires
confirming in a message saying so that the checksum is correct
before syncing the project, s. [4].

[1] 
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12380#note_1229239229
[2] https://downloads.gradle-dn.com/distributions/gradle-7.4-all.zip.sha256
[3] 
https://docs.gradle.org/current/userguide/gradle_wrapper.html#configuring_checksum_verification
[4] https://issuetracker.google.com/issues/129261435#comment11

Change-Id: I39902be79e7dad2ad006262efe3b6c6ab3b5de5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145105
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties 
b/android/source/gradle/wrapper/gradle-wrapper.properties
index b1159fc54f39..dcf5e2cb7b3e 100644
--- a/android/source/gradle/wrapper/gradle-wrapper.properties
+++ b/android/source/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
+distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0
 distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
commit 4a0dc0d63a204f7ed03b48debd439e0e81f1dfac
Author: Michael Weghorn 
AuthorDate: Thu Jan 5 17:51:41 2023 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 6 09:06:28 2023 +

android: Update gradle wrapper to 7.4

Commit the result of running

./gradlew wrapper --distribution-type all --gradle-version 7.4

from within the `android/source` directory as described at [1].

Double-check that the sha256sum of the jar file matches what is listed on 
the
website [2] for v7.4:

$ sha256sum gradle/wrapper/gradle-wrapper.jar
575098db54a998ff1c6770b352c3b16766c09848bee7555dab09afc34e8cf590  
gradle/wrapper/gradle-wrapper.jar

(Interestingly, the sha256sum of the gradle-wrapper.jar
used so far, 
e2b82129ab64751fd40437007bd2f7f2afb3c6e41a9198e628650b22d5824a14,
is not the one of any listed versions there, which is what
the F-Droid bot marked as error in a MR to update LibreOffice Viewer [3]).

[1] 
https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
[2] https://gradle.org/release-checksums/
[3] 
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12380#note_1229239229

Change-Id: I3f466061aba55c5704fe251eee7e8c73f7d316aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145098
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/gradle/wrapper/gradle-wrapper.jar 
b/android/source/gradle/wrapper/gradle-wrapper.jar
index 8c0fb64a8698..41d9927a4d4f 100644
Binary files a/android/source/gradle/wrapper/gradle-wrapper.jar and 
b/android/source/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties 
b/android/source/gradle/wrapper/gradle-wrapper.properties
index e4ca53e04840..b1159fc54f39 100644
--- a/android/source/gradle/wrapper/gradle-wrapper.properties
+++ b/android/source/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Tue Mar 03 14:01:57 CET 2020
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/android/source/gradlew b/android/source/gradlew
index b7029853b09f..1b6c787337ff 100755
--- a/android/source/gradlew

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

2022-04-26 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOKitTileProvider.java |   22 
--
 1 file changed, 2 insertions(+), 20 deletions(-)

New commits:
commit e996ad71582ecd4425a1ab0d0347cccf7c7724c2
Author: Michael Weghorn 
AuthorDate: Tue Apr 26 16:38:35 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 27 05:51:18 2022 +0200

android: Reuse existing LOKitTileProvider#resetParts

... instead of duplicating what it does in
`LOKitTileProvider#postLoad`.

Change-Id: I0ed3d77d9f9651efec764eafeaa3f71576abcf6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133449
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index afce177f097e..fa22bc803c9a 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -120,25 +120,9 @@ class LOKitTileProvider implements TileProvider {
 private void postLoad() {
 mDocument.setMessageCallback(mMessageCallback);
 
-int parts = mDocument.getParts();
-Log.i(LOGTAG, "Document parts: " + parts);
-mContext.getDocumentPartView().clear();
-
+resetParts();
 // Writer documents always have one part, so hide the navigation 
drawer.
-if (mDocument.getDocumentType() != Document.DOCTYPE_TEXT) {
-for (int i = 0; i < parts; i++) {
-String partName = mDocument.getPartName(i);
-if (partName.isEmpty()) {
-partName = getGenericPartName(i);
-}
-Log.i(LOGTAG, "Document part " + i + " name:'" + partName + 
"'");
-
-mDocument.setPart(i);
-resetDocumentSize();
-final DocumentPartView partView = new DocumentPartView(i, 
partName);
-mContext.getDocumentPartView().add(partView);
-}
-} else {
+if (mDocument.getDocumentType() == Document.DOCTYPE_TEXT) {
 mContext.disableNavigationDrawer();
 mContext.getToolbarController().hideItem(R.id.action_parts);
 }
commit 1b45a30ccd4726612420bd09318eeae2a72425be
Author: Michael Weghorn 
AuthorDate: Tue Apr 26 16:21:37 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 27 05:51:04 2022 +0200

android: Leave part names starting with "Sheet" etc. intact

It's unexpected that opening a Calc sheet with two tables
called "Sheet foobar" and "Sheet 10" would result in the
sheets showing up as "Sheet 1" and "Sheet 2" in the parts
view instead of their real names.

Therefore, leave the original names intact and show
them instead of generating new generic names.

The change to rename such sheets (and similar parts)
has been added in

commit 1239dce2595877ad64fd8c8fd927ea4285d69abe
Date:   Thu Nov 1 22:03:31 2018 +0300

[Pardus] language improvements on Android

More hardcoded strings extrated to the resource file
Few Turkish language improvements
This patch is sponsored by ULAKBIM/Pardus project.

where the intention seems to have been to have a
localized name for the parts show up.
That still happens when the part name is empty
(s. lines above), but I think that explicit
names should remain as they are, as e.g. also
happens for Calc sheets in the desktop version of
LibreOffice.

Change-Id: I3073babf99a6b2309be2107141bba92236eba76d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133448
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 579162931d3a..afce177f097e 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -130,8 +130,6 @@ class LOKitTileProvider implements TileProvider {
 String partName = mDocument.getPartName(i);
 if (partName.isEmpty()) {
 partName = getGenericPartName(i);
-}else if (partName.startsWith("Slide") || 
partName.startsWith("Sheet") || partName.startsWith("Part")) {
-partName = getGenericPartName(i);
 }
 Log.i(LOGTAG, "Document part " + i + " name:'" + partName + 
"'");
 


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

2022-04-26 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java |   
13 ++
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 6df639114da3fa98bd2fd749eca40d3c2190c018
Author: Michael Weghorn 
AuthorDate: Tue Apr 26 08:27:21 2022 +0200
Commit: Michael Weghorn 
CommitDate: Tue Apr 26 14:06:14 2022 +0200

android: Use 'if' instead of switch-cases with just 1 case

... which IMHO makes this a bit more readable.

Change-Id: Ica1d9416f711e75e6d6c23963ca64d13e08c138e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133428
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index c096332b2bcc..697980af397d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -143,12 +143,9 @@ class JavaPanZoomController
 
 /** This function MUST be called on the UI thread */
 public boolean onMotionEvent(MotionEvent event) {
-switch (event.getSource() & InputDevice.SOURCE_CLASS_MASK) {
-case InputDevice.SOURCE_CLASS_POINTER:
-switch (event.getAction() & MotionEvent.ACTION_MASK) {
-case MotionEvent.ACTION_SCROLL: return handlePointerScroll(event);
-}
-break;
+if ((event.getSource() & InputDevice.SOURCE_CLASS_MASK) == 
InputDevice.SOURCE_CLASS_POINTER
+&& (event.getAction() & MotionEvent.ACTION_MASK) == 
MotionEvent.ACTION_SCROLL) {
+return handlePointerScroll(event);
 }
 return false;
 }
commit 052c8a4b1b3aaa472ca89f834572c293f7d9ead2
Author: Michael Weghorn 
AuthorDate: Tue Apr 26 08:22:00 2022 +0200
Commit: Michael Weghorn 
CommitDate: Tue Apr 26 14:06:00 2022 +0200

android: Drop redundant check for SDK version <= 11

minSdkVersion is 16.

Change-Id: I1082cc5abd7ecc02211509e57fd41c97cf706e8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133427
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index db2fcc03c5b3..c096332b2bcc 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -143,10 +143,6 @@ class JavaPanZoomController
 
 /** This function MUST be called on the UI thread */
 public boolean onMotionEvent(MotionEvent event) {
-if (Build.VERSION.SDK_INT <= 11) {
-return false;
-}
-
 switch (event.getSource() & InputDevice.SOURCE_CLASS_MASK) {
 case InputDevice.SOURCE_CLASS_POINTER:
 switch (event.getAction() & MotionEvent.ACTION_MASK) {


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

2022-04-19 Thread Michael Weghorn (via logerrit)
 android/source/AndroidManifest.xml |6 +++---
 android/source/build.gradle|4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 258fd217a35444ed245528ccbabdef62869c0419
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 12:04:11 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:18:49 2022 +0200

android: Remove redundant label attribute from activities

Android Studio was showing an info/warning in the "Problems"
pane that this label is redundant, so remove it.
(The app name is used by default if nothing else is specified
anyway.)

Change-Id: I799c681488b95e2fffe89b59e7de18febe654dcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133174
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 409a56cb84ef..0af368c8460b 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -25,7 +25,6 @@
 
 
@@ -102,7 +101,6 @@
 
 
 
 
 
commit 2ab389b251744fa7f3f6b060c09746e59d87f3b1
Author: Michael Weghorn 
AuthorDate: Tue Apr 19 10:33:27 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Apr 20 05:18:36 2022 +0200

android: Update compileSdkVersion/targetSdkVersion to 31

Google Play now requires that apps target API level 30 or higher, and
compileSdkVersion/targetSdkVersion 31 is also needed to update
the com.google.android.material dependency to >= 1.5.0 [1].

Explicitly set the `android:exported="true"` attribute for activities
which is required when targeting Android 12 or newer; quoting from
the list of behavior changes for apps targeting Android 12 [1]:

> Safer component exporting
>
> If your app targets Android 12 or higher and contains activities,
> services, or broadcast receivers that use intent filters, you must
> explicitly declare the android:exported attribute for these app
> components.  Warning: If an activity, service, or broadcast receiver
> uses intent filters and doesn't have an explicitly-declared value for
> android:exported, your app can't be installed on a device that runs
> Android 12 or higher.
>
> If the app component includes the LAUNCHER category, set
> android:exported to true. In most other cases, set android:exported
> to false.
>
> The following code snippet shows an example of a service that
> contains an intent filter whose android:exported attribute is set to
> false:
>
>   android:exported="false">
> 
> 
> 
> 

The app worked fine in a quick test on an x86_64 AVD with API level 31.

[1] 
https://github.com/material-components/material-components-android/releases/tag/1.5.0-alpha03

Change-Id: Ibb919e4edb995740e48ebc3338ffab6ca35c1373
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 43f790fca985..409a56cb84ef 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -27,7 +27,8 @@
 android:name=".LibreOfficeMainActivity"
 android:label="@string/app_name"
 
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize"
-android:windowSoftInputMode="adjustResize" >
+android:windowSoftInputMode="adjustResize"
+android:exported="true">
 
 
 
@@ -101,7 +102,8 @@
 
 
 
+android:label="@string/app_name"
+android:exported="true">
 
 
 
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 7dc93e778a7c..6b7391d5e389 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -32,7 +32,7 @@ dependencies {
 }
 
 android {
-compileSdkVersion 28
+compileSdkVersion 31
 compileOptions {
 // silence some java-language features hints
 sourceCompatibility 6
@@ -53,7 +53,7 @@ android {
 }
 defaultConfig {
 minSdkVersion 16
-targetSdkVersion 28
+targetSdkVersion 31
 vectorDrawables.useSupportLibrary = true
 }
 buildTypes {


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

2021-03-31 Thread Bartosz Kosiorek (via logerrit)
 android/source/res/values-de/strings.xml  |1 
 android/source/res/values-tr/strings.xml  |1 
 android/source/res/values/strings.xml |1 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   19 

 emfio/qa/cppunit/emf/EmfImportTest.cxx|   24 
+
 emfio/qa/cppunit/emf/data/TestFillRegion.emf  |binary
 emfio/source/reader/emfreader.cxx |   46 
+-
 7 files changed, 50 insertions(+), 42 deletions(-)

New commits:
commit 5d4d8278b7fd2a555d6c9678d37877853562bd85
Author: Bartosz Kosiorek 
AuthorDate: Wed Mar 31 17:50:59 2021 +0200
Commit: Bartosz Kosiorek 
CommitDate: Wed Mar 31 20:08:37 2021 +0200

tdf#55058 tdf#141394 EMF FILLRGN record is not displayed correctly

The EMR_FILLRGN record fills the specified region by using the specified 
brush.

After deep analyse of [EMF] documentation, it seems that
bounds from RegionDataHeader was treated as first rectangle of
region. As a result whole bounds was treated as the Region.

Change-Id: Ie34877b71292c05a1f17381a6de51aaed2386565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113423
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index f587135e1b1e..4213b373eebb 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -51,6 +51,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools, public unotest:
 void TestLinearGradient();
 void TestTextMapMode();
 void TestEnglishMapMode();
+void TestFillRegion();
 void TestCreatePen();
 void TestPdfInEmf();
 
@@ -69,6 +70,7 @@ public:
 CPPUNIT_TEST(TestLinearGradient);
 CPPUNIT_TEST(TestTextMapMode);
 CPPUNIT_TEST(TestEnglishMapMode);
+CPPUNIT_TEST(TestFillRegion);
 CPPUNIT_TEST(TestCreatePen);
 CPPUNIT_TEST(TestPdfInEmf);
 CPPUNIT_TEST_SUITE_END();
@@ -309,6 +311,28 @@ void Test::TestEnglishMapMode()
 
 }
 
+void Test::TestFillRegion()
+{
+// Check import of EMF image with records: CREATEBRUSHINDIRECT, FILLRGN. 
The SETICMMODE is also used.
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestFillRegion.emf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygon", 
"path", "m0 0h3943v3939h-3943z");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor", 1);
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor[1]/polypolygon",
+"path", "m1323 
0h1323v1322h1323v1322h-1323v1322h-1323v-1322h-1323v-1322h1323z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor[1]", "color", "#ff");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline", 1);
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]/polygon",
+   "1323,0 2646,0 2646,1322 3969,1322 3969,2644 2646,2644 
2646,3966 1323,3966 1323,2644 0,2644 0,1322 1323,1322");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#00");
+}
+
 void Test::TestCreatePen()
 {
 // Check import of EMF image with records: RESTOREDC, SAVEDC, MOVETOEX, 
LINETO, POLYLINE16, EXTTEXTOUTW with DxBuffer
diff --git a/emfio/qa/cppunit/emf/data/TestFillRegion.emf 
b/emfio/qa/cppunit/emf/data/TestFillRegion.emf
new file mode 100644
index ..da7d4cd65d1f
Binary files /dev/null and b/emfio/qa/cppunit/emf/data/TestFillRegion.emf differ
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index 451c998a7669..12b4fce29323 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -333,38 +333,42 @@ bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, 
SvStream& rStream, sal_uInt3
 if (nLen == 0)
 return false;
 
-sal_uInt32 nHdSize, nType, nCount, nRgnSize, i;
+sal_uInt32 nHdSize, nType, nCountRects, nRgnSize, i;
 rStream.ReadUInt32(nHdSize);
 rStream.ReadUInt32(nType);
-rStream.ReadUInt32(nCount);
+rStream.ReadUInt32(nCountRects);
 rStream.ReadUInt32(nRgnSize);
 
-if (!rStream.good() || nCount == 0 || nType != RDH_RECTANGLES)
+if (!rStream.good() || nCountRects == 0 || nType != RDH_RECTANGLES)
 return false;
 
 sal_uInt32 nSize;
-if (o3tl::checked_multiply(nCount, 16, nSize))
+if (o3tl::checked_multiply(nCountRects, 16, nSize))
 

[Libreoffice-commits] core.git: 2 commits - android/source configure.ac download.lst external/Module_external.mk external/owncloud-android-lib Makefile.fetch readlicense_oo/license RepositoryExternal.

2021-03-22 Thread Michael Weghorn (via logerrit)
 Makefile.fetch|1 
 RepositoryExternal.mk |   16 --
 android/source/res/values-de/strings.xml  |1 
 android/source/res/values/strings.xml |1 
 android/source/src/java/org/libreoffice/InvalidationHandler.java  |2 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |   60 
+-
 configure.ac  |3 
 download.lst  |2 
 external/Module_external.mk   |1 
 external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk |   23 
---
 external/owncloud-android-lib/Makefile|7 -
 external/owncloud-android-lib/Module_owncloud-android-lib.mk  |   19 
---
 external/owncloud-android-lib/README  |7 -
 external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk |   16 --
 external/owncloud-android-lib/build.gradle|   57 
-
 readlicense_oo/license/license.xml|   17 --
 16 files changed, 62 insertions(+), 171 deletions(-)

New commits:
commit 2df8b776e635efc5e59aaf6c8a5a7f4c218d74d0
Author: Michael Weghorn 
AuthorDate: Fri Mar 19 13:07:41 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Mar 22 07:56:13 2021 +0100

tdf#129833 android: Allow editing writable docs passed by Intent

When a document is passed by an Intent in Android
Viewer, allow editing if the Intent has flag
'Intent.FLAG_GRANT_WRITE_URI_PERMISSION' set.

Since LibreOffice operates on a temporary copy
in this case, write the content of the
temporary file back to the original URI
when saving.

This in particular allows editing documents
passed from third-party apps, e.g. opened from
Android's "Files" app or the NextCloud app.

The online-based Android app already does
something similar.

Change-Id: Icf252a95dd9a8089ca8610ccf3edfbeee2682e1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112767
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/values-de/strings.xml 
b/android/source/res/values-de/strings.xml
index ff58b14babc5..64eaa844a754 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -96,6 +96,7 @@
 Speichern beendet
 Dokument wird gespeichert…
 Speichern unvollständig. Gab es 
Änderungen?
+Speichern des Dokuments ist 
fehlgeschlagen.
 "Neue Datei angelegt - "
 Neue Datei konnte nicht angelegt 
weden, bitte Prüfen Sie den eingegeben Dateinamen.
 
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index aa32497862f6..a44d81ee5faf 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -95,6 +95,7 @@
 
 Save complete
 Saving the document…
+Saving the document failed.
 Save incomplete. Were there any 
changes?
 "Created new file - "
 Unable to create new file, please 
check entered file name.
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java 
b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index 32e9b56656dd..588fec9f5372 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -139,7 +139,7 @@ public class InvalidationHandler implements 
Document.MessageCallback, Office.Mes
 JSONObject payloadObject = new JSONObject(payload);
 if (payloadObject.getString("commandName").equals(".uno:Save")) {
 if (payloadObject.getString("success").equals("true")) {
-mContext.saveFilesToCloud();
+mContext.saveFileToOriginalSource();
 }
 }else 
if(payloadObject.getString("commandName").equals(".uno:Name") ||
 
payloadObject.getString("commandName").equals(".uno:RenamePage")){
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index b640fa404973..bf6108edc8af 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -46,9 +46,11 @@ import org.mozilla.gecko.gfx.GeckoLayerClient;
 import org.mozilla.gecko.gfx.LayerView;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.net.URI;
 import java.nio.ByteBuffer;
 import 

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

2020-01-21 Thread Michael Weghorn (via logerrit)
 android/source/res/values-de/strings.xml  |  244 
++
 android/source/res/values/arrays.xml  |4 
 android/source/res/xml/libreoffice_preferences.xml|2 
 android/source/src/java/org/libreoffice/LibreOfficeApplication.java   |2 
 android/source/src/java/org/libreoffice/LocaleHelper.java |   14 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |4 
 6 files changed, 260 insertions(+), 10 deletions(-)

New commits:
commit 5bf2ec9ed8728a2042e110122ea2b0e4ff55104a
Author: Michael Weghorn 
AuthorDate: Fri Dec 20 10:40:34 2019 +0100
Commit: Michael Weghorn 
CommitDate: Wed Jan 22 08:47:02 2020 +0100

android: Use system locale by default

Instead of hard-coding the use of English as default
locale and allowing manually selecting another language,
this now makes the system's default locale to be used
by default in the Android Viewer. It's still possible to
explicitly select another language to override that.

In case there is no localization for the system locale,
an automatic fallback to English happens anyway, so there
should be no need to explicitly set the locale to English
in that case either.

Change-Id: I0b8cfafea6a4659c3657522cfd5895c00f25f054
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85583
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/values/arrays.xml 
b/android/source/res/values/arrays.xml
index b1b61ef89b2f..edea6443b419 100644
--- a/android/source/res/values/arrays.xml
+++ b/android/source/res/values/arrays.xml
@@ -14,6 +14,7 @@
 3
 
 
+SYSTEM_DEFAULT_LANGUAGE
 de
 en
 tr
@@ -43,6 +44,7 @@
 @string/filter_drawings
 
 
+(System Default)
 Deutsch
 English
 Turkçe
diff --git a/android/source/res/xml/libreoffice_preferences.xml 
b/android/source/res/xml/libreoffice_preferences.xml
index cf1d306866cf..d02c9d5cccbc 100644
--- a/android/source/res/xml/libreoffice_preferences.xml
+++ b/android/source/res/xml/libreoffice_preferences.xml
@@ -30,7 +30,7 @@
 android:summary="@string/display_language_summary"
 android:entries="@array/SupportedLanguages"
 android:entryValues="@array/SupportedLanguagesValues"
-android:defaultValue="en"
+android:defaultValue="SYSTEM_DEFAULT_LANGUAGE"
 android:key="DISPLAY_LANGUAGE"
 />
 
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeApplication.java 
b/android/source/src/java/org/libreoffice/LibreOfficeApplication.java
index 07c14663860e..cb79219fc999 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeApplication.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeApplication.java
@@ -28,6 +28,6 @@ public class LibreOfficeApplication extends Application {
 
 @Override
 protected void attachBaseContext(Context base) {
-super.attachBaseContext(LocaleHelper.onAttach(base, "en"));
+super.attachBaseContext(LocaleHelper.onAttach(base));
 }
 }
diff --git a/android/source/src/java/org/libreoffice/LocaleHelper.java 
b/android/source/src/java/org/libreoffice/LocaleHelper.java
index 26a31e431397..8c0e9b3fbbed 100644
--- a/android/source/src/java/org/libreoffice/LocaleHelper.java
+++ b/android/source/src/java/org/libreoffice/LocaleHelper.java
@@ -12,17 +12,14 @@ import java.util.Locale;
 public class LocaleHelper {
 
 private static final String SELECTED_LANG = 
"org.libreoffice.selected.lang";
+// value for language that indicates that system's default language should 
be used
+public static final String SYSTEM_DEFAULT_LANGUAGE = 
"SYSTEM_DEFAULT_LANGUAGE";
 
 public static Context onAttach(Context context){
 String lang = getPersistedData(context, 
Locale.getDefault().getLanguage());
 return setLocale(context, lang);
 }
 
-public static Context onAttach(Context context, String defLang){
-String lang = getPersistedData(context, defLang);
-return setLocale(context, lang);
-}
-
 public static Context setLocale(Context context, String lang) {
 persist(context, lang);
 return updateResources(context, lang);
@@ -30,7 +27,12 @@ public class LocaleHelper {
 
 @SuppressWarnings("deprecation")
 private static Context updateResources(Context context, String lang) {
-Locale locale = new Locale(lang);
+Locale locale;
+if (lang.equals(SYSTEM_DEFAULT_LANGUAGE)) {
+locale = Locale.getDefault();
+} else {
+locale = new Locale(lang);
+}
 Locale.setDefault(locale);
 
 Resources res = context.getResources();
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 

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

2018-10-18 Thread Libreoffice Gerrit user
 android/source/res/values-tr/strings.xml  |  230 
++
 android/source/res/values/arrays.xml  |8 
 android/source/res/values/strings.xml |2 
 android/source/res/xml/libreoffice_preferences.xml|9 
 android/source/src/java/org/libreoffice/LibreOfficeApplication.java   |6 
 android/source/src/java/org/libreoffice/LocaleHelper.java |   56 ++
 android/source/src/java/org/libreoffice/SettingsActivity.java |3 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   13 
 8 files changed, 326 insertions(+), 1 deletion(-)

New commits:
commit 1ed42082589f529278cd35a01f23cc25846f7983
Author: Mert Tumer 
AuthorDate: Mon Oct 15 15:21:02 2018 +0300
Commit: Tomaž Vajngerl 
CommitDate: Thu Oct 18 12:32:49 2018 +0200

Added Turkish Language Support on Android Viewer

Change-Id: I0b2f1ca5386510e3a8217cf3bb3e08a940f438f7
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/61788
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/android/source/res/values-tr/strings.xml 
b/android/source/res/values-tr/strings.xml
new file mode 100644
index ..ce22a1e3050b
--- /dev/null
+++ b/android/source/res/values-tr/strings.xml
@@ -0,0 +1,230 @@
+
+
+
+LibreOffice Görüntüleyici
+LibreOffice Görüntüleyici 
Ayarları
+
+LibreOffice Görüntüleyici 
\'Beta\'
+Versiyon: %1$s\nBuild ID: %2$s
+LibreOffice Görüntüleyici LibreOffice 
tabanlı bir belge görüntüleyicisidir.
+https://www.libreoffice.org
+Bu sürüm $VENDOR tarafından 
derlenmiştir.
+Bu dosya salt okunabilir 
haldedir. Kaydetme devredışı.
+
+Lisansı Görüntüle
+Bildiriyi Görüntüle
+Daha Fazla Bilgi
+Çıkış için geri tuşuna tekrar 
basınız.
+
+Yeni Kelime İşlemci
+Yeni Sunum
+Yeni Hesap Tablosu
+Yeni Çizim
+başlıksız
+
+LibreOffice Tarayıcı
+Ara
+Liste
+Grid
+Şununla filtrele:
+Söz dizimi bulunamadı.
+Şununla sırala:
+Küçükten büyüğe
+Büyükten küçüğe
+A-Z
+Z-A
+Eskiden yeniye
+Yeniden eskiye
+Boyuta Göre Sırala
+Alfabetik Sırala
+Tarihe Göre Sırala
+Seçenekler
+fileicon
+Son açılan dosyalar
+Tüm dosyalar
+
+EXPLORER_VIEW_TYPE
+CURRENT_DIRECTORY
+Dosya Gezgini Ayarları
+Genel
+Deneysel Mod
+Deneysel editleme modunu 
etkinleştirin. Kullanım riski size aittir.
+Gizli Dosyalar ve Dizinler
+Gizli dosyalar ve dizinleri 
göstermeyi etkinleştir.
+Geliştirici Modu
+Geliştirici modunu 
etkinleştirerek UNO komutları gönderin. Kullanım riski size aittir.
+
+Hakkında
+Bölümler
+Ayarlar
+Aç
+Paylaş
+Şununla paylaş
+
+
+Hepsi
+Kelime İşlemci
+Hesap Tablosu
+Sunum
+Çizimler
+
+
+Belge dizinleri
+Belge dizinlerini kapat
+Belgeler
+Yerel dosya sistemi
+Harici SD
+OTG cihazı (deneysel)
+Uzak sunucu
+USB bağlantısı yapıldı, cihazınızın 
ayarlarını yapınız.
+
+ownCloud sunucusuna 
bağlanılamadı. Ayarlarınızı kontrol ediniz.
+ownCloud sunucusuna giriş yapılamadı. 
Ayarlarınızı kontrol ediniz.
+ownCloud sunucusuna bağlanırken 
belirtilmemiş bir hata oluştu. Lütfen daha sonra tekrar deneyiniz veya 
ayarlarınızı kontrol ediniz.
+
+Geçersiz dizin. SD kart 
ayarlarınızı kontrol ediniz.
+Geçersiz dizin. SD kartınızı 
veya SD kart ayarlarınızı kontrol ediniz.
+Geçersiz dizin. OTG cihazınızı veya OTG 
cihazı ayarlarınızı kontrol ediniz.
+
+
+Kalın
+Altı çizgili
+Yana yatık
+Üzeri çizgili
+Klaveyi göster
+Kaydet
+Biçimlendirmeyi etkinleştir.
+Ara
+UNO Komutu yolla
+
+
+Kaydetme tamamlandı.
+Belge kaydediliyor…
+Kayıt tamamlanmadı. Değişiklik 
yapıldı mı?
+"Yeni dosya yaratıldı - "
+Yeni dosya yaratma başarısız. Lütfen 
dosya ismini kontrol ediniz.
+
+
+Depolama sağlayıcısı 
ayarları
+ownCloud ayarları
+Fiziksel depolama 
ayarları
+Harici SD yolu
+OTG cihazı yolu
+Deneysel özellik: OTG cihazı yazılabilir ise 
kullanın
+Sunucu URL
+ownCloud sunucusu URL ve port
+Kullanıcı Adı
+Parola
+Geri Al
+Yinele
+
+
+Üst dizin
+Onayla
+İptal
+Git
+Dizin Seç
+Geçersiz dizin
+Şuan ki dizin: %1$s
+
+
+Değişiklikleri kaydetmek istiyor 
musunuz?
+Kaydet
+İptal
+Hayır
+
+
+Dosya ismi girin
+OLUŞTUR
+
+
+Slayt Gösterisi
+Slayt Ekle
+Cihazınız uygulama 
içi slayt gösterisini desteklemiyor. Sunumu panoya kopyaladık. Lütfen ev tuşuna 
basıp modern bir tarayıcı açıp arama çubuğuna yapıştırın ve sunumu 
görüntüleyin.
+Tamam
+Geri
+
+
+Ekle
+Sil
+Gizle
+Göster
+En iyi uzunluk
+Uzunluğu ayarla
+Yüksekliği ayarla
+Genişliği ayarla
+En iyi yükseklikt
+En iyi 

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

2017-05-30 Thread Christian Lohmaier
 android/source/AndroidManifest.xml 
   |2 ++
 android/source/build.gradle
   |8 
 
android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
 |4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit bffb5437b48327a0572d905c792bbcc5f1f25f9a
Author: Christian Lohmaier 
Date:   Tue May 30 18:30:29 2017 +0200

enable the Action/Toolbar for Settings screens

by using a theme that has it enabled

Change-Id: Icf3b66d38de55e2b08d4e4ced463bab045e56c43

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index 56fe63d62008..0b384a3becc2 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -95,6 +95,7 @@
 
 
 
 
@@ -109,6 +110,7 @@
 
 
 
 
 
diff --git 
a/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
 
b/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
index 7b2160a3f509..b842e79fafd6 100644
--- 
a/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
+++ 
b/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
@@ -14,7 +14,6 @@ import java.util.Set;
 import org.libreoffice.R;
 import org.libreoffice.storage.external.BrowserSelectorActivity;
 
-import android.app.Activity;
 import android.content.Intent;
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.os.Bundle;
@@ -22,8 +21,9 @@ import android.preference.Preference;
 import android.preference.PreferenceFragment;
 import android.preference.PreferenceManager;
 import android.preference.PreferenceScreen;
+import android.support.v7.app.AppCompatActivity;
 
-public class DocumentProviderSettingsActivity extends Activity {
+public class DocumentProviderSettingsActivity extends AppCompatActivity {
 
 public static final String KEY_PREF_OWNCLOUD_SERVER = "pref_server_url";
 public static final String KEY_PREF_OWNCLOUD_USER_NAME = "pref_user_name";
commit cb57abf33ffd2a76f67498b452f11d0f38e08054
Author: Christian Lohmaier 
Date:   Tue May 30 18:27:08 2017 +0200

android: bump build-tools, support-lib and gradle-plugin versions

Change-Id: Ib9fa2a3ca0ad4ba5075c9c25e5b2cba1e0e7285a

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 302d34a54754..92c6680f464a 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -5,7 +5,7 @@ buildscript {
 jcenter()
 }
 dependencies {
-classpath 'com.android.tools.build:gradle:2.3.0'
+classpath 'com.android.tools.build:gradle:2.3.2'
 }
 }
 
@@ -24,14 +24,14 @@ dependencies {
 ])
 compile files("${liboInstdir}/${liboShareJavaFolder}/unoil.jar")
 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:appcompat-v7:25.3.1'
+compile 'com.android.support:design:25.3.1'
 compile 'com.android.support.constraint:constraint-layout:1.0.2'
 }
 
 android {
 compileSdkVersion 25
-buildToolsVersion "25.0.1"
+buildToolsVersion "25.0.3"
 compileOptions {
 // silence some java-language features hints
 sourceCompatibility 6
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-28 Thread Christian Lohmaier
 Makefile.in |2 
-
 android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java |5 
--
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java|   20 
++
 3 files changed, 7 insertions(+), 20 deletions(-)

New commits:
commit 372f297de1ed0c3af0fa23dd6ea027035f850207
Author: Christian Lohmaier 
Date:   Sun May 28 14:25:54 2017 +0200

Makefile is generated in BUILDDIR, not SRCDIR (fix fetch for android)

Change-Id: Ieaa4cb0e8d3370154cd1a57d4afaf5bfa715cbc9

diff --git a/Makefile.in b/Makefile.in
index 6aa98cfe97ab..53cb88141121 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -277,7 +277,7 @@ help showmodules gbuildtojson:
 cross-toolset: bootstrap fetch
# fetch again in case there are externals only needed on build platform
 ifneq ($(OS),IOS)
-   $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile fetch
+   $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(BUILDDIR)/Makefile fetch
 endif
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f 
$(SRCDIR)/Makefile.gbuild build-tools
 
commit eac12b1fe5108bcd64be37e6011721f8566e2015
Author: Christian Lohmaier 
Date:   Wed Apr 5 21:42:46 2017 +0200

android: simplify some more if statements

Change-Id: I49f7069ca774468b4b9d44541238e38edd0f5bd7

diff --git 
a/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java 
b/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
index 101afe4b70ac..6b40ae4ba905 100644
--- a/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
+++ b/android/source/src/java/org/libreoffice/canvas/CommonCanvasElement.java
@@ -41,9 +41,6 @@ public abstract class CommonCanvasElement implements 
CanvasElement, CanvasElemen
  */
 @Override
 public boolean contains(float x, float y) {
-if (!isVisible()) {
-return false;
-}
-return onHitTest(x, y);
+return isVisible() && onHitTest(x, y);
 }
 }
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 41fafd46a3db..05f2118114c8 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -200,37 +200,27 @@ public class LayerView extends FrameLayout {
 
 @Override
 public boolean onKeyPreIme(int keyCode, KeyEvent event) {
-if (mInputConnectionHandler != null)
-return mInputConnectionHandler.onKeyPreIme(keyCode, event);
-return false;
+return mInputConnectionHandler != null && 
mInputConnectionHandler.onKeyPreIme(keyCode, event);
 }
 
 @Override
 public boolean onKeyDown(int keyCode, KeyEvent event) {
-if (mInputConnectionHandler != null)
-return mInputConnectionHandler.onKeyDown(keyCode, event);
-return false;
+return mInputConnectionHandler != null && 
mInputConnectionHandler.onKeyDown(keyCode, event);
 }
 
 @Override
 public boolean onKeyLongPress(int keyCode, KeyEvent event) {
-if (mInputConnectionHandler != null)
-return mInputConnectionHandler.onKeyLongPress(keyCode, event);
-return false;
+return mInputConnectionHandler != null && 
mInputConnectionHandler.onKeyLongPress(keyCode, event);
 }
 
 @Override
 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) 
{
-if (mInputConnectionHandler != null)
-return mInputConnectionHandler.onKeyMultiple(keyCode, repeatCount, 
event);
-return false;
+return mInputConnectionHandler != null && 
mInputConnectionHandler.onKeyMultiple(keyCode, repeatCount, event);
 }
 
 @Override
 public boolean onKeyUp(int keyCode, KeyEvent event) {
-if (mInputConnectionHandler != null)
-return mInputConnectionHandler.onKeyUp(keyCode, event);
-return false;
+return mInputConnectionHandler != null && 
mInputConnectionHandler.onKeyUp(keyCode, event);
 }
 
 public boolean isIMEEnabled() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-10 Thread Mirek Mazel
 android/source/res/drawable-hdpi/lo_icon.png  |binary
 android/source/res/drawable-hdpi/main.png |binary
 android/source/res/drawable-mdpi/lo_icon.png  |binary
 android/source/res/drawable-xhdpi/handle_image_end.png|binary
 android/source/res/drawable-xhdpi/handle_image_middle.png |binary
 android/source/res/drawable-xhdpi/handle_image_start.png  |binary
 dev/null  |binary
 7 files changed

New commits:
commit f7b60a3819e162b0bb3cc605d0945b89e9b4d1c5
Author: Mirek Mazel 
Date:   Thu Nov 10 12:09:23 2016 +0100

refresh app icons to flat/material style

Change-Id: I0c0a8a540eccc022c405659f53da73bd87eced18

diff --git a/android/source/res/drawable-hdpi/lo_icon.png 
b/android/source/res/drawable-hdpi/lo_icon.png
index 8c6b699..d03373b 100644
Binary files a/android/source/res/drawable-hdpi/lo_icon.png and 
b/android/source/res/drawable-hdpi/lo_icon.png differ
diff --git a/android/source/res/drawable-hdpi/main.png 
b/android/source/res/drawable-hdpi/main.png
index 7e8e2a0..99c826d 100644
Binary files a/android/source/res/drawable-hdpi/main.png and 
b/android/source/res/drawable-hdpi/main.png differ
diff --git a/android/source/res/drawable-ldpi/lo_icon.png 
b/android/source/res/drawable-ldpi/lo_icon.png
deleted file mode 100644
index 41a7114..000
Binary files a/android/source/res/drawable-ldpi/lo_icon.png and /dev/null differ
diff --git a/android/source/res/drawable-mdpi/lo_icon.png 
b/android/source/res/drawable-mdpi/lo_icon.png
index 569808e..48e90bd 100644
Binary files a/android/source/res/drawable-mdpi/lo_icon.png and 
b/android/source/res/drawable-mdpi/lo_icon.png differ
commit 4ae8c3c20bd4a10ba141a32f01e23ac63636f9c3
Author: Mirek Mazel 
Date:   Thu Nov 10 12:05:37 2016 +0100

use material style selection handles

Change-Id: If42bf5757e2010fccc7061ccffda76048b2e0dda

diff --git a/android/source/res/drawable-hdpi/handle_image_end.png 
b/android/source/res/drawable-hdpi/handle_image_end.png
deleted file mode 100644
index d5e2044..000
Binary files a/android/source/res/drawable-hdpi/handle_image_end.png and 
/dev/null differ
diff --git a/android/source/res/drawable-hdpi/handle_image_middle.png 
b/android/source/res/drawable-hdpi/handle_image_middle.png
deleted file mode 100644
index f5dab66..000
Binary files a/android/source/res/drawable-hdpi/handle_image_middle.png and 
/dev/null differ
diff --git a/android/source/res/drawable-hdpi/handle_image_start.png 
b/android/source/res/drawable-hdpi/handle_image_start.png
deleted file mode 100644
index b6a8ce7..000
Binary files a/android/source/res/drawable-hdpi/handle_image_start.png and 
/dev/null differ
diff --git a/android/source/res/drawable-xhdpi/handle_image_end.png 
b/android/source/res/drawable-xhdpi/handle_image_end.png
index 02e5173..b6e943b 100644
Binary files a/android/source/res/drawable-xhdpi/handle_image_end.png and 
b/android/source/res/drawable-xhdpi/handle_image_end.png differ
diff --git a/android/source/res/drawable-xhdpi/handle_image_middle.png 
b/android/source/res/drawable-xhdpi/handle_image_middle.png
index 15940a2..4d28b4a 100644
Binary files a/android/source/res/drawable-xhdpi/handle_image_middle.png and 
b/android/source/res/drawable-xhdpi/handle_image_middle.png differ
diff --git a/android/source/res/drawable-xhdpi/handle_image_start.png 
b/android/source/res/drawable-xhdpi/handle_image_start.png
index 9af7654..3bd7a4c 100644
Binary files a/android/source/res/drawable-xhdpi/handle_image_start.png and 
b/android/source/res/drawable-xhdpi/handle_image_start.png differ
diff --git a/android/source/res/drawable/handle_image_end.png 
b/android/source/res/drawable/handle_image_end.png
deleted file mode 100644
index 32b77df..000
Binary files a/android/source/res/drawable/handle_image_end.png and /dev/null 
differ
diff --git a/android/source/res/drawable/handle_image_middle.png 
b/android/source/res/drawable/handle_image_middle.png
deleted file mode 100644
index 751eb89..000
Binary files a/android/source/res/drawable/handle_image_middle.png and 
/dev/null differ
diff --git a/android/source/res/drawable/handle_image_start.png 
b/android/source/res/drawable/handle_image_start.png
deleted file mode 100644
index cf12a0d..000
Binary files a/android/source/res/drawable/handle_image_start.png and /dev/null 
differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-23 Thread Miklos Vajna
 dev/null |binary
 libreofficekit/source/gtk/lokdocview.cxx |6 +++---
 sw/source/core/view/viewsh.cxx   |9 +
 sw/source/uibase/docvw/SidebarWin.cxx|5 +++--
 4 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 30b511ae38e2870174db91d12f65a9c3320fc172
Author: Miklos Vajna 
Date:   Mon Nov 23 13:46:59 2015 +0100

sw lok comments: fix vertical scrollbar with custom zoom

With this, if a comment has enough content that it gets a vertical
scrollbar, then tiled rendering output looks OK, even with non-100%
zoom.

Change-Id: I699aadc11b6c34fb0791e70705719fd61169d972

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index bf919a9..c45fd29 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1881,6 +1881,15 @@ void SwViewShell::PaintTile(VirtualDevice , int 
contextWidth, int contex
 aMapMode.SetScaleY(scaleY);
 rDevice.SetMapMode(aMapMode);
 
+// Update scaling of SwEditWin and its sub-widgets, needed for comments.
+if (GetWin() && GetWin()->GetMapMode().GetScaleX() != scaleX)
+{
+double fScale = scaleX;
+SwViewOption aOption(*GetViewOptions());
+aOption.SetZoom(fScale * 100);
+ApplyViewOptions(aOption);
+}
+
 Rectangle aOutRect = Rectangle(Point(tilePosX, tilePosY),
rDevice.PixelToLogic(Size(contextWidth, 
contextHeight)));
 
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx 
b/sw/source/uibase/docvw/SidebarWin.cxx
index 394fcbe..0891a2a 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -283,8 +283,7 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& 
rRenderContext, const Rectangle
 continue;
 
 rRenderContext.Push(PushFlags::MAPMODE);
-const Fraction& 
rFraction(mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY());
-Point aOffset(PixelToLogic(pChild->GetPosPixel() * 
rFraction.GetDenominator() / rFraction.GetNumerator()));
+Point aOffset(PixelToLogic(pChild->GetPosPixel()));
 MapMode aMapMode(rRenderContext.GetMapMode());
 aMapMode.SetOrigin(aMapMode.GetOrigin() + aOffset);
 rRenderContext.SetMapMode(aMapMode);
@@ -298,6 +297,8 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& 
rRenderContext, const Rectangle
 pChild->EnableMapMode();
 aMapMode = pChild->GetMapMode();
 aMapMode.SetMapUnit(rRenderContext.GetMapMode().GetMapUnit());
+aMapMode.SetScaleX(rRenderContext.GetMapMode().GetScaleX());
+aMapMode.SetScaleY(rRenderContext.GetMapMode().GetScaleY());
 pChild->SetMapMode(aMapMode);
 }
 
commit 7ce0889ec9a87198560fa39afbae282938e0a9d9
Author: Miklos Vajna 
Date:   Mon Nov 23 10:18:15 2015 +0100

android: remove duplicated bitmaps

Change-Id: I5e16aa9da0aabe4302ebdd30b080b6bad4767006

diff --git a/android/source/res/drawable/handle_end.png 
b/android/source/res/drawable/handle_end.png
deleted file mode 100644
index 32b77df..000
Binary files a/android/source/res/drawable/handle_end.png and /dev/null differ
diff --git a/android/source/res/drawable/handle_middle.png 
b/android/source/res/drawable/handle_middle.png
deleted file mode 100644
index 751eb89..000
Binary files a/android/source/res/drawable/handle_middle.png and /dev/null 
differ
diff --git a/android/source/res/drawable/handle_start.png 
b/android/source/res/drawable/handle_start.png
deleted file mode 100644
index cf12a0d..000
Binary files a/android/source/res/drawable/handle_start.png and /dev/null differ
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 6e9fc19..eebf6bc 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1081,7 +1081,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 if (priv->m_bEdit && priv->m_bCursorVisible && 
!isEmptyRectangle(priv->m_aVisibleCursor) && 
priv->m_aTextSelectionRectangles.empty())
 {
 // Have a cursor, but no selection: we need the middle handle.
-gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", 
CURSOR_HANDLE_DIR, "handle_middle.png", NULL);
+gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", 
CURSOR_HANDLE_DIR, "handle_image_middle.png", NULL);
 if (!priv->m_pHandleMiddle)
 {
 priv->m_pHandleMiddle = 
cairo_image_surface_create_from_png(handleMiddlePath);
@@ -1109,7 +1109,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 if (!isEmptyRectangle(priv->m_aTextSelectionStart))
 {
 // Have a start position: we need a start handle.
-gchar* handleStartPath = g_strconcat (priv->m_aLOPath, "/../..", 
CURSOR_HANDLE_DIR, 

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

2015-11-01 Thread Tomaž Vajngerl
 android/source/res/drawable-hdpi/handle_alias_end.xml |
5 
 android/source/res/drawable-hdpi/handle_alias_middle.xml  |
5 
 android/source/res/drawable-hdpi/handle_alias_start.xml   |
5 
 android/source/res/drawable-hdpi/handle_image_end.png 
|binary
 android/source/res/drawable-hdpi/handle_image_middle.png  
|binary
 android/source/res/drawable-hdpi/handle_image_start.png   
|binary
 android/source/res/drawable-xhdpi/handle_image_end.png
|binary
 android/source/res/drawable-xhdpi/handle_image_middle.png 
|binary
 android/source/res/drawable-xhdpi/handle_image_start.png  
|binary
 android/source/res/drawable/handle_end_level.xml  |   
14 
 android/source/res/drawable/handle_image_end.png  
|binary
 android/source/res/drawable/handle_image_middle.png   
|binary
 android/source/res/drawable/handle_image_start.png
|binary
 android/source/res/drawable/handle_start_level.xml|   
14 
 android/source/res/values/colors.xml  |  
177 +-
 android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java|
2 
 android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java |
2 
 android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java  |
2 
 dev/null  
|binary
 19 files changed, 108 insertions(+), 118 deletions(-)

New commits:
commit 74463457b39c9def1add630b7b0581dc195549c8
Author: Tomaž Vajngerl 
Date:   Sun Nov 1 23:28:43 2015 +0100

android: chanhe handles to use alias, tint handles with color

Change-Id: I86ad5eefd70bc8b768780cac66ca466aa0926dc4

diff --git a/android/source/res/drawable-hdpi/handle_alias_end.xml 
b/android/source/res/drawable-hdpi/handle_alias_end.xml
new file mode 100644
index 000..8319861
--- /dev/null
+++ b/android/source/res/drawable-hdpi/handle_alias_end.xml
@@ -0,0 +1,5 @@
+
+
+http://schemas.android.com/apk/res/android;
+android:src="@drawable/handle_image_end"
+android:tint="@color/handle_color"/>
\ No newline at end of file
diff --git a/android/source/res/drawable-hdpi/handle_alias_middle.xml 
b/android/source/res/drawable-hdpi/handle_alias_middle.xml
new file mode 100644
index 000..a8587f6
--- /dev/null
+++ b/android/source/res/drawable-hdpi/handle_alias_middle.xml
@@ -0,0 +1,5 @@
+
+
+http://schemas.android.com/apk/res/android;
+android:src="@drawable/handle_image_middle"
+android:tint="@color/handle_color"/>
\ No newline at end of file
diff --git a/android/source/res/drawable-hdpi/handle_alias_start.xml 
b/android/source/res/drawable-hdpi/handle_alias_start.xml
new file mode 100644
index 000..df10470
--- /dev/null
+++ b/android/source/res/drawable-hdpi/handle_alias_start.xml
@@ -0,0 +1,5 @@
+
+
+http://schemas.android.com/apk/res/android;
+android:src="@drawable/handle_image_start"
+android:tint="@color/handle_color"/>
\ No newline at end of file
diff --git a/android/source/res/drawable-hdpi/handle_end.png 
b/android/source/res/drawable-hdpi/handle_image_end.png
similarity index 100%
rename from android/source/res/drawable-hdpi/handle_end.png
rename to android/source/res/drawable-hdpi/handle_image_end.png
diff --git a/android/source/res/drawable-hdpi/handle_middle.png 
b/android/source/res/drawable-hdpi/handle_image_middle.png
similarity index 100%
rename from android/source/res/drawable-hdpi/handle_middle.png
rename to android/source/res/drawable-hdpi/handle_image_middle.png
diff --git a/android/source/res/drawable-hdpi/handle_start.png 
b/android/source/res/drawable-hdpi/handle_image_start.png
similarity index 100%
rename from android/source/res/drawable-hdpi/handle_start.png
rename to android/source/res/drawable-hdpi/handle_image_start.png
diff --git a/android/source/res/drawable-xhdpi/handle_end.png 
b/android/source/res/drawable-xhdpi/handle_image_end.png
similarity index 100%
rename from android/source/res/drawable-xhdpi/handle_end.png
rename to android/source/res/drawable-xhdpi/handle_image_end.png
diff --git a/android/source/res/drawable-xhdpi/handle_middle.png 
b/android/source/res/drawable-xhdpi/handle_image_middle.png
similarity index 100%
rename from android/source/res/drawable-xhdpi/handle_middle.png
rename to android/source/res/drawable-xhdpi/handle_image_middle.png
diff --git a/android/source/res/drawable-xhdpi/handle_start.png 
b/android/source/res/drawable-xhdpi/handle_image_start.png
similarity index 100%
rename from android/source/res/drawable-xhdpi/handle_start.png
rename to android/source/res/drawable-xhdpi/handle_image_start.png
diff --git a/android/source/res/drawable/handle_end_level.xml 
b/android/source/res/drawable/handle_end_level.xml
deleted file 

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

2015-10-11 Thread Christian Lohmaier
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   13 
+++---
 solenv/bin/native-code.py |1 
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 888535f1c4e8617786c1cb6151aa5ef992b0c30f
Author: Christian Lohmaier 
Date:   Sun Oct 11 18:12:16 2015 +0200

tdf#90053 add svgio to Android Viewer, so display of svg works

the default Impress templates also make use of it, so not having it only
displays white background...

Change-Id: I34ffab7389fce60941fd926673a4999d40c50190

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 8bec1fe..819f1bb 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -275,6 +275,7 @@ calc_constructor_list = [
 
 draw_factory_list = [
 ("libsdlo.a", "sd_component_getFactory"),
+("libsvgiolo.a", "svgio_component_getFactory"),
 ("libsvgfilterlo.a", "svgfilter_component_getFactory"),
 ("libdeployment.a", "deployment_component_getFactory"),
 ("libemboleobj.a", "emboleobj_component_getFactory"),
commit b6430ed7fd4b6d3656f70f98ea1b089e049a3847
Author: Christian Lohmaier 
Date:   Sun Oct 11 18:10:20 2015 +0200

tdf#94891 fix crash when rotating screen in docbrowser right after launch

will likely also lose the current directory, but much better than
crashing.

Change-Id: I9ce20e1954a6f58325413046e258ded75b6c8848

diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 5290a50..29229e1 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -82,6 +82,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity 
implements ActionBa
 private IFile currentDirectory;
 
 private static final String CURRENT_DIRECTORY_KEY = "CURRENT_DIRECTORY";
+private static final String DOC_PROIVDER_KEY = "CURRENT_DOCUMENT_PROVIDER";
 private static final String FILTER_MODE_KEY = "FILTER_MODE";
 public static final String EXPLORER_VIEW_TYPE_KEY = "EXPLORER_VIEW_TYPE";
 public static final String EXPLORER_PREFS_KEY = "EXPLORER_PREFS";
@@ -610,8 +611,9 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements ActionBa
 // TODO Auto-generated method stub
 super.onSaveInstanceState(outState);
 outState.putString(CURRENT_DIRECTORY_KEY, 
currentDirectory.getUri().toString());
-outState.putInt(FILTER_MODE_KEY , filterMode);
+outState.putInt(FILTER_MODE_KEY, filterMode);
 outState.putInt(EXPLORER_VIEW_TYPE_KEY , viewMode);
+outState.putInt(DOC_PROIVDER_KEY, documentProvider.getId());
 
 Log.d(LOGTAG, currentDirectory.toString() + 
Integer.toString(filterMode) + Integer.toString(viewMode));
 //prefs.edit().putInt(EXPLORER_VIEW_TYPE, viewType).commit();
@@ -625,14 +627,19 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements ActionBa
 if (savedInstanceState.isEmpty()){
 return;
 }
+if (documentProvider == null) {
+Log.d(LOGTAG, "onRestoreInstanceState - documentProvider is null");
+documentProvider = DocumentProviderFactory.getInstance()
+.getProvider(savedInstanceState.getInt(DOC_PROIVDER_KEY));
+}
 try {
 currentDirectory = documentProvider.createFromUri(new URI(
 savedInstanceState.getString(CURRENT_DIRECTORY_KEY)));
 } catch (URISyntaxException e) {
 currentDirectory = documentProvider.getRootDirectory();
 }
-filterMode = savedInstanceState.getInt(FILTER_MODE_KEY , 
FileUtilities.ALL) ;
-viewMode = savedInstanceState.getInt(EXPLORER_VIEW_TYPE_KEY , 
GRID_VIEW);
+filterMode = savedInstanceState.getInt(FILTER_MODE_KEY, 
FileUtilities.ALL);
+viewMode = savedInstanceState.getInt(EXPLORER_VIEW_TYPE_KEY, 
GRID_VIEW);
 //openDirectory(currentDirectory);
 Log.d(LOGTAG, "onRestoreInstanceState");
 Log.d(LOGTAG, currentDirectory.toString() + 
Integer.toString(filterMode) + Integer.toString(viewMode));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - android/source bean/qa connectivity/qa dbaccess/qa jurt/com odk/examples qadevOOo/runner qadevOOo/testdocs qadevOOo/tests reportbuilder/java scripting/java

2015-06-15 Thread Noel Grandin
 android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java   
   |2 
 bean/qa/complex/bean/WriterFrame.java  
   |2 
 connectivity/qa/connectivity/tools/HsqlColumnDescriptor.java   
   |4 
 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
   |4 
 jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java
   |2 
 odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java 
   |   14 
 odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java
   |2 
 odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java  
   |2 
 qadevOOo/runner/lib/SimpleStatus.java  
   |   10 
 qadevOOo/runner/util/DBTools.java  
   |   32 +-
 qadevOOo/testdocs/backend/org/openoffice/JavaSystemBackend.java
   |6 
 qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java 
   |2 
 qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java 
   |2 
 qadevOOo/tests/java/ifc/reflection/_XIdlReflection.java
   |2 
 qadevOOo/tests/java/ifc/util/_XURLTransformer.java 
   |   26 -
 qadevOOo/tests/java/mod/_dbaccess/ORowSet.java 
   |2 
 qadevOOo/tests/java/mod/_dbaccess/OSingleSelectQueryComposer.java  
   |2 
 qadevOOo/tests/java/mod/_forms/GenericModelTest.java   
   |4 
 qadevOOo/tests/java/mod/_forms/ODatabaseForm.java  
   |2 
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java   
   |   33 --
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java   
   |   32 --
 qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java  
   |   32 --
 qadevOOo/tests/java/mod/_toolkit/AccessibleButton.java 
   |  153 +++--
 qadevOOo/tests/java/mod/_toolkit/AccessibleCheckBox.java   
   |  154 +++--
 qadevOOo/tests/java/mod/_toolkit/AccessibleComboBox.java   
   |  158 --
 
reportbuilder/java/org/libreoffice/report/pentaho/parser/draw/ObjectOleReadHandler.java
   |4 
 scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java  
   |2 
 scripting/java/com/sun/star/script/framework/provider/ScriptContext.java   
   |8 
 sfx2/JunitTest_sfx2_complex.mk 
   |1 
 sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java   
   |4 
 sfx2/qa/complex/sfx2/tools/DialogThread.java   
   |   79 -
 sfx2/qa/complex/sfx2/tools/WriterHelper.java   
   |  126 +--
 sw/qa/complex/accessibility/AccessibleRelationSet.java 
   |2 
 swext/mediawiki/src/com/sun/star/wiki/Helper.java  
   |   70 ++--
 toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java  
   |4 
 vcl/qa/complex/memCheck/TestDocument.java  
   |2 
 wizards/com/sun/star/wizards/db/DBMetaData.java
   |6 
 wizards/com/sun/star/wizards/document/FormHandler.java 
   |   18 -
 wizards/com/sun/star/wizards/form/FormDocument.java
   |4 
 wizards/com/sun/star/wizards/form/StyleApplier.java
   |8 
 wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java  
   |2 
 wizards/com/sun/star/wizards/table/ScenarioSelector.java   
   |4 
 wizards/com/sun/star/wizards/ui/ButtonList.java
   |2 
 wizards/com/sun/star/wizards/ui/FieldSelection.java
   |   16 -
 wizards/com/sun/star/wizards/ui/FilterComponent.java   
   |6 
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java 
   |2 
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java 
   |2 
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java
   |6 
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java   
   |   12