Commit graph

2063 commits

Author SHA1 Message Date
Weblate
80d4ce197f android-viewer translated using Weblate
Interlingua currently translated at 75.8% (88 of 116 strings)

Change-Id: I6f6529872aa3c3cf3553eacebe280195fa5f0699
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: eduver <hmcb2080@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177478
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-29 07:41:38 +01:00
Weblate
b7e71559ce android-viewer translated using Weblate
Interlingua currently translated at 75.8% (88 of 116 strings)

Change-Id: I75ff1908970b8d28c3380e5791aea0146354868c
Co-authored-by: eduver <hmcb2080@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177272
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-27 10:54:51 +01:00
Weblate
449df239a2 android-viewer translated using Weblate
Hebrew currently translated at 100.0% (116 of 116 strings)

Change-Id: I5a39070be19791e0f85ee32487bcca8a1876a9b8

android-viewer translated using Weblate

Interlingua currently translated at 75.8% (88 of 116 strings)

Change-Id: Iea0eb23bf7d58d78fd99668a8b057f3d9295a3fc

Added translation for android-viewer using Weblate (Tagalog)

Change-Id: I2f97dbf569d5eda71dfdd2a62c5563bd7918d43b
Co-authored-by: Andy Flagg <libreoffice.tagalog@gmail.com>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: famese <hmcb2080@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/he/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175682
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-04 13:51:47 +01:00
Weblate
7a749b0c34 android-viewer translated using Weblate
Indonesian currently translated at 100.0% (116 of 116 strings)

Change-Id: I072e698547ef9bc602168563245aec265aac6db2
Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/id/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174780
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-15 17:03:07 +02:00
Bartosz Kosiorek
529dfc741a tdf#163170 Add support for MS Visio Template format with .vstx extension
libvisio is already supporting .vstx template format.
With this patch the LibreOffice is recognizing such file types,
and successfully opening it.

More information about format:
https://learn.microsoft.com/en-us/office/client-developer/visio/introduction-to-the-visio-file-formatvsdx

Change-Id: Ibee01288cdb2cd6a0ac3f371a22604d7bb5b471c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173997
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2024-09-29 10:04:37 +02:00
Michael Weghorn
c9b7d8cc74 android: Update Android Gradle Plugin to 8.6.1
as suggested by Android Studio.

Change-Id: Idbd71e7766d44374b4972362fb917f385b4fc5a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174042
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-09-28 09:20:17 +02:00
Weblate
52d0e53fa8 android-viewer translated using Weblate
Slovak currently translated at 100.0% (116 of 116 strings)

Change-Id: Ibc6247bf6000bbdaee75f4eb303eac5a4b6138bb

android-viewer translated using Weblate

Asturian currently translated at 100.0% (116 of 116 strings)

Change-Id: I9696da414ca126b4b84b789d04f28c9fffd4cf0f
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: Miloš Šrámek <msramek22@gmail.com>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ast/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/sk/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171584
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-08-14 17:52:09 +02:00
Weblate
128a1332d6 android-viewer translated using Weblate
Interlingua currently translated at 75.8% (88 of 116 strings)

Change-Id: Ic8de20a48ed2bd6c8756b3158432cba86811577b
Co-authored-by: SoftInterlingua <softinterlingua@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171103
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-29 08:17:56 +02:00
Ilmari Lauhakangas
c5823a2e27 android, compilerplugins: fix issues found by Ruff linter
Change-Id: Idab013bf2ff1f274a07911ec8b545cd26142139c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171050
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-26 18:45:56 +02:00
Weblate
b547d13a46 android-viewer translated using Weblate
Japanese currently translated at 83.6% (97 of 116 strings)

Change-Id: I0f1a0b85fa02badf103683cc589b8cc0a3a99a6b
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170788
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-22 10:42:54 +02:00
Michael Weghorn
9a3018ee0b android: Drop unused import
Change-Id: Idd578c2f1a984f1ecb9618ddfa8563cc467a6af2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170767
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 18:32:15 +02:00
Michael Weghorn
2546dd1b28 android: Drop unused ViewportMetrics class
There's still the `ImmutableViewportMetrics` class that
actually gets used.

Change-Id: I4645a33812441a2de36d666423742b164da76bda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170766
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 18:32:09 +02:00
Michael Weghorn
f1a130a87a android: Drop unnecessary semicolon
Change-Id: I6e47003e4c890da9c09b23f64a0e2eac24d2e6bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170765
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 18:32:00 +02:00
Michael Weghorn
2180a868cc android: Drop unused TextLayer class
Change-Id: Id4be67dc7c3ac7ad7a820fca6af730c776ec88f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170764
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 18:31:54 +02:00
Michael Weghorn
74d1b4e2d6 android: Drop unused local var
Change-Id: I31f02d8fbc0bb3b5b5cd57665ebd2c02138b654e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170763
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 18:31:48 +02:00
Michael Weghorn
d8f08430c1 android: Drop unused imports
Change-Id: Ic7f38227d982d1f402b12df85cf37fcda2558ad7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170762
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 18:31:43 +02:00
Michael Weghorn
f9f1e215cb android: Drop unused IntSize#nextPowerOfTwo(float)
Change-Id: Idec5616195875e4adec22a193d8d8a569de079e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170761
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 18:31:37 +02:00
Michael Weghorn
435b4d01e1 android: Drop unused imports
Change-Id: Ie26eb3ee5e068b75912d0392ca81c966972e72bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170717
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 12:57:24 +02:00
Michael Weghorn
9cd74570a1 android: Drop unused DisplayMentrics#toJSON
Change-Id: I631932c4f4a6d61e89816b5d276bfe8384194939
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170716
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 12:57:14 +02:00
Michael Weghorn
a91464d10f android: Drop unused CairoImage.FORMAT_INVALID
Change-Id: I4cd9aba81129921bae523f8afe182732119471c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170715
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 12:57:05 +02:00
Michael Weghorn
3ed11168c5 android: Make constant final
Addresses this warning/suggestion shown in Android Studio:

> Field 'LOGTAG' may be 'final'

And: Drop an unused import.

Change-Id: I6ce730a80690c2701a91cc7900cc801b370dc605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170714
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 12:56:54 +02:00
Michael Weghorn
f70a8cc859 android: Drop obsolete '@TargetApi(19)'
Obsolete since:

    commit c2fc2c8c7c
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Dec 5 09:57:22 2023 +0100

        android: Bump minSdkVersion to 21 (Android 5.0)

Change-Id: I0b8d115b5be1e066a3232c8297de75ea1cea6cc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170713
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 12:56:41 +02:00
Michael Weghorn
45eb67728f android: Drop unused Event#getTypeString
Change-Id: I5f6d553de58cde78099b503bbf1a958fa0bd8813
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170712
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 12:56:25 +02:00
Michael Weghorn
9e8db61261 android: Drop unused imports
Change-Id: Ic39f84002e4521a33f8f4209ae64a919b28cb538
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170711
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 12:56:17 +02:00
Michael Weghorn
938d4ceea5 android: Use String.equals for string comparison
Change-Id: I05ea3f7ee488328425743fd96e854f20c84600ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170710
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 12:56:05 +02:00
Michael Weghorn
aa7605571c android: Make constant static
Makes this warning/suggestion disappear in Android Studio:

> Field can be converted to a local variable

Change-Id: I710cd83c19fe1f83b756b035f05560974b349d22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170709
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-19 12:55:54 +02:00
Michael Weghorn
55a62bbfc2 android: Drop unused mAlpha member from Cursor
Change-Id: I141abc523fb975fde997bdd961840456032fdcfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170708
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-19 12:55:39 +02:00
Michael Weghorn
97b827aa61 android: Port from deprecated "archivesBaseName"
Port from deprecated Gradle API that is planned to
be removed in Gradle 9.0, as was warned about in the
build output previously:

    > Configure project :
    Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
    The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation
            at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)
            at liboSettings_bbauwf0uak693a4tmdwwty192.run(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:20)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)
    Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
    The BasePluginExtension.archivesBaseName property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the archivesName property instead. For more information, please refer to https://docs.gradle.org/8.7/dsl/org.gradle.api.plugins.BasePluginExtension.html#org.gradle.api.plugins.BasePluginExtension:archivesName in the Gradle documentation.
            at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
            (Run with --stacktrace to get the full stack trace of this deprecation warning.)

As described in the upgrading guide [1], use the "base"
configuration block in build.gradle instead.

[1] https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation

Change-Id: I358569a72b508efd31d2872d5009ac4f060398d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170610
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-17 12:14:37 +02:00
Michael Weghorn
89fd1a2ada android: Show all gradle warnings
Set the gradle property to show individual warnings during the
build. Without this, the build output showed:

> Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
>
> You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
>
> For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

Now, it shows the individual issues that need to be addressed:

> > Configure project :
> Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
> The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#base_convention_deprecation
>         at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)
>         at liboSettings_bbauwf0uak693a4tmdwwty192.run(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:20)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Script '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle': line 22
> The BasePluginExtension.archivesBaseName property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the archivesName property instead. For more information, please refer to https://docs.gradle.org/8.7/dsl/org.gradle.api.plugins.BasePluginExtension.html#org.gradle.api.plugins.BasePluginExtension:archivesName in the Gradle documentation.
>         at liboSettings_bbauwf0uak693a4tmdwwty192$_run_closure3.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/liboSettings.gradle:22)
>         (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Actually addressing them still needs to be done separately.

Change-Id: Ib749e9e21d3d5f5893c348a5070a1e994a395c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170609
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:14:29 +02:00
Michael Weghorn
27f1851eb2 android: Set minSdkVersion without "="
Addresses this warning shown in Android Studio:

> Do not use assignment with the minSdkVersion property (remove the '=')

Change-Id: I2d9e7037f7fb6e4d1625a8625a1b3820fb6e205f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170607
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:14:20 +02:00
Michael Weghorn
053d9feec4 android: Handle cursor keys
In Android Viewer, forward the left/right/up/down keys
as such by adding the corresponding mapping to
`LOKitTileProvider#getKeyCode`.

This allows navigating through the document using those
keys e.g. on a hardware keyboard.

This addresses this comment from a Google Play Review:

> Editing, the cursor doesn't respond to the cursor keys

Change-Id: I688e5d0cc1db4f9315f9c9cb2139c22117a210e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170605
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17 12:13:33 +02:00
Michael Weghorn
a360543249 android: Update Android Gradle Plugin to 8.5.1
... and gradle to 8.7, as suggested by Android Studio.

Change-Id: I572c1e0d62a477278fd63e613610d8d422d14a05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170601
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-17 12:13:25 +02:00
Weblate
dd56ce1bbf android-viewer translated using Weblate
Hebrew currently translated at 100.0% (116 of 116 strings)

Change-Id: I7f7c03b86b360ba3574882f189b7e45d0b661760
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/he/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170170
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-09 09:03:38 +02:00
Michael Weghorn
802a106541 tdf#157009 android: Add missing subdir for Triple-T/F-Droid icon
Even with

    commit 69189de8fa
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu May 16 09:26:44 2024 +0200

        tdf#157009 android: Add icon symlink for F-Droid

(and its 24-2 backport) in place, the icon is not shown
for LibreOffice Viewer in the F-Droid app and on the repo
website [1].

Revisiting the related specs [2] [3], it turns out
that the icon needs to be in an "icon" subdir in the
"graphics" directory, so add that missing "icon" subdir
and move the symlink there.

From [2]:

> └── listings
>     ├── en-US                           (en-US is the default locale in F-Droid)
>     │   ├── title.txt                   (app name)
>     │   ├── short-description.txt       (short description, max 80 chars, mandatory)
>     │   ├── full-description.txt        (full app description, mandatory)
>     │   ├── video-url.txt               (URL to a video introducing the app)
>     │   ├── whatsnew                    (alternative changelog location; single file, no .txt)
>     │   └── graphics
>     │       ├── icon                    (app icon; mandatory if your app doesn't include any png icon)
>     │       │   └── *.(png|jpg)         1 image, usually 512x512

[1] https://f-droid.org/en/packages/org.documentfoundation.libreoffice/
[2] https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#triple-t-structure
[3] https://github.com/Triple-T/gradle-play-publisher?tab=readme-ov-file#uploading-graphic-based-listings

Change-Id: I43c23040bf63a34f8f9648b45fab6c47a8816b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169700
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-06-28 16:36:48 +02:00
Weblate
2f350b868f android-viewer translated using Weblate
Interlingua currently translated at 75.0% (87 of 116 strings)

Change-Id: I863bf24dd6469ec7a263811d3c7b6cb1dbd907f2
Co-authored-by: SoftInterlingua <softinterlingua@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ia/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168820
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-06-14 23:28:13 +02:00
Weblate
29525b020c android-viewer translated using Weblate
Japanese currently translated at 82.7% (96 of 116 strings)

Change-Id: I823d969cd027cbdd3778c5ca6887722831d01fbf

android-viewer translated using Weblate

Hebrew currently translated at 99.1% (115 of 116 strings)

Change-Id: I610c1282074f709b2b08baf6303cd70e2eef19c1
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/he/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168567
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-10 14:00:45 +02:00
Weblate
d106539f8f android-viewer translated using Weblate
Japanese currently translated at 80.1% (93 of 116 strings)

Change-Id: I558bd48e66a90ad580a7b3f54379072af9c16dff

android-viewer translated using Weblate

Japanese currently translated at 78.4% (91 of 116 strings)

Change-Id: I42d1e535c6ef14d4f5f3d66a10b5562a487015ae

android-viewer translated using Weblate

Japanese currently translated at 77.5% (90 of 116 strings)

Change-Id: I26cb3b9e8a1c9ed4b92fb1ed8ba08d81a0d646d3
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168333
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-06 11:56:53 +02:00
Weblate
858e9e48ac android-viewer translated using Weblate
Georgian currently translated at 100.0% (116 of 116 strings)

Change-Id: Iaf9193bd950b9bbc1cb25828fb6ee2af53ae158b

android-viewer translated using Weblate

Japanese currently translated at 75.0% (87 of 116 strings)

Change-Id: Idd317334a8a1e30f427fae91a38fa3300d0b9c5d

android-viewer translated using Weblate

Japanese currently translated at 74.1% (86 of 116 strings)

Change-Id: Iebd923daef4f9bc7693e15340e2d7f6d9eb21159
Co-authored-by: Ekaterine Papava <papava.e@gtu.ge>
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ka/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168189
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Jenkins
2024-05-31 07:16:38 +02:00
Weblate
7ae9dc0420 android-viewer translated using Weblate
Japanese currently translated at 68.1% (79 of 116 strings)

Change-Id: I1c42877ea415bdf3830bbee64c97589eafa7fa1c

android-viewer translated using Weblate

Change-Id: I9efdbae451a5313cb5b8ef4a169696969696969b
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167986
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-05-24 06:02:41 +02:00
Michael Weghorn
6bab548591 android: Use "compact_fonts" LibreOfficeKit option
For Android Viewer, set the "compact_fonts" LibreOfficeKit
option via environment variable `SAL_LOK_OPTIONS` introduced in

    Change-Id: I3dc9f5de876def6e4afc09a43105b1740f7c621f
    Author: Michael Meeks <michael.meeks@collabora.com>
    Date:   Fri May 17 21:25:29 2024 +0100

        lok: stop amazing waste of repeated font sizes in each font element.

and adjust the handling in `FontController` to process
the flat lists for font names and sizes that is reported
with that options set, rather than processing
font sizes for each individual font.

(See also discussion in original Gerrit change
for the distro/collabora/co-24.04 branch: [1].).

[1] https://gerrit.libreoffice.org/c/core/+/167799

Change-Id: I85734c1876d152f4f95f9182629affd6b250fdbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167963
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-05-23 15:53:26 +02:00
Weblate
15e60dfeac Added translation for android-viewer using Weblate (Georgian)
Change-Id: I4058a4698582256a31ebb21379c0a66b22e2a1cc

android-viewer translated using Weblate

Japanese currently translated at 65.5% (76 of 116 strings)

Change-Id: I74e48d5d605e25ebf39e2a8bd73495274ee94855

Added translation for android-viewer using Weblate (Hebrew)

Change-Id: I491b69291975d22c0552cc20e93f2042cc70e4b0

Update translation files for android-viewer

Updated by "Cleanup translation files" hook in Weblate.

Change-Id: Iea28e4d8bf859accdb1c16bb4c6836237a4d2b26

android-viewer translated using Weblate

Japanese currently translated at 61.0% (72 of 118 strings)

Change-Id: I741c23b1048d4857605d73aad34668c29234dd6f

android-viewer translated using Weblate

Catalan currently translated at 100.0% (118 of 118 strings)

Change-Id: I9cbcf579a5c634adf0686e43aa4dca069c2dd577

Added translation for android-viewer using Weblate (Esperanto)

Change-Id: Ibcf6e82a860c5e789d6ee89dace30d1457a60c22

android-viewer translated using Weblate

Japanese currently translated at 39.8% (47 of 118 strings)

Change-Id: I9efdbae451a5313cb5b8ef4a1abca6969696969b
Co-authored-by: Adolfo Jayme Barrientos <fito@libreoffice.org>
Co-authored-by: Ekaterine Papava <papava.e@gtu.ge>
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ca/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167895
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-23 08:07:50 +02:00
Weblate
903e71eb45 Update translation files for android-viewer
Updated by "Cleanup translation files" hook in Weblate.

Change-Id: Iea28e4d8bf859accdb1c16bb4c6836237a4d2b26

android-viewer translated using Weblate

Japanese currently translated at 61.0% (72 of 118 strings)

Change-Id: I741c23b1048d4857605d73aad34668c29234dd6f

android-viewer translated using Weblate

Catalan currently translated at 100.0% (118 of 118 strings)

Change-Id: I9cbcf579a5c634adf0686e43aa4dca069c2dd577

Added translation for android-viewer using Weblate (Esperanto)

Change-Id: Ibcf6e82a860c5e789d6ee89dace30d1457a60c22

android-viewer translated using Weblate

Japanese currently translated at 39.8% (47 of 118 strings)

Change-Id: I9efdbae451a5313cb5b8ef4a1abca4bbc696969b
Co-authored-by: Adolfo Jayme Barrientos <fito@libreoffice.org>
Co-authored-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ca/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ja/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167748
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-05-17 10:48:22 +02:00
Michael Weghorn
86050dc7c7 android: Disable multidex, only needed for minSdkVersion < 21
multidex was enabled in

    commit 037680488b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Dec 27 12:51:54 2022 +0100

        android: Enable multidex, update com.google.android.material to 1.7.0

as it was needed when building for minSdkVersion <= 20, see [1]
and the full commit message of the above-mentioned commit
for more details.

However, since

    commit c2fc2c8c7c
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Dec 5 09:57:22 2023 +0100

        android: Bump minSdkVersion to 21 (Android 5.0)

, the minSdkVersion is greater than that, so this
is no longer needed.

[1] https://developer.android.com/build/multidex

Change-Id: I31502ec74e9c4201a8a11be42820f70e5fd5a1fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167735
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-05-16 15:13:20 +02:00
Michael Weghorn
69189de8fa tdf#157009 android: Add icon symlink for F-Droid
Add a symlink to the app icon at the expected
location when using the Triple-T data structure
that can be used to provide metadata for F-Droid. [1]

As Android Viewer currently uses a non-default directory layout,
this currently needs to be placed in a different subdirectory than
the actual source code in order for F-Droid to find it, see the
discussion in [2] for more details.

This should cause the app icon to show up in F-Droid
after the next update.

[1] https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#triple-t-structure
[2] https://gitlab.com/fdroid/fdroiddata/-/merge_requests/13643#note_1538888683

Change-Id: Ic1a987e430b6e92134ac19d7f1c264953cd3cf0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167732
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-05-16 12:14:04 +02:00
Michael Weghorn
e63fa1ab17 android lint: Udate lint-baseline.xml
Some of the issues have been addressed in
the meanwhile, so regenerate the file to
reflect that.

Change-Id: I5c0f8a112cf02a89fe652c79ed8d70213f6fbc1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167725
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:57 +02:00
Michael Weghorn
91fa1f792d android: Avoid unnecessary prefs processing
When the experimental editing mode preference
was toggled, it was processed twice:

Toggling that pref requires starting the
`SettingsActivity`, and when returning to
`LibreOfficeMainActivity`, its `onResume` method
was called which updates `mIsExperimentalMode` as needed.
In addition, the `LibreOfficeMainActivity#onSharedPreferenceChanged`
callback was called that also processed that preference.

The latter is more "targeted" and only called when a preference
actually changes.
Call `updatePreferences()` from there so other preferences
are also handled and drop the call to `updatePreferences`
from the `onResume` method, which is no longer needed
with that in place.

Change-Id: Ic0cacd8ad551137d5aea14cda6838d2ac50de8db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167724
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:51 +02:00
Michael Weghorn
3865c81e96 android: Drop indirection listening to pref change
Let `LibreOfficeMainActivity` implement the standard
Android `SharedPreferences.OnSharedPreferenceChangeListener`
interface directly, rather than having a custom
`SettingsListenerModel.OnSettingsPreferenceChangedListener`
indirection and the `SettingsFragment` implementing the
standard interface.

This simplifies the code and removes one level of
indirection.

Drop the now unused `SettingsListenerModel`.

Change-Id: I8c7d6088e711631409f9189bba966439db3daa44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167723
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:45 +02:00
Michael Weghorn
4d4c313494 android: Apply enabled experimental mode when doc open
Use a `mbReadOnlyDoc` member that keeps
track of the readonly status of the document only
instead of a `mbISReadOnlyMode` that at the same
time also was taking into account whether experimental
editing features were enabled.
Let `LibreOfficeMainActivity#isReadOnlyMode()` take
experimental status into account instead.

With this in place, opening a (writable) document
with experimental editing mode disabled, then enabling
experimental editing mode makes editing possible after
clicking on the LibreOffice logo in the toolbar.

Previously, it was necessary to open the document
anew.

Change-Id: Ia5fde9b6019251d76d46df97fad2ffd64a0f5a30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167721
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:38 +02:00
Michael Weghorn
39ed595d60 android: No longer manually set UI language
Drop the possibility to manually set a UI language
introduced in

    commit f2e35a6956
    Author: Mert Tumer <merttumer@outlook.com>
    Date:   Tue Sep 18 23:29:57 2018 +0300

        Added language support on Android Viewer

Since

    commit 5bf2ec9ed8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Dec 20 10:40:34 2019 +0100

        android: Use system locale by default

, Android Viewer defaulted to the system
language for its UI language as well.

In addition, current Android versions allow to set
a specific language for apps: [1]

The previous approach of manually setting a language
in Android Viewer shouldn't really be necessary any more.

With the app now being available for translation on
Weblate and having been translated to more languages,
the list of available languages had become out of sync.

Additionally, the manually selected language wasn't
consistently applied everywhere:

* On the start activity where a document can be selected,
  it was only applied after closing the app, then opening
  it again.

* in the Settings, the language was not applied at all,
  that was always using the system locale anyway

Changes to the system locale are applied immediately
and consistently, so stick to the default Android mechanism
and reduce the overall complexity and maintenance burden.

[1] https://support.google.com/android/answer/12395118?hl=en

Change-Id: Ida61650b888a563f2346ea94a14b260802b1d24d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167718
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:30 +02:00
Michael Weghorn
567891fdf7 android: Port Settings{Activity,Fragment} from deprecated API
API used in `SettingsActivity` and `SettingsFragment` has
been deprecated, e.g. `PreferenceFragment` was deprecated in
API level 28 [1].

Port that to non-deprecated API from the androidx.preference
library [2].

This addresses these deprecation warnings:

    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:14: warning: [deprecation] PreferenceFragment in android.preference has been deprecated
    import android.preference.PreferenceFragment;
                             ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:15: warning: [deprecation] PreferenceGroup in android.preference has been deprecated

    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:23: warning: [deprecation] getFragmentManager() in Activity has been deprecated
            getFragmentManager().beginTransaction()
            ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:23: warning: [deprecation] beginTransaction() in FragmentManager has been deprecated
            getFragmentManager().beginTransaction()
                                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:24: warning: [deprecation] replace(int,Fragment) in FragmentTransaction has been deprecated
                .replace(android.R.id.content, new SettingsFragment())
                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:25: warning: [deprecation] commit() in FragmentTransaction has been deprecated
                .commit();
                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:28: warning: [deprecation] PreferenceFragment in android.preference has been deprecated
        public static class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
                                                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:28: warning: [deprecation] PreferenceFragment() in PreferenceFragment has been deprecated
        public static class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
                      ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:30: warning: [deprecation] onCreate(Bundle) in PreferenceFragment has been deprecated
            public void onCreate(Bundle savedInstanceState) {
                        ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:31: warning: [deprecation] onCreate(Bundle) in PreferenceFragment has been deprecated
                super.onCreate(savedInstanceState);
                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:32: warning: [deprecation] addPreferencesFromResource(int) in PreferenceFragment has been deprecated
                addPreferencesFromResource(R.xml.libreoffice_preferences);
                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] PreferenceGroup in android.preference has been deprecated
                    PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
                    ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] PreferenceGroup in android.preference has been deprecated
                    PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
                                                    ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] findPreference(CharSequence) in PreferenceFragment has been deprecated
                    PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
                                                                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:35: warning: [deprecation] findPreference(CharSequence) in PreferenceGroup has been deprecated
                    generalGroup.removePreference(generalGroup.findPreference("ENABLE_EXPERIMENTAL"));
                                                              ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:35: warning: [deprecation] removePreference(Preference) in PreferenceGroup has been deprecated
                    generalGroup.removePreference(generalGroup.findPreference("ENABLE_EXPERIMENTAL"));
                                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:36: warning: [deprecation] findPreference(CharSequence) in PreferenceGroup has been deprecated
                    generalGroup.removePreference(generalGroup.findPreference("ENABLE_DEVELOPER"));
                                                              ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:36: warning: [deprecation] removePreference(Preference) in PreferenceGroup has been deprecated
                    generalGroup.removePreference(generalGroup.findPreference("ENABLE_DEVELOPER"));
                                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:41: warning: [deprecation] onResume() in Fragment has been deprecated
            public void onResume() {
                        ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:42: warning: [deprecation] onResume() in Fragment has been deprecated
                super.onResume();
                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:43: warning: [deprecation] getPreferenceScreen() in PreferenceFragment has been deprecated
                getPreferenceScreen().getSharedPreferences()
                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:43: warning: [deprecation] getSharedPreferences() in Preference has been deprecated
                getPreferenceScreen().getSharedPreferences()
                                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:48: warning: [deprecation] onPause() in Fragment has been deprecated
            public void onPause() {
                        ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:49: warning: [deprecation] onPause() in Fragment has been deprecated
                super.onPause();
                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:50: warning: [deprecation] getPreferenceScreen() in PreferenceFragment has been deprecated
                getPreferenceScreen().getSharedPreferences()
                ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:50: warning: [deprecation] getSharedPreferences() in Preference has been deprecated
                getPreferenceScreen().getSharedPreferences()
                                     ^
    /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:58: warning: [deprecation] getActivity() in Fragment has been deprecated

[1] https://developer.android.com/reference/android/preference/PreferenceFragment
[2] https://developer.android.com/reference/androidx/preference/package-summary

Change-Id: I3365a487345787056c91fa7addf987edca38e94f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167717
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-05-16 12:13:24 +02:00