[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- android/source/gradle/wrapper/gradle-wrapper.properties |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 08ba31da63b58e92de05e96563146d3e909352e9 Author: Michael Weghorn AuthorDate: Fri Dec 1 12:45:37 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 1 20:34:02 2023 +0100 android: Update Android Gradle Plugin to 8.2.0 ... and gradle to 8.2, as suggested by Android Studio. Change-Id: I1a1df5f43b7a95d24308873b708d3d21b76aa7f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160200 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 3157dcf6ad6d..8843330b7ba5 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.4' +classpath 'com.android.tools.build:gradle:8.2.0' } } diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index b22661d9bfd2..ec719b3ea19d 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=f30b29580fe11719087d698da23f3b0f0d04031d8995f7dd8275a31f7674dc01 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionSha256Sum=5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
[Libreoffice-commits] core.git: android/source
android/source/res/values/colors.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 05f80d673a27bba2520fac07888db5082dd7f9bd Author: Andrea Gelmini AuthorDate: Fri Dec 1 12:10:29 2023 +0100 Commit: Julien Nabet CommitDate: Fri Dec 1 17:03:37 2023 +0100 Fix typo Change-Id: Ia40016ad2696c8555163074c415ea0e8f9216f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160207 Reviewed-by: Michael Weghorn Tested-by: Jenkins diff --git a/android/source/res/values/colors.xml b/android/source/res/values/colors.xml index 8f97b3e67130..4642a2b8f1c1 100644 --- a/android/source/res/values/colors.xml +++ b/android/source/res/values/colors.xml @@ -6,7 +6,7 @@ + but current minimum API level is lower. Overridden for dark theme in values-night/color.xml. --> @color/background_floating_material_light #FAFAFA
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |5 + 1 file changed, 5 insertions(+) New commits: commit 55097433ed766a2ced6b87021a71c8a31cde9d99 Author: Michael Weghorn AuthorDate: Fri Dec 1 10:17:02 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 1 11:54:42 2023 +0100 android: Shown warnings about deprecated API usage Configure the gradle build to show detailed warnings about the use of deprecated API, instead of just > Task :compileStrippedUIEditingDebugJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. With this in place, 78 specific warnings about the use of deprecated API are now shown in the build output, which can be addressed at some point. Change-Id: I9f3b484b6dfad1fc57895efa7d3426b625030ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160198 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 8fd3de9be2c3..3157dcf6ad6d 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -91,6 +91,11 @@ android { } } +// show warnings about use of deprecated API +tasks.withType(JavaCompile).configureEach { +options.deprecation = true +} + /* remark inherited from makefile: Then "assets". Let the directory structure under assets mimic that under solver for now.
[Libreoffice-commits] core.git: android/source
android/source/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 266a0e72e8382f0b72fa7b1127ce8712103aa562 Author: Michael Weghorn AuthorDate: Thu Nov 30 11:44:01 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 30 14:18:22 2023 +0100 android: Remove 'build' dir in 'clean' make target Add the build dir (`android/source/build`) to the directories to be removed when cleaning. Previously, this was't cleaned, which could be seen e.g. by the fact that a fresh build would result in this warning being shown > Task :compileStrippedUIEditingDebugJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. while a make android.clean make android after a full build wouldn't. Change-Id: I00a4f8b1fda9fbefb3b8f806b1997eceded117fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160145 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/Makefile b/android/source/Makefile index 1dc1b42d187b..d934994001d9 100644 --- a/android/source/Makefile +++ b/android/source/Makefile @@ -23,7 +23,7 @@ uninstall: $(ANDROID_SDK_DIR)/platform-tools/adb uninstall $(ANDROID_PACKAGE_NAME) clean: - rm -rf assets assets_fullUI assets_strippedUI jniLibs jniLibs_debug $(OBJLOCAL) + rm -rf assets assets_fullUI assets_strippedUI build jniLibs jniLibs_debug $(OBJLOCAL) rm -f native-code.cxx rm -f liboSettings.gradle
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 68ccc26f64632e0af66ff18d164aa39468ad3a2d Author: Michael Weghorn AuthorDate: Wed Nov 29 14:03:28 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 30 12:18:01 2023 +0100 android: Update com.google.android.material:material to 1.10.0 Depends on the previous commit Change-Id: I2778d8c181daa92530c769a168a9e186b6ea079c Author: Michael Weghorn Date: Wed Nov 29 13:33:33 2023 +0100 android: Update compileSdk/targetSdkVersion to 34 Change-Id: Ibdb7e002d599d42256290febc422cf86b2694d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160087 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index ea93633489c7..8fd3de9be2c3 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -32,7 +32,7 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.9.0' +implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.multidex:multidex:2.0.1" }
[Libreoffice-commits] core.git: android/source
android/source/res/layout/activity_document_browser.xml |2 +- android/source/res/layout/toolbar_bottom.xml| 12 ++-- android/source/res/layout/toolbar_color_picker.xml |2 +- android/source/res/menu/main.xml|8 4 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 59093ecb1cdf0ba8c946dfdbe0ec7ee0e89cd6f6 Author: Michael Weghorn AuthorDate: Tue Nov 28 14:54:49 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 30 12:16:51 2023 +0100 tdf#124480 android: Rename icons no longer using hard-coded color As already mentioned in Change-Id I2061878067d21dcd743ad6ca8d1018db323755d6 Author: Michael Weghorn Date: Tue Nov 28 14:22:54 2023 +0100 tdf#124480 android: Use themed color for more icons , do this: > Given the icons are no longer hard-coded to be black, > the files with a "_black" suffix will be renamed in > a follow-up commit. (Separate commit to keep the > diff clearer.) Change-Id: Ie2d3433934569dc97530a35d88bda01802af96b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160074 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/drawable/ic_add_black_24dp.xml b/android/source/res/drawable/ic_add_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_add_black_24dp.xml rename to android/source/res/drawable/ic_add_24dp.xml diff --git a/android/source/res/drawable/ic_arrow_back_black_24dp.xml b/android/source/res/drawable/ic_arrow_back_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_arrow_back_black_24dp.xml rename to android/source/res/drawable/ic_arrow_back_24dp.xml diff --git a/android/source/res/drawable/ic_content_copy_black_24dp.xml b/android/source/res/drawable/ic_content_copy_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_content_copy_black_24dp.xml rename to android/source/res/drawable/ic_content_copy_24dp.xml diff --git a/android/source/res/drawable/ic_content_cut_black_24dp.xml b/android/source/res/drawable/ic_content_cut_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_content_cut_black_24dp.xml rename to android/source/res/drawable/ic_content_cut_24dp.xml diff --git a/android/source/res/drawable/ic_content_paste_black_24dp.xml b/android/source/res/drawable/ic_content_paste_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_content_paste_black_24dp.xml rename to android/source/res/drawable/ic_content_paste_24dp.xml diff --git a/android/source/res/drawable/ic_filter_list_black_24dp.xml b/android/source/res/drawable/ic_filter_list_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_filter_list_black_24dp.xml rename to android/source/res/drawable/ic_filter_list_24dp.xml diff --git a/android/source/res/drawable/ic_folder_black_24dp.xml b/android/source/res/drawable/ic_folder_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_folder_black_24dp.xml rename to android/source/res/drawable/ic_folder_24dp.xml diff --git a/android/source/res/drawable/ic_format_clear_black_24dp.xml b/android/source/res/drawable/ic_format_clear_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_format_clear_black_24dp.xml rename to android/source/res/drawable/ic_format_clear_24dp.xml diff --git a/android/source/res/drawable/ic_grid_off_black_24dp.xml b/android/source/res/drawable/ic_grid_off_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_grid_off_black_24dp.xml rename to android/source/res/drawable/ic_grid_off_24dp.xml diff --git a/android/source/res/drawable/ic_grid_on_black_24dp.xml b/android/source/res/drawable/ic_grid_on_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_grid_on_black_24dp.xml rename to android/source/res/drawable/ic_grid_on_24dp.xml diff --git a/android/source/res/drawable/ic_settings_black_24dp.xml b/android/source/res/drawable/ic_settings_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_settings_black_24dp.xml rename to android/source/res/drawable/ic_settings_24dp.xml diff --git a/android/source/res/drawable/ic_sort_black_24dp.xml b/android/source/res/drawable/ic_sort_24dp.xml similarity index 100% rename from android/source/res/drawable/ic_sort_black_24dp.xml rename to android/source/res/drawable/ic_sort_24dp.xml diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml index b8c00cf973d0..5f03d4bc0c28 100644 --- a/android/source/res/layout/activity_document_browser.xml +++ b/android/source/res/layout/activity_document_browser.xml @@ -123,7 +123,7 @@ app:fabSize="normal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" -app:srcCompat="@drawa
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java | 21 ++ 1 file changed, 14 insertions(+), 7 deletions(-) New commits: commit d134615570bd7afb045f983cdd008c5662265504 Author: Michael Weghorn AuthorDate: Mon Nov 27 11:05:57 2023 +0100 Commit: Michael Weghorn CommitDate: Mon Nov 27 14:04:21 2023 +0100 tdf#158398 android: Draw light gray background for Calc headers Similar to the desktop version, use a light gray background color for the Calc header cells. There was already code in place to draw darker gray background to highlight the header cell when a cell in that row/column is selected. (The actually highlighted header cell didn't wasn't always the correct one in a quick test, but that's independent of this change.) Adapt that to always fill the rectangle, but use a lighter gray (lower alpha value) when not selected. Use a separate `Paint` object for the frame (stroke). Set the frame color and text color to black instead of gray, for better contrast to the light gray fill/background. Change-Id: I0490811e928ebd1b3840242fc1aa4682b2786b00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159989 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 eec0b5e4a88d..a285234bc8b0 100644 --- a/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java +++ b/android/source/src/java/org/libreoffice/canvas/CalcHeaderCell.java @@ -10,6 +10,8 @@ import android.text.TextPaint; public class CalcHeaderCell extends CommonCanvasElement { private final TextPaint mTextPaint = new TextPaint(); + +private final Paint mFramePaint = new Paint(); private final Paint mBgPaint = new Paint(); private final RectF mBounds; private final Rect mTextBounds = new Rect(); @@ -17,16 +19,20 @@ public class CalcHeaderCell extends CommonCanvasElement { public CalcHeaderCell(float left, float top, float width, float height, String text, boolean selected) { mBounds = new RectF(left, top, left + width, top + height); + +mFramePaint.setStyle(Style.STROKE); +mFramePaint.setColor(Color.BLACK); + +mBgPaint.setStyle(Style.FILL); +mBgPaint.setColor(Color.GRAY); +// draw background more intensely when cell is selected if (selected) { -// if the cell is selected, display filled -mBgPaint.setStyle(Style.FILL_AND_STROKE); +mBgPaint.setAlpha(100); } else { -// if not, display only the frame -mBgPaint.setStyle(Style.STROKE); +mBgPaint.setAlpha(25); } -mBgPaint.setColor(Color.GRAY); -mBgPaint.setAlpha(100); // hard coded for now -mTextPaint.setColor(Color.GRAY); + +mTextPaint.setColor(Color.BLACK); mTextPaint.setTextSize(24f); // hard coded for now mTextPaint.setTextAlign(Paint.Align.CENTER); mText = text; @@ -54,6 +60,7 @@ public class CalcHeaderCell extends CommonCanvasElement { @Override public void onDraw(Canvas canvas) { canvas.drawRect(mBounds, mBgPaint); +canvas.drawRect(mBounds, mFramePaint); canvas.drawText(mText, mBounds.centerX(), mBounds.centerY() - mTextBounds.centerY(), mTextPaint); } }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |4 android/source/src/java/org/libreoffice/ui/FileUtilities.java|5 + 2 files changed, 9 insertions(+) New commits: commit 872d26d4a859ff72e1e13068b798854185960de0 Author: Michael Weghorn AuthorDate: Sat Nov 25 22:09:34 2023 +0100 Commit: Michael Weghorn CommitDate: Sun Nov 26 18:07:37 2023 +0100 android: Suggest file name for PDF export When using the PDF export feature in Android Viewer, suggest a file name for the PDF file that matches the current display name (which is usually the file name, or "untitled" for a newly created doc that hasn't been saved yet). This can be achieved by setting `Intent.EXTRA_TITLE` for the `ACTION_CREATE_DOCUMENT`. [1] The `DocumentsContract.EXTRA_INITIAL_URI` already set previously already results in the same directory as the doc being preselected in the file chooser: > Callers can set a document URI through > DocumentsContract#EXTRA_INITIAL_URI to indicate the initial location of > documents navigator. System will do its best to launch the navigator in > the specified document if it's a folder, or the folder that contains the > specified document if not. Filling in the current file name was suggested in a Google Play review comment for the app. [1] https://developer.android.com/reference/android/content/Intent#ACTION_CREATE_DOCUMENT Change-Id: Idbd4a89416089f927e0232ce65161b43059ca46d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159959 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index b21ad02383d7..ba371bfd9c8a 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -350,7 +350,11 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType(FileUtilities.MIMETYPE_PDF); +// suggest directory and file name based on the doc intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, mDocumentUri); +final String displayName = toolbarTop.getTitle().toString(); +final String suggestedFileName = FileUtilities.stripExtensionFromFileName(displayName) + ".pdf"; +intent.putExtra(Intent.EXTRA_TITLE, suggestedFileName); startActivityForResult(intent, REQUEST_CODE_EXPORT_TO_PDF); } diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 902b30ed7794..7fc8c3c84eb1 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -124,6 +124,11 @@ public class FileUtilities { return mimeType != null && mimeType.endsWith("template"); } +public static String stripExtensionFromFileName(final String fileName) +{ +return fileName.split("\\.[A-Za-z0-9]*$")[0]; +} + /** * Tries to retrieve the display (which should be the document name) * for the given URI using the given resolver.
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 934a4937e32b4ccf4690b642ccf4787331f37b68 Author: Michael Weghorn AuthorDate: Thu Nov 23 11:35:03 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 23 13:20:56 2023 +0100 tdf#158331 android: Fix "Save As" for non-experimental mode While "Save" (i.e. saving back to the original location) doesn't make sense when editing is disabled (because the doc cannot be changed) and the menu entry is therefore not available when the experimental editing mode is disabled, "Save As" does make sense, e.g. in order to save a copy of a file opened from another app. The menu entry was there, but not working as expected, a 0-byte file was created. This is because `LibreOfficeMainActivity#saveFileToOriginalSource` would return early if experimental mode is disabled. No longer do that, but save the file as requested. Change-Id: I5785b6060c4ba9cdf3e9c3591b9f941ab987bf4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159857 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index 54418f5cbc8f..b21ad02383d7 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -416,7 +416,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin } public void saveFileToOriginalSource() { -if (isReadOnlyMode() || mTempFile == null || mDocumentUri == null || !mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) +if (mTempFile == null || mDocumentUri == null || !mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) return; boolean copyOK = false;
[Libreoffice-commits] core.git: android/source
android/source/res/drawable/calc.png|binary android/source/res/drawable/draw.png|binary android/source/res/drawable/impress.png |binary android/source/res/drawable/writer.png |binary 4 files changed New commits: commit 1750078e3ace30d3ad9798feb81239688b1ea869 Author: Michael Weghorn AuthorDate: Fri Nov 17 14:30:19 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Nov 17 16:39:05 2023 +0100 android: Update app-specific/MIME type icons Just as commit 2105f638fa178f49210116bd914889599930b62a Author: Michael Weghorn Date: Fri Nov 17 09:11:42 2023 +0100 android: Update app icon to new startcenter icon updated the main icon for the Android app, also update the MIME type icons that are shown in the "Recent files" section in LibreOfficeUIActivity to the new ones meant to be used for Calc/Draw/Impress/Writer since 7.5. Change-Id: I1d969a290caa3c23589e78151cd5bf70144c3099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159568 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/drawable/calc.png b/android/source/res/drawable/calc.png index 0c0d31444d11..240da6c8966d 100644 Binary files a/android/source/res/drawable/calc.png and b/android/source/res/drawable/calc.png differ diff --git a/android/source/res/drawable/draw.png b/android/source/res/drawable/draw.png index b3ee11426a04..8b8436789cc2 100644 Binary files a/android/source/res/drawable/draw.png and b/android/source/res/drawable/draw.png differ diff --git a/android/source/res/drawable/impress.png b/android/source/res/drawable/impress.png index 5909f05bf089..2de82d6bd42b 100644 Binary files a/android/source/res/drawable/impress.png and b/android/source/res/drawable/impress.png differ diff --git a/android/source/res/drawable/writer.png b/android/source/res/drawable/writer.png index 8a4e21e47174..6cc9e8483033 100644 Binary files a/android/source/res/drawable/writer.png and b/android/source/res/drawable/writer.png differ
[Libreoffice-commits] core.git: android/source
android/source/ic_launcher-web.png|binary android/source/res/mipmap-hdpi/ic_launcher.png|binary android/source/res/mipmap-mdpi/ic_launcher.png|binary android/source/res/mipmap-xhdpi/ic_launcher.png |binary android/source/res/mipmap-xxhdpi/ic_launcher.png |binary android/source/res/mipmap-xxxhdpi/ic_launcher.png |binary 6 files changed New commits: commit 2105f638fa178f49210116bd914889599930b62a Author: Michael Weghorn AuthorDate: Fri Nov 17 09:11:42 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Nov 17 12:36:28 2023 +0100 android: Update app icon to new startcenter icon Update the icon used for LibreOffice Viewer with the new icon used since LibreOffice 7.5 [1]. Use the startcenter icon from `sysui/desktop/icons/hicolor/` and export for the required resolutions where it doesn't exist yet. [1] https://wiki.documentfoundation.org/ReleaseNotes/7.5#Design Change-Id: Ie9f59d42bbc9375e7ca433c6452223b7ba3033a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159554 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/ic_launcher-web.png b/android/source/ic_launcher-web.png index e9dcfcacf844..82497c1ac299 100644 Binary files a/android/source/ic_launcher-web.png and b/android/source/ic_launcher-web.png differ diff --git a/android/source/res/mipmap-hdpi/ic_launcher.png b/android/source/res/mipmap-hdpi/ic_launcher.png index f8b74553e385..0765a1e0108e 100644 Binary files a/android/source/res/mipmap-hdpi/ic_launcher.png and b/android/source/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/source/res/mipmap-mdpi/ic_launcher.png b/android/source/res/mipmap-mdpi/ic_launcher.png index fa68d30f003a..dcc03ff1fb2c 100644 Binary files a/android/source/res/mipmap-mdpi/ic_launcher.png and b/android/source/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/source/res/mipmap-xhdpi/ic_launcher.png b/android/source/res/mipmap-xhdpi/ic_launcher.png index 12069c7e8ac5..d8fb1d912633 100644 Binary files a/android/source/res/mipmap-xhdpi/ic_launcher.png and b/android/source/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/source/res/mipmap-xxhdpi/ic_launcher.png b/android/source/res/mipmap-xxhdpi/ic_launcher.png index a00a40dbe1de..7b9a8029aa40 100644 Binary files a/android/source/res/mipmap-xxhdpi/ic_launcher.png and b/android/source/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/source/res/mipmap-xxxhdpi/ic_launcher.png b/android/source/res/mipmap-xxxhdpi/ic_launcher.png index ef7067cbd2a3..86d268ede8ef 100644 Binary files a/android/source/res/mipmap-xxxhdpi/ic_launcher.png and b/android/source/res/mipmap-xxxhdpi/ic_launcher.png differ
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/AboutDialogFragment.java |2 +- android/source/src/java/org/libreoffice/ToolbarController.java|2 +- android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |2 +- dev/null |binary 4 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 129c493adc3d572e2417e62bc96d7b2cfbe0d983 Author: Michael Weghorn AuthorDate: Fri Nov 17 09:04:09 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Nov 17 12:35:38 2023 +0100 android: Reuse launcher icon in activities Instead of duplicating the icon as drawable, just use the one from the mipmap folder that's used for the app launcher. Change-Id: Idd6691c4639fb570357280cec63636d07fe06b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159553 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/drawable-hdpi/lo_icon.png b/android/source/res/drawable-hdpi/lo_icon.png deleted file mode 100644 index d03373b9c2ee.. Binary files a/android/source/res/drawable-hdpi/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 deleted file mode 100644 index 48e90bd1fdc5.. Binary files a/android/source/res/drawable-mdpi/lo_icon.png and /dev/null differ diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java index 4abf9c14a35f..4ed351026778 100644 --- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java +++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java @@ -70,7 +70,7 @@ public class AboutDialogFragment extends DialogFragment { } AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); -builder .setIcon(R.drawable.lo_icon) +builder .setIcon(R.mipmap.ic_launcher) .setTitle(R.string.app_name) .setView(messageView) .setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() { diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java index 5d2f9823ad1f..603d2258167e 100644 --- a/android/source/src/java/org/libreoffice/ToolbarController.java +++ b/android/source/src/java/org/libreoffice/ToolbarController.java @@ -146,7 +146,7 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { @Override public void run() { mMainMenu.setGroupVisible(R.id.group_edit_actions, false); -mToolbarTop.setNavigationIcon(R.drawable.lo_icon); +mToolbarTop.setNavigationIcon(R.mipmap.ic_launcher); mToolbarTop.setLogo(null); setEditModeOn(false); mContext.hideBottomToolbar(); diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 0539a920b307..eba618095045 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -175,7 +175,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { -actionBar.setIcon(R.drawable.lo_icon); +actionBar.setIcon(R.mipmap.ic_launcher); } editFAB = findViewById(R.id.editFAB);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/LayerView.java | 10 -- 1 file changed, 10 deletions(-) New commits: commit c5c2d3195189a329516c918faa251cff4baaed5a Author: Michael Weghorn AuthorDate: Thu Nov 9 08:26:18 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 9 14:40:43 2023 +0100 android: Drop unused LayerView#mFullScreen ... and the getters and setters. Change-Id: I14e69e2543d92dc63954bc3faf5a7456d2343fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159200 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 2e1a897b62e7..29049f92912d 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java @@ -45,8 +45,6 @@ public class LayerView extends FrameLayout { private InputConnectionHandler mInputConnectionHandler; private LayerRenderer mRenderer; -private boolean mFullScreen = false; - private SurfaceView mSurfaceView; private Listener mListener; @@ -336,12 +334,4 @@ public class LayerView extends FrameLayout { super(e); } } - -public void setFullScreen(boolean fullScreen) { -mFullScreen = fullScreen; -} - -public boolean isFullScreen() { -return mFullScreen; -} }
[Libreoffice-commits] core.git: android/source
android/source/res/layout/activity_document_browser.xml |1 + android/source/res/layout/toolbar_bottom.xml|7 +-- android/source/res/values/strings.xml |3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) New commits: commit a21e7a76d745750dcea14bc6311e4f1766c3fa45 Author: Michael Weghorn AuthorDate: Thu Nov 9 10:24:13 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 9 12:59:28 2023 +0100 android a11y: Add content labels Add a few content labels, so screen readers can present these UI elements in a more meaningful way. Reported by Google Play CI: > This item may not have a label readable by screen readers. > Learn more [1] [1] https://support.google.com/accessibility/android/answer/7158690 Change-Id: Ic8e8885ed132367426207fad652e324ea4eb0790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159206 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml index 23ef44f4e5dc..c4dcf3f0c8c1 100644 --- a/android/source/res/layout/activity_document_browser.xml +++ b/android/source/res/layout/activity_document_browser.xml @@ -116,6 +116,7 @@ +android:src="@drawable/ic_search_direction_down" +android:contentDescription="@string/search_find_next" /> +android:src="@drawable/ic_search_direction_up" +android:contentDescription="@string/search_find_previous" /> +/> Show Notice More Info +Create New File New Text Document New Presentation New Spreadsheet @@ -26,6 +27,8 @@ LibreOffice Browser Search Keyword not found +Find Next +Find Previous Preferences fileicon Recent files
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java |3 --- 1 file changed, 3 deletions(-) New commits: commit 560cb9c53e7c6d6b8164cdd92e897d3c99b850d2 Author: Michael Weghorn AuthorDate: Wed Nov 8 18:11:56 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Nov 9 07:56:07 2023 +0100 android: Drop obsolete TODO comment This comment was originally for the code underneath, that has already been separated into a separate method in gecko-dev commit [1] commit 60ed20fee4095523ee498579c71fc17032d1004b Author: Patrick Walton Date: Mon Feb 13 12:27:09 2012 -0800 Split out Java compositor shader program activation and deactivation into separate functions , but the comment was left behind. [1] https://github.com/mozilla/gecko-dev/commit/60ed20fee4095523ee498579c71fc17032d1004b Change-Id: Ied0a4aaec4d8228665748b834026b54c8e9615bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159184 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 792cb0422eb2..6f013612384e 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java @@ -184,9 +184,6 @@ public class LayerRenderer implements GLSurfaceView.Renderer { GLES20.glEnableVertexAttribArray(mTextureHandle); GLES20.glUniform1i(mSampleHandle, 0); - -// TODO: Move these calls into a separate deactivate() call that is called after the -// underlay and overlay are rendered. } // Deactivates the shader program. This must be done to avoid crashes after returning to the
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |1 - 1 file changed, 1 deletion(-) New commits: commit ff3fb42b48c70ba5788507a6177bf0a9f3b50fdb Author: Michael Weghorn AuthorDate: Tue Nov 7 17:27:49 2023 +0100 Commit: Michael Weghorn CommitDate: Tue Nov 7 22:17:35 2023 +0100 android: Don't add "-editing" suffix to version/vendor Don't append "-editing" to the version string, which would then end up to be something like "24.2.0.0.alpha0+/7763190f7ec2/The Document Foundation-editing" when the build was configured with `--with-vendor="The Document Foundation"` and would result in the "About" dialog/widget saying "This release was supplied by The Document Foundation-editing." (s. `AboutDialogFragment#onCreateDialog`). While it's useful to have the different build flavors (with or without the experimental editing support), I see no need to have the build config reflected in the version string. (Whether experimental editing support was enabled during the build can easily be seen by checking whether the "Experimental Mode" option is available in the settings.) Change-Id: I48ddb3a842b9db4fc1f435683ed9d8e8e85898ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159079 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index f4f74338284c..f207ddedf267 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -82,7 +82,6 @@ android { strippedUIEditing { dimension "default" buildConfigField 'boolean', 'ALLOW_EDITING', 'true' -versionNameSuffix "-editing" } fullUI.dimension "default" }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 3 ++- android/source/src/java/org/mozilla/gecko/gfx/PointUtils.java| 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit 9844a197bfe91e7adb74e9e5859c7fbfaaf99e28 Author: apurvapriyadarshi AuthorDate: Wed Sep 20 15:22:19 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Thu Sep 21 07:15:22 2023 +0200 tdf#147906 used StrictMath.hypot for Pythagorean addition Change-Id: I529dc199c2cc20ce91b7181f650c36db8d81fc9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157098 Reviewed-by: Bartosz Kosiorek Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas 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 c0da18ff70bd..b20d602a21cb 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java @@ -21,6 +21,7 @@ import org.mozilla.gecko.util.FloatUtils; import java.util.Timer; import java.util.TimerTask; +import java.lang.StrictMath; /* * Handles the kinetic scrolling and zooming physics for a layer controller. @@ -543,7 +544,7 @@ class JavaPanZoomController private float getVelocity() { float xvel = mX.getRealVelocity(); float yvel = mY.getRealVelocity(); -return (float) Math.sqrt(xvel * xvel + yvel * yvel); +return (float) StrictMath.hypot(xvel, yvel); } public PointF getVelocityVector() { diff --git a/android/source/src/java/org/mozilla/gecko/gfx/PointUtils.java b/android/source/src/java/org/mozilla/gecko/gfx/PointUtils.java index 4eb07a31f147..4eff380527d2 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/PointUtils.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/PointUtils.java @@ -11,6 +11,8 @@ import android.graphics.PointF; import org.json.JSONException; import org.json.JSONObject; +import java.lang.StrictMath; + public final class PointUtils { public static PointF add(PointF one, PointF two) { return new PointF(one.x + two.x, one.y + two.y); @@ -30,7 +32,7 @@ public final class PointUtils { /* Computes the magnitude of the given vector. */ public static float distance(PointF point) { -return (float)Math.sqrt(point.x * point.x + point.y * point.y); +return (float)StrictMath.hypot(point.x, point.y); } /** Computes the scalar distance between two points. */
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- android/source/gradle.properties|3 +++ android/source/gradle/wrapper/gradle-wrapper.properties |4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 443e72497e5ae55facad8ad24ae10c82d6c25f4d Author: Michael Weghorn AuthorDate: Fri Aug 4 22:29:00 2023 +0200 Commit: Michael Weghorn CommitDate: Fri Sep 1 20:39:35 2023 +0200 android: Update Android Gradle Plugin to 8.1.0 ... and gradle to 8.0, as suggested by Android Studio. Also, as suggested, let the upgrade assistant set the following properties to keep the previous behavior for these for now instead of applying the new default behavior: android.defaults.buildfeatures.buildconfig=true android.nonFinalResIds=false android.nonTransitiveRClass=false Those may be revisited in a follow-up step. See the Android Gradle Plugin release notes [1] for more details on the properties. [1] https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes Change-Id: Iec2f5766c0888e0f38438290b8fd814494afd837 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155376 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 99365f08f2d4..f4f74338284c 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -21,7 +21,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.4.2' +classpath 'com.android.tools.build:gradle:8.1.0' } } diff --git a/android/source/gradle.properties b/android/source/gradle.properties index fe72551bf894..76578d6146a5 100644 --- a/android/source/gradle.properties +++ b/android/source/gradle.properties @@ -1,2 +1,5 @@ +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx3072m diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index ef80eb5051f2..b22661d9bfd2 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionSha256Sum=f30b29580fe11719087d698da23f3b0f0d04031d8995f7dd8275a31f7674dc01 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 616a03c7addf78d50cf20e161becf17cb35b90ec Author: Michael Weghorn AuthorDate: Fri Aug 4 22:12:55 2023 +0200 Commit: Michael Weghorn CommitDate: Mon Aug 7 07:58:45 2023 +0200 android: Update com.google.android.material to 1.9.0 Change-Id: I52b2060cbf1f8eb06a49c58b8d35461aec99f3a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155375 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index d4776c88de90..99365f08f2d4 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -32,7 +32,7 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.8.0' +implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.multidex:multidex:2.0.1" }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e0647aeaa4d3a2467c3cc12440df179d7a5853c2 Author: Michael Weghorn AuthorDate: Mon Mar 13 07:52:06 2023 +0100 Commit: Michael Weghorn CommitDate: Mon Mar 13 08:25:39 2023 + android: Update Android Gradle Plugin to 7.4.2 Change-Id: Idee4fddd7fd2b610fef194b86ace88469c3124da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148749 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 6b8e8d23ad83..d4776c88de90 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -21,7 +21,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.4.1' +classpath 'com.android.tools.build:gradle:7.4.2' } }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |6 ++ 1 file changed, 6 insertions(+) New commits: commit a344f152873e3b2f33411c391c3f57f604ae8bfa Author: Christian Lohmaier AuthorDate: Mon Feb 27 14:40:15 2023 +0100 Commit: Christian Lohmaier CommitDate: Tue Feb 28 18:27:16 2023 + add ipv6 enabled maven repository maven central so far doesn't support ipv6 on the primary URL (see https://issues.sonatype.org/browse/MVNCENTRAL-658 ), it is only enabled on a dedicated ipv6.repo1.maven.org URL currently. Add that one to the list of repositories so that ipv6-only hosts can also fetch the dependencies. (when using internal ipv4 as well, you'll also need to export JAVA_OPTS="-Djava.net.preferIPv6Addresses=true" since otherwise the gradle wrapper fails to download gradle) Change-Id: I22f0e07fd4e6bb518396f76db20c174e45588372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147917 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/android/source/build.gradle b/android/source/build.gradle index 13bf0381d416..6b8e8d23ad83 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -5,6 +5,9 @@ apply from: 'liboSettings.gradle' allprojects { repositories { mavenCentral() +maven { +url "https://ipv6.repo1.maven.org/maven2"; +} google() } } @@ -12,6 +15,9 @@ allprojects { buildscript { repositories { mavenCentral() +maven { +url "https://ipv6.repo1.maven.org/maven2"; +} google() } dependencies {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9fe3b3b09002188be4691e11eaa36113be0d80c1 Author: Michael Weghorn AuthorDate: Fri Feb 17 10:27:12 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Feb 17 12:06:49 2023 + android: Update com.google.android.material to 1.8.0 Change-Id: I2e2049c5d832aa9ea82feaabf3a86fd8c87a9668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147197 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 38a7cc801467..13bf0381d416 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -26,7 +26,7 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.7.0' +implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.multidex:multidex:2.0.1" }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4aa73a298f4849e222aa3c6111d8b5c57e417e4b Author: Michael Weghorn AuthorDate: Thu Feb 9 10:47:08 2023 +0100 Commit: Michael Weghorn CommitDate: Thu Feb 9 10:50:15 2023 + android: Update Android Gradle Plugin to 7.4.1 Change-Id: I2a709e27d3ba42f0d1c2ae9510d2cbf1f38c484d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146682 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 113b62b4b09c..3f97fca4497e 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.4.0' +classpath 'com.android.tools.build:gradle:7.4.1' } }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 08cfcea7fef6cde9eddcfa461fe1edff99dadafe Author: Yomnasalama AuthorDate: Mon Feb 6 18:32:36 2023 + Commit: Hossein CommitDate: Mon Feb 6 18:37:58 2023 + tdf#147906 Use Math.hypot() for Pythagorean addition Change-Id: I644947ca22f493bbc805c45334450db8d4b4808b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146137 Tested-by: Hossein Reviewed-by: Hossein 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 f1973d980e32..c0da18ff70bd 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java @@ -426,7 +426,7 @@ class JavaPanZoomController private float panDistance(MotionEvent move) { float dx = mX.panDistance(move.getX(0)); float dy = mY.panDistance(move.getY(0)); -return (float) Math.sqrt(dx * dx + dy * dy); +return (float) Math.hypot(dx , dy); } private void track(float x, float y, long time) {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- android/source/gradle/wrapper/gradle-wrapper.properties |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 20989728c78008f29c7f7bf72b3d0e5189835dc4 Author: Michael Weghorn AuthorDate: Wed Jan 18 10:35:38 2023 +0100 Commit: Michael Weghorn CommitDate: Wed Jan 18 12:38:43 2023 + android: Update Android Gradle Plugin to 7.4.0 ... and gradle to 7.5. Change-Id: If5156ab18dc500dafdfa4f8a0f6e6c2563acc4db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145711 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index b31b82eb1120..113b62b4b09c 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.3.1' +classpath 'com.android.tools.build:gradle:7.4.0' } } diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index dcf5e2cb7b3e..ef80eb5051f2 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
[Libreoffice-commits] core.git: android/source
android/source/res/menu/main.xml |8 +--- android/source/src/java/org/libreoffice/ToolbarController.java |2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit d993327eab0a2c9c8820c6528075b01de68b0ec6 Author: Michael Weghorn AuthorDate: Fri Dec 30 08:21:04 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 30 11:17:40 2022 + android: Offer "Save" entry independent of edit actions Move the "Save" menu entry out of "group_edit_actions", which gets hidden when switching from edit to view mode when the experimental editing feature is enabled in Android Viewer. This e.g. makes sure that the "Save" entry is offered for the following scenario (just as the "Save as" entry is as well): * ensure experimental editing feature is enabled * open existing doc * edit the document * switch back to view mode by tapping the left-most item in the editing toolbar Since the doc was modified, the "Save" entry should be present then. Explicitly hide the entry when the experimental editing feature is disabled, since that no longer happens through "group_edit_actions" now. Change-Id: Ibe7736932021d7516e2fd3a09ae9276015fe0d56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144872 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 168817f68c5f..b0358a7cc360 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -35,15 +35,17 @@ android:title="@string/action_UNO_commands" android:orderInCategory="100" /> - + +
[Libreoffice-commits] core.git: android/source
android/source/res/drawable-xxxhdpi/decrementindent.png |binary android/source/res/drawable-xxxhdpi/incrementindent.png |binary android/source/res/drawable/ic_decrementindent.xml | 12 +++- android/source/res/drawable/ic_incrementindent.xml | 12 +++- 4 files changed, 6 insertions(+), 18 deletions(-) New commits: commit a510543a466aca0d152f82af24d16563f28455f0 Author: Michael Weghorn AuthorDate: Wed Dec 28 10:10:19 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 10:32:13 2022 + android: Use PNG icons instead of vector image for compatibility Convert the drawable resources added in commit cfc73f3373f49770b859bc68cbf6bd987342f9ad Date: Fri Dec 23 23:20:26 2022 +0100 android: Add buttons to increase/decrease indent to use PNG images (PNG export of the SVG images used previously, using Inkscape) instead of vector drawables, since devices with old API versions apparently don't support these vector drawables. Trying to open any doc in an x86 AVD with API version 16 would result in LO crashing with this exception in ADB log: E/AndroidRuntime( 2948): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.libreoffice/org.libreoffice.LibreOfficeMainActivity}: android.view.InflateException: Binary XML file line #281: Error inflating class ImageButton E/AndroidRuntime( 2948):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) E/AndroidRuntime( 2948):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) E/AndroidRuntime( 2948):at android.app.ActivityThread.access$600(ActivityThread.java:130) E/AndroidRuntime( 2948):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/AndroidRuntime( 2948):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 2948):at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 2948):at android.app.ActivityThread.main(ActivityThread.java:4745) E/AndroidRuntime( 2948):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 2948):at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 2948):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/AndroidRuntime( 2948):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime( 2948):at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 2948): Caused by: android.view.InflateException: Binary XML file line #281: Error inflating class ImageButton E/AndroidRuntime( 2948):at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) E/AndroidRuntime( 2948):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) E/AndroidRuntime( 2948):at android.view.LayoutInflater.inflate(LayoutInflater.java:489) E/AndroidRuntime( 2948):at android.view.LayoutInflater.inflate(LayoutInflater.java:396) E/AndroidRuntime( 2948):at android.view.LayoutInflater.inflate(LayoutInflater.java:352) E/AndroidRuntime( 2948):at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:710) E/AndroidRuntime( 2948):at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195) E/AndroidRuntime( 2948):at org.libreoffice.LibreOfficeMainActivity.onCreate(LibreOfficeMainActivity.java:131) E/AndroidRuntime( 2948):at android.app.Activity.performCreate(Act
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |6 +- android/source/src/java/org/libreoffice/LibreOfficeApplication.java |4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 037680488b56aa2c4eb21900168aa88ef35d5b07 Author: Michael Weghorn AuthorDate: Tue Dec 27 12:51:54 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 08:28:48 2022 + android: Enable multidex, update com.google.android.material to 1.7.0 Release notes: https://github.com/material-components/material-components-android/releases/tag/1.7.0 With the material update in place, multidex needs to be enabled since the app has minSdkVersion 16 (i.e. smaller than 21) and now references more then 65,536 methods, see [1] for more background. Therefore, carry out the changes to support multidex as mentioned in [2]. Without enabling multidex, the build would fail like this: > Task :mergeExtDexStrippedUIDebug FAILED ERROR:D8: Cannot fit requested classes in a single dex file (# methods: 68864 > 65536) com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:151) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:138) at com.android.build.gradle.internal.tasks.DexMergingWorkAction.merge(DexMergingTask.kt:859) at com.android.build.gradle.internal.tasks.DexMergingWorkAction.run(DexMergingTask.kt:805) at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74) at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:205) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:187) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:120) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:162) at org.gradle.internal.Factories$1.create(Factories.java:31) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:270) at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e690752d5643ffaf4da8778768e5e080476b2427 Author: Michael Weghorn AuthorDate: Tue Dec 27 12:46:28 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 08:28:17 2022 + android: Update compileSdkVersion/targetSdkVersion to 33 API version 33 refers to Android 13. I didn't notice anything requiring changes when quickly going over the release notes for all apps running on Android 13 [1] and apps targeting Android 13 [2]. [1] https://developer.android.com/about/versions/13/behavior-changes-all [2] https://developer.android.com/about/versions/13/behavior-changes-13 Change-Id: I8b68f3bf0afc4c00ecd3412a8fdf0581f2d6bbc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144837 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 581216e603fc..37239d214f70 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -32,7 +32,7 @@ dependencies { android { namespace 'org.libreoffice' -compileSdkVersion 32 +compileSdkVersion 33 // uses non-conventional source layout, so need to reconfigure accordingly // ToDo move to conventional layout, so stuff can be stripped down. sourceSets { @@ -48,7 +48,7 @@ android { } defaultConfig { minSdkVersion 16 -targetSdkVersion 32 +targetSdkVersion 33 vectorDrawables.useSupportLibrary = true } buildTypes {
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml |3 +-- android/source/build.gradle|1 + 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit afcdd294b3cbca93810ad1a94df18770d0a09bba Author: Michael Weghorn AuthorDate: Tue Dec 27 11:45:56 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 08:27:54 2022 + android: Set namespace in build.gradle instead of manifest Switch from the now deprecated way, as mentioned in commit 7347d911fa295c31262a0f576c5b2f3f14ce017d Author: Michael Weghorn Date: Fri Dec 23 18:29:44 2022 +0100 android: Update Android Gradle Plugin to 7.3.1 ... and gradle to 7.4. Relevant entry from the release notes [1] that will be addressed in a follow-up commit: > # Package attribute in manifest file is deprecated > > Starting with AGP 7.3.0-alpha04, if you use Gradle to build your > project, AGP generates a warning if you use the package attribute in the > manifest file. To set the namespace for your app, use the namespace > property in the module-level build.gradle file. To learn more, see Set a > namespace > [https://developer.android.com/studio/build/configure-app-module#set-namespace]. > > To get help moving to the new namespace DSL, use the AGP Upgrade > Assistant (Tools > AGP Upgrade Assistant). [1] https://developer.android.com/studio/releases/gradle-plugin#7-3-0 Change-Id: I8b196e53fb9b3fb7e9314719fdb7e0f2254abd10 Note that this is unrelated to the Android application ID [1] that can be set with autogen param `--with-android-package-name`. [1] https://developer.android.com/studio/build/configure-app-module#set-application-id Change-Id: I146dab19228d83b1beb6408743c0232e1ba1d060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144836 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index c50ad77ae71d..4a7c137878fb 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -1,7 +1,6 @@ http://schemas.android.com/apk/res/android"; -android:installLocation="${installLocation}" -package="org.libreoffice"> +android:installLocation="${installLocation}"> diff --git a/android/source/build.gradle b/android/source/build.gradle index 52ca33f0994e..581216e603fc 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -31,6 +31,7 @@ dependencies { } android { +namespace 'org.libreoffice' compileSdkVersion 32 // uses non-conventional source layout, so need to reconfigure accordingly // ToDo move to conventional layout, so stuff can be stripped down.
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit d23671de498d5531f1f84fa7f0ee21773551ef8a Author: Michael Weghorn AuthorDate: Tue Dec 27 10:33:59 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 08:27:31 2022 + android: Include Impress's layout.xml into app It's needed since commit daab698b346e5e40b67f1e15c796c4e399ccaf8a Date: Tue Nov 22 14:07:12 2022 +0200 sd: replace hardcoded table styles with xml file Without it being included into the app/APK, opening any presentation in Android Viewer file would fail, with this in ADB log: 12-27 10:22:45.329 9811 9862 E libo:sal/osl/unx/file: failed to open /assets/share/config/soffice.cfg/simpress/styles.xml 12-27 10:22:45.332 9811 9862 W svl.items: 1:svl/source/items/itempool.cxx:442: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty. 12-27 10:22:45.337 9811 9862 I LOKitTileProvider: > mOffice.documentLoad() returned null, trying to restart 'Office' and loading again Change-Id: I677476bda146be2cd3ebe18da91bcb8f2a796fd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144835 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index a407c2f81cf2..52ca33f0994e 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -139,11 +139,12 @@ task copyAssets(type: Copy) { description "copies assets that can be accessed within the installed apk" into 'assets' -// include icons +// include icons and Impress styles into ('share') { into ('config') { from ("${liboInstdir}/share/config") -includes = ['images_**.zip'] +includes = ['images_**.zip', +'**/simpress/styles.xml'] } }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- android/source/gradle/wrapper/gradle-wrapper.properties |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 3826a7df9aa447bec08a3b056180778ad8c953af Author: Michael Weghorn AuthorDate: Fri Dec 23 18:29:44 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Dec 28 08:27:04 2022 + android: Update Android Gradle Plugin to 7.3.1 ... and gradle to 7.4. Relevant entry from the release notes [1] that will be addressed in a follow-up commit: > # Package attribute in manifest file is deprecated > > Starting with AGP 7.3.0-alpha04, if you use Gradle to build your > project, AGP generates a warning if you use the package attribute in the > manifest file. To set the namespace for your app, use the namespace > property in the module-level build.gradle file. To learn more, see Set a > namespace > [https://developer.android.com/studio/build/configure-app-module#set-namespace]. > > To get help moving to the new namespace DSL, use the AGP Upgrade > Assistant (Tools > AGP Upgrade Assistant). [1] https://developer.android.com/studio/releases/gradle-plugin#7-3-0 Change-Id: I8b196e53fb9b3fb7e9314719fdb7e0f2254abd10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144834 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 68e68f8d57ae..a407c2f81cf2 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.2.2' +classpath 'com.android.tools.build:gradle:7.3.1' } } diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index e97856541453..e4ca53e04840 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
[Libreoffice-commits] core.git: android/source
android/source/res/drawable/ic_decrementindent.xml|9 android/source/res/drawable/ic_incrementindent.xml|9 android/source/res/layout/toolbar_bottom.xml | 21 ++ android/source/src/java/org/libreoffice/FormattingController.java |6 ++ 4 files changed, 45 insertions(+) New commits: commit cfc73f3373f49770b859bc68cbf6bd987342f9ad Author: Michael Weghorn AuthorDate: Fri Dec 23 23:20:26 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 23 23:24:03 2022 + android: Add buttons to increase/decrease indent This adds two buttons to the formatting toolbar to increase/decrease the indent, using the corresponding UNO commands. These can be used when the experimental editing mode for Android Viewer is enabled. The drawable resources were created using the corresponding sifr_svg icons (incrementindent.svg, decrementindent.svg). Change-Id: Id8f0fc9a5ea686b474ec9a4b4dcdf23407e9ac98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144789 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/drawable/ic_decrementindent.xml b/android/source/res/drawable/ic_decrementindent.xml new file mode 100644 index ..e67a75ad1873 --- /dev/null +++ b/android/source/res/drawable/ic_decrementindent.xml @@ -0,0 +1,9 @@ +http://schemas.android.com/apk/res/android"; +android:width="24dp" +android:height="24dp" +android:viewportWidth="24" +android:viewportHeight="24"> + + diff --git a/android/source/res/drawable/ic_incrementindent.xml b/android/source/res/drawable/ic_incrementindent.xml new file mode 100644 index ..3d8e948488c9 --- /dev/null +++ b/android/source/res/drawable/ic_incrementindent.xml @@ -0,0 +1,9 @@ +http://schemas.android.com/apk/res/android"; +android:width="24dp" +android:height="24dp" +android:viewportWidth="24" +android:viewportHeight="24"> + + diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml index 7d420f35cbca..8ac99a28650d 100644 --- a/android/source/res/layout/toolbar_bottom.xml +++ b/android/source/res/layout/toolbar_bottom.xml @@ -269,6 +269,27 @@ android:paddingBottom="12dp" android:paddingTop="12dp" android:src="@drawable/ic_format_bullets" /> + + + + + diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java index 49cffabf72d8..49e81eb69784 100644 --- a/android/source/src/java/org/libreoffice/FormattingController.java +++ b/android/source/src/java/org/libreoffice/FormattingController.java @@ -48,6 +48,8 @@ class FormattingController implements View.OnClickListener { mContext.findViewById(R.id.button_insertFormatListBullets).setOnClickListener(this); mContext.findViewById(R.id.button_insertFormatListNumbering).setOnClickListener(this); + mContext.findViewById(R.id.button_increaseIndent).setOnClickListener(this); + mContext.findViewById(R.id.button_decreaseIndent).setOnClickListener(this); mContext.findViewById(R.id.button_bold).setOnClickListener(this); mContext.findViewById(R.id.button_italic).setOnClickListener(this); @@ -89,6 +91,10 @@ class FormattingController implements View.OnClickListener { LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultBullet")); } else if (buttonId == R.id.button_insertFormatListNumbering) { LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultNumbering")); +} else if (buttonId == R.id.button_increaseIndent) { +LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:IncrementIndent")); +} else if (buttonId == R.id.button_decreaseIndent) { +LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DecrementIndent")); } else if (buttonId == R.id.button_bold) { LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Bold")); } else if (buttonId == R.id.button_italic) {
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/FontController.java |5 + android/source/src/java/org/libreoffice/InvalidationHandler.java |2 +- 2 files changed, 2 insertions(+), 5 deletions(-) New commits: commit 70d9e7eadb1069b5e7a1909c671b9348b740cca1 Author: Justin Luth AuthorDate: Tue Sep 20 20:25:37 2022 -0400 Commit: Justin Luth CommitDate: Tue Dec 20 00:15:43 2022 + tdf#85592 android: .uno:BackColor deprecated, use .uno:CharBackColor Follow-up. I didn't want to include it in the main deprecation patch. No good reason - android is just too different and untestable by me. Change-Id: I661211aea619af256e38dc685fdd0662e5aa7272 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140284 Reviewed-by: Justin Luth Tested-by: Jenkins diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java index e0161076a5a1..72f35d8b42d8 100644 --- a/android/source/src/java/org/libreoffice/FontController.java +++ b/android/source/src/java/org/libreoffice/FontController.java @@ -171,12 +171,9 @@ public class FontController implements AdapterView.OnItemSelectedListener { if(mActivity.getTileProvider().isSpreadsheet()){ json.put("BackgroundColor", valueJson); LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:BackgroundColor", json.toString())); -}else if(mActivity.getTileProvider().isPresentation()){ +}else { json.put("CharBackColor", valueJson); LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:CharBackColor", json.toString())); -}else { -json.put("BackColor", valueJson); -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:BackColor", json.toString())); } changeFontBackColorBoxColor(color); diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java index 0f3f1dd7b889..c48127cce67f 100644 --- a/android/source/src/java/org/libreoffice/InvalidationHandler.java +++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java @@ -342,7 +342,7 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes mContext.getFormattingController().onToggleStateChanged(Document.NUMBERED_LIST, pressed); } else if (parts[0].equals(".uno:Color")) { mContext.getFontController().colorPaletteListener.updateColorPickerPosition(Integer.parseInt(value)); -} else if (mContext.getTileProvider().isTextDocument() && parts[0].equals(".uno:BackColor")) { +} else if (mContext.getTileProvider().isTextDocument() && (parts[0].equals(".uno:BackColor") || parts[0].equals(".uno:CharBackColor"))) { mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value)); } else if (mContext.getTileProvider().isPresentation() && parts[0].equals(".uno:CharBackColor")) { mContext.getFontController().backColorPaletteListener.updateColorPickerPosition(Integer.parseInt(value));
[Libreoffice-commits] core.git: android/source bin/find-german-comments configure.ac .git-hooks/commit-msg odk/config slideshow/qa
.git-hooks/commit-msg |4 ++-- android/source/gradlew |4 ++-- bin/find-german-comments |2 +- configure.ac |6 +++--- odk/config/configure.pl|4 ++-- slideshow/qa/debug/nodetree.sh |2 +- 6 files changed, 11 insertions(+), 11 deletions(-) New commits: commit fd42cea5f301a10cdeaa29959f04b111de534132 Author: Rene Engelhard AuthorDate: Wed Sep 7 21:34:42 2022 +0200 Commit: Christian Lohmaier CommitDate: Thu Sep 8 14:43:53 2022 +0200 replace egrep/fgrep calls with grep -E/grep -F as egrep/fgrep is deprecated since long amd grep 3.8+ now actually warns (e.g. "egrep: warning: egrep is obsolescent; using grep -E") Change-Id: I5b10f05dffdd09081deb05cef974e3cdb2907315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139614 Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg index eebca62cb6f7..950a6b709d9a 100755 --- a/.git-hooks/commit-msg +++ b/.git-hooks/commit-msg @@ -49,8 +49,8 @@ if [ "$len" -gt 79 ] ; then fi fdo_regex='fdo#[0-9]+' -if egrep -q "$fdo_regex" $1; then -for bugid in `head -n 1 $1 |egrep -o "$fdo_regex" |sed 's/fdo#//'` +if grep -E -q "$fdo_regex" $1; then +for bugid in `head -n 1 $1 | grep -E -o "$fdo_regex" |sed 's/fdo#//'` do if [ "`echo $bugid |sed 's/fdo#//'`" -gt 88775 ]; then abort "$1" "The first line contains a suspicious fdo# rereference: 'fdo#$bugid', did you mean tdf#?" diff --git a/android/source/gradlew b/android/source/gradlew index 91a7e269e19d..b7029853b09f 100755 --- a/android/source/gradlew +++ b/android/source/gradlew @@ -130,8 +130,8 @@ if $cygwin ; then # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do -CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` -CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option +CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -` +CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` diff --git a/bin/find-german-comments b/bin/find-german-comments index a38b435ce870..175af6f22420 100755 --- a/bin/find-german-comments +++ b/bin/find-german-comments @@ -235,7 +235,7 @@ class Parser: # Change into the given dir, so "git ls-tree" does work. os.chdir(directory) -sock = os.popen(r"git ls-tree -r HEAD --name-only |egrep '\.(c|cc|cpp|cxx|h|hxx|mm)$'") +sock = os.popen(r"git ls-tree -r HEAD --name-only | grep -E '\.(c|cc|cpp|cxx|h|hxx|mm)$'") lines = sock.readlines() sock.close() diff --git a/configure.ac b/configure.ac index 7b03df8ee0aa..7c82578933cb 100644 --- a/configure.ac +++ b/configure.ac @@ -2945,7 +2945,7 @@ AC_SUBST(GNUPARALLEL) AC_MSG_CHECKING([for GNU or BSD tar]) for a in $GNUTAR gtar gnutar tar bsdtar /usr/sfw/bin/gtar; do -$a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null +$a --version 2> /dev/null | grep -E "GNU|bsdtar" 2>&1 > /dev/null if test $? -eq 0; then GNUTAR=$a break @@ -2958,11 +2958,11 @@ fi AC_SUBST(GNUTAR) AC_MSG_CHECKING([for tar's option to strip components]) -$GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null +$GNUTAR --help 2> /dev/null | grep -E "bsdtar|strip-components" 2>&1 >/dev/null if test $? -eq 0; then STRIP_COMPONENTS="--strip-components" else -$GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null +$GNUTAR --help 2> /dev/null | grep -E "strip-path" 2>&1 >/dev/null if test $? -eq 0; then STRIP_COMPONENTS="--strip-path" else diff --git a/odk/config/configure.pl b/odk/config/configure.pl index f3d0e08b3440..756db5a3c76b 100755 --- a/odk/config/configure.pl +++ b/odk/config/configure.pl @@ -242,7 +242,7 @@ while ( (!$main::correctVersion) && } else { #check version -my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`; +my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | grep -E Zip | head -n 1`; $testVersion =~ s#Zip ([\d.]+) .*#$1#go; if ( $testVersion eq "") { @@ -414,7 +414,7 @@ while ( (!$main::correctVersion) && } else { #check version -my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; +my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | grep -E "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; $testVersion =~ s#([^\n]+)\n#$1#go; $main::correctVersion =
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |1 + 1 file changed, 1 insertion(+) New commits: commit e77bfe281403e49c58730489e94b62032c296e75 Author: Michael Weghorn AuthorDate: Mon Aug 8 09:27:39 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Aug 8 13:23:15 2022 +0200 android: Add scrollbars.ui into APK That UI file was added in commit 4bc62c4e9b5b4eab6e2e40577789c435dce59f66 Date: Thu Aug 4 15:33:51 2022 +0100 split SwScrollbar up for reuse of adaptor Include it for Android. Without it, trying to load/display any document would result in Android Viewer crashing or getting stuck, with this in the ADB log: 08-08 09:22:20.102 6064 6256 D libo:sal/osl/unx/file: double-slash in path: /assets//config/soffice.cfg/svt/ui/scrollbars.ui 08-08 09:22:20.102 6064 6256 E libo:sal/osl/unx/file: miss cache: failed to open /assets//config/soffice.cfg/svt/ui/scrollbars.ui 08-08 09:22:20.102 6064 6256 W vcl.builder: 23:vcl/source/window/builder.cxx:480: DBG_UNHANDLED_EXCEPTION in VclBuilder 08-08 09:22:20.102 6064 6256 W vcl.builder: when: Unable to read .ui file exception: void 08-08 09:22:20.103 6064 6256 I LOKitTileProvider: > mOffice.documentLoad() returned null, trying to restart 'Office' and loading again Change-Id: I0938d77dc9553d8acc7b2bdd4a72b5299b4ec1a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137943 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 13d4d1b0bb14..68e68f8d57ae 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -175,6 +175,7 @@ task copyAssets(type: Copy) { '**/hfmenubutton.ui', '**/inforeadonlydialog.ui', '**/pbmenubutton.ui', +'**/scrollbars.ui', '**/tabbuttons.ui', '**/tabviewbar.ui' } }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |1 - 1 file changed, 1 deletion(-) New commits: commit fd95bf6dea0bfa5a9fd1254c11854dec4a2cdcff Author: Michael Weghorn AuthorDate: Mon Aug 8 09:09:21 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Aug 8 13:22:45 2022 +0200 android: Drop empty main.jni.srcDirs from sourceSets This was shown as a recommended step in Android Studio when the update to Android Gradle Plugin 7.2.2 was suggested: > *Remove jni source directory from sourceSets* > > The jni block in an android > sourceSet does nothing, and will be removed in Android Gradle Plugin > version 8.0.0. Change-Id: I3378926047d5ad86548d0bf800e022b74efb5e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137942 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 0a6c1aefa454..13d4d1b0bb14 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -40,7 +40,6 @@ android { main.res.srcDirs = ['res', 'res_generated'] main.java.srcDirs = ['../Bootstrap/src', 'src/java'] main.jniLibs.srcDirs = ["${liboJniLibsdir}"] -main.jni.srcDirs = [] // don't attempt to build native-lib via gradle // the configuration data that might be stripped or not fullUI.assets.srcDirs 'assets_fullUI' strippedUI.assets.srcDirs 'assets_strippedUI'
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 495efc3396f04a6dc2200b33d9969f125b2a79c8 Author: Michael Weghorn AuthorDate: Mon Aug 8 09:08:07 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Aug 8 11:33:49 2022 +0200 android: Update Android Gradle Plugin to 7.2.2 Change-Id: I3235716498168ca5eebf71ebf6f5ee571af7a72d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137941 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index a1c5a43c0d87..0a6c1aefa454 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.2.1' +classpath 'com.android.tools.build:gradle:7.2.2' } }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3318742094157b6baf57f2294731b8dec8da73ad Author: Michael Weghorn AuthorDate: Mon Jun 13 11:11:16 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Jun 14 06:38:57 2022 +0200 android: Update com.google.android.material to 1.6.1 Change-Id: If5aebe347534745065b371190abffce2421655f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135729 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 26da7cf9c3b9..a1c5a43c0d87 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -26,7 +26,7 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.6.0' +implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 553750d5763b2e605cc8990d81c5588db4319b62 Author: Michael Weghorn AuthorDate: Sat May 28 12:20:34 2022 +0200 Commit: Michael Weghorn CommitDate: Sat May 28 13:28:10 2022 +0200 android: Update Android Gradle Plugin to 7.2.1 Release notes [1]: > 7.2.1 (May 2022) > > This minor update corresponds to the release of Android Studio > Chipmunk Patch 1 and includes the following bug fixes: > > bundletool does not package baseline profiles correctly [2] > > To see the other bug fixes included in this release, see the Android > Studio Chipmunk Patch 1 release notes. [3] [1] https://developer.android.com/studio/releases/gradle-plugin?buildsystem=ndk-build#7-2-0 [2] https://issuetracker.google.com/issues/230361284 [3] https://developer.android.com/studio/releases#patch-releases Change-Id: I57f37ea3786003dba4d95b291ddf6b0b44dccaa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135053 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 0e0cd6381053..26da7cf9c3b9 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.2.0' +classpath 'com.android.tools.build:gradle:7.2.1' } }
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit be3f29bd103bf058eeef063823fd4049448ce27f Author: Michael Weghorn AuthorDate: Thu May 26 09:48:27 2022 +0200 Commit: Michael Weghorn CommitDate: Thu May 26 22:06:04 2022 +0200 android: Update compileSdkVersion/targetSdkVersion to 32 API version 32 refers to the Android 12L feature drop (Android 12.1). According to [1], "12L is a special feature drop that makes Android 12 even better on tablets and foldable devices." When getting over the list of behavior changes for apps targeting Android 12, I didn't realize anyting relevant specific to API level 32 not yet in API level 31 as well, so there seems to be no need for any special adjustments for this update on top of commit 2ab389b251744fa7f3f6b060c09746e59d87f3b1 Date: Tue Apr 19 10:33:27 2022 +0200 android: Update compileSdkVersion/targetSdkVersion to 31 [1] https://developer.android.com/about/versions/12/12L Change-Id: Ic99c4ee5b81b6584648fa4717e23cc7f3c78bdab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134988 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index adb9b067d1b4..0e0cd6381053 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -31,7 +31,7 @@ dependencies { } android { -compileSdkVersion 31 +compileSdkVersion 32 // uses non-conventional source layout, so need to reconfigure accordingly // ToDo move to conventional layout, so stuff can be stripped down. sourceSets { @@ -48,7 +48,7 @@ android { } defaultConfig { minSdkVersion 16 -targetSdkVersion 31 +targetSdkVersion 32 vectorDrawables.useSupportLibrary = true } buildTypes {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 97b1a21f9b7b7ed8a24da4a83a043e82de46683c Author: Michael Weghorn AuthorDate: Thu May 26 09:18:05 2022 +0200 Commit: Michael Weghorn CommitDate: Thu May 26 22:05:20 2022 +0200 android: Update androidx.constraintlayout to 2.1.4 Change-Id: If2edff8006c3aa904d40dabf679d5ed0b0fd0127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134987 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 22cbb858d4fa..adb9b067d1b4 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -27,7 +27,7 @@ dependencies { "unoloader.jar" ]) implementation 'com.google.android.material:material:1.6.0' -implementation 'androidx.constraintlayout:constraintlayout:2.1.3' +implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } android {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b6258ff75dd3c19e8309a33c85e17e8a76b388cf Author: Michael Weghorn AuthorDate: Thu May 26 09:16:42 2022 +0200 Commit: Michael Weghorn CommitDate: Thu May 26 22:04:58 2022 +0200 android: Update com.google.android.material to 1.6.0 Change-Id: Iac3831d400d29b45be82d2585ca1454ed22676be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134986 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 137501b39654..22cbb858d4fa 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -26,7 +26,7 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.5.0' +implementation 'com.google.android.material:material:1.6.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' }
[Libreoffice-commits] core.git: android/source
android/source/gradle.properties |1 - 1 file changed, 1 deletion(-) New commits: commit 6e24713c8cb4d2c1aec8ee647c07c6b03de0063a Author: Michael Weghorn AuthorDate: Fri May 20 11:35:49 2022 +0200 Commit: Michael Weghorn CommitDate: Sat May 21 09:18:38 2022 +0200 android: Drop 'android.enableJetifier=true' From the Android Gradle Plugin 7.2.0 release notes [1]: > Jetifier warning and check in Build Analyzer Build Analyzer now displays > a warning if your project's gradle.properties file includes > android.enableJetifier=true. This flag was introduced in a previous > version of Android Studio to enable AndroidX for libraries that don't > support AndroidX natively. However, the library ecosystem has mostly > moved to support AndroidX natively and the Jetifier flag is probably no > longer needed by your project. Additionally, the flag can lead to slower > build performance. If you see this warning, you can run a check within > Build Analyzer to confirm if the flag can be removed. Android Viewer has no dependencides requiring Android Support Libraries, so drop the `android.enableJetifier=true` flag. [1] https://developer.android.com/studio/releases/gradle-plugin?buildsystem=ndk-build#jetifier-build-analyzer Change-Id: I6943b2e82e5b226286be288f9ed30944c541eb1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134673 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/gradle.properties b/android/source/gradle.properties index 414d53485e7f..fe72551bf894 100644 --- a/android/source/gradle.properties +++ b/android/source/gradle.properties @@ -1,3 +1,2 @@ -android.enableJetifier=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3072m
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |2 +- android/source/gradle/wrapper/gradle-wrapper.properties |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit b62509e43c355d98b3ef26b1f55045cffcb1f486 Author: Michael Weghorn AuthorDate: Fri May 20 11:24:39 2022 +0200 Commit: Michael Weghorn CommitDate: Sat May 21 09:17:48 2022 +0200 android: Update Android Gradle Plugin to 7.2.0 ... and gradle to 7.3.3, as suggested by Android Studio. The Android Gradle plugin release notes for 7.2.0 [1] mention a new warning in Build Analyzer when `android.enableJetifier=true` is set. That will be handled in a follow-up commit. [1] https://developer.android.com/studio/releases/gradle-plugin?buildsystem=ndk-build#jetifier-build-analyzer Change-Id: I9427f8b878346edc3c6e30be1d41fcc4dc32540e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134672 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 80427b8b73b1..137501b39654 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -15,7 +15,7 @@ buildscript { google() } dependencies { -classpath 'com.android.tools.build:gradle:7.1.3' +classpath 'com.android.tools.build:gradle:7.2.0' } } diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index 2d5e5400a6ed..e97856541453 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/PageView.java |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit e5fb120a32d04e241b35a7e63894c744196f576b Author: Andrea Gelmini AuthorDate: Mon May 9 12:15:41 2022 +0200 Commit: Andrea Gelmini CommitDate: Mon May 9 23:45:49 2022 +0200 Fix typo in code Change-Id: I6fae9a4df450f80ee2af59e271a8cb1dd8bc918f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134047 Reviewed-by: Julien Nabet Reviewed-by: Michael Weghorn Tested-by: Jenkins diff --git a/android/source/src/java/org/libreoffice/ui/PageView.java b/android/source/src/java/org/libreoffice/ui/PageView.java index 11b365f2bbcc..4c3f69562250 100644 --- a/android/source/src/java/org/libreoffice/ui/PageView.java +++ b/android/source/src/java/org/libreoffice/ui/PageView.java @@ -22,21 +22,21 @@ public class PageView extends View{ public PageView(Context context ) { super(context); bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page); -intialise(); +initialise(); } public PageView(Context context, AttributeSet attrs) { super(context, attrs); bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page); Log.d(LOGTAG, bmp.toString()); -intialise(); +initialise(); } public PageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page);//load a "page" -intialise(); +initialise(); } -private void intialise(){ +private void initialise(){ mPaintBlack = new Paint(); mPaintBlack.setARGB(255, 0, 0, 0); Log.d(LOGTAG, " Doing some set-up");
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ToolbarController.java | 149 -- 1 file changed, 70 insertions(+), 79 deletions(-) New commits: commit 1bb9036e90688929fec61edbacae768afef9f5db Author: Michael Weghorn AuthorDate: Sat May 7 23:17:03 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:29:20 2022 +0200 android: Don't use res Id in switch-case (ToolbarController) Like Change-Id I9d563b6ad4ed70a891c583a82331dd80db5956dc, "android: Avoid using res ID in switch-case (FormattingController)", but for `TollbarController`. Change-Id: I40f23b6a91ddf0bb7e90c3b3b690fe332cd874ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133999 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java index f0fbb139484d..9f5c5309a523 100644 --- a/android/source/src/java/org/libreoffice/ToolbarController.java +++ b/android/source/src/java/org/libreoffice/ToolbarController.java @@ -162,85 +162,76 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { @Override public boolean onMenuItemClick(MenuItem item) { -switch (item.getItemId()) { -case R.id.action_keyboard: -mContext.showSoftKeyboard(); -break; -case R.id.action_format: -mContext.showFormattingToolbar(); -break; -case R.id.action_about: -mContext.showAbout(); -return true; -case R.id.action_save: -mContext.getTileProvider().saveDocument(); -return true; -case R.id.action_save_as: -mContext.saveDocumentAs(); -return true; -case R.id.action_parts: -mContext.openDrawer(); -return true; -case R.id.action_exportToPDF: -mContext.exportToPDF(); -return true; -case R.id.action_print: -mContext.getTileProvider().printDocument(); -return true; -case R.id.action_settings: -mContext.showSettings(); -return true; -case R.id.action_search: -mContext.showSearchToolbar(); -return true; -case R.id.action_undo: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Undo")); -return true; -case R.id.action_redo: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Redo")); -return true; -case R.id.action_presentation: -mContext.preparePresentation(); -return true; -case R.id.action_add_slide: -mContext.addPart(); -return true; -case R.id.action_add_worksheet: -mContext.addPart(); -return true; -case R.id.action_rename_worksheet: -case R.id.action_rename_slide: -mContext.renamePart(); -return true; -case R.id.action_delete_worksheet: -mContext.deletePart(); -return true; -case R.id.action_delete_slide: -mContext.deletePart(); -return true; -case R.id.action_back: -hideClipboardActions(); -return true; -case R.id.action_copy: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Copy")); -clipData = ClipData.newPlainText("clipboard data", clipboardText); -clipboardManager.setPrimaryClip(clipData); -Toast.makeText(mContext, mContext.getResources().getString(R.string.action_text_copied), Toast.LENGTH_SHORT).show(); -return true; -case R.id.action_paste: -clipData = clipboardManager.getPrimaryClip(); -ClipData.Item clipItem = clipData.getItemAt(0); -mContext.setDocumentChanged(true); -return mContext.getTileProvider().paste("text/plain;charset=utf-16", clipItem.getText().toString()); -case R.id.action_cut: -clipData = ClipData.newPlainText("clipboard data", clipboardText); -clipboardManager.setPrimaryClip(clipData); -LOKitShell.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)); -mContext.setDocumentChanged(true); -return true; -case R.id.action_UNO_commands: -mContext.showUNOCommandsToolbar(); -return true; +final int itemId = item.getItemId(); +if (itemId == R.id.action_keyboard) { +mContext.showSoftKeyboard(); +} else if (ite
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/SearchController.java | 11 +- 1 file changed, 2 insertions(+), 9 deletions(-) New commits: commit dcc6b286ea58bca21fd6a85fde2bffa2cce8d564 Author: Michael Weghorn AuthorDate: Sat May 7 23:03:20 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:28:38 2022 +0200 android: Don't use res ID in switch-case (SearchController) Addresses this Lint warning: > ../../src/java/org/libreoffice/SearchController.java:73: Resource IDs > will be non-final by default in Android Gradle Plugin version 8.0, avoid > using them in switch case statements There's no need to explicitly set `SearchDirection.DOWN` for `R.id.button_search_down` since it has previously been set as default value anyway. Change-Id: I283c00b97e1417f5dc3a48922238df7a29032137 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133998 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/SearchController.java b/android/source/src/java/org/libreoffice/SearchController.java index 8bdf42e8be8c..6095e1fd2afe 100644 --- a/android/source/src/java/org/libreoffice/SearchController.java +++ b/android/source/src/java/org/libreoffice/SearchController.java @@ -69,15 +69,8 @@ public class SearchController implements View.OnClickListener { ImageButton button = (ImageButton) view; SearchDirection direction = SearchDirection.DOWN; -switch(button.getId()) { -case R.id.button_search_down: -direction = SearchDirection.DOWN; -break; -case R.id.button_search_up: -direction = SearchDirection.UP; -break; -default: -break; +if (button.getId() == R.id.button_search_up) { +direction = SearchDirection.UP; } String searchText = ((EditText) mActivity.findViewById(R.id.search_string)).getText().toString();
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/FormattingController.java | 133 +++--- 1 file changed, 51 insertions(+), 82 deletions(-) New commits: commit 1c5a8b5eafd67001875a0270459a1a9dd7b605d8 Author: Michael Weghorn AuthorDate: Sat May 7 22:49:18 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:27:52 2022 +0200 android: Avoid using res ID in switch-case (FormattingController) Adresses Lint warnings like this in FormattingController: > ../../src/java/org/libreoffice/FormattingController.java:89: Resource > IDs will be non-final by default in Android Gradle Plugin version 8.0, > avoid using them in switch case statements > > 86 > 87 switch(button.getId()) { > 88 > 89 case R.id.button_insertFormatListBullets: > 90 LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultBullet")); > 91 break; Change-Id: I9d563b6ad4ed70a891c583a82331dd80db5956dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133997 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java index 4527583d503c..49cffabf72d8 100644 --- a/android/source/src/java/org/libreoffice/FormattingController.java +++ b/android/source/src/java/org/libreoffice/FormattingController.java @@ -84,70 +84,47 @@ class FormattingController implements View.OnClickListener { button.getBackground().setState(new int[]{android.R.attr.state_selected}); } -switch(button.getId()) { - -case R.id.button_insertFormatListBullets: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultBullet")); -break; - -case R.id.button_insertFormatListNumbering: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultNumbering")); -break; - -case R.id.button_bold: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Bold")); -break; -case R.id.button_italic: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Italic")); -break; -case R.id.button_strikethrough: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Strikeout")); -break; -case R.id.button_clearformatting: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:ResetAttributes")); -break; -case R.id.button_underlined: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:UnderlineDouble")); -break; -case R.id.button_align_left: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:LeftPara")); -break; -case R.id.button_align_center: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:CenterPara")); -break; -case R.id.button_align_right: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:RightPara")); -break; -case R.id.button_align_justify: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:JustifyPara")); -break; -case R.id.button_insert_line: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Line")); -break; -case R.id.button_insert_rect: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Rect")); -break; -case R.id.button_font_shrink: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Shrink")); -break; -case R.id.button_font_grow: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Grow")); -break; -case R.id.button_subscript: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:SubScript")); -break; -case R.id.button_superscript: -LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:SuperScript")); -break; -case R.id.button_insert_picture: -insertPicture(); -break; -case R.id.button_insert_table: -insertTable(); -break; -case R.id.button_delete_table: -deleteTable(); -break; +final int buttonId = button.getId(); +if (buttonId == R.id.button_insertFormatListBullets) { +LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:DefaultBullet")); +} else if (buttonId == R.id.button_insertFormatListNumbering) { +
[Libreoffice-commits] core.git: android/source
android/source/res/drawable/ic_auto_color.xml | 10 +++ android/source/res/layout/toolbar_color_picker.xml | 32 +--- android/source/res/values-de/strings.xml|1 android/source/res/values/strings.xml |1 android/source/src/java/org/libreoffice/FontController.java | 21 +-- 5 files changed, 52 insertions(+), 13 deletions(-) New commits: commit e1381521c59362053e70ebe1b0c52a1f0378 Author: Michael Weghorn AuthorDate: Sat May 7 21:25:14 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:27:05 2022 +0200 android: Allow setting auto font/bg color Add a button in the color palette UI (that can be found in the bottom toolbar under "Styles" -> "Font Color"/"Highlight Color" when experimental editing mode is enabled) which allows setting auto color for the font or the highlighting/background. This allows to unset any explicitly set color and use the automatic color. This is equivalent to the "Automatic"/"No fill color" items in the font color and character highlighting color popups in the desktop version. Add a `boolean keepAlpha` param to `sendFont{,Back}ColorChange` to be able to distinguish between "auto color" and white when -1/0x is passed as color. See also previous commit Change-Id I2e6512f32e671f92c8d31b2780c350dd74fb0747, "android: Handle auto color as such", for some more context. Change-Id: I05182a2adbc00e64b1925ff52861a51ba8dcc21f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133996 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/drawable/ic_auto_color.xml b/android/source/res/drawable/ic_auto_color.xml new file mode 100644 index ..3c68b556ee70 --- /dev/null +++ b/android/source/res/drawable/ic_auto_color.xml @@ -0,0 +1,10 @@ +http://schemas.android.com/apk/res/android"; +android:width="24dp" +android:height="24dp" +android:viewportWidth="24" +android:viewportHeight="24" +android:tint="?attr/colorControlNormal"> + + diff --git a/android/source/res/layout/toolbar_color_picker.xml b/android/source/res/layout/toolbar_color_picker.xml index e80f25bf46f6..6a8f81b2a842 100644 --- a/android/source/res/layout/toolbar_color_picker.xml +++ b/android/source/res/layout/toolbar_color_picker.xml @@ -21,13 +21,31 @@ android:layout_height="wrap_content" android:padding="10dp" android:orientation="vertical"> - + + + + + + + + Hervorhebungs-Farbe Schriftfarbe Folie umbenennen +Automatisch diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 49eea9f3014c..207be1c2c150 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -168,4 +168,5 @@ Highlight Color Font Color Rename Slide +Automatic diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java index 2eb6b2f7f658..e0161076a5a1 100644 --- a/android/source/src/java/org/libreoffice/FontController.java +++ b/android/source/src/java/org/libreoffice/FontController.java @@ -8,6 +8,7 @@ import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; +import android.widget.Button; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.RelativeLayout; @@ -48,7 +49,7 @@ public class FontController implements AdapterView.OnItemSelectedListener { final ColorPaletteListener colorPaletteListener = new ColorPaletteListener() { @Override public void applyColor(int color) { -sendFontColorChange(color); +sendFontColorChange(color, false); } @Override @@ -70,7 +71,7 @@ public class FontController implements AdapterView.OnItemSelectedListener { final ColorPaletteListener backColorPaletteListener = new ColorPaletteListener() { @Override public void applyColor(int color) { -sendFontBackColorChange(color); +sendFontBackColorChange(color, false); } @Override @@ -141,12 +142,12 @@ public class FontController implements AdapterView.OnItemSelectedListener { } } -private void sendFontColorChange(int color){ +private void sendFontColorChange(int color, boolean keepAlpha){ try { JSONObject json = new JSONObject(); JSONObject valueJson = new JSONObject(); valueJson.put("type", "long"); -valueJson.put("value", 0x00FF & color); +valueJson.put("value", keepAlpha ? color : 0x00FF & color); json.put("Color", valueJson);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPickerAdapter.java |9 -- android/source/src/java/org/libreoffice/FontController.java | 45 ++ 2 files changed, 27 insertions(+), 27 deletions(-) New commits: commit 5c50d8f7ee351e7605b382ae5b06ccaa8518747f Author: Michael Weghorn AuthorDate: Sat May 7 19:23:12 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:25:36 2022 +0200 android: Handle auto color as such When no color is explicitly set for the font/background (i.e. automatic color is used which would e.g. be black for the font if no background color is set or white if a black highlight color is set in Writer), the value for the color sent in the ".uno:Color" event for the font color and similarly for the background/highlight color (".uno:BackgroundColor" in Calc, ".uno:CharBackColor" in Impress, ".uno:BackColor" in Writer) is -1. The previous handling of that special value was problematic: 1) Where handled specifically, -1 was interpreted as "black color" rather than "auto/no color". 2) The color handled by the above-mentioned UNO events does not contain/handle the alpha channel, while Android does, so a conversion happens to add/remove the alpha layer. However, the anonymous `ColorPaletteListener`s that handle font and background color updates in their `updateColorPickerPosition` methods were not doing a logical or to add an alpha channel to the LO-provided color, but *adding* 0xFF00 instead, which is the same for actual colors without an alpha channel set, but the actual special value of -1 (0x) would then be converted to 0xFEFF and no longer be treated as special. The way of treating -1 as black would also have the side effect that an explicit white color (0x00FF) would be converted to 0x, which is -1, and would therefore be treated as black. (So setting font color to white would result in black being shown as font color in the font color UI in experimental mode instead...) In order to actually handle auto color as such, handle the special value of -1 right in the `updateColorPickerPosition` methods: In that case, unselect any explicitly selected color (and set color to transparent for the buttons in the "Style" tab of the toolbar, `font_color_picker_button` and `font_back_color_picker_button` in `toolbar_bottom.xml`). Also, do a logical or to add the alpha layer instead of adding 0xFF00. While at it, unify the code in the two `updateColorPickerPosition` methods a bit. Change-Id: I2e6512f32e671f92c8d31b2780c350dd74fb0747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133992 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index dbbf65cf67b8..a17dd264fb99 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -125,15 +125,6 @@ public class ColorPickerAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPickerAdapter.java | 35 ++ 1 file changed, 23 insertions(+), 12 deletions(-) New commits: commit bc762b702d9869070b05d63e14a39a758a21ad3e Author: Michael Weghorn AuthorDate: Sat May 7 18:05:40 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:24:20 2022 +0200 android: Don't show any color in palette as selected if none matches In Android Viewer with experimental editing mode enabled, doing the following resulted in black still being marked as the current font color in the "Style" -> "Font Color" UI. 1) create a new Writer doc in the desktop version with one paragraph that has the font color explicitly set to black and one with "Dark Brick 2" 2) open the doc in Android Viewer with experimental mode enabled 3) tap on the first paragraph with font color explicitly set to black 4) open the "Style" -> "Font Color" UI where the color could be changed (layout file: `toolbar_color_picker.xml`) -> black is marked as current font color (OK) 5) tap on the paragraph which has font color "Dark Brick 2" set -> black is still marked as current font color (NOK) This is because the indices of the previously set color would just remain set if the new color was not found in any of the palettes which contain a set of predefined colors. Change that to set the index for the `upperSelectedBox` palette to 0 (i.e. switch to the first palette), and the index of the `selectedBox` (i.e. color within the palette) to the special value of '-1' and don't mark any palette or color as selected in that case. The newly introduced `ColorPickerAdapter#unselectColors` will be used from elsewhere in a follow-up commit, so make it public right away. The two `ImageButton`s right in the "Style" tab in the toolbar (i.e. `font_color_picker_button` and `font_back_color_picker_button` in `toolbar_bottom.xml`) remain unchanged and keep showing the actual color, since those are not restricted to predefined colors in the palettes. For the case where no explicit font color is set (i.e. use of automatic font color, e.g. black if no background is set, but white if the background is set to black), the value '-1' is sent from the C++ side, and no color should be marked as selected in Android Viewer, which also works with this change in place in general. However, the current handling for the "automatic color" case on Android Viewer side looks suspicious in more ways that will be addressed in a follow-up commit. Change-Id: I228d57ace5341bd311761f40c477441d1e511d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133989 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index bae9c3ed7768..dbbf65cf67b8 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -40,7 +40,8 @@ public class ColorPickerAdapter extends RecyclerView.Adapter= 0) { holder.colorBox.setImageResource(R.drawable.ic_done_white_12dp); } else { holder.colorBox.setImageDrawable(null); @@ -68,6 +69,15 @@ public class ColorPickerAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPickerAdapter.java | 24 +- 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit 9a249103de13f2a00fc17bf138d3e656f9a311b8 Author: Michael Weghorn AuthorDate: Sat May 7 17:54:57 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:23:29 2022 +0200 android: Switch order of these if/else statements I find if (a == b) { // statement 1 } else { // statement 2 } more straightforward than if ( a != b) { // statement 2 } else { // statement 1 } since it doesn't require logically negating twice (else block is for `!(a != b)`) in the second form), and this also prepares for a follow-up commit where one of the conditions will be extended further. Change-Id: I1d2177bdcf662994e757b626983a9f9626c66aa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133988 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index ed8fe0e59933..bae9c3ed7768 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -40,10 +40,10 @@ public class ColorPickerAdapter extends RecyclerView.Adapter= 0; k--) { red_shade = (int) (red_shade * 0.75); @@ -100,14 +108,6 @@ public class ColorPickerAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPaletteAdapter.java |4 android/source/src/java/org/libreoffice/ColorPickerAdapter.java |8 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 5c452ad4c31bcaa3f0a94c50b5eeb7cbca27da2e Author: Michael Weghorn AuthorDate: Sat May 7 17:44:56 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:22:26 2022 +0200 android: Don't store selected pos in ColorPickerAdapter The position is already set and used in `ColorPaletteAdapter` as its `upperSelectedBox` member, so stop doing the double bookkeeping in both classes and retrieve it from there instead. Change-Id: I59896b85f5d5a0285076f61599be64638fa71121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133987 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java index e26dcc1c30a9..16d8a977864f 100644 --- a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java @@ -36,6 +36,10 @@ public class ColorPaletteAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPaletteAdapter.java | 12 +- android/source/src/java/org/libreoffice/ColorPickerAdapter.java | 12 +- 2 files changed, 12 insertions(+), 12 deletions(-) New commits: commit fd50cbbc410ebf949e00881de848bf90cb2f72aa Author: Michael Weghorn AuthorDate: Sat May 7 17:39:21 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:21:37 2022 +0200 android: Make Color{Palette,Picker}Adapter members private ... and make some `final` as well. Change-Id: Ib50ff32788edaea753cc25f119f91a93e936b2ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133986 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java index 41aed46ca915..e26dcc1c30a9 100644 --- a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java @@ -12,12 +12,12 @@ import android.widget.ImageButton; public class ColorPaletteAdapter extends RecyclerView.Adapter { -int[][] color_palette; -Context mContext; -int upperSelectedBox = -1; -int selectedBox = 0; -boolean animate; -ColorPaletteListener colorPaletteListener; +private int[][] color_palette; +private final Context mContext; +private int upperSelectedBox = -1; +private int selectedBox = 0; +private boolean animate; +private final ColorPaletteListener colorPaletteListener; public ColorPaletteAdapter(Context mContext, ColorPaletteListener colorPaletteListener) { this.mContext = mContext; diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index 9b7e8173975c..b88087da3bf0 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -12,12 +12,12 @@ import android.widget.ImageButton; public class ColorPickerAdapter extends RecyclerView.Adapter { -Context mContext; -ColorPaletteAdapter colorPaletteAdapter; -ColorPaletteListener colorPaletteListener; -int[] colorList; -int[][] colorPalette = new int[11][8]; -int selectedBox = 0; +private final Context mContext; +private final ColorPaletteAdapter colorPaletteAdapter; +private final ColorPaletteListener colorPaletteListener; +private final int[] colorList; +private final int[][] colorPalette = new int[11][8]; +private int selectedBox = 0; public ColorPickerAdapter(Context mContext, final ColorPaletteAdapter colorPaletteAdapter, ColorPaletteListener colorPaletteListener) { this.mContext = mContext;
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/FontController.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 87d0037d75386afcaef4002e2e652b95d6cd92d5 Author: Michael Weghorn AuthorDate: Fri May 6 22:27:51 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:21:04 2022 +0200 android: Drop explicit type arguments when calling ctors Addresses these suggestions shown in Android Studio: * "Explicit type argument String can be replaced with <>" * "Explicit type argument String, ArrayList can be replaced with <>" Change-Id: Ibc78364cf5b246d8c1e1d32d755c3e8dcf0e32aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133985 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java index 8b7f232ac65c..ab8ffe307363 100644 --- a/android/source/src/java/org/libreoffice/FontController.java +++ b/android/source/src/java/org/libreoffice/FontController.java @@ -26,9 +26,9 @@ public class FontController implements AdapterView.OnItemSelectedListener { private boolean mFontNameSpinnerSet = false; private boolean mFontSizeSpinnerSet = false; private final LibreOfficeMainActivity mActivity; -private final ArrayList mFontList = new ArrayList(); -private final ArrayList mFontSizes = new ArrayList(); -private final HashMap> mAllFontSizes = new HashMap>(); +private final ArrayList mFontList = new ArrayList<>(); +private final ArrayList mFontSizes = new ArrayList<>(); +private final HashMap> mAllFontSizes = new HashMap<>(); private String mCurrentFontSelected = null; private String mCurrentFontSizeSelected = null; @@ -213,7 +213,7 @@ public class FontController implements AdapterView.OnItemSelectedListener { String key = keys.next(); mFontList.add(key); JSONArray array = jObject2.getJSONArray(key); -fontSizes = new ArrayList(); +fontSizes = new ArrayList<>(); for (int i = 0; i < array.length(); i++) { fontSizes.add(array.getString(i)); } @@ -237,14 +237,14 @@ public class FontController implements AdapterView.OnItemSelectedListener { private void setupFontNameSpinner() { Spinner fontSpinner = mActivity.findViewById(R.id.font_name_spinner); -ArrayAdapter dataAdapter = new ArrayAdapter(mActivity, android.R.layout.simple_spinner_item, mFontList); +ArrayAdapter dataAdapter = new ArrayAdapter<>(mActivity, android.R.layout.simple_spinner_item, mFontList); dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); fontSpinner.setAdapter(dataAdapter); } private void setupFontSizeSpinner() { Spinner fontSizeSpinner = mActivity.findViewById(R.id.font_size_spinner); -ArrayAdapter dataAdapter = new ArrayAdapter(mActivity, android.R.layout.simple_spinner_item, mFontSizes); +ArrayAdapter dataAdapter = new ArrayAdapter<>(mActivity, android.R.layout.simple_spinner_item, mFontSizes); dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); fontSizeSpinner.setAdapter(dataAdapter); }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPickerAdapter.java |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 621db9bfacca199ea1db1abf1a4b57f72fb8c8fa Author: Michael Weghorn AuthorDate: Fri May 6 22:15:19 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:20:22 2022 +0200 android: Move assignment to existing loop There is already a loop just before this one, so just move that assignment there as well. Change-Id: Ie93a0275c0940b7932973264352bad64d0489b03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133984 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index d81d43c77fbc..9b7e8173975c 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -111,9 +111,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ColorPickerAdapter.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4c2d7e23861861c13644f1c9e3dc4e4356912f71 Author: Michael Weghorn AuthorDate: Fri May 6 22:14:35 2022 +0200 Commit: Michael Weghorn CommitDate: Sun May 8 08:19:23 2022 +0200 android: Use existing Color.WHITE constant ... instead of creating the color from the RGB values manually. Change-Id: I2058de553e2e70e7d856ca9bfaf5f9041b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133983 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index 89b9b9044033..d81d43c77fbc 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -113,7 +113,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7250d61c28a9467fa17736717b409cefd50867d3 Author: Michael Weghorn AuthorDate: Wed May 4 07:29:11 2022 +0200 Commit: Michael Weghorn CommitDate: Wed May 4 13:34:40 2022 +0200 android: Don't use log tag longer than 23 chars Addresses this lint error: > .../android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java:146: > Error: The logging tag can be at most 23 characters, was 31 > (GeckoSimpleScaleGestureDetector) [LongLogTag] > Log.e(LOGTAG, "No gesture taking place in getFocusX()!"); Change-Id: I1d18fb3717ccea8dc36695bfef888d035efe8d55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133799 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java b/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java index 1d901a02a14b..e89015b5ed8c 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java @@ -34,7 +34,7 @@ import java.util.Stack; * - It doesn't take pressure into account, which results in smoother scaling. */ public class SimpleScaleGestureDetector { -private static final String LOGTAG = "GeckoSimpleScaleGestureDetector"; +private static final String LOGTAG = "ScaleGestureDetector"; private SimpleScaleGestureListener mListener; private long mLastEventTime;
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0b463cbc22d00f40055983c213c505c60064289a Author: Michael Weghorn AuthorDate: Wed May 4 07:17:01 2022 +0200 Commit: Michael Weghorn CommitDate: Wed May 4 13:34:09 2022 +0200 android: Make clear that column index is non-negative Use `Cursor#getColumnIndexOrThrow` instead of `Cursor#getColumnIndex` here, as suggested in the `Cursor#getColumnIndex` doc [1]: > Returns the zero-based index for the given column name, or -1 if the > column doesn't exist. If you expect the column to exist use > getColumnIndexOrThrow(java.lang.String) instead, which will make the > error more clear. As described in the `OpenableColumns` doc [2], `OpenableColumns.DISPLAY_NAME` is one of the two standard columns that must be supported: > These are standard columns for openable URIs. Providers that serve > openable URIs must support at least these columns when queried. Addresses this lint error: > .../android/source/src/java/org/libreoffice/ui/FileUtilities.java:139: Error: Value must be ≥ 0 [Range] > displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); > ~~~ > >Explanation for issues of type "Range": >Some parameters are required to in a particular numerical range; this check >makes sure that arguments passed fall within the range. For arrays, Strings >and collections this refers to the size or length. [1] https://developer.android.com/reference/android/database/Cursor#getColumnIndex(java.lang.String) [2] https://developer.android.com/reference/android/provider/OpenableColumns Change-Id: I946fcd32a905a4bb8c0527fc1199b9dcc52bccfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133798 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 52b92534947f..902b30ed7794 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -136,7 +136,7 @@ public class FileUtilities { String[] columns = {OpenableColumns.DISPLAY_NAME}; cursor = resolver.query(docUri, columns, null, null, null); if (cursor != null && cursor.moveToFirst()) { -displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); +displayName = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME)); } } catch (SecurityException e) { // thrown e.g. when Uri has become invalid, e.g. corresponding file has been deleted
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |1 + android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |1 + 2 files changed, 2 insertions(+) New commits: commit 4fb2a667a634d04cbb72f005e7a74b4f29af0f81 Author: Michael Weghorn AuthorDate: Wed May 4 07:07:39 2022 +0200 Commit: Michael Weghorn CommitDate: Wed May 4 13:33:23 2022 +0200 android: Call base class implementation in 'onActivityResult' Addresses this lint error: > android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java:253: Error: > Overriding method should call super.onActivityResult [MissingSuperCall] > protected void onActivityResult(int requestCode, int resultCode, Intent data) { > > >Explanation for issues of type "MissingSuperCall": >Some methods, such as View#onDetachedFromWindow, require that you also call >the super implementation as part of your method. Change-Id: Iab2bdadae7a776e4f52d671a6fd47c1b8146b2a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133797 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index dec1cb3649c2..a44ec56e2457 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -1104,6 +1104,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { +super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_SAVEAS && resultCode == RESULT_OK) { final Uri fileUri = data.getData(); saveDocumentAs(fileUri); diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index e7b38b4cac86..a5fa78f22404 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -251,6 +251,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { +super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_OPEN_FILECHOOSER && resultCode == RESULT_OK) { final Uri fileUri = data.getData(); openDocument(fileUri);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c50afd45d2f6a7c70bb3a7591747b162a2675311 Author: Michael Weghorn AuthorDate: Fri Apr 29 22:01:07 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Apr 30 07:11:04 2022 +0200 android: Show Impress icon for .pps files For some reason, that was commented out. Opening such a PowerPoint file worked just fine, and with this commit in place, the Impress icon is shown in the "Recent Files" view as well. Change-Id: I69bce54074c084928d9aa7b95f37145a9692b847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133649 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 4675ca1d0709..52b92534947f 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -63,7 +63,7 @@ public class FileUtilities { mExtnMap.put(".vsdx", DRAWING); mExtnMap.put(".pub", DRAWING); mExtnMap.put(".ppt", IMPRESS); -// mExtnMap.put(".pps", IMPRESS); +mExtnMap.put(".pps", IMPRESS); mExtnMap.put(".xls", CALC); // MS templates
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml|2 +- android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +- android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |1 + 3 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 965205931162b7fcdc175672354103b40985c6ed Author: Michael Weghorn AuthorDate: Fri Apr 29 21:55:54 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Apr 30 07:10:35 2022 +0200 tdf#111427 android: Enable support for .ppsx Opening the sample file of MIME type "application/vnd.openxmlformats-officedocument.presentationml.slideshow" attached to tdf#111427 worked fine now when testing in an x86_64 AVD with API level 31, so declare support for it. Change-Id: I67ace0fb6ee82c0a43624dc32671ba2d453e473c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133648 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 0af368c8460b..c50ad77ae71d 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -70,7 +70,7 @@ - + diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 72da47b8cc3a..4675ca1d0709 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -74,7 +74,7 @@ public class FileUtilities { // OOXML mExtnMap.put(".docx", DOC); mExtnMap.put(".pptx", IMPRESS); -// mExtnMap.put(".ppsx", IMPRESS); +mExtnMap.put(".ppsx", IMPRESS); mExtnMap.put(".xlsx", CALC); // OOXML templates diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 965639e6e2ba..e7b38b4cac86 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -103,6 +103,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings "application/x-mspublisher", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitTileProvider.java |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 5453f75a1e682992f3a725781bb563b8cc76cf1b Author: Michael Weghorn AuthorDate: Tue Apr 26 16:43:15 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Apr 27 05:51:32 2022 +0200 android: Slightly clean up style of LOKitTileProvider#resetParts * Reduce scope of the `parts` variable to the if block * add an emptly line before the next method Change-Id: I22389cb4c9307f6888c4ed836056caf23ce84da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133450 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 fa22bc803c9a..0c7931763571 100644 --- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java @@ -176,9 +176,9 @@ class LOKitTileProvider implements TileProvider { } public void resetParts(){ -int parts = mDocument.getParts(); mContext.getDocumentPartView().clear(); if (mDocument.getDocumentType() != Document.DOCTYPE_TEXT) { +int parts = mDocument.getParts(); for (int i = 0; i < parts; i++) { String partName = mDocument.getPartName(i); @@ -192,7 +192,9 @@ class LOKitTileProvider implements TileProvider { mContext.getDocumentPartView().add(partView); } } -} public void renamePart(String partName) { +} + +public void renamePart(String partName) { try{ for(int i=0; i
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit b68821acc77c774c09ebca8be157a768ea417e04 Author: Michael Weghorn AuthorDate: Thu Apr 21 17:01:55 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 21:01:37 2022 +0200 android: Show file chooser despite package visibility filtering in API 30 While it was working just fine in my x86_64 AVD with API level 31, opening the the file chooser on a real HW aarch64 device running Android 12 no longer worked by tapping on the TextView in `LibreOfficeUIActivity` after updating target API from 28 to 31 in commit 2ab389b251744fa7f3f6b060c09746e59d87f3b1 Date: Tue Apr 19 10:33:27 2022 +0200 android: Update compileSdkVersion/targetSdkVersion to 31 The intent.resolveActivity(getPackageManager()) != null check was failing there, so the Activity with `Intent.ACTION_OPEN_DOCUMENT` wasn't started there. This looks like an issue due to package visibility filtering introduced in target API level 30. Quoting from [1]: > When an app targets Android 11 (API level 30) or higher and queries for > information about the other apps that are installed on a device, the > system filters this information by default. The limited package > visibility reduces the number of apps that appear to be installed on a > device, from your app's perspective. > > [...] > > The limited app visibility affects the return results of methods that > give information about other apps, such as queryIntentActivities(), > getPackageInfo(), and getInstalledApplications(). The limited > visibility also affects explicit interactions with other apps, such > as starting another app's service. From how I understand it, the check is used to make sure that there is an app that can handle the Intent, as e.g. the "Android fundamentals 02.3: Implicit intents" tutorial [2] mentions it for the example using an `Intent.ACTION_VIEW`: > Use the resolveActivity() method and the Android package manager to find > an Activity that can handle your implicit Intent. Make sure that the > request resolved successfully. > > if (intent.resolveActivity(getPackageManager()) != null) { > } > > This request matches your Intent action and data with the Intent filters > for installed apps on the device. You use it to make sure there is at > least one Activity that can handle your requests. While that sounds reasonable to make sure there is an app that can view specific data passed *from* the app (and [3] describes how to add a corresponding `` element to make this use case work), it seems to be unnecessary for `Intent.ACTION_OPEN_DOCUMENT`, since that causes the system to "display the various DocumentsProvider instances installed on the device, letting the user navigate through them" and Android presumably at least provides a provider for handling local files by itself in any case. The `Intent.ACTION_GET_CONTENT` case used instead of `Intent.ACTION_OPEN_DOCUMENT` for API level < 19 should presumably be similar. Anyway, in case there should still be any case where the Intent cannot be handled: `startActivityForResult` "throws ActivityNotFoundException if there was no Activity found to run the given Intent." [4], so add a try-catch block handling that exception instead of the previous check. [1] https://developer.android.com/training/package-visibility [2] https://developer.android.com/codelabs/android-training-activity-with-implicit-intent?index=..%2F..android-training#3 [3] https://developer.android.com/training/package-visibility/use-cases#open-a-file [4] https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int) Change-Id: I7702b100d71333be2d78df1bc81ef2e5a7e016bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133272 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 16e0fe8af2cd..965639e6e2ba 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -10,6 +10,7 @@ package org.libreoffice.ui; import android.Manifest; +import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -268,8 +269,10 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings intent.setType("*/*"); intent.putExtra(Inte
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b68362b178f732f90fdc99073aaa5940bee409bb Author: Michael Weghorn AuthorDate: Thu Apr 21 16:34:03 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 21:01:05 2022 +0200 android: Slightly improve style in use of arrays Addresses these warnings shown in Android Studio for class `LibreOfficeUIActivity`: * "Unnecessary 'Arrays.asList()' call" * "Raw use of parameterized class 'ArrayList'" * "Explicit type argument ShortcutInfo can be replaced with <>" Change-Id: I083e5fcf804209fae704b19643ce80bc92126ca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133271 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 1f7292b2a538..16e0fe8af2cd 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -197,9 +197,9 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings SharedPreferences prefs = getSharedPreferences(EXPLORER_PREFS_KEY, MODE_PRIVATE); String recentPref = prefs.getString(RECENT_DOCUMENTS_KEY, ""); -List recentFileStrings = Arrays.asList(recentPref.split(RECENT_DOCUMENTS_DELIMITER)); +String[] recentFileStrings = recentPref.split(RECENT_DOCUMENTS_DELIMITER); -final List recentFiles = new ArrayList(); +final List recentFiles = new ArrayList<>(); for (String recentFileString : recentFileStrings) { Uri uri = Uri.parse(recentFileString); String filename = FileUtilities.retrieveDisplayNameForDocumentUri(getContentResolver(), uri); @@ -364,7 +364,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings getContentResolver().takePersistableUriPermission(fileUri, Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION); String newRecent = fileUri.toString(); -List recentsList = new ArrayList(Arrays.asList(prefs.getString(RECENT_DOCUMENTS_KEY, "").split(RECENT_DOCUMENTS_DELIMITER))); +List recentsList = new ArrayList<>(Arrays.asList(prefs.getString(RECENT_DOCUMENTS_KEY, "").split(RECENT_DOCUMENTS_DELIMITER))); // remove string if present, so that it doesn't appear multiple times recentsList.remove(newRecent); @@ -393,7 +393,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings //Remove all shortcuts, and apply new ones. shortcutManager.removeAllDynamicShortcuts(); -ArrayList shortcuts = new ArrayList(); +ArrayList shortcuts = new ArrayList<>(); for (String recentDoc : recentsList) { Uri docUri = Uri.parse(recentDoc); String filename = FileUtilities.retrieveDisplayNameForDocumentUri(getContentResolver(), docUri);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 6515633aad867dd9e2d59378f3254e292dbdacb0 Author: Michael Weghorn AuthorDate: Thu Apr 21 15:54:55 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 21:00:29 2022 +0200 android: Drop unused import and extra semicolon Change-Id: I19557b0b1d63698a31dac61ce9fde3ce07f86451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133267 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 3b7b401804b8..1f7292b2a538 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -10,7 +10,6 @@ package org.libreoffice.ui; import android.Manifest; -import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -267,7 +266,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings } intent.setType("*/*"); -intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; +intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES); if (intent.resolveActivity(getPackageManager()) != null) { startActivityForResult(intent, REQUEST_CODE_OPEN_FILECHOOSER);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 74 -- 1 file changed, 33 insertions(+), 41 deletions(-) New commits: commit 62524dcf152b274b855005402d082debaa3fc84a Author: Michael Weghorn AuthorDate: Thu Apr 21 15:52:54 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 20:59:56 2022 +0200 android: Avoid using resource ID in switch-case Adresses this warning shown in Android Studio: > Resource IDs will be non-final by default in Android Gradle Plugin > version 8.0, avoid using them in switch case statements Change-Id: I8cead0ceb3b71e263b29d4283a8cfac522ed4204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133266 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index f2e366c90ed3..3b7b401804b8 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -318,19 +318,18 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings @Override public boolean onOptionsItemSelected(MenuItem item) { -switch (item.getItemId()) { -case R.id.action_about: { -AboutDialogFragment aboutDialogFragment = new AboutDialogFragment(); -aboutDialogFragment.show(getSupportFragmentManager(), "AboutDialogFragment"); -} -return true; -case R.id.action_settings: -startActivity(new Intent(getApplicationContext(), SettingsActivity.class)); -return true; - -default: -return super.onOptionsItemSelected(item); +final int itemId = item.getItemId(); +if (itemId == R.id.action_about) { +AboutDialogFragment aboutDialogFragment = new AboutDialogFragment(); +aboutDialogFragment.show(getSupportFragmentManager(), "AboutDialogFragment"); +return true; } +if (itemId == R.id.action_settings) { +startActivity(new Intent(getApplicationContext(), SettingsActivity.class)); +return true; +} + +return super.onOptionsItemSelected(item); } public void readPreferences(){ @@ -441,35 +440,28 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings @Override public void onClick(View v) { int id = v.getId(); -switch (id){ -case 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 { -expandFabMenu(); -} -break; -case R.id.open_file_view: -showSystemFilePickerAndOpenFile(); -break; -case R.id.newWriterFAB: -loadNewDocument(DocumentType.WRITER); -break; -case R.id.newImpressFAB: -loadNewDocument(DocumentType.IMPRESS); -break; -case R.id.newCalcFAB: -loadNewDocument(DocumentType.CALC); -break; -case R.id.newDrawFAB: -loadNewDocument(DocumentType.DRAW); -break; +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 { +expandFabMenu(); +} +} else if (id == R.id.open_file_view) { +showSystemFilePickerAndOpenFile(); +} else if (id == R.id.newWriterFAB) { +loadNewDocument(DocumentType.WRITER); +} else if (id == R.id.newImpressFAB) { +loadNewDocument(DocumentType.IMPRESS); +} else if (id == R.id.newCalcFAB) { +loadNewDocument(DocumentType.CALC); +} else if (id == R.id.newDrawFAB) { +loadNewDocument(DocumentType.DRAW); } } }
[Libreoffice-commits] core.git: android/source
android/source/res/layout/activity_document_browser.xml |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 730add0ca619985b99e133dd586e063f0f12538b Author: Michael Weghorn AuthorDate: Thu Apr 21 13:48:53 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 20:57:21 2022 +0200 android: Use drawable tag already supported with API level 16 Use the `app:drawableLeftCompat` tag instead of `android:drawableLeft` to set the icon to show in the TextView. With the latter, trying to start Android Viewer in an x86 AVD with API level 16 resulted in this crash: > E/AndroidRuntime( 2510): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.libreoffice/org.libreoffice.ui.LibreOfficeUIActivity}: android.view.InflateException: Binary XML file line #80: Error inflating class TextView > E/AndroidRuntime( 2510):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) > E/AndroidRuntime( 2510):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) > E/AndroidRuntime( 2510):at android.app.ActivityThread.access$600(ActivityThread.java:130) > E/AndroidRuntime( 2510):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) > E/AndroidRuntime( 2510):at android.os.Handler.dispatchMessage(Handler.java:99) > E/AndroidRuntime( 2510):at android.os.Looper.loop(Looper.java:137) > E/AndroidRuntime( 2510):at android.app.ActivityThread.main(ActivityThread.java:4745) > E/AndroidRuntime( 2510):at java.lang.reflect.Method.invokeNative(Native Method) > E/AndroidRuntime( 2510):at java.lang.reflect.Method.invoke(Method.java:511) > E/AndroidRuntime( 2510):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) > E/AndroidRuntime( 2510):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) > E/AndroidRuntime( 2510):at dalvik.system.NativeStart.main(Native Method) > E/AndroidRuntime( 2510): Caused by: android.view.InflateException: Binary XML file line #80: Error inflating class TextView > E/AndroidRuntime( 2510):at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.inflate(LayoutInflater.java:489) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.inflate(LayoutInflater.java:396) > E/AndroidRuntime( 2510):at android.view.LayoutInflater.inflate(LayoutInflater.java:352) > E/AndroidRuntime( 2510):at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696) > E/AndroidRuntime( 2510):at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170) > E/AndroidRuntime( 2510):at org.libreoffice.ui.LibreOfficeUIActivity.createUI(LibreOfficeUIActivity.java:169) > E/AndroidRuntime( 2510):at org.libreoffice.ui.LibreOfficeUIActivity.onCreate(LibreOfficeUIActivity.java:147) > E/AndroidRuntime( 2510):at android.app.Activity.performCreate(Activity.java:5008) > E/AndroidRuntime( 2510):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) > E/AndroidRuntime( 2510):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) > E/AndroidRuntime( 2510):... 11 more > E/AndroidRuntime( 2510): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi-v4/ic_folder_grey_48dp.xml from drawable resource ID #0x7f080083 > E/AndroidRuntime( 2510):at android.content.res.Resources.loadDrawable(Resources.java:1923) > E/AndroidRuntime( 2510):at android.content.res.TypedArray.getDrawable(TypedArray.java:601) > E/AndroidRuntime( 2510):at android.widget.TextView.(TextView.java:614) > E/AndroidRuntime( 2510):at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:100) > E/AndroidRuntime( 2510):at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:95) > E/AndroidRuntime( 2510):at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:194) > E/AndroidRuntime( 2510):at androidx.appcompat.app.AppCompatV
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b6a237ad1f5957b9d32bca7e41aa4a2b3bed01fc Author: Michael Weghorn AuthorDate: Thu Apr 21 08:18:18 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 21 11:16:14 2022 +0200 android: use mavenCentral instead of jcenter repository From the `./gradlew --warning-mode all assembleStrippedUIEditingRelease` output: > > Configure project : > The RepositoryHandler.jcenter() method has been deprecated. This is > scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset > in February 2021. Use mavenCentral() instead. Consult the upgrading > guide for further information: > https://docs.gradle.org/7.2/userguide/upgrading_version_6.html#jcenter_deprecation > at build_a6ed945jjgv6miyybz50fclhq$_run_closure1$_closure2.doCall(/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/build.gradle:14) > (Run with --stacktrace to get the full stack trace of this deprecation warning.) Change-Id: I5db84a9778b598d1e3459dd313aa05c229060368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133239 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 43a22c3b31a8..80427b8b73b1 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -4,14 +4,14 @@ apply from: 'liboSettings.gradle' allprojects { repositories { -jcenter() +mavenCentral() google() } } //build-time dependencies - android plugin for gradle buildscript { repositories { -jcenter() +mavenCentral() google() } dependencies {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f22f83fbac3a0a419c2e95d7b725525fd02649e6 Author: Michael Weghorn AuthorDate: Tue Apr 19 17:19:26 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Apr 20 05:20:08 2022 +0200 android: Update dependencies to current versions This requires the Gradle update from Change-Id Ia982d72d877e229c3006c6d528b830d16c88481f "android: Update Android Gradle Plugin to 7.1.3" as a prerequisite, since the build would otherwise fail with > > Task :desugarStrippedUIDebugFileDependencies FAILED > D8: Method name '$private$' in class > 'com.sun.star.frame.XMenuBarMergingAcceptor$-CC' cannot be represented > in dex format. > > FAILURE: Build failed with an exception. after updating only the dependencies. Change-Id: Ifa007fa0e520e9494ace173d1643abb7d7a5f9c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133183 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 08f59bd2f90a..118d7c53d86e 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -27,8 +27,8 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.google.android.material:material:1.0.0' -implementation 'androidx.constraintlayout:constraintlayout:1.1.3' +implementation 'com.google.android.material:material:1.5.0' +implementation 'androidx.constraintlayout:constraintlayout:2.1.3' } android {
[Libreoffice-commits] core.git: android/source
android/source/build.gradle |4 1 file changed, 4 deletions(-) New commits: commit 8917c8b11a4c05e9dd8b0259146179a99ae08a19 Author: Michael Weghorn AuthorDate: Tue Apr 19 17:18:03 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Apr 20 05:19:52 2022 +0200 android: Drop obsolete "sourceCompatibility 6" This addresses this warning when building Android Viewer: > > Task :compileStrippedUIDebugJavaWithJavac > warning: [options] source value 6 is obsolete and will be removed in a future release > warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. Change-Id: Ic1a80117e7e8c31774947729452bfafacd7a24c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133182 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/build.gradle b/android/source/build.gradle index 47661f79c4cc..08f59bd2f90a 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -33,10 +33,6 @@ dependencies { android { compileSdkVersion 31 -compileOptions { -// silence some java-language features hints -sourceCompatibility 6 -} // uses non-conventional source layout, so need to reconfigure accordingly // ToDo move to conventional layout, so stuff can be stripped down. sourceSets {
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 003e2873e4463974e59e1f909f9250cde743851f Author: Michael Weghorn AuthorDate: Thu Apr 14 09:34:28 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 14 20:40:23 2022 +0200 android: Use proper Intent to open doc for API level < 19 `Intent.ACTION_OPEN_DOCUMENT` was introduced in API level 19, therefore `Intent.ACTION_GET_CONTENT` is supposed to be used for older Android versions. The previous attempt at doing so didn't work, since no `ActivityNotFoundException` is thrown when trying to set the action to `Intent.ACTION_OPEN_DOCUMENT` on older Android versions. Fix that by using a proper version check instead. Change-Id: Ie06fa3f39e3042b4b7161a3c937bf655eb658abd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133025 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index c18b784e581b..f2e366c90ed3 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -258,9 +258,10 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings private void showSystemFilePickerAndOpenFile() { Intent intent = new Intent(); -try { +if (Build.VERSION.SDK_INT >= 19) { intent.setAction(Intent.ACTION_OPEN_DOCUMENT); -} catch (ActivityNotFoundException exception) { +} +else { // Intent.ACTION_OPEN_DOCUMENT added in API level 19, but minSdkVersion is currently 16 intent.setAction(Intent.ACTION_GET_CONTENT); }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f869807175f1fc49328465473aa8e90b6f1876ff Author: Michael Weghorn AuthorDate: Thu Apr 14 17:17:04 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 14 20:40:09 2022 +0200 android: Use "ContentResolver#query" available from API level 1 Use the `ContentResolver#query` overload that is available from Android API level 1 on, not the one that's only available from API level 26 on [2], which would otherwise trigger an exception if run on devices running Android version < 8.0, as seen on an AVD with API level 21: > E/AndroidRuntime( 2914): FATAL EXCEPTION: main > E/AndroidRuntime( 2914): Process: org.libreoffice, PID: 2914 > E/AndroidRuntime( 2914): java.lang.NoSuchMethodError: No virtual method query(Landroid/net/Uri;[Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor; in class Landroid/content/ContentResolver; or its super classes (declaration of 'android.content.ContentResolver' appears in /system/framework/framework.jar) > E/AndroidRuntime( 2914):at org.libreoffice.ui.FileUtilities.retrieveDisplayNameForDocumentUri(FileUtilities.java:137) > E/AndroidRuntime( 2914):at org.libreoffice.ui.LibreOfficeUIActivity.createUI(LibreOfficeUIActivity.java:206) > E/AndroidRuntime( 2914):at org.libreoffice.ui.LibreOfficeUIActivity.onCreate(LibreOfficeUIActivity.java:147) > E/AndroidRuntime( 2914):at android.app.Activity.performCreate(Activity.java:5937) > E/AndroidRuntime( 2914):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) > E/AndroidRuntime( 2914):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251) > E/AndroidRuntime( 2914):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) > E/AndroidRuntime( 2914):at android.app.ActivityThread.access$800(ActivityThread.java:144) > E/AndroidRuntime( 2914):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) > E/AndroidRuntime( 2914):at android.os.Handler.dispatchMessage(Handler.java:102) > E/AndroidRuntime( 2914):at android.os.Looper.loop(Looper.java:135) > E/AndroidRuntime( 2914):at android.app.ActivityThread.main(ActivityThread.java:5221) > E/AndroidRuntime( 2914):at java.lang.reflect.Method.invoke(Native Method) > E/AndroidRuntime( 2914):at java.lang.reflect.Method.invoke(Method.java:372) > E/AndroidRuntime( 2914):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) > E/AndroidRuntime( 2914):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) > [1] https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String) [2] https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal) Change-Id: I13ecc57d3d6b25a7eb2e5ff85a3420ef8064cb20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133024 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 5bfb93b4c1f5..72da47b8cc3a 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -134,7 +134,7 @@ public class FileUtilities { Cursor cursor = null; try { String[] columns = {OpenableColumns.DISPLAY_NAME}; -cursor = resolver.query(docUri, columns, null, null); +cursor = resolver.query(docUri, columns, null, null, null); if (cursor != null && cursor.moveToFirst()) { displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); }
[Libreoffice-commits] core.git: android/source configure.ac
android/source/AndroidManifest.xml | 2 android/source/build.gradle| 4 - android/source/gradle.properties | 2 android/source/res/layout/activity_document_browser.xml| 28 +- android/source/res/layout/activity_main.xml| 14 ++--- android/source/res/layout/number_picker.xml| 4 - android/source/res/layout/toolbar_bottom.xml | 2 android/source/res/layout/toolbar_color_picker.xml | 12 ++-- android/source/src/java/org/libreoffice/AboutDialogFragment.java | 4 - android/source/src/java/org/libreoffice/ColorPaletteAdapter.java | 4 - android/source/src/java/org/libreoffice/ColorPickerAdapter.java| 4 - android/source/src/java/org/libreoffice/FontController.java| 6 +- android/source/src/java/org/libreoffice/FormattingController.java | 4 - android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 10 +-- android/source/src/java/org/libreoffice/PasswordDialogFragment.java| 6 +- android/source/src/java/org/libreoffice/PresentationActivity.java | 8 +- android/source/src/java/org/libreoffice/ToolbarController.java | 2 android/source/src/java/org/libreoffice/UNOCommandsController.java | 2 android/source/src/java/org/libreoffice/canvas/BitmapHandle.java | 2 android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java | 2 android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java | 2 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 18 +++--- android/source/src/java/org/libreoffice/ui/RecentFilesAdapter.java | 4 - configure.ac | 8 -- 24 files changed, 73 insertions(+), 81 deletions(-) New commits: commit 70cb4955f1c099b030567e6bf4702f7dc6ee521a Author: Michael Weghorn AuthorDate: Thu Apr 14 11:29:27 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 14 16:49:41 2022 +0200 android: Port from Android Support Lib to AndroidX Replace the no longer maintained Android Support Library with the Android Jetpack libraries. Quoting [1]: > Version 28.0.0 is the last release of the Support Library. There will be > no more android.support library releases. All new feature development > will be in the androidx namespace. Most porting was done automatically by using Android Studio's "Refactor" -> "Migrate to AndroidX..." function. In `android/source/res/layout/toolbar_bottom.xml` and `android/source/res/layout/toolbar_color_picker.xml`, the uses of `app:layout_behavior="android.support.design.widget.BottomSheetBehavior"` had to be replaced manually as described at [2], because the app would crash when using the old "android.support" values. Also drop the Android Support Library related bits from configure.ac In a quick test, this worked fine and no obvious difference was visible when running this in various AVDs. When trying to test this in an x86 AVD still using SDK 16 (Android 4.1), which is currently specified as Android Viewer's `minSdkVersion`, only various unrelated issues showed up, some of which will be handled in follow-up commits. After the migration, many weird errors showed up in Android Studio, which disappeared after invalidating the caches (via "File" -> "Invalidate Caches..."). [1] https://developer.android.com/jetpack/androidx [2] https://stackoverflow.com/questions/45100963/runtimeexception-could-not-inflate-behavior-subclass Change-Id: I2a57f0ebd56e7ecc09b7d65aae17fd15088a633b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133002 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 987aeed66ae6..43f790fca985 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -116,7 +116,7 @@ diff --git a/android/source/build.gradle b/android/source/build.gradle index a690749ff0ee..7dc93e778a7c 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -27,8 +27,8 @@ dependencies { "libreoffice.jar", "unoloader.jar" ]) -implementation 'com.android.support:design:27.1.1' // also pulls-in corresponding support libraries -implementation 'com.android.support.constraint:constraint-layout:1.1.2' +implementation 'com.google.android.material:material:1.0.0' +implementation 'androidx.constraintl
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitThread.java | 20 --- 1 file changed, 6 insertions(+), 14 deletions(-) New commits: commit d2572dc9d6c7cda9d6e08e46c42048e12e4f04e0 Author: Michael Weghorn AuthorDate: Wed Apr 13 13:52:40 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Apr 13 18:23:02 2022 +0200 android: Deduplicate LOKitThread#load{,New}Document After Change-Id I15ecc2eba6c5ee441f6e14f8229594cab05dbba7 "tdf#148556 android: Don't delay refresh when loading doc", the only thing that `LOKitThread#loadNewDocument` does in addition to `LOKithThread#loadDocument` is to save the newly created document (to a temp file) if loading was successful. So, have `loadDocument` return a boolean saying whether loading was successful and call that method from `loadNewDocument` to reduce duplication. Change-Id: I9b99e011b3f5105bb60f95174de393462ff08271 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132966 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 b4aee40c1cd3..c29f98461fb9 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -204,8 +204,9 @@ class LOKitThread extends Thread { /** * Handle load document event. * @param filePath - filePath to where the document is located + * @return Whether the document has been loaded successfully. */ -private void loadDocument(String filePath) { +private boolean loadDocument(String filePath) { mLayerClient = mContext.getLayerClient(); mInvalidationHandler = new InvalidationHandler(mContext); @@ -216,8 +217,10 @@ class LOKitThread extends Thread { updateZoomConstraints(); refresh(true); LOKitShell.hideProgressSpinner(mContext); +return true; } else { closeDocument(); +return false; } } @@ -227,20 +230,9 @@ class LOKitThread extends Thread { * @param fileType - fileType what type of new document is to be loaded */ private void loadNewDocument(String filePath, String fileType) { -mLayerClient = mContext.getLayerClient(); - -mInvalidationHandler = new InvalidationHandler(mContext); -mTileProvider = TileProviderFactory.create(mContext, mInvalidationHandler, fileType); - -if (mTileProvider.isReady()) { -LOKitShell.showProgressSpinner(mContext); -updateZoomConstraints(); -refresh(true); -LOKitShell.hideProgressSpinner(mContext); - +boolean ok = loadDocument(fileType); +if (ok) { mTileProvider.saveDocumentAs(filePath, true); -} else { -closeDocument(); } }
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitThread.java | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) New commits: commit 4476fd51a324930e832535c10979564afc6968f2 Author: Michael Weghorn AuthorDate: Wed Apr 13 12:59:08 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Apr 13 18:22:49 2022 +0200 tdf#148556 android: Don't delay refresh when loading doc The previous way of using a separate Runnable to do the refresh and posting that to the main handler instead of doing the refresh right away resulted in a timing issue, due to which it could happen that a Calc document would not be rendered when initally loaded (but only after another tile reevaluation was triggered, e.g. by tapping on the screen). While this appears to happen mostly on fast hardware, I could reproduce on my AVD as well when increasing the minimum time that has to pass between tile reevaluations to 100 ms: --- a/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java @@ -157,7 +157,7 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba } long currentReevaluationNanoTime = System.nanoTime(); -if ((currentReevaluationNanoTime - reevaluationNanoTime) < 25 * 100) { +if ((currentReevaluationNanoTime - reevaluationNanoTime) < 100 * 100) { return; } For the bad case, the Runnable that triggers the refresh would be taken from the message queue and run on the main thread at a point in time that resulted in `LOKitShell.sendTileReevaluationRequest` not getting called in `ComposedTileLayer#reevaluateTiles` due to the above-mentioned minimum time in between tile reevaluations. Avoid the problem and simplify the whole handling by no longer posting a Runnable to the main handler, but calling `refresh()` right away. Posting to the main handler had been introduced in commit 27326e0f587c20d8dcf1595829233de1bd3fbe9e Date: Fri Aug 3 07:13:00 2018 -0700 tdf#119082 Exception wrong thread on Android Viewer to avoid crashes due to things being done on the wrong thread when switching to another app and then back to Android Viewer (s. tdf#119082), but that is no longer a problem, because the document is no longer loaded anew in that case since commit 1bc42472200c32c9a0a10dd1c3cd6c6a8a5d47d2 Date: Fri Apr 9 13:59:43 2021 +0200 tdf#95517 android: Rework app/doc lifecycle handling , so the code path is not used there any more, but only when the document is initially loaded, triggered in `LibreOfficeMainActivity#onCreate`. After all, the problem seems to be a similar one as fixed in commit 128f67e0efa02294205a1abe1be874557ecdcecd Date: Tue May 18 14:27:51 2021 +0200 tdf#142348 android: Avoid extra refresh after loading doc , where another timing issue in the handling of a refresh event could result in a blank page instead of the Calc doc being rendered. With the refresh being done right away, the synchronization added in commit 55661298bb3e9087a89a08637e4285f090c4e0e8 Date: Wed Apr 1 09:00:13 2020 +0200 tdf#131195 android: Don't destroy doc while loading it is also no more needed, because the situation described in its commit message no longer applies: > Since the 'refresh()' in 'LOKitThread::loadDocument' is > not executed synchronously but posted to the main handler, > this needs to be synchronized to prevent the document from > being deleted while it's being used. Change-Id: I15ecc2eba6c5ee441f6e14f8229594cab05dbba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132965 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 a4d5ba99f1a2..b4aee40c1cd3 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -214,15 +214,7 @@ class LOKitThread extends Thread { if (mTileProvider.isReady()) { LOKitShell.showProgressSpinner(mContext); updateZoomConstraints(); -LOKitShell.getMainHandler().post(new Runnable() { -@Override -public void run() { -// synchronize to avoid deletion while loading -synchronized (LOKitThread.this) { -refresh(true); -} -} -}); +refresh(tr
[Libreoffice-commits] core.git: android/source
android/source/res/values-de/strings.xml |1 - 1 file changed, 1 deletion(-) New commits: commit 2f998468b09de615eb89d2f0d607c635644f7750 Author: Michael Weghorn AuthorDate: Mon Apr 11 17:06:21 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Apr 11 19:53:36 2022 +0200 android: Drop leftover German translation The English string had already been dropped in commit a23bd42e9b2f6401c710ac95afcc3aa8f360d65c Author: Michael Weghorn Date: Tue Apr 6 14:26:06 2021 +0200 android: Drop custom file abstraction + UI While the leftover German translation is just ignored in development builds, it resulted in an error when building a release APK like this: > ./gradlew assembleStrippedUIEditingRelease > warn: removing resource org.libreoffice:string/filter without required default value. > > > > Task :compileStrippedUIEditingReleaseJavaWithJavac > warning: [options] source value 6 is obsolete and will be removed in a future release > warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. > Note: /home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/src/java/org/libreoffice/SettingsActivity.java uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > Note: /home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java uses unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > 2 warnings > > > Task :lintVitalStrippedUIEditingRelease > /home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/res/values-de/strings.xml:28: Error: "filter" is translated here but not found in default locale [ExtraTranslation] > Filtern nach > ~ > >Explanation for issues of type "ExtraTranslation": >If a string appears in a specific language translation file, but there is >no corresponding string in the default locale, then this string is probably >unused. (It's technically possible that your application is only intended >to run in a specific locale, but it's still a good idea to provide a >fallback.) > >Note that these strings can lead to crashes if the string is looked up on >any locale not providing a translation, so it's important to clean them >up. > > 1 errors, 0 warnings > > > Task :lintVitalStrippedUIEditingRelease FAILED > > FAILURE: Build failed with an exception. Change-Id: I9a6c984d3250852d0e806cffdff81770ed868299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132834 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 5342cf73ad7e..e1a87da475bf 100644 --- a/android/source/res/values-de/strings.xml +++ b/android/source/res/values-de/strings.xml @@ -25,7 +25,6 @@ LibreOffice Browser Suchen -Filtern nach Suchbegriff nicht gefunden Einstellungen Datei-Icon
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java | 16 ++ 1 file changed, 4 insertions(+), 12 deletions(-) New commits: commit 9c5facd726e3d5148d17ad547213afe0874ea910 Author: Michael Weghorn AuthorDate: Mon Apr 11 11:49:59 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Apr 11 13:19:07 2022 +0200 android: Pass variable for "selected" param ... of the CalcHeaderCell ctor, to simplify this a bit. Change-Id: I02ff00acccaec26de54534c6c021b9cd05f1d472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132813 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java b/android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java index a8b2d2048409..50a1bfbdc6b0 100644 --- a/android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java +++ b/android/source/src/java/org/libreoffice/overlay/CalcHeadersView.java @@ -101,12 +101,8 @@ public class CalcHeadersView extends View { bottom = -origin.y + zoom*mDimens.get(i); if (top <= getHeight() && bottom >= 0) { inRangeOfVisibleHeaders = true; -if (mCellCursorRect != null && bottom > mCellCursorRect.top - origin.y && top < mCellCursorRect.bottom - origin.y) { -// if cell is within current selected portion -new CalcHeaderCell(0f, top, getWidth(), bottom - top, mLabels.get(i), true).onDraw(canvas); -} else { -new CalcHeaderCell(0f, top, getWidth(), bottom - top, mLabels.get(i), false).onDraw(canvas); -} +boolean isSelected = mCellCursorRect != null && bottom > mCellCursorRect.top - origin.y && top < mCellCursorRect.bottom - origin.y; +new CalcHeaderCell(0f, top, getWidth(), bottom - top, mLabels.get(i), isSelected).onDraw(canvas); } else { if (inRangeOfVisibleHeaders) { break; @@ -116,12 +112,8 @@ public class CalcHeadersView extends View { left = -origin.x + zoom*mDimens.get(i-1); right = -origin.x + zoom*mDimens.get(i); if (left <= getWidth() && right >= 0) { -if (mCellCursorRect != null && right > mCellCursorRect.left - origin.x && left < mCellCursorRect.right - origin.x) { -// if cell is within current selected portion -new CalcHeaderCell(left, 0f, right - left, getHeight(), mLabels.get(i), true).onDraw(canvas); -} else { -new CalcHeaderCell(left, 0f, right - left, getHeight(), mLabels.get(i), false).onDraw(canvas); -} +boolean isSelected = mCellCursorRect != null && right > mCellCursorRect.left - origin.x && left < mCellCursorRect.right - origin.x; +new CalcHeaderCell(left, 0f, right - left, getHeight(), mLabels.get(i), isSelected).onDraw(canvas); } else { if (inRangeOfVisibleHeaders) { break;
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml |2 -- 1 file changed, 2 deletions(-) New commits: commit 44950bc4bbcafb86d9e6466b5ce0852122d7f2be Author: Michael Weghorn AuthorDate: Tue Mar 29 10:42:33 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 11:59:28 2022 +0200 android: Enable support for FODS Enable support for MIME type "application/vnd.oasis.opendocument.spreadsheet-flat-xml" in AndroidManifest, the comment saying it crashes the app is obsolete. However, at least on my Android 10 AVD, that MIME type does not seem to be associated with '*.fods' files, so they were not offered to be opened. MIME type "application/octet-stream" was used instead, for which no support is declared. For testing, I just disabled the MIME type filter locally and was then able to open an FODS file just fine: --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -266,7 +266,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings } intent.setType("*/*"); -intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; +//intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; Change-Id: Ibf3f559a313f0b89bc4c25498e3efa0fcbded506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132263 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 53a064fb901b..987aeed66ae6 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -48,9 +48,7 @@ -
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6bfa94398a0ea501fce7634ab0ae9ce35c442043 Author: Michael Weghorn AuthorDate: Fri Jun 11 13:55:43 2021 +0200 Commit: Michael Weghorn CommitDate: Sun Jun 13 20:49:21 2021 +0200 tdf#142618 android: Don't crash when passed MIME type is null Change-Id: I5fb532b36fe650596f25a1ba8b7dc56e21292dc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117053 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index 4c9c0d6d10eb..5bfb93b4c1f5 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -121,7 +121,7 @@ public class FileUtilities { */ public static boolean isTemplateMimeType(final String mimeType) { // this works for ODF and OOXML template MIME types -return mimeType.endsWith("template"); +return mimeType != null && mimeType.endsWith("template"); } /** ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitThread.java|2 - android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java | 16 +- android/source/src/java/org/mozilla/gecko/gfx/LayerView.java|4 +- 3 files changed, 12 insertions(+), 10 deletions(-) New commits: commit 4a9eef7849a75ba91806886ea9c96d114c8d56f9 Author: Michael Weghorn AuthorDate: Fri May 21 19:20:08 2021 +0200 Commit: Michael Weghorn CommitDate: Fri May 21 22:00:24 2021 +0200 tdf#106893 android: Show whole doc when closing soft keyboard When closing the software keyboard after typing, a black area instead of the doc content was shown in Android Viewer. This looks related to the fact that a SurfaceView is involved, s.a. [1] which suggests two potential solutions to fix the issue, but none of them really works well. (Setting a transparent background didn't have any effect when I tried. Using 'android:windowSoftInputMode="adjustPan"' in AndroidManifest.xml would work in general, but trigger the problem described in tdf#96789, namely the software keyboard would be shown on top of the document and the last part of the document would not be visible with the software keyboard enabled any more.) Rather, make sure an 'LOEvent.SIZE_CHANGED' is triggered when the software keyboard is enabled or disabled, in which case 'LayerView#onLayout' is called with a 'changed=true' parameter. To avoid resetting zoom and position of the document for this case, call the 'redraw' function with param 'false' when processing this type of event in 'LOKitThread#processEvent' (s.a. Change-Id: I8ba6a7cd8d984ad99654e188e00144e1edf407ed, "android: Don't reset zoom and position on refresh event" that did a similar thing for 'LOEvent.REFRESH'). This adds a 'force' boolean parameter to 'GeckoLayerClient#sendResizeEventIfNecessary', which interestingly had been there before commit 43bbf53bbad4623355e6344094573f8efca01df2 Date: Tue Jan 27 13:01:53 2015 +0900 android: remove unneded code from GeckoLayerClient but I didn't further check whether it had been used in any way that would have been useful for this scenario back then. Stackoverflow article [2] was quite helpful. [1] https://stackoverflow.com/questions/2978290/androids-edittext-is-hidden-when-the-virtual-keyboard-is-shown-and-a-surfacevie [2] https://stackoverflow.com/questions/52223095/how-to-detect-redraw-of-screen-has-completed-after-soft-keyboard-closes Change-Id: If3fdd1335468fc50901fc6c1982c1463c7804309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115973 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 547cb4acc6d2..a4d5ba99f1a2 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -295,7 +295,7 @@ class LOKitThread extends Thread { closeDocument(); break; case LOEvent.SIZE_CHANGED: -redraw(true); +redraw(false); break; case LOEvent.CHANGE_PART: changePart(event.mPartIndex); diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java index 681fb6fd6019..72a96f0bb00f 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java @@ -80,7 +80,7 @@ public class GeckoLayerClient implements PanZoomTarget { mView.setLayerRenderer(mLayerRenderer); -sendResizeEventIfNecessary(); +sendResizeEventIfNecessary(false); mView.requestRender(); } @@ -124,21 +124,23 @@ public class GeckoLayerClient implements PanZoomTarget { * to the layer client. That way, the layer client won't be tempted to call this, which might * result in an infinite loop. */ -void setViewportSize(FloatSize size) { +void setViewportSize(FloatSize size, boolean forceResizeEvent) { mViewportMetrics = mViewportMetrics.setViewportSize(size.width, size.height); -sendResizeEventIfNecessary(); +sendResizeEventIfNecessary(forceResizeEvent); } PanZoomController getPanZoomController() { return mPanZoomController; } -/* Informs Gecko that the screen size has changed. */ -private void sendResizeEventIfNecessary() { +/* Informs Gecko that the screen size has changed. + * @param force: If true, a resize event will always be sent, otherwise + * it is only sent if size has changed. */ +private voi
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/LayerView.java |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit 817c89fa456917fd9993ae226e8e932fe90ee1d8 Author: Michael Weghorn AuthorDate: Fri May 21 18:29:48 2021 +0200 Commit: Michael Weghorn CommitDate: Fri May 21 21:59:56 2021 +0200 android: Inline 'LayerView#setViewportSize' to only call site It doesn't override any parent class methods and was only called from here. Change-Id: Iccfacb42e8d5514994eafac841c0ec55be65b062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115972 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 05f2118114c8..549b2a963bf5 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java @@ -183,10 +183,6 @@ public class LayerView extends FrameLayout { public GeckoLayerClient getLayerClient() { return mLayerClient; } public PanZoomController getPanZoomController() { return mPanZoomController; } -public void setViewportSize(IntSize size) { -mLayerClient.setViewportSize(new FloatSize(size)); -} - public ImmutableViewportMetrics getViewportMetrics() { return mLayerClient.getViewportMetrics(); } @@ -371,7 +367,7 @@ public class LayerView extends FrameLayout { protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (changed) { -setViewportSize(new IntSize(right - left, bottom - top)); +mLayerClient.setViewportSize(new FloatSize(right - left, bottom - top)); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitThread.java | 22 --- 1 file changed, 12 insertions(+), 10 deletions(-) New commits: commit 1cfc6c545cd979eff04e38b2998c40e25106faf2 Author: Michael Weghorn AuthorDate: Fri May 21 17:47:13 2021 +0200 Commit: Michael Weghorn CommitDate: Fri May 21 21:59:31 2021 +0200 android: Don't reset zoom and position on refresh event Don't call 'zoomAndRepositionTheDocument' for a REFRESH event. The only two places sending such an event are in 'LibreOfficeMainActivity#onStart' and in 'FormattingControler#sendInsertGraphic'. I don't see any need to reset the zoom and position in any of those two cases. Doing so had the effect that any manual zoom changes would be lost when e.g. switching between the LibreOffice Viewer app and another one, after a "Save As" or when inserting a picture. In my opinion, it's desirable to keep the view the user had before doing any of those actions and just rendering the document anew. To do so, add an extra bool parameter 'resetZoomAndPosition' to the relevant methods in 'LOKitThread' that says whether a reset should take place. Change-Id: I8ba6a7cd8d984ad99654e188e00144e1edf407ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115950 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 fb076389f0f4..547cb4acc6d2 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -111,7 +111,7 @@ class LOKitThread extends Thread { /** * Handle the geometry change + draw. */ -private void redraw() { +private void redraw(boolean resetZoomAndPosition) { if (mLayerClient == null || mTileProvider == null) { // called too early... return; @@ -121,7 +121,9 @@ class LOKitThread extends Thread { mViewportMetrics = mLayerClient.getViewportMetrics(); mLayerClient.setViewportMetrics(mViewportMetrics); -zoomAndRepositionTheDocument(); +if (resetZoomAndPosition) { +zoomAndRepositionTheDocument(); +} mLayerClient.forceRedraw(); mLayerClient.forceRender(); @@ -151,9 +153,9 @@ class LOKitThread extends Thread { /** * Invalidate everything + handle the geometry change */ -private void refresh() { +private void refresh(boolean resetZoomAndPosition) { mLayerClient.clearAndResetlayers(); -redraw(); +redraw(resetZoomAndPosition); updatePartPageRectangles(); if (mTileProvider != null && mTileProvider.isSpreadsheet()) { updateCalcHeaders(); @@ -176,7 +178,7 @@ class LOKitThread extends Thread { private void updatePageSize(int pageWidth, int pageHeight){ mTileProvider.setDocumentSize(pageWidth, pageHeight); -redraw(); +redraw(true); } private void updateZoomConstraints() { @@ -195,7 +197,7 @@ class LOKitThread extends Thread { mTileProvider.changePart(partIndex); mViewportMetrics = mLayerClient.getViewportMetrics(); // mLayerClient.setViewportMetrics(mViewportMetrics.scaleTo(0.9f, new PointF())); -refresh(); +refresh(true); LOKitShell.hideProgressSpinner(mContext); } @@ -217,7 +219,7 @@ class LOKitThread extends Thread { public void run() { // synchronize to avoid deletion while loading synchronized (LOKitThread.this) { -refresh(); +refresh(true); } } }); @@ -241,7 +243,7 @@ class LOKitThread extends Thread { if (mTileProvider.isReady()) { LOKitShell.showProgressSpinner(mContext); updateZoomConstraints(); -refresh(); +refresh(true); LOKitShell.hideProgressSpinner(mContext); mTileProvider.saveDocumentAs(filePath, true); @@ -293,7 +295,7 @@ class LOKitThread extends Thread { closeDocument(); break; case LOEvent.SIZE_CHANGED: -redraw(); +redraw(true); break; case LOEvent.CHANGE_PART: changePart(event.mPartIndex); @@ -347,7 +349,7 @@ class LOKitThread extends Thread { mTileProvider.postUnoCommand(event.mString, event.mValue, event.mNotify); break; case LOEvent.REFRESH: -refresh(); +refresh(false); break; case LOEvent.PAGE_SIZE_CHANGED: updatePageSize(event.mPageWidth, event.mPageHeight); _
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/FormattingController.java|8 +++- android/source/src/java/org/libreoffice/LOKitTileProvider.java |8 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |1 - 3 files changed, 3 insertions(+), 14 deletions(-) New commits: commit a3f682f90f85d69270f4d10ee1d661f25257bf21 Author: Michael Weghorn AuthorDate: Fri May 21 15:44:46 2021 +0200 Commit: Michael Weghorn CommitDate: Fri May 21 21:59:01 2021 +0200 tdf#106370 android: Make inserting pictures work Instead of just setting LibreOfficeMainActivity's 'pendingInsertGraphic' member when inserting an image, call the method responsible for asking what compression to apply, doing the actual compression and sending the event so the picture is actually inserted right away. 'LibreOfficeMainActivity#pendingInsertGraphic' is (by now) only evaluated in 'LOKitTileProvider' when the document is initially loaded, therefore just setting it had no effect. The more complicated handling used previously instead of just inserting the picture right away was probably necessary/used because 'LibreOfficeMainActivity#onStart' used to reload the whole document before commit 1bc42472200c32c9a0a10dd1c3cd6c6a8a5d47d2 Author: Michael Weghorn Date: Fri Apr 9 13:59:43 2021 +0200 tdf#95517 android: Rework app/doc lifecycle handling and that was called when returning to the main activity from the picture chooser. (That is just a guess, I didn't actually verify this). While this fix probably doesn't have much to do with what caused that functionality to not work back in 2018, when most of the feature was introduced but it did not yet fully work as mentioned in commit 8d977511e3ab755da65d34a0bd618ef3c9db90c7 Date: Mon Aug 14 11:41:30 2017 -0500 tdf#106370 Android: add ability to insert pictures Added ability to insert pictures to Android Viewer. You can take photo or select photo from device or the cloud (Google photos, Dropbox). You can also compress the picture before inserting it with multiple compress grades. So far, inserting doesn't work for Writer due LO native library issues (I think). it still makes inserting pictures "just work" by now. Change-Id: Idad9dcbba177ea12f056bc31bd6b9c08621062cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115932 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java index a729e357bfe9..9259b2ea6cae 100644 --- a/android/source/src/java/org/libreoffice/FormattingController.java +++ b/android/source/src/java/org/libreoffice/FormattingController.java @@ -421,15 +421,14 @@ class FormattingController implements View.OnClickListener { void handleActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == TAKE_PHOTO && resultCode == Activity.RESULT_OK) { -mContext.pendingInsertGraphic = true; +compressAndInsertImage(); } else if (requestCode == SELECT_PHOTO && resultCode == Activity.RESULT_OK) { getFileFromURI(data.getData()); -mContext.pendingInsertGraphic = true; +compressAndInsertImage(); } } -// Called by LOKitTileProvider when activity is resumed from photo/gallery/camera/cloud apps -void popCompressImageGradeSelection() { +void compressAndInsertImage() { AlertDialog.Builder builder = new AlertDialog.Builder(mContext); String[] options = {mContext.getResources().getString(R.string.compress_photo_smallest_size), mContext.getResources().getString(R.string.compress_photo_medium_size), @@ -493,7 +492,6 @@ class FormattingController implements View.OnClickListener { LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:InsertGraphic", rootJson.toString())); LOKitShell.sendEvent(new LOEvent(LOEvent.REFRESH)); mContext.setDocumentChanged(true); -mContext.pendingInsertGraphic = false; } private void compressImage(int grade) { diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java index 1c04fbe5a43a..579162931d3a 100644 --- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java @@ -160,14 +160,6 @@ class LOKitTileProvider implements TileProvider { mContext.getDocumentPartViewListAdapter().notifyDataSetChanged(); } }); -mContext.runOnUiThread(new Runnable() { -@Overr
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 128f67e0efa02294205a1abe1be874557ecdcecd Author: Michael Weghorn AuthorDate: Tue May 18 14:27:51 2021 +0200 Commit: Michael Weghorn CommitDate: Wed May 19 07:42:57 2021 +0200 tdf#142348 android: Avoid extra refresh after loading doc commit 1bc42472200c32c9a0a10dd1c3cd6c6a8a5d47d2 Date: Fri Apr 9 13:59:43 2021 +0200 tdf#95517 android: Rework app/doc lifecycle handling changed activity lifecycle for Android Viewer's 'LibreOfficeMainActivity'. It moved sending an event to trigger loading of the document from the 'onStart' to the 'onCreate' method and added sending a more lightweight refresh event the 'onStart' method instead. However, since a refresh is already done when loading the document, there's no need to do another refresh when the 'onStart' method is called right after the 'onCreate' method. Therefore, set a flag in the 'onCreate' method and use that to skip sending the extra refresh event for that case. This not only avoids doing unnecessary work but also avoids that the two could get into each others way, resulting in Calc documents sometimes not being rendered on initial load. Change-Id: I5c47e1b5f7a42a49fb903891aa84585b36994a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115750 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index 9d8828811ade..3927cc744eb4 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -100,6 +100,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin private LOKitTileProvider mTileProvider; private String mPassword; private boolean mPasswordProtected; +private boolean mbSkipNextRefresh; public boolean pendingInsertGraphic; // boolean indicating a pending insert graphic action, used in LOKitTileProvider.postLoad() public GeckoLayerClient getLayerClient() { @@ -213,6 +214,9 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin Log.e(LOGTAG, "No document specified. This should never happen."); return; } +// the loadDocument/loadNewDocument event already triggers a refresh as well, +// so there's no need to do another refresh in 'onStart' +mbSkipNextRefresh = true; mDrawerLayout = findViewById(R.id.drawer_layout); @@ -466,7 +470,10 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin protected void onStart() { Log.i(LOGTAG, "onStart.."); super.onStart(); -LOKitShell.sendEvent(new LOEvent(LOEvent.REFRESH)); +if (!mbSkipNextRefresh) { +LOKitShell.sendEvent(new LOEvent(LOEvent.REFRESH)); +} +mbSkipNextRefresh = false; } @Override ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java |3 +++ 1 file changed, 3 insertions(+) New commits: commit 55c17dff49166e8ad036f02fc97db40137158d43 Author: Michael Weghorn AuthorDate: Tue May 11 08:39:21 2021 +0200 Commit: Michael Weghorn CommitDate: Tue May 11 10:05:45 2021 +0200 android: Don't crash trying to process non-existing file from recents When the "Recent files" list in Android Viewer contained an entry for an Uri that was no longer pointing to a valid file, a SecurityException was thrown trying to query the display name from it. Catch the SecurityException that is thrown and just return an empty string, the document is then not displayed in the "Recent files" list. One scenario: 1) open file located in the "Download" directory from within the app 2) close the app 3) delete the file 4) open the app again -> crash, with this backtrace in ADB log: 05-11 08:37:14.230 3892 4707 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadStorageProvider uri content://com.android.providers.downloads.documents/document/msf%3A1091 from pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:804) 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:670) 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.content.ContentProvider$Transport.query(ContentProvider.java:238) 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106) 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.os.Binder.execTransactInternal(Binder.java:1138) 05-11 08:37:14.230 3892 4707 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:1102) 05-11 08:37:14.230 6981 6981 D AndroidRuntime: Shutting down VM 05-11 08:37:14.231 6981 6981 E AndroidRuntime: FATAL EXCEPTION: main 05-11 08:37:14.231 6981 6981 E AndroidRuntime: Process: org.libreoffice, PID: 6981 05-11 08:37:14.231 6981 6981 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.libreoffice/org.libreoffice.ui.LibreOfficeUIActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadStorageProvider uri content://com.android.providers.downloads.documents/document/msf%3A1091 from pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3477) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2043) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.os.Handler.dispatchMessage(Handler.java:106) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.os.Looper.loop(Looper.java:216) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.app.ActivityThread.main(ActivityThread.java:7464) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at java.lang.reflect.Method.invoke(Native Method) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549) 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:955) 05-11 08:37:14.231 6981 6981 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadStorageProvider uri content://com.android.providers.downloads.documents/document/msf%3A1091 from pid=6981, uid=10177 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs 05-11 08:37:14.231 6981 6981 E AndroidRuntime:at android.os.Parcel.cre
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/mozilla/gecko/gfx/SubTile.java | 14 + 1 file changed, 6 insertions(+), 8 deletions(-) New commits: commit bcd7a7244208a15e36a724270c72b496e77f84bf Author: Michael Weghorn AuthorDate: Fri May 7 13:44:17 2021 +0200 Commit: Michael Weghorn CommitDate: Fri May 7 18:32:04 2021 +0200 tdf#142153 android: Delete unused textures immediately Don't delay the call to 'glDeleteTextures' but always call it immediately via 'TextureReaper.get().reap()' in 'Subtile#cleanTexture'. Delaying it appears to sometimes cause it to be called "at the wrong time", resulting in black areas being shown instead of properly rendering/displaying the document content in the corresponding tile. This fixes the issue also mentioned in commit 1bc42472200c32c9a0a10dd1c3cd6c6a8a5d47d2 ("tdf#95517 android: Rework app/doc lifecycle handling"), which was present before, though: > (Well, sometimes there is an issue with > invalidation/repaint and single tiles remain black, > but that happened previously - when the whole doc > was loaded anew - just the same way). Change-Id: I5f18dbe3133d9d00a76b129fd119c2e80441e531 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115241 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java b/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java index 42750df62838..bdad37195d90 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java @@ -86,26 +86,24 @@ public class SubTile extends Layer { protected void finalize() throws Throwable { try { destroyImage(); -cleanTexture(false); +cleanTexture(); } finally { super.finalize(); } } -private void cleanTexture(boolean immediately) { +private void cleanTexture() { if (mTextureIDs != null) { TextureReaper.get().add(mTextureIDs); mTextureIDs = null; -if (immediately) { -TextureReaper.get().reap(); -} +TextureReaper.get().reap(); } } public void destroy() { try { destroyImage(); -cleanTexture(false); +cleanTexture(); } catch (Exception ex) { Log.e(LOGTAG, "Error clearing buffers: ", ex); } @@ -140,7 +138,7 @@ public class SubTile extends Layer { if (!textureSize.equals(mSize)) { mSize = textureSize; -cleanTexture(true); +cleanTexture(); } } @@ -253,4 +251,4 @@ public class SubTile extends Layer { GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4); } } -} \ No newline at end of file +} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/res/layout/activity_document_browser.xml |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 70554d74a602c5cbeb5a3830898f644becf507ba Author: Michael Weghorn AuthorDate: Wed May 5 12:23:50 2021 +0200 Commit: Michael Weghorn CommitDate: Wed May 5 17:44:25 2021 +0200 tdf#135136 Android: Don't hardcode height of TextViews Otherwise the text gets cut off when using a large system font size. Change-Id: I265d57ae310e39e9e452f6e744f17ed4807a00b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115134 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml index 36ccdbc40699..559d92efbb38 100644 --- a/android/source/res/layout/activity_document_browser.xml +++ b/android/source/res/layout/activity_document_browser.xml @@ -61,7 +61,7 @@ https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/AboutDialogFragment.java | 2 - android/source/src/java/org/libreoffice/DocumentPartViewListAdapter.java | 1 android/source/src/java/org/libreoffice/FormattingController.java| 2 - android/source/src/java/org/libreoffice/InvalidationHandler.java | 4 +- android/source/src/java/org/libreoffice/LOKitInputConnectionHandler.java | 2 - android/source/src/java/org/libreoffice/LOKitShell.java | 2 - android/source/src/java/org/libreoffice/LOKitThread.java | 5 +- android/source/src/java/org/libreoffice/LOKitTileProvider.java | 17 -- android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 2 - android/source/src/java/org/libreoffice/SearchController.java| 2 - android/source/src/java/org/libreoffice/ThumbnailCreator.java| 2 - android/source/src/java/org/libreoffice/UNOCommandsController.java | 6 +-- android/source/src/java/org/libreoffice/ui/PageView.java | 10 ++--- android/source/src/java/org/libreoffice/ui/RecentFile.java | 4 +- android/source/src/java/org/libreoffice/ui/RecentFilesAdapter.java | 4 +- 15 files changed, 28 insertions(+), 37 deletions(-) New commits: commit fbcc644bad1fb0ad9a9387ba93339b24c126629f Author: Michael Weghorn AuthorDate: Fri Apr 23 14:51:18 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 23 23:26:16 2021 +0200 android: Some trivial style improvements Those were mostly suggested by Android Studio, like: * mark members static or final * drop unused variables and members * avoid unnecessary cast * simplify condition: '(!cond)' instead of 'cond == false' * drop unused imports Change-Id: I252fe836e4a3184e13af59a30202c6daccac1794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114546 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java index 8e4ddf0ae08c..b8e22077e928 100644 --- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java +++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java @@ -26,8 +26,6 @@ import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.TextView; -import java.io.File; - public class AboutDialogFragment extends DialogFragment { @NonNull @Override diff --git a/android/source/src/java/org/libreoffice/DocumentPartViewListAdapter.java b/android/source/src/java/org/libreoffice/DocumentPartViewListAdapter.java index a576fc67dcb2..a0ed871a40d2 100644 --- a/android/source/src/java/org/libreoffice/DocumentPartViewListAdapter.java +++ b/android/source/src/java/org/libreoffice/DocumentPartViewListAdapter.java @@ -19,7 +19,6 @@ import android.widget.TextView; import java.util.List; public class DocumentPartViewListAdapter extends ArrayAdapter { -private static final String LOGTAG = DocumentPartViewListAdapter.class.getSimpleName(); private final Activity activity; private final ThumbnailCreator thumbnailCollector; diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java index a34c4c41ee29..a729e357bfe9 100644 --- a/android/source/src/java/org/libreoffice/FormattingController.java +++ b/android/source/src/java/org/libreoffice/FormattingController.java @@ -40,7 +40,7 @@ class FormattingController implements View.OnClickListener { private static final int SELECT_PHOTO = 2; private static final int IMAGE_BUFFER_SIZE = 4 * 1024; -private LibreOfficeMainActivity mContext; +private final LibreOfficeMainActivity mContext; private String mCurrentPhotoPath; FormattingController(LibreOfficeMainActivity context) { diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java index b74d92d15460..d74f150bfb44 100644 --- a/android/source/src/java/org/libreoffice/InvalidationHandler.java +++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java @@ -25,12 +25,12 @@ import java.util.List; * Parses (interprets) and handles invalidation messages from LibreOffice. */ public class InvalidationHandler implements Document.MessageCallback, Office.MessageCallback { -private static String LOGTAG = InvalidationHandler.class.getSimpleName(); +private static final String LOGTAG = InvalidationHandler.class.getSimpleName(); private final DocumentOverlay mDocumentOverlay; private final GeckoLayerClient mLayerClient; private OverlayState mState; private boolean mKeyEvent = false; -private LibreOfficeMainActivity mContext; +private final LibreOfficeMainActivity mContext;
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java | 42 -- 1 file changed, 1 insertion(+), 41 deletions(-) New commits: commit 710badae87b53e5052413cf6dfa163065ef250ac Author: Michael Weghorn AuthorDate: Fri Apr 23 14:13:20 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 23 23:24:31 2021 +0200 android: Drop unused FileUtilities members ... and make its static 'LOGTAG' member final. Change-Id: I6d16bc76590341a60db9e123d20d81dcd7adba71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114545 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index aed671205bef..38ea9054fd59 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -8,7 +8,6 @@ */ package org.libreoffice.ui; -import java.io.File; import java.util.Map; import java.util.HashMap; @@ -17,13 +16,10 @@ import android.database.Cursor; import android.net.Uri; import android.provider.OpenableColumns; import android.util.Log; -import android.webkit.MimeTypeMap; public class FileUtilities { -private static String LOGTAG = FileUtilities.class.getSimpleName(); - -static final int ALL = -1; +private static final String LOGTAG = FileUtilities.class.getSimpleName(); // These have to be in sync with the file_view_modes resource. static final int DOC = 0; @@ -40,7 +36,6 @@ public class FileUtilities { public static final String MIMETYPE_PDF = "application/pdf"; private static final Map mExtnMap = new HashMap(); -private static final Map extensionToMimeTypeMap = new HashMap(); static { // Please keep this in sync with AndroidManifest.xml // and 'SUPPORTED_MIME_TYPES' in LibreOfficeUIActivity.java @@ -97,22 +92,6 @@ public class FileUtilities { mExtnMap.put(".svm", DRAWING); mExtnMap.put(".wmf", DRAWING); mExtnMap.put(".svg", DRAWING); - -// Some basic MIME types -// Android's MimeTypeMap lacks some types that we need -extensionToMimeTypeMap.put("odb", "application/vnd.oasis.opendocument.database"); -extensionToMimeTypeMap.put("odf", "application/vnd.oasis.opendocument.formula"); -extensionToMimeTypeMap.put("odg", MIMETYPE_OPENDOCUMENT_GRAPHICS); -extensionToMimeTypeMap.put("otg", "application/vnd.oasis.opendocument.graphics-template"); -extensionToMimeTypeMap.put("odi", "application/vnd.oasis.opendocument.image"); -extensionToMimeTypeMap.put("odp", MIMETYPE_OPENDOCUMENT_PRESENTATION); -extensionToMimeTypeMap.put("otp", "application/vnd.oasis.opendocument.presentation-template"); -extensionToMimeTypeMap.put("ods", MIMETYPE_OPENDOCUMENT_SPREADSHEET); -extensionToMimeTypeMap.put("ots", "application/vnd.oasis.opendocument.spreadsheet-template"); -extensionToMimeTypeMap.put("odt", MIMETYPE_OPENDOCUMENT_TEXT); -extensionToMimeTypeMap.put("odm", "application/vnd.oasis.opendocument.text-master"); -extensionToMimeTypeMap.put("ott", "application/vnd.oasis.opendocument.text-template"); -extensionToMimeTypeMap.put("oth", "application/vnd.oasis.opendocument.text-web"); } public static String getExtension(String filename) { @@ -137,25 +116,6 @@ public class FileUtilities { return type; } -static String getMimeType(String filename) { -String extension = MimeTypeMap.getFileExtensionFromUrl(filename); -String mime = extensionToMimeTypeMap.get(extension); -if (mime == null) { -//fallback to Android's MimeTypeMap -mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension( -extension); -} -return mime; -} - -static boolean isHidden(File file) { -return file.getName().startsWith("."); -} - -static boolean isThumbnail(File file) { -return isHidden(file) && file.getName().endsWith(".png"); -} - /** * Returns whether the passed MIME type is one for a document template. */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FolderIconView.java | 204 -- 1 file changed, 204 deletions(-) New commits: commit 8646ed92473ea7fdb1abfb282196bfb058145d43 Author: Michael Weghorn AuthorDate: Fri Apr 23 14:19:48 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 23 23:24:10 2021 +0200 android: Drop unused FolderIconView class It appears to be unused since commit f3eccc655387b47fb0986558b8835588eee2898d Date: Tue Feb 3 18:19:32 2015 + tdf#87432: normal icons for folders in android doc browser Change-Id: I6984ff75392f7f28ba1b2659846d164d25b66f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114544 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FolderIconView.java b/android/source/src/java/org/libreoffice/ui/FolderIconView.java deleted file mode 100644 index cde6cd27af4c.. --- a/android/source/src/java/org/libreoffice/ui/FolderIconView.java +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ -package org.libreoffice.ui; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.RectF; -import android.graphics.Color; -import android.util.AttributeSet; -import android.util.Log; -import android.view.View; - -import java.io.File; -import java.util.Stack; - -public class FolderIconView extends View{ -private String LOGTAG = "FolderIconView"; - -private Paint mPaintBlack; -private Paint mPaintGray; -private Paint mPaintShadow; - -private File dir; - -public FolderIconView(Context context) { -super(context); -initialisePaints(); -} -public FolderIconView(Context context, AttributeSet attrs) { -super(context, attrs); -initialisePaints(); -} -public FolderIconView(Context context, AttributeSet attrs, int defStyle) { -super(context, attrs, defStyle); -initialisePaints(); -} - -private void initialisePaints() { -mPaintBlack = new Paint(); -mPaintBlack.setColor(Color.DKGRAY);//Can also use parseColor(String "#aarrggbb") -mPaintBlack.setAntiAlias(true); - -mPaintGray = new Paint(); -mPaintGray.setColor(Color.GRAY);//Can also use parseColor(String "#aarrggbb") -mPaintGray.setAntiAlias(true); - -mPaintShadow = new Paint(); -mPaintShadow.setColor(Color.parseColor("#")); -mPaintShadow.setAntiAlias(true); -} - -public void setDir(File dir) { -this.dir = dir; -} - -@Override -protected void onDraw(Canvas canvas) { -super.onDraw(canvas); -Log.d(LOGTAG, "onDraw"); -//float width = (float)canvas.getWidth(); -//float height = (float)canvas.getHeight(); -float width = (float) this.getWidth(); -float height = (float) this.getHeight(); -float centerX = width*0.5f;// centered on horz axis -float centerY = height*0.5f; -float outerRadius = 0.8f*0.5f*width; -float innerRadius = 0.7f*0.5f*width; -float thumbHeight = outerRadius*1.25f; -float thumbWidth = thumbHeight*(float)(1/Math.sqrt(2)); -float DZx = 0.2f*outerRadius; -float DZy = 0.2f*outerRadius; -//Bitmap blankPage = BitmapFactory.decodeResource(getResources(), R.drawable.page); -Log.i(LOGTAG, Float.toString(width) + "x" + Float.toString(height)); -canvas.drawCircle(centerX, centerY, outerRadius, mPaintGray); -canvas.drawCircle(centerX, centerY, innerRadius, mPaintBlack); -//Either get thumbs from directory or use generic page images -//For now just get the first 4 thumbs -> add some checks later -if (dir == null) -return;//TODO -File[] contents = dir.listFiles();//TODO consider filtering thumbs to match grid. -if (contents == null) -// dir is not a directory, -// or user does not have permissions to read it -return; -Stack thumbs = new Stack(); -BitmapFactory factory = new BitmapFactory(); -for (File file : contents) { -if (!FileUtilities.isThumbnail(file)) -continue; - thumbs.push(BitmapFactory.decodeFile(file.getAbsolutePath()));//TODO switch to push for semantics -if (thumbs.size() > 3) -break; -} -/*while(thumbs.size() < 4) {// padd out with blanks? -thumbs.push(blankPage); -
[Libreoffice-commits] core.git: android/source
android/source/res/menu/main.xml |9 + 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/LibreOfficeMainActivity.java |2 +- android/source/src/java/org/libreoffice/ToolbarController.java |5 +++-- 6 files changed, 12 insertions(+), 10 deletions(-) New commits: commit 3199182588fecac8a1c1fe202ca55702a3aab6ab Author: Michael Weghorn AuthorDate: Fri Apr 23 13:31:52 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 23 15:01:31 2021 +0200 android: Offer 'Save As' in readonly mode Provide the "Save As..." menu entry in Android Viewer also if read-only mode is used, either because the experimental editing mode is disabled or there is no write access to the document. This way, a copy of the original document can be saved elsewhere. In case experimental mode is enabled, editing is allowed after saving the document. Call 'ToolbarController#setEditMode' in 'ToolbarController#switchToEditMode' right away instead of posting it to the main handler in a Runnable along with the other commands (that change the UI), so the new state is already taken into account in 'LibreOfficeMainActivity#onResume' and the toolbar isn't switched back to view mode there right away. Change-Id: I321e42d0833463b31c7b39336d66b29bd51d9890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114539 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 0570a77fdd7b..168817f68c5f 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -38,16 +38,17 @@ - - + + LibreOffice Viewer ist ein Dokumentenbetrachter, der auf LibreOffice basiert. https://www.libreoffice.org Dieses Release wurde bereitgestellt durch $VENDOR. -Diese Datei ist schreibgeschützt, Speichern ist deaktiviert. +Diese Datei ist schreibgeschützt. Lizenz anzeigen Hinweise anzeigen diff --git a/android/source/res/values-tr/strings.xml b/android/source/res/values-tr/strings.xml index a780a59fe165..ec7274c8cca6 100644 --- a/android/source/res/values-tr/strings.xml +++ b/android/source/res/values-tr/strings.xml @@ -9,7 +9,7 @@ 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ışı. +Bu dosya salt okunabilir haldedir. Lisansı Görüntüle Bildiriyi Görüntüle diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 6b3db68e23b6..49eea9f3014c 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -9,7 +9,7 @@ LibreOffice Viewer is a document viewer based on LibreOffice. https://www.libreoffice.org This release was supplied by $VENDOR. -This file is read-only, saving is disabled. +This file is read-only. Show License Show Notice diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index f7f5f6ae0ed6..28427b51435b 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -339,7 +339,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin String displayName = FileUtilities.retrieveDisplayNameForDocumentUri(getContentResolver(), mDocumentUri); toolbarTop.setTitle(displayName); -// make sure that "Save" menu item is enabled +mbISReadOnlyMode = !isExperimentalMode(); getToolbarController().setupToolbars(); } diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java index d4985aee180e..c97d84f0f329 100644 --- a/android/source/src/java/org/libreoffice/ToolbarController.java +++ b/android/source/src/java/org/libreoffice/ToolbarController.java @@ -72,6 +72,8 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { void switchToEditMode() { if (!LOKitShell.isEditingEnabled()) return; + +setEditModeOn(true); // Ensure the change is done on UI thread LOKitShell.getMainHandler().post(new Runnable() { @Override @@ -89,7 +91,6 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { } mToolbarTop.se
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 45 ++ android/source/src/java/org/libreoffice/ui/FileUtilities.java|8 + 2 files changed, 39 insertions(+), 14 deletions(-) New commits: commit 01521db61eb41447113c4bb671ac828a583c0cd1 Author: Michael Weghorn AuthorDate: Thu Apr 15 16:50:16 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:50:30 2021 +0200 tdf#95615 android: Don't offer "Save" after opening template When the input document in Android Viewer is a template, a new doc is created and a plain '.uno:Save' (which 'LibreOfficeMainActivity#saveDocument' triggers when the "Save" menu entry is selected) will therefore fail. A proper URI to save to (rather than overwriting the template itself) is only known after a "Save As" anyway, so don't set the 'mDocument' member until then, which leads to the "Save" menu entry becoming disabled, just as is the case when explicitly choosing to create a new document in the start activity. For now, the check whether the document is a template checks whether the MIME type detected for the URI ends with "template", which is the case for ODF and OOXML types (like "application/vnd.oasis.opendocument.text-template" or "application/vnd.openxmlformats-officedocument.wordprocessingml.template"). This can be refined further as needed, e.g. by explicitly adding more MIME types to check. (Editing the actual template instead of creating a new doc from it would be a different use case that remains unsupported also with this change in place.) Change-Id: I81ff957de27f620a026dbc01097b8061886293a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114157 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index 066c05dc9662..f7f5f6ae0ed6 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -82,7 +82,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin private List mDocumentPartView = new ArrayList(); private DocumentPartViewListAdapter mDocumentPartViewListAdapter; private DocumentOverlay mDocumentOverlay; -/** URI of the actual document. */ +/** URI to save the document to. */ private Uri mDocumentUri; /** Temporary local copy of the document. */ private File mTempFile = null; @@ -170,29 +170,38 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin mbISReadOnlyMode = !isExperimentalMode(); -mDocumentUri = getIntent().getData(); -if (mDocumentUri != null) { -if (mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT) -|| mDocumentUri.getScheme().equals(ContentResolver.SCHEME_ANDROID_RESOURCE)) { +final Uri docUri = getIntent().getData(); +if (docUri != null) { +if (docUri.getScheme().equals(ContentResolver.SCHEME_CONTENT) +|| docUri.getScheme().equals(ContentResolver.SCHEME_ANDROID_RESOURCE)) { final boolean isReadOnlyDoc = (getIntent().getFlags() & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0; mbISReadOnlyMode = !isExperimentalMode() || isReadOnlyDoc; -Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + mDocumentUri.getPath()); +Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + docUri.getPath()); -String displayName = FileUtilities.retrieveDisplayNameForDocumentUri(getContentResolver(), mDocumentUri); +String displayName = FileUtilities.retrieveDisplayNameForDocumentUri(getContentResolver(), docUri); toolbarTop.setTitle(displayName); -} else if (mDocumentUri.getScheme().equals(ContentResolver.SCHEME_FILE)) { +} else if (docUri.getScheme().equals(ContentResolver.SCHEME_FILE)) { mbISReadOnlyMode = true; -Log.d(LOGTAG, "SCHEME_FILE: getPath(): " + mDocumentUri.getPath()); -toolbarTop.setTitle(mDocumentUri.getLastPathSegment()); +Log.d(LOGTAG, "SCHEME_FILE: getPath(): " + docUri.getPath()); +toolbarTop.setTitle(docUri.getLastPathSegment()); } // create a temporary local copy to work with -boolean copyOK = copyFileToTemp() && mTempFile != null; +boolean copyOK = copyFileToTemp(docUri) && mTempFile != null; if (!copyOK) { // TODO: can't open the file -Log.e(LOGTAG, "couldn't create temporary file from " + mDocumentUri); +Log.e(LOGTAG, "couldn't create temporary file from " + docUri);
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 35 +++--- android/source/src/java/org/libreoffice/ToolbarController.java| 17 +-- android/source/src/java/org/libreoffice/ui/FileUtilities.java |5 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 51 +- 4 files changed, 32 insertions(+), 76 deletions(-) New commits: commit 5ce43b2b4e79c51f0d8922caf77fa6492c05c2a7 Author: Michael Weghorn AuthorDate: Thu Apr 15 15:14:51 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:50:03 2021 +0200 android: Show file picker for new docs on "Save As" When creating a new document in Android Viewer, don't show a file picker to choose where to save the file at once, but create a new document and only ask where to save the file once "Save As" has been selected. The plain "Save" entry is disabled until then, since no URI to save to is known at this time. The handling for the temporary local file, which is used for all of the "actual work" remains unchanged. While at it, rename 'ToolbarController#disableMenuItem' to 'ToolbarController#enableMenuItem' and invert the meaning of the boolean parameter since I find that more straightforward and it also better matches the naming of the underlying 'MenuItem' method as well. Change-Id: I3eefada5531bfb2202aca25f2c9f170a463f87f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114152 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index 1812ad253744..066c05dc9662 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -169,24 +169,12 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin mDocumentOverlay = new DocumentOverlay(this, layerView); mbISReadOnlyMode = !isExperimentalMode(); -boolean isNewDocument = false; mDocumentUri = getIntent().getData(); if (mDocumentUri != null) { if (mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT) || mDocumentUri.getScheme().equals(ContentResolver.SCHEME_ANDROID_RESOURCE)) { -final boolean isReadOnlyDoc; -if (getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY) != null) { -// New document type string is not null, meaning we want to open a new document -String newDocumentType = getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY); -// create a temporary local file, will be copied to the actual URI when saving -loadNewDocument(newDocumentType); -isNewDocument = true; -isReadOnlyDoc = false; -} else { -isReadOnlyDoc = (getIntent().getFlags() & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0; -} - +final boolean isReadOnlyDoc = (getIntent().getFlags() & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0; mbISReadOnlyMode = !isExperimentalMode() || isReadOnlyDoc; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + mDocumentUri.getPath()); @@ -198,12 +186,6 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin Log.d(LOGTAG, "SCHEME_FILE: getPath(): " + mDocumentUri.getPath()); toolbarTop.setTitle(mDocumentUri.getLastPathSegment()); } -} else { -Log.e(LOGTAG, "No document specified. This should never happen."); -return; -} - -if (!isNewDocument) { // create a temporary local copy to work with boolean copyOK = copyFileToTemp() && mTempFile != null; if (!copyOK) { @@ -212,6 +194,15 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin return; } LOKitShell.sendLoadEvent(mTempFile.getPath()); +} else if (getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY) != null) { +// New document type string is not null, meaning we want to open a new document +String newDocumentType = getIntent().getStringExtra(LibreOfficeUIActivity.NEW_DOC_TYPE_KEY); +// create a temporary local file, will be copied to the actual URI when saving +loadNewDocument(newDocumentType); +toolbarTop.setTitle(getString(R.string.default_document_name)); +} else { +Log.e(LOGTAG, "No document specified. This should never happen."); +return; } mDrawerLayout = findV
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/ui/FileUtilities.java | 17 -- 1 file changed, 17 deletions(-) New commits: commit 865ec16158b04cf98efae4309b40244a7e41eb59 Author: Michael Weghorn AuthorDate: Thu Apr 15 15:49:40 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:49:42 2021 +0200 android: Drop unused 'FileUtilities#doAccept' Change-Id: I8b7f268862c3800012548376b3e60ac1f7dca9e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114151 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java index f1581a678c30..660fbc0e4528 100644 --- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java +++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java @@ -153,23 +153,6 @@ public class FileUtilities { return mime; } -// Filter by mode, and/or in future by filename/wildcard -private static boolean doAccept(String filename, int byMode, String byFilename) { -Log.d(LOGTAG, "doAccept : " + filename + " mode " + byMode + " byFilename " + byFilename); -if (filename == null) -return false; - -// check extension -if (byMode != ALL) { -if (mExtnMap.get (getExtension (filename)) != byMode) -return false; -} -if (!byFilename.equals("")) { -// FIXME return false on a non-match -} -return true; -} - static boolean isHidden(File file) { return file.getName().startsWith("."); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/res/menu/main.xml | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 5306ecda9ceb5f9702c2ce6dc6207a3bd5f14a6a Author: Michael Weghorn AuthorDate: Thu Apr 15 14:31:43 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:49:21 2021 +0200 android: Allow printing and PDF export regardless of mode Don't only enable the "Export To PDF" and "Print" menu items if the experimental editing mode is enabled, but always offer them, since they should be sufficiently stable and don't require any editing of the document. To do so, move them into a new menu group "group_misc_actions", and move the entry for sending UNO commands up, so it remains in the "group_edit_actions" menu group whose entries are hidden unless editing mode is enabled. Change-Id: I425cf6d0a45306ff48b45dad6fd0e804b87a2546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114147 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 94856d52e759..0570a77fdd7b 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -31,6 +31,9 @@ android:orderInCategory="100" app:showAsAction="always"/> + + + + - https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitTileProvider.java | 25 -- 1 file changed, 11 insertions(+), 14 deletions(-) New commits: commit 40f30020b9e91d15c4d90e53b1d2e41770fbc58c Author: Michael Weghorn AuthorDate: Thu Apr 15 13:47:23 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:48:52 2021 +0200 android: Merge 2 'LOKitTileProvider#printDocument' methods ... and move the check for a new enough SDK version to the beginning. Change-Id: I7f5528985b8c43e218b88899409fdd22b640f72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114145 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 5d8d2e557d0f..a5222f7e46ea 100644 --- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java @@ -340,25 +340,22 @@ class LOKitTileProvider implements TileProvider { } public void printDocument() { +if (Build.VERSION.SDK_INT < 19) { + mContext.showCustomStatusMessage(mContext.getString(R.string.printing_not_supported)); +return; +} + String mInputFileName = (new File(mInputFile)).getName(); String file = mInputFileName.substring(0,(mInputFileName.length()-3))+"pdf"; String cacheFile = mContext.getExternalCacheDir().getAbsolutePath() + "/" + file; mDocument.saveAs("file://"+cacheFile,"pdf",""); -printDocument(cacheFile); -} - -private void printDocument(String cacheFile) { -if (Build.VERSION.SDK_INT >= 19) { -try { -PrintManager printManager = (PrintManager) mContext.getSystemService(Context.PRINT_SERVICE); -PrintDocumentAdapter printAdapter = new PDFDocumentAdapter(mContext, cacheFile); -printManager.print("Document", printAdapter, new PrintAttributes.Builder().build()); +try { +PrintManager printManager = (PrintManager) mContext.getSystemService(Context.PRINT_SERVICE); +PrintDocumentAdapter printAdapter = new PDFDocumentAdapter(mContext, cacheFile); +printManager.print("Document", printAdapter, new PrintAttributes.Builder().build()); -} catch (Exception e) { -e.printStackTrace(); -} -} else { - mContext.showCustomStatusMessage(mContext.getString(R.string.printing_not_supported)); +} catch (Exception e) { +e.printStackTrace(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/res/values-de/strings.xml |2 android/source/res/values-tr/strings.xml |1 android/source/res/values/strings.xml|2 android/source/src/java/org/libreoffice/LOKitTileProvider.java | 56 +++--- android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 44 +++ android/source/src/java/org/libreoffice/TileProvider.java|5 android/source/src/java/org/libreoffice/ToolbarController.java |4 android/source/src/java/org/libreoffice/ui/FileUtilities.java|1 8 files changed, 70 insertions(+), 45 deletions(-) New commits: commit 9ebcb80e2e4335fca1e137d015fe4d84631e282a Author: Michael Weghorn AuthorDate: Thu Apr 15 11:22:46 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:48:28 2021 +0200 android: Ask where to save PDF file on export In Android Viewer, show a file picker to select where to save the PDF file on PDF export, rather than unconditionally trying to save in the "Documents" directory. This also means that permission 'android.PERMISSION_WRITE_EXTERNAL_STORAGE' is now no longer needed for this task, s. commit message from commit 7d9db806d65cb814af1e99a1e79c3db5aa7c17d5 Date: Fri Apr 9 11:24:16 2021 +0200 android: Request PERMISSION_WRITE_EXTERNAL_STORAGE again for more details. Also, adapt the 'TileKitProvider#saveDocumentAs' methods to return a boolean value indicating whether the save operation was successful, and trigger showing the message right into 'LibreOfficeMainActivity#exportToPDF'. Rename 'LOKitTileProvider#exportToPDF(boolean print)' to just 'LOKitTileProvider#printDocument()', since the only remaining use case for which it is used is printing now. Change-Id: I779d782813ca01640811690a388a4b7fd3db4b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114143 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 c2c33ff5b5e5..36effc9303f0 100644 --- a/android/source/res/values-de/strings.xml +++ b/android/source/res/values-de/strings.xml @@ -153,9 +153,9 @@ Aktuelles UNO-Kommando Anzeigesprache Wählen Sie die Standard-Anzeigesprache +PDF-Export abgeschlossen PDF-Export nicht möglich Speichern nicht möglich -PDF exportiert nach Ihr Gerät unterstützt Drucken nicht Erstellen neuer Dokumente auf diesem Gerät nicht verfügbar, benötigt Android-SDK-Version >= 19. Fehler diff --git a/android/source/res/values-tr/strings.xml b/android/source/res/values-tr/strings.xml index 72d15c210933..a780a59fe165 100644 --- a/android/source/res/values-tr/strings.xml +++ b/android/source/res/values-tr/strings.xml @@ -149,7 +149,6 @@ Uygulama Dili Varsayılan dili değiştir Pdf dışa aktarılamıyor. -Şu konumda pdf\'e aktarıldı: Cihazınız yazdırmayı desteklemiyor. Hata Bölüm ismi girin. diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index d0014646bc15..6b3db68e23b6 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -152,9 +152,9 @@ Current UNO command Display Language Set the default display language +PDF export finished Unable to export to pdf Unable to save file -Exported to PDF at Your device does not support printing Creating new files not supported on this device, requires Android SDK version >= 19. Error diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java index 5f4684703f36..5d8d2e557d0f 100644 --- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java @@ -277,7 +277,7 @@ class LOKitTileProvider implements TileProvider { } @Override -public void saveDocumentAs(final String filePath, String format, boolean takeOwnership) { +public boolean saveDocumentAs(final String filePath, String format, boolean takeOwnership) { String options = ""; if (takeOwnership) { options = "TakeOwnership"; @@ -287,21 +287,16 @@ class LOKitTileProvider implements TileProvider { Log.d("saveFilePathURL", newFilePath); LOKitShell.showProgressSpinner(mContext); mDocument.saveAs(newFilePath, format, options); +final boolean ok; if (!mOffice.getError().isEmpty()){ +ok = true; Log.e("Save Error", mOffice.getError()); if (format.equals("svg")) { // error in creating temp slideshow svg file Log.d(LOGTAG, "Error in creating temp slide
[Libreoffice-commits] core.git: android/source
android/source/res/menu/main.xml |4 android/source/res/values-de/strings.xml |1 android/source/res/values/strings.xml|1 android/source/src/java/org/libreoffice/LOKitTileProvider.java |8 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 98 +- android/source/src/java/org/libreoffice/TileProvider.java|5 android/source/src/java/org/libreoffice/ToolbarController.java |3 android/source/src/java/org/libreoffice/ui/FileUtilities.java| 13 - 8 files changed, 125 insertions(+), 8 deletions(-) New commits: commit d16e569209fe40c2cb5776f7b9415e273d5b2387 Author: Michael Weghorn AuthorDate: Thu Apr 15 08:57:56 2021 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 16 08:47:59 2021 +0200 android: Add a "Save As..." menu entry This adds a "Save As..." menu entry to Android Viewer in order to save the currently opened file to a different location. Currently, the file is always saved in the corresponding ODF format, regardless of the original file type, i.e. that e.g. a DOCX file is saved in ODT format. (This could be extended to allow a selection of the target format as needed.) Like "Save As" (and as compared to "Save a Copy") in the desktop version, the app remembers the new document URI and subsequent save operations will overwrite the newly saved file, not the originally opened one. (There is no need to create a new temporary local file to use, though.) The directory of the currently used file is preselected in the file chooser used to specify where to save the new file. Make sure to copy the file in a non-main thread, since the destination URI might be handled by a DocumentsProvider that does network access. However, for now the main thread just waits for the separate thread to finish, just like commit 7f838b73e85eb6f0a1dce4647650a5cf5f34ccd2 Date: Fri Mar 19 15:46:36 2021 +0100 tdf#129833 android: Move reading file to separate thread implemented it for copying from the URI to the temporary file when opening a file. This also adds a 'TileProvider#isDrawing' method (like the already existing 'isTextDocument', 'isSpreadsheet' and 'isPresentation' ones). Change-Id: I6f56b71763431b89a6c74be35cc1e81fad136cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114058 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 2c97b3201b9e..94856d52e759 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -36,6 +36,10 @@ android:title="@string/action_save" android:orderInCategory="100" /> + + Durchgestrichen Tastatur anzeigen Speichern +Speichern unter... Format anwenden Suchen UNO-Kommando senden diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 5e7ad1e3ded7..d0014646bc15 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -47,6 +47,7 @@ Strike Out Show keyboard Save +Save As... Enable Format Search Send UNO Cmd diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java index 2fb3551eada2..5f4684703f36 100644 --- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java @@ -631,6 +631,14 @@ class LOKitTileProvider implements TileProvider { } } +/** + * @see TileProvider#isDrawing() + */ +@Override +public boolean isDrawing() { +return mDocument != null && mDocument.getDocumentType() == Document.DOCTYPE_DRAWING; +} + /** * @see TileProvider#isTextDocument() */ diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index d97719afb726..255c4d5bdd95 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -14,6 +14,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; +import android.provider.DocumentsContract; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.Snackbar; import android.support.v4.widget.DrawerLayout; @@ -62,6 +63,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin private static final String ENABLE_EXPERIMEN