diff --git a/.cirrus.yml b/.cirrus.yml.disabled
similarity index 100%
rename from .cirrus.yml
rename to .cirrus.yml.disabled
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 6cd2fef2663cd..453f41e7d180b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -8,43 +8,34 @@ assignees: ''
---
### Describe the Bug
-
A clear and concise description of what the bug is.
### Steps to Reproduce
-
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected Behavior
-
A clear and concise description of what you expected to happen.
### Actual Behavior
-
A clear and concise description of what actually happens.
### Screenshots
-
If applicable, add screenshots to help explain your problem.
### Desktop
-
(Please complete the following information)
- - **OS:** [e.g. Windows 11]
- - **Browser:** [e.g. Chrome]
- - **Version:** [e.g. 114.0]
+ - **Collabora version:** [e.g. 23.05.5.3]
+ - **OS and version:** [e.g. Windows 11]
+ - **Browser and version:** [e.g. Chrome 114.0]
### Smartphone
-
(Please complete the following information)
- - **Device:** [e.g. iPhone14]
- - **OS:** [e.g. iOS16.5]
- - **Browser:** [e.g. Safari]
- - **Version:** [e.g. 16.4]
+ - **Device:** [e.g. iPhone 14]
+ - **OS:** [e.g. iOS 16.5]
+ - **Browser and version:** [e.g. Safari 16.4]
### Additional Context
-
Add any other context about the problem here.
diff --git a/.github/workflows/code-duplication.yml b/.github/workflows/code-duplication.yml
deleted file mode 100644
index 278394133a3fc..0000000000000
--- a/.github/workflows/code-duplication.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-on: [pull_request]
-
-jobs:
- dry-code-action:
- runs-on: ubuntu-latest
- name: Dry Code Action
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v2
- - name: Dry Code Action
- uses: Pposong-Hantaihe/dry-code@v1.0.2
- with:
- token: "${{ secrets.GITHUB_TOKEN }}"
- arguments: "./browser/src"
- options: "--min-lines=26"
-
diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml
index b28f5eb786138..b9018ee9fd401 100644
--- a/.github/workflows/helm-release.yml
+++ b/.github/workflows/helm-release.yml
@@ -13,6 +13,7 @@ jobs:
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
+ packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -30,10 +31,76 @@ jobs:
with:
version: v3.12.1
+ - name: Import GPG key
+ run: |
+ echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --dearmor --output keyring.gpg
+ echo "${{ secrets.GPG_PASSPHRASE }}" > passphrase-file.txt
+
- name: Run chart-releaser
- uses: helm/chart-releaser-action@v1.5.0
+ # for use with make-release-latest
+ uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ CR_SKIP_EXISTING: true
+ CR_KEY: Collabora Productivity
+ CR_KEYRING: keyring.gpg
+ CR_PASSPHRASE_FILE: passphrase-file.txt
+ CR_SIGN: true
with:
charts_dir: "kubernetes/helm"
- config: kubernetes/helm/cr.yaml
\ No newline at end of file
+ config: kubernetes/helm/cr.yaml
+
+ # see https://github.com/helm/chart-releaser/issues/183
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Push charts to GHCR
+ run: |
+ shopt -s nullglob
+ for pkg in .cr-release-packages/*; do
+ if [ -z "${pkg:-}" ]; then
+ break
+ fi
+
+ # Check if the package has a ".prov" extension and skip if true
+ # prov doesn't need to be pushed they are already pushed as layer in manifest
+ if [[ "${pkg}" == *.prov ]]; then
+ echo "Skipping package - ${pkg} with '.prov' extension"
+ continue
+ fi
+
+ # convert uppercase->lowercase to make sure it follows oci rules
+ lowercase=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
+
+ echo "Pushing package - ${pkg} to ghcr.io repository - ${lowercase}"
+ helm push "${pkg}" "oci://ghcr.io/${lowercase}/charts"
+ done
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Push charts to Docker Hub
+ run: |
+ shopt -s nullglob
+ for pkg in .cr-release-packages/*; do
+ if [ -z "${pkg:-}" ]; then
+ break
+ fi
+
+ # Check if the package has a ".prov" extension and skip if true
+ # prov doesn't need to be pushed they are already pushed as layer in manifest
+ if [[ "${pkg}" == *.prov ]]; then
+ echo "Skipping package - ${pkg} with '.prov' extension"
+ continue
+ fi
+
+ echo "Pushing package - ${pkg} to docker.io repository - collabora"
+ helm push "${pkg}" "oci://registry-1.docker.io/collabora"
+ done
diff --git a/.gitignore b/.gitignore
index 14c2392fc933d..1f3486d2d6027 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,6 @@
**/.cache
Makefile
Makefile.in
-coolkitconfig.xcu
coolwsd.spec
coolwsd.xml
aclocal.m4
@@ -99,6 +98,8 @@ coolforkit-nocaps
loadtest
unittest
clientnb
+libsimd.a
+coolwsd-inproc
# Fuzzer
*_fuzzer
@@ -121,6 +122,7 @@ ios/Mobile/Info.plist
ios/Mobile/Fonts
ios/Mobile/Branding
ios/Mobile/Resources/Settings.bundle/Root.plist
+ios/Mobile/coolkitconfig.xcu
# symlinks created by configure for the iOS app Xcode project
lobuilddir-symlink
diff --git a/.gitpod-files/coolwsd-gitpod.xml b/.gitpod-files/coolwsd-gitpod.xml
index 709c304759300..d8b45d54f1dfa 100644
--- a/.gitpod-files/coolwsd-gitpod.xml
+++ b/.gitpod-files/coolwsd-gitpod.xml
@@ -1,5 +1,8 @@
+
+
@@ -44,6 +47,7 @@
+ true120900
@@ -134,7 +138,8 @@
- classic
+ default
+ true
@@ -168,8 +173,6 @@
- true
-
truefalse
@@ -180,4 +183,16 @@
+
+ both
+
+
+
+ true
+
+
+
+ true
+
+
diff --git a/Makefile.am b/Makefile.am
index 4a2e1dd4c1505..fef50272647c5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,9 @@ bin_PROGRAMS = \
if ENABLE_LIBFUZZER
else
bin_PROGRAMS += coolwsd
+if ENABLE_DEBUG
+bin_PROGRAMS += coolwsd-inproc
+endif
endif
dist_bin_SCRIPTS = coolwsd-systemplate-setup
@@ -44,7 +47,8 @@ dist_doc_DATA = wsd/README \
wsd/README.vars \
wsd/protocol.txt \
wsd/reference.md \
- wsd/metrics.txt
+ wsd/metrics.txt \
+ THIRDPARTYLICENSES
coolwsddatadir = @COOLWSD_DATADIR@
@@ -115,6 +119,7 @@ shared_sources = common/FileUtil.cpp \
common/ConfigUtil.cpp \
common/Authorization.cpp \
common/CommandControl.cpp \
+ common/Simd.cpp \
net/DelaySocket.cpp \
net/HttpRequest.cpp \
net/HttpHelper.cpp \
@@ -132,19 +137,24 @@ coolwsd_sources = common/Crypto.cpp \
wsd/DocumentBroker.cpp \
wsd/ProxyProtocol.cpp \
wsd/COOLWSD.cpp \
+ wsd/ClientRequestDispatcher.cpp \
wsd/ClientSession.cpp \
wsd/FileServer.cpp \
wsd/ProxyRequestHandler.cpp \
wsd/FileServerUtil.cpp \
wsd/RequestDetails.cpp \
+ wsd/RequestVettingStation.cpp \
wsd/Storage.cpp \
+ wsd/StorageConnectionManager.cpp \
wsd/HostUtil.cpp \
wsd/TileCache.cpp \
wsd/ProofKey.cpp \
- wsd/QuarantineUtil.cpp
+ wsd/QuarantineUtil.cpp \
+ wsd/WopiProxy.cpp
coolwsd_SOURCES = $(coolwsd_sources) \
- $(shared_sources)
+ $(shared_sources) \
+ wsd/coolwsd-fork.cpp
EXTRA_coolwsd_DEPENDENCIES = browser/node_modules
@@ -177,12 +187,29 @@ lokitclient_SOURCES = common/Log.cpp \
common/TraceEvent.cpp \
common/Util.cpp
+noinst_LIBRARIES = libsimd.a
+libsimd_a_SOURCES = kit/DeltaSimd.c
+libsimd_a_CFLAGS = @SIMD_CFLAGS@
+
coolforkit_sources = kit/ChildSession.cpp \
kit/ForKit.cpp \
kit/Kit.cpp
coolforkit_SOURCES = $(coolforkit_sources) \
- $(shared_sources)
+ $(shared_sources) \
+ kit/forkit-main.cpp
+
+coolforkit_LDADD = libsimd.a
+
+if ENABLE_DEBUG
+coolwsd_inproc_SOURCES = $(coolwsd_sources) \
+ $(shared_sources) \
+ $(coolforkit_sources) \
+ wsd/coolwsd-inproc.cpp
+
+coolwsd_inproc_LDADD = ${coolwsd_LDADD} \
+ ${coolforkit_LDADD}
+endif
if ENABLE_LIBFUZZER
coolforkit_SOURCES += \
@@ -191,41 +218,42 @@ coolforkit_SOURCES += \
common_fuzzer_sources = \
common/DummyTraceEventEmitter.cpp \
$(coolwsd_sources) \
+ wsd/coolwsd-inproc.cpp \
$(coolforkit_sources) \
$(shared_sources)
admin_fuzzer_CPPFLAGS = \
- -DKIT_IN_PROCESS=1 \
$(AM_CPPFLAGS)
admin_fuzzer_SOURCES = \
$(common_fuzzer_sources) \
fuzzer/Admin.cpp
admin_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
+admin_fuzzer_LDADD = libsimd.a
clientsession_fuzzer_CPPFLAGS = \
- -DKIT_IN_PROCESS=1 \
$(AM_CPPFLAGS)
clientsession_fuzzer_SOURCES = \
$(common_fuzzer_sources) \
fuzzer/ClientSession.cpp
clientsession_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
+clientsession_fuzzer_LDADD = libsimd.a
httpresponse_fuzzer_CPPFLAGS = \
- -DKIT_IN_PROCESS=1 \
$(AM_CPPFLAGS)
httpresponse_fuzzer_SOURCES = \
$(common_fuzzer_sources) \
fuzzer/HttpResponse.cpp
httpresponse_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
+httpresponse_fuzzer_LDADD = libsimd.a
httpecho_fuzzer_CPPFLAGS = \
- -DKIT_IN_PROCESS=1 \
$(AM_CPPFLAGS) \
-I${top_srcdir}/test
httpecho_fuzzer_SOURCES = \
$(common_fuzzer_sources) \
fuzzer/HttpEcho.cpp
httpecho_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
+httpecho_fuzzer_LDADD = libsimd.a
endif # ENABLE_LIBFUZZER
@@ -269,17 +297,21 @@ wsd_headers = wsd/Admin.hpp \
wsd/FileServer.hpp \
wsd/ProxyRequestHandler.hpp \
wsd/COOLWSD.hpp \
+ wsd/ClientRequestDispatcher.hpp \
wsd/ProofKey.hpp \
wsd/RequestDetails.hpp \
+ wsd/RequestVettingStation.hpp \
wsd/SenderQueue.hpp \
wsd/ServerURL.hpp \
wsd/Storage.hpp \
+ wsd/StorageConnectionManager.hpp \
wsd/TileCache.hpp \
wsd/TileDesc.hpp \
wsd/TraceFile.hpp \
wsd/UserMessages.hpp \
wsd/QuarantineUtil.hpp \
- wsd/HostUtil.hpp
+ wsd/HostUtil.hpp \
+ wsd/WopiProxy.hpp
shared_headers = common/Common.hpp \
common/Clipboard.hpp \
@@ -309,6 +341,7 @@ shared_headers = common/Common.hpp \
common/security.h \
common/SpookyV2.h \
common/CommandControl.hpp \
+ common/Simd.hpp \
net/Buffer.hpp \
net/DelaySocket.hpp \
net/FakeSocket.hpp \
@@ -327,6 +360,7 @@ endif
kit_headers = kit/ChildSession.hpp \
kit/Delta.hpp \
+ kit/DeltaSimd.h \
kit/DummyLibreOfficeKit.hpp \
kit/Kit.hpp \
kit/KitHelper.hpp \
@@ -363,7 +397,6 @@ dist-hook:
EXTRA_DIST = discovery.xml \
favicon.ico \
coolkitconfig.xcu \
- coolwsd.init.rhel6 \
coolwsd.spec \
coolwsd.xml.in \
coolwsd.service \
@@ -385,6 +418,7 @@ EXTRA_DIST = discovery.xml \
scripts/unocommands.py \
scripts/refresh-git-hooks \
README.md \
+ THIRDPARTYLICENSES \
$(man_MANS)
if ENABLE_LIBFUZZER
@@ -480,6 +514,17 @@ run-one: setup-wsd
--o:security.capabilities="$(CAPABILITIES)" \
--o:logging.file[@enable]=true --o:logging.level=trace \
--singlekit
+
+run-inproc: setup-wsd
+ @echo "Launching coolwsd-inproc"
+ ./coolwsd-inproc $(COMMON_PARAMS) \
+ --o:logging.file[@enable]=true --o:logging.level=trace
+
+run-massif-inproc: setup-wsd
+ @echo "Launching coolwsd under valgrind for single process"
+ valgrind --tool=massif --num-callers=64 --trace-children=no -v \
+ ./coolwsd-inproc $(COMMON_PARAMS) \
+ --o:logging.file[@enable]=false --o:logging.level=trace
endif
sync-writer:
@@ -590,6 +635,14 @@ compile_commands: $(abs_srcdir)/compile_commands.json
browser/node_modules: browser/package.json browser/archived-packages
@cd browser && npm install
+eslint: browser/node_modules
+ browser/node_modules/.bin/eslint browser/src browser/js browser/admin/src \
+ --max-warnings 0 \
+ --resolve-plugins-relative-to browser \
+ --ignore-path browser/.eslintignore \
+ --no-eslintrc \
+ --config browser/.eslintrc
+
install-exec-hook:
cd $(DESTDIR)$(bindir) && \
$(LN_S) coolconfig loolconfig && \
@@ -631,7 +684,9 @@ check-for-system-nss:
fi \
fi
-check: check-for-system-nss check-recursive
+check-recursive: eslint
+
+check: check-for-system-nss eslint check-recursive
$(GEN_COVERAGE_COMMAND)
coverage-report:
diff --git a/README.CONTRIBUTING.md b/README.CONTRIBUTING.md
index d38bca1da7207..761451ca4660d 100644
--- a/README.CONTRIBUTING.md
+++ b/README.CONTRIBUTING.md
@@ -34,3 +34,33 @@ Signed-off-by: Random J Developer
using your real name and the email address (sorry, no pseudonyms
or anonymous contributions.)
+
+## Other information to put into your commit message
+
+When reviewing a patch, we look for the following information in the commit message:
+
+- Title: a single line, short and to the point summary of what the patch does.
+
+ - The reason is to be able to do `git log --pretty=oneline` and have a usable result.
+
+- Intro: observation of the current state
+
+ - Rationale: the problem to be solved is obvious to you, but not to the reviewer. It's good to
+ have a list of steps to reproduce the problem.
+
+- Problem description: pros and cons of the current state
+
+ - Rationale: when some feature doesn't work the way expected, frequently there is some other
+ use-case that motivated the current behavior. It's easier to not break the old use-case with
+ your change if you're aware of the old use-case.
+
+ - If there was an old use-case and you found it by research, please document it, so the person
+ reading the commit message finds it easily.
+
+- Solution: give orders to the codebase
+
+ - A short description of how you introduce new behavior while not breaking old behavior is useful,
+ because it may not be too obvious just by looking at what you changed.
+
+An alternative is to have much of this information in a (public) issue, refer to that issue and have
+a short commit message. That works better e.g. when using images to demonstrate the problem.
diff --git a/README.FILENOTICES.md b/README.FILENOTICES.md
index 241800985e49d..b26b8b2ba88e7 100644
--- a/README.FILENOTICES.md
+++ b/README.FILENOTICES.md
@@ -10,6 +10,10 @@ Notices (ie. header in the file describing the Copyright and License):
* Copyright the Collabora Online contributors.
*
* SPDX-License-Identifier: MPL-2.0
+ *
+ * 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/.
*/
```
@@ -21,4 +25,8 @@ Notices (ie. header in the file describing the Copyright and License):
#
# SPDX-License-Identifier: MPL-2.0
#
+# 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/.
+#
```
diff --git a/README.md b/README.md
index 9ec69cdbf690d..c2b2219aec588 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[![Master: Pull request policy](https://img.shields.io/badge/Master-protected%2C%20PRs%20need%20approval-red?logoColor=lightred&logo=git "Collabora Team is preparing for the next release, therefore 'master' branch is protected now, PRs need 1 review before merging. Thanks for your support and contributions! :)")](https://github.com/CollaboraOnline/online/blob/master/CONTRIBUTING.md#contributing-to-source-code)
-[![irc](https://img.shields.io/badge/IRC-%23cool--dev%20on%20libera-orange.svg)](https://web.libera.chat/?channels=cool-dev)
+[![Matrix](https://img.shields.io/badge/Matrix-%23cool--dev-turquoise.svg)](https://matrix.to/#/#cool-dev:clicks.codes)
[![Telegram](https://img.shields.io/badge/Telegram-Collabora%20Online-green.svg)](https://t.me/CollaboraOnline)
[![Forum](https://img.shields.io/badge/Forum-Discourse-blue.svg)](https://forum.collaboraonline.com/)
[![Website](https://img.shields.io/badge/Website-collaboraonline.github.io-blueviolet.svg)](https://collaboraonline.github.io/)
@@ -22,9 +22,9 @@
## Get in touch 💬
-* [📋 Forum](forum.collaboraonline.com/)
+* [📋 Forum](https://forum.collaboraonline.com/)
* [👥 Facebook](https://www.facebook.com/collaboraoffice/)
-* [🐣 Twitter](https://twitter.com/CollaboraOffice)
+* [🐣 𝕏(Twitter)](https://twitter.com/CollaboraOffice)
* [🐘 Mastodon](https://mastodon.social/@CollaboraOffice)
## Key features
@@ -38,9 +38,8 @@
For many more details, build instructions, downloads and more please visit https://collaboraonline.github.io/
## Developer assistance
-Please ask your questions on any of the bridged IRC/Matrix/Telegram rooms
-* IRC: `#cool-dev` on `irc.libera.chat`
-* Matrix: [#cool-dev:libera.chat](https://app.element.io/#/room/#cool-dev:libera.chat)
+Please ask your questions on any of the bridged Matrix/Telegram rooms
+* Matrix: [#cool-dev:clicks.codes](https://matrix.to/#/#cool-dev:clicks.codes)
* Telegram: [CollaboraOnline](https://t.me/CollaboraOnline)
Join the conversation on our Discourse server at https://forum.collaboraonline.com/
@@ -78,15 +77,6 @@ See the corresponding READMEs:
## GitPod
-Head over to https://collaboraonline.github.io/post/build-code/ select gitpod from the dropdown and follow the steps.
-
-Interesting things to keep in mind:
-- Make sure your browser is not blocking windows/tabs from opening from the gitpod workspace URL (maybe add `*.gitpod.io` to your browser's whitelist)
- - The GitPod tasks will run automatically and further instructions will be printed out right in the terminal
- - VNC tab will open automatically if not just click in the left icon `Remote explorer` and click `6080`. You will see a tab completly black, that's normal.
- - As mentioned in those instructions if you are not using the VS Code desktop and if you are only relying on your browser please:
- - Do not try to click the URL from the make run out put instead copy that URL and execute `firefox [paste URL here]`
- - Head over to the tab where the VNC is opened (black page), you will see Firefox opening there, maximize and have fun.
- - You can also run cypress tests via GitPod but you will need to use Firefox, for that just prepend `CYPRESS_BROWSER="firefox"` to the desired command. Example: `CYPRESS_BROWSER="firefox" make check` for every test or `CYPRESS_BROWSER="firefox" make check-desktop spec=impress/scrolling_spec.js` for one specific test on desktop
+Head over to https://collaboraonline.github.io/post/build-code/#build-code-on-gitpod and follow the steps.
## Enjoy!
diff --git a/THIRDPARTYLICENSES b/THIRDPARTYLICENSES
new file mode 100644
index 0000000000000..6c3fa7a0109d1
--- /dev/null
+++ b/THIRDPARTYLICENSES
@@ -0,0 +1,459 @@
+Collabora Online binaries may be statically linked against POCO C++ Libraries.
+
+The POCO C++ Libraries are licensed under the Boost Software License. A very liberal license that encourages both commercial and non-commercial use.
+
+THE BOOST SOFTWARE LICENSE 1.0
+Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Collabora Online binaries may be statically linked against OpenSSL 3.0 Libraries.
+
+For the OpenSSL 3.0 release, and later releases derived from that, the Apache License v2 applies.
+
+
+ Apache License
+ Version 2.0, January 2004
+ https://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+Collabora Online binaries may be statically linked against libpng, the free reference library for reading and writing PNGs.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
+
+PNG Reference Library License version 2
+---------------------------------------
+
+ * Copyright (c) 1995-2024 The PNG Reference Library Authors.
+ * Copyright (c) 2018-2024 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement. In no event shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the product
+ documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+Collabora Online binaries may be statically linked against Zstandard library.
+
+BSD License
+
+For Zstandard software
+
+Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * Neither the name Facebook, nor Meta, nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Collabora Online client side JavaScript code uses the following 3rd party modules.
+
+Autolinker.js
+Copyright(c) 2020 Gregory Jacobs
+MIT License
+
+braintee/sanitize-url
+Copyright (c) 2017 Braintree
+MIT License
+
+Bulma: the modern CSS framework that just works
+Copyright (c) 2023 Jeremy Thomas
+MIT License
+
+fzstd – High performance Zstandard decompression in a pure JavaScript
+Copyright (c) 2020 Arjun Barrett
+MIT License
+
+hammer.js – A javascript library for multi-touch gestures
+Copyright (C) 2011-2017 by Jorik Tangelder (Eight Media)
+MIT License
+
+jQuery JavaScript Library
+Includes Sizzle.js https://sizzlejs.com/
+Copyright JS Foundation and other contributors
+MIT License
+
+jQuery contextMenu - Plugin for simple contextMenu handling
+Copyright (c) 2011-2020 SWIS BV and contributors
+MIT License
+
+jQuery Mousewheel
+Copyright jQuery Foundation and other contributors
+MIT License
+
+jQuery UI
+Copyright jQuery Foundation and other contributors
+MIT License
+
+Leaflet – an open-source JavaScript library for mobile-friendly interactive maps
+Copyright (c) 2010-2015, Vladimir Agafonkin
+Copyright (c) 2010-2011, CloudMade
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ of conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ResizeObserverPolyfill.js – A polyfill for the Resize Observer API
+Copyright (c) 2016 Denis Rul
+MIT License
+
+Select2 – The jQuery replacement for select boxes
+Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors
+MIT License
+
+SmartMenus jQuery Plugin
+Copyright Vasil Dinkov, Vadikom Web Ltd.
+MIT License
+
+w2ui – JavaScript UI Library for the Modern Web
+Copyright (C) 2014 (vitmalina@gmail.com)
+MIT License
+
+The MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Montserraft Regular Font
+Copyright 2011 The Montserrat Project Authors
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+
diff --git a/android/app/build.gradle.in b/android/app/build.gradle.in
index a9cf2fd4305b1..0dd0cee32066c 100644
--- a/android/app/build.gradle.in
+++ b/android/app/build.gradle.in
@@ -6,6 +6,7 @@ apply from: 'appSettings.gradle'
android {
compileSdkVersion 33
buildDir = "${rootProject.getBuildDir()}/app"
+ ndkVersion "20.1.5948944"
defaultConfig {
// applicationId, versionCode and versionName are defined in appSettings.gradle
@@ -61,21 +62,30 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.core:core:1.0.2'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation 'androidx.recyclerview:recyclerview:1.0.0'
- implementation 'com.google.android.material:material:1.1.0-alpha04'
- implementation 'com.google.android.play:core:1.8.0'
+ implementation 'androidx.appcompat:appcompat:1.6.1'
+ implementation 'androidx.core:core:1.9.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+ implementation 'androidx.recyclerview:recyclerview:1.3.1'
+ implementation 'com.google.android.material:material:1.6.1'
+ implementation 'com.google.android.play:core:1.10.3'
- //before changing the version please see https://issuetracker.google.com/issues/111662669
- implementation 'androidx.preference:preference:1.1.0-alpha01'
+ implementation 'androidx.preference:preference:1.2.1'
implementation project(path: ':lib')
+
+ // https://stackoverflow.com/questions/75263047/duplicate-class-in-kotlin-android
+ constraints {
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
+ because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
+ }
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
+ because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
+ }
+ }
}
-task copyBrandFiles(type: Copy) {
- from "${liboBrandingDir}/android"
- into "src/main/res"
+tasks.register('copyBrandFiles', Copy) {
+ from "${liboBrandingDir}/android"
+ into "src/main/res"
}
afterEvaluate {
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
index e42017f33543c..56e03e4fd3249 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
@@ -17,6 +17,7 @@
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import org.libreoffice.androidapp.ui.LibreOfficeUIActivity;
+import org.libreoffice.androidlib.LOActivity;
public class SettingsActivity extends AppCompatActivity {
@@ -86,6 +87,7 @@ public void onCheckedChanged(RadioGroup radioGroup, int i) {
}
AppCompatDelegate.setDefaultNightMode(dayNightMode);
prefs.edit().putInt(LibreOfficeUIActivity.NIGHT_MODE_KEY, dayNightMode).commit();
+ prefs.edit().putInt(LOActivity.NIGHT_MODE_KEY, dayNightMode).commit();
getActivity().recreate();
}
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index 74a0f12b9d6e9..1879e87d223e2 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -73,7 +73,7 @@ public static String getUriFilename(Activity activity, Uri uri) {
try {
cursor = activity.getContentResolver().query(uri, null, null, null, null);
if (cursor != null && cursor.moveToFirst())
- filename = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
+ filename = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME));
} catch (Exception e) {
return null;
} finally {
@@ -94,7 +94,7 @@ public static long getUriFileLength(Activity activity, Uri uri) {
try {
cursor = activity.getContentResolver().query(uri, null, null, null, null);
if (cursor != null && cursor.moveToFirst())
- length = cursor.getLong(cursor.getColumnIndex(OpenableColumns.SIZE));
+ length = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
} catch (Exception e) {
return 0;
} finally {
diff --git a/android/app/src/main/res/layout/file_explorer_grid_item.xml b/android/app/src/main/res/layout/file_explorer_grid_item.xml
index a84161e496de8..b741a90916cbd 100644
--- a/android/app/src/main/res/layout/file_explorer_grid_item.xml
+++ b/android/app/src/main/res/layout/file_explorer_grid_item.xml
@@ -37,7 +37,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:ellipsize="end"
- android:gravity="center_vertical"
+ android:gravity="center"
android:maxLines="2"
android:textAlignment="center"
android:textColor="?android:attr/textColorPrimary"
@@ -52,8 +52,8 @@
android:layout_gravity="center"
android:contentDescription="@string/file_actions_icon_desc"
android:scaleType="fitStart"
- android:tint="?android:attr/textColorPrimary"
- app:srcCompat="@drawable/ic_more_vert_black_24dp" />
+ app:srcCompat="@drawable/ic_more_vert_black_24dp"
+ app:tint="?android:attr/textColorPrimary" />
diff --git a/android/app/src/main/res/values-ar/strings.xml b/android/app/src/main/res/values-ar/strings.xml
index e6e2f9f2121c6..1e0b990c84b9e 100644
--- a/android/app/src/main/res/values-ar/strings.xml
+++ b/android/app/src/main/res/values-ar/strings.xml
@@ -59,4 +59,11 @@
مواقع المستنداتنظام الملفات المحليبطاقة SD خارجية
+ إنشاء
+ عنْ
+ الخادم عن بُعد
+ السِّمة
+ اختر حُلّة
+ جداول البيانات
+ مُشارَكة المستنَد
\ No newline at end of file
diff --git a/android/app/src/main/res/values-cy/strings.xml b/android/app/src/main/res/values-cy/strings.xml
index 52426dd64ceb2..f1878479fce17 100644
--- a/android/app/src/main/res/values-cy/strings.xml
+++ b/android/app/src/main/res/values-cy/strings.xml
@@ -1,7 +1,7 @@
Methu cysylltu a\'r gweinydd cwmwl. Gwiriwch eich ffurfweddiad.
- USB wedi\'i gysylltu, ffurfweddwch eich dyfais
+ USB wedi\'i gysylltu, ffurfweddwch eich dyfais.Gweinydd pellDyfais OTG (arbrofol)SD allanol
@@ -38,19 +38,19 @@
Dangos y DrwyddedGalluogi i ddangos manylion dadfygio mewn darllenydd dogfennauDangos Manylion Dadfygio
- Gosod pa hidl ffeiliau ddylai gael eu defnyddio drwy ragosodiad
+ Gosod pa hidl ffeiliau ddylai gael eu defnyddio drwy ragosodiad.Hidl Ffeiliau RhagosodedigTrefn FfeiliauCynllun rheolwr ffeiliau
- Gweld ffeiliau fel grid neu mewn rhestr
- Dewiswch sut i drefnu ffeiliau: A-Z, yn ôl maint neu ddyddiad
+ Gweld ffeiliau fel grid neu mewn rhestr.
+ Dewiswch sut i drefnu ffeiliau: A-Z, yn ôl maint neu ddyddiad.Galluogwch i ddangos ffeiliau/ffolderi cuddFfeiliau/Ffolderi CuddGosodiadau Rheolwr FfeiliauGridRhestrMethwyd penderfynu pa ffeil i\'w chadw
- Mae angen caniatâd cadw.
+ Mae angen caniatâd cadwMethodd creu\'r ffeilMae ffeil o\'r enw yna\'n bodoli eisoes, a bydd yn cael ei thros ysgrifennu.Darllen yn unig yw\'r ffeil hon, mae cadw wedi ei analluogi.
@@ -62,8 +62,8 @@
GosodiadauMethu mewngofnodi i\'r gweinydd cwmwl. Gwiriwch eich ffurfweddiad.Ynghylch
- Heb gadw\'r cyfeiriadur
- Mae bmp yn nwll
+ Heb gadw\'r cyfeiriadur.
+ Mae bmp yn nwl!Methu mynd ymhellach.Rhannu DogfenLlwytho...
@@ -77,7 +77,7 @@
IawnMae angen caniatâd ar gyfer darllen eich dogfennau.Mae Angen Caniatâd
- "Cyfeiriadur Cyfredol: %1$s"
+ Cyfeiriadur Cyfredol: %1$sLlwybr cyfeiriadur annilysDewis GyfeiriadurMynd
@@ -86,9 +86,9 @@
Llinynnau porwr cyfeiriadurCyfrinairEnw defnyddiwr
- URL a phorth y gweinydd cwmwl
+ URL a phorth y gweinydd cwmwl.URL y gweinydd
- Nodwedd arbrofol: Defnyddiwch yn unig os yw\'r ddyfais OTG yn ysgrifenadwy
+ Nodwedd Arbrofol: Defnyddiwch yn unig os yw\'r ddyfais OTG yn ysgrifenadwy.Llwybr dyfais OTGLlwybr SD allanolGosodiadau offer storio
@@ -110,4 +110,7 @@
Rhagosodiad y systemDewis themaThema
+ Enw Defnyddiwr
+ Yn cael ei ddefnyddio wrth ychwanegu sylw
+ Defnyddiwr Gwadd
\ No newline at end of file
diff --git a/android/app/src/main/res/values-en-rGB/strings.xml b/android/app/src/main/res/values-en-rGB/strings.xml
index 08021e81822fb..3c94320702da4 100644
--- a/android/app/src/main/res/values-en-rGB/strings.xml
+++ b/android/app/src/main/res/values-en-rGB/strings.xml
@@ -98,7 +98,7 @@
Largest firstSmallest firstSort by
- Filter by
+ Filter byyEditor SettingsRemove from the listFile actions
diff --git a/android/app/src/main/res/values-hr/strings.xml b/android/app/src/main/res/values-hr/strings.xml
index d9a8162832ee3..fabe3ab804d81 100644
--- a/android/app/src/main/res/values-hr/strings.xml
+++ b/android/app/src/main/res/values-hr/strings.xml
@@ -32,18 +32,18 @@
Potrebna je dozvola za spremišteNeuspjelo određivanje datoteke za učitavanjePopis
- Ikone
+ MrežaPostavke upravljača datotekaSkrivene datoteke i mapeAktiviraj prikaz skrivenih datoteka i mapaOdaberi redoslijed datoteka: A-Z, po veličini ili po datumu.
- Prikaži pločasti prikaz ili popis.
+ Prikaži datoteke kao mrežu ili kao popis.Raspored upravljača datotekaRedoslijed datotekaStandardno filtriranje datotekaPostavi standardno filtriranje datoteka.Prikaži podatke otklanjanje grešaka
- Aktiviraj za prikaz podataka otklanjanje grešaka u dokumentu
+ Aktiviraj za prikaz informacija o otklanjanju grešaka u prikazivaču dokumenataRedoslijedPostavkeOtvori
@@ -52,7 +52,7 @@
Zatvori lokacije dokumenataMapa dokumenataLokalni datotečni sustav
- Vanjska SD kartica
+ Eksterna SD karticaOTG uređaj (eksperimentalno)Udaljeni poslužiteljuUSB povezan, konfiguriraj uređaj.
@@ -63,7 +63,7 @@
Nevažeća root datoteka. Provjeri OTG uređaj i/ili konfiguraciju.Postavke poslužitelja oblakaPostavke fizičkog spremišta
- Staza vanjske SD kartice
+ Staza eksterne SD karticeStaza OTG uređajaEksperimentalna funkcija: koristi samo, ako je na OTG uređaju dozvoljeno pisanje.URL poslužitelja
diff --git a/android/app/src/main/res/values-ia/strings.xml b/android/app/src/main/res/values-ia/strings.xml
new file mode 100644
index 0000000000000..a6b3daec9354f
--- /dev/null
+++ b/android/app/src/main/res/values-ia/strings.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values-or/strings.xml b/android/app/src/main/res/values-or/strings.xml
index 76cd3305aa5be..591dcc3e5c083 100644
--- a/android/app/src/main/res/values-or/strings.xml
+++ b/android/app/src/main/res/values-or/strings.xml
@@ -2,12 +2,12 @@
ସେଟିଂଏହା ଅନୁଯାୟୀ ସଜାନ୍ତୁ
- ଵିଷୟରେ
+ ସମ୍ବନ୍ଧରେସେଟିଂଯାଅଠିକ୍ ଅଛିପାସ୍ୱର୍ଡ଼
- ଵିଷୟରେ
+ ସମ୍ବନ୍ଧରେଥିମ୍ଗାଢ଼ହାଲୁକା
diff --git a/android/app/src/main/res/values-sq/strings.xml b/android/app/src/main/res/values-sq/strings.xml
index 80fc0110c58b3..4f0e397d75284 100644
--- a/android/app/src/main/res/values-sq/strings.xml
+++ b/android/app/src/main/res/values-sq/strings.xml
@@ -11,14 +11,14 @@
S’bëhet dot hyrje në llogari te shërbyesi re.Gabim i papërcaktuar në lidhjen te shërbyesi re. Kontrolloni formësimin tuaj dhe/ose riprovoni më vonë.Rregullime
- $APP_NAME është një suitë moderne, e lehtë për t’u përdorur, me burim të hapët zyrash, për përpunim tekstesh, fletëllogaritje, paraqitje, etj.
+ $APP_NAME është një suitë moderne zyrash, e lehtë për t’u përdorur, me burim të hapët, për përpunim tekstesh, fletëllogaritje, paraqitje, etj.Kjo hedhje në qarkullim qe sjellë nga $VENDOR.Ju lutemi, hapni një kartelë duke përdorur ikonën dosje te paneli.S’ka objekteKa tashmë një kartelë me këtë emër dhe do të mbishkruhet.Krijimi i kartelës dështoiListë
- Rrjetë
+ MozaikRregullime Përgjegjësi KartelashRregullime PërpunuesiKartela/Dosje të Fshehura
@@ -30,7 +30,7 @@
Filtër Parazgjedhje KartelashCaktoni cili filtër kartelash duhet përdorur si parazgjedhje.Shfaq Hollësi Diagnostikimi
- Shfaq Licence
+ Shfaq LicencëShfaq NjoftimMë Tepër HollësiDokument i Ri Tekst
@@ -67,10 +67,10 @@
Kartelë rrënjë e pavlefshme. Kontrolloni pajisje tuaj OTG dhe/ose formësimin.Rregullime depozitimi nga shërbimiRregullime shërbyesi re
- Rregullime depozite faktike
+ Rregullime depozite materialeShteg SD të jashtmeShteg pajisjeje OTG
- Veçori Eksperimentale: Përdoreni vetëm nëse pajisje OTG është e shkrueshme.
+ Veçori Eksperimentale: Përdoreni vetëm nëse pajisja OTG është e shkrueshme.URL ShërbyesiURL dhe portë te shërbyesi re.Emër përdoruesi
@@ -109,4 +109,7 @@
ParaqitjeVendndodhje dokumenteshFjalëkalim
+ Version: %1$s
+\nonline git-hash: %2$s
+\ncore git-hash: %3$s
\ No newline at end of file
diff --git a/android/build.gradle.in b/android/build.gradle.in
index 4552f6897d80f..6674d7a371883 100644
--- a/android/build.gradle.in
+++ b/android/build.gradle.in
@@ -4,10 +4,11 @@ buildDir = "@abs_top_builddir@/android/build"
buildscript {
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.4.1'
+ // before updating make sure https://issuetracker.google.com/issues/293294923 is fixed
+ classpath 'com.android.tools.build:gradle:3.6.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -17,11 +18,11 @@ buildscript {
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
-task clean(type: Delete) {
+tasks.register('clean', Delete) {
delete rootProject.buildDir
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 5bb4a233eb20c..efc143b99acdb 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/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-5.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/android/lib/build.gradle.in b/android/lib/build.gradle.in
index 78ebe83ee316f..6dfcfaf49e3a5 100644
--- a/android/lib/build.gradle.in
+++ b/android/lib/build.gradle.in
@@ -6,6 +6,7 @@ apply from: 'libSettings.gradle'
android {
compileSdkVersion 33
buildDir = "${rootProject.getBuildDir()}/lib"
+ ndkVersion "20.1.5948944"
defaultConfig {
minSdkVersion 21
@@ -67,13 +68,22 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.0.2'
- implementation 'com.google.android.material:material:1.1.0-alpha04'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
+ implementation 'androidx.appcompat:appcompat:1.6.1'
+ implementation 'com.google.android.material:material:1.6.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+ // https://stackoverflow.com/questions/75263047/duplicate-class-in-kotlin-android
+ constraints {
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
+ because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
+ }
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
+ because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
+ }
+ }
}
-task copyUnpackAssets(type: Copy) {
+tasks.register('copyUnpackAssets', Copy) {
description "copies assets that need to be extracted on the device"
into 'src/main/assets/unpack'
into('program') {
@@ -95,7 +105,7 @@ task copyUnpackAssets(type: Copy) {
}
into('etc/coolwsd') {
from('/android/coolkitconfig.xcu')
- includes = [ 'coolkitconfig.xcu' ]
+ includes = ['coolkitconfig.xcu']
}
into('user/fonts') {
from "${liboInstdir}/share/fonts/truetype"
@@ -122,7 +132,7 @@ task copyUnpackAssets(type: Copy) {
filter {
String line ->
line.replaceAll(
- '@@APPLICATION_ID@@', new String("${liboApplicationId}")
+ '@@APPLICATION_ID@@', new String("${liboApplicationId}")
)
}
}
@@ -138,15 +148,15 @@ task copyUnpackAssets(type: Copy) {
includes = ['extensions/dict-de/**', 'extensions/dict-en/**', 'extensions/dict-es/**', 'extensions/dict-fr/**', 'extensions/dict-pt-BR/**']
exclude { FileTreeElement details ->
!(details.file.isDirectory() ||
- details.file.name.endsWith('.xcu') ||
- details.file.name.endsWith('.dic') ||
- details.file.name.endsWith('.aff') ||
- details.file.name.endsWith('.xml'))
+ details.file.name.endsWith('.xcu') ||
+ details.file.name.endsWith('.dic') ||
+ details.file.name.endsWith('.aff') ||
+ details.file.name.endsWith('.xml'))
}
}
}
-task copyAssets(type: Copy) {
+tasks.register('copyAssets', Copy) {
description "copies assets that can be accessed within the installed apk"
into 'src/main/assets'
from("${liboSrcRoot}/instdir/") {
@@ -168,7 +178,7 @@ task copyAssets(type: Copy) {
}
}
-task createFullConfig(type: Copy) {
+tasks.register('createFullConfig', Copy) {
description "copies various configuration bits into the apk"
into('src/main/assets/share/config')
from("${liboInstdir}/share/config") {
@@ -176,25 +186,25 @@ task createFullConfig(type: Copy) {
}
}
-task copyBrandTheme(type: Copy) {
- from "${liboBrandingDir}/online-theme"
- into "src/main/assets/share/theme_definitions/online"
+tasks.register('copyBrandTheme', Copy) {
+ from "${liboBrandingDir}/online-theme"
+ into "src/main/assets/share/theme_definitions/online"
}
-task copyDocTemplates(type: Copy) {
- from "${rootProject.getRootDir()}/templates/untitled.odp",
- "${rootProject.getRootDir()}/templates/untitled.ods",
- "${rootProject.getRootDir()}/templates/untitled.odt"
- into "src/main/assets/templates"
+tasks.register('copyDocTemplates', Copy) {
+ from "${rootProject.getRootDir()}/templates/untitled.odp",
+ "${rootProject.getRootDir()}/templates/untitled.ods",
+ "${rootProject.getRootDir()}/templates/untitled.odt"
+ into "src/main/assets/templates"
}
-task copyKitConfig(type: Copy) {
- from "${file(rootProject.getRootDir()).getParent()}/coolkitconfig-mobile.xcu"
- into "src/main/assets/etc/coolwsd"
- rename { "coolkitconfig.xcu" }
+tasks.register('copyKitConfig', Copy) {
+ from "${file(rootProject.getRootDir()).getParent()}/coolkitconfig-mobile.xcu"
+ into "src/main/assets/etc/coolwsd"
+ rename { "coolkitconfig.xcu" }
}
-task createStrippedConfig {
+tasks.register('createStrippedConfig') {
def preserveDir = file("src/main/assets/share/config/soffice.cfg/empty")
outputs.dir "src/main/assets/share/registry/res"
outputs.file preserveDir
@@ -207,7 +217,7 @@ task createStrippedConfig {
}
}
-task createRCfiles {
+tasks.register('createRCfiles') {
inputs.file "libSettings.gradle"
dependsOn copyUnpackAssets, copyAssets
def sofficerc = file('src/main/assets/unpack/program/sofficerc')
@@ -295,7 +305,7 @@ preBuild.dependsOn 'createRCfiles',
'createFullConfig',
'copyBrandTheme'
-task generateCoolDebugAssets {
+tasks.register('generateCoolDebugAssets') {
doLast {
exec {
commandLine 'make', '-C', "${rootProject.getBuildDir()}/../../browser", 'clean'
@@ -306,7 +316,7 @@ task generateCoolDebugAssets {
}
}
-task generateCoolReleaseAssets {
+tasks.register('generateCoolReleaseAssets') {
doLast {
exec {
commandLine 'make', '-C', "${rootProject.getBuildDir()}/../../browser", 'clean'
diff --git a/android/lib/src/main/cpp/CMakeLists.txt.in b/android/lib/src/main/cpp/CMakeLists.txt.in
index 74101d0d4a304..12529d4109fab 100644
--- a/android/lib/src/main/cpp/CMakeLists.txt.in
+++ b/android/lib/src/main/cpp/CMakeLists.txt.in
@@ -11,6 +11,7 @@ add_library(androidapp SHARED
../../../../../common/MessageQueue.cpp
../../../../../common/TraceEvent.cpp
../../../../../common/Protocol.cpp
+ ../../../../../common/Simd.cpp
../../../../../common/StringVector.cpp
../../../../../common/Session.cpp
../../../../../common/SigUtil.cpp
@@ -18,15 +19,19 @@ add_library(androidapp SHARED
../../../../../common/Unit.cpp
../../../../../common/Util.cpp
../../../../../kit/ChildSession.cpp
+ ../../../../../kit/DeltaSimd.c
../../../../../kit/Kit.cpp
../../../../../net/FakeSocket.cpp
../../../../../net/Socket.cpp
../../../../../wsd/ClientSession.cpp
../../../../../wsd/DocumentBroker.cpp
../../../../../wsd/COOLWSD.cpp
+ ../../../../../wsd/ClientRequestDispatcher.cpp
../../../../../wsd/RequestDetails.cpp
+ ../../../../../wsd/RequestVettingStation.cpp
../../../../../wsd/Storage.cpp
- ../../../../../wsd/TileCache.cpp)
+ ../../../../../wsd/TileCache.cpp
+ ../../../../../wsd/coolwsd-fork.cpp)
target_compile_definitions(androidapp PRIVATE COOLWSD_CONFIGDIR="/assets/etc/coolwsd")
diff --git a/android/lib/src/main/cpp/androidapp.cpp b/android/lib/src/main/cpp/androidapp.cpp
index 8606bb00b401d..a8748982ee903 100644
--- a/android/lib/src/main/cpp/androidapp.cpp
+++ b/android/lib/src/main/cpp/androidapp.cpp
@@ -35,6 +35,7 @@ static int fakeClientFd;
static int closeNotificationPipeForForwardingThread[2] = {-1, -1};
static JavaVM* javaVM = nullptr;
static bool lokInitialized = false;
+static std::mutex coolwsdRunningMutex;
// Remember the reference to the LOActivity
jclass g_loActivityClz = nullptr;
@@ -182,9 +183,11 @@ void closeDocument()
{
// Close one end of the socket pair, that will wake up the forwarding thread that was constructed in HULLO
fakeSocketClose(closeNotificationPipeForForwardingThread[0]);
-
+ LOG_DBG("Waiting for Lokit to finish...");
+ std::unique_lock lokitLock(COOLWSD::lokit_main_mutex);
+ LOG_DBG("Lokit has finished.");
LOG_DBG("Waiting for COOLWSD to finish...");
- std::unique_lock lock(COOLWSD::lokit_main_mutex);
+ std::unique_lock coolwsdLock(coolwsdRunningMutex);
LOG_DBG("COOLWSD has finished.");
}
@@ -345,6 +348,7 @@ Java_org_libreoffice_androidlib_LOActivity_createCOOLWSD(JNIEnv *env, jobject in
{
LOG_DBG("Creating COOLWSD");
{
+ std::unique_lock lock(coolwsdRunningMutex);
fakeClientFd = fakeSocketSocket();
LOG_DBG("createCOOLWSD created fakeClientFd: " << fakeClientFd);
std::unique_ptr coolwsd = std::make_unique();
diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index e741d6bb2248f..fcdd0f95f4f9a 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -23,6 +23,7 @@
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
+import android.content.res.Configuration;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
@@ -74,6 +75,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@@ -96,6 +98,7 @@ public class LOActivity extends AppCompatActivity {
private static final String CLIPBOARD_COOL_SIGNATURE = "cool-clip-magic-4a22437e49a8-";
public static final String RECENT_DOCUMENTS_KEY = "RECENT_DOCUMENTS_LIST";
private static String USER_NAME_KEY = "USER_NAME";
+ public static final String NIGHT_MODE_KEY = "NIGHT_MODE";
private File mTempFile = null;
@@ -349,6 +352,8 @@ private void initUI() {
webSettings.setJavaScriptEnabled(true);
mWebView.addJavascriptInterface(this, "COOLMessageHandler");
+ webSettings.setDomStorageEnabled(true);
+
// allow debugging (when building the debug version); see details in
// https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
boolean isChromeDebugEnabled = sPrefs.getBoolean("ENABLE_CHROME_DEBUGGING", false);
@@ -637,6 +642,7 @@ protected void onDestroy() {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+ super.onActivityResult(requestCode, resultCode, intent);
if (resultCode != RESULT_OK) {
if (requestCode == REQUEST_SELECT_IMAGE_FILE) {
valueCallback.onReceiveValue(null);
@@ -655,18 +661,15 @@ Meaning that we will switch to the copied (saved-as) document in the bg
requestCopy = true;
if (getMimeType().equals("text/plain")) {
requestCode = REQUEST_SAVEAS_ODT;
- }
- else if (getMimeType().equals("text/comma-separated-values")) {
+ } else if (getMimeType().equals("text/comma-separated-values")) {
requestCode = REQUEST_SAVEAS_ODS;
- }
- else if (getMimeType().equals("application/vnd.ms-excel.sheet.binary.macroenabled.12")) {
+ } else if (getMimeType().equals("application/vnd.ms-excel.sheet.binary.macroenabled.12")) {
requestCode = REQUEST_SAVEAS_ODS;
- }
- else {
+ } else {
String filename = getFileName(true);
String extension = filename.substring(filename.lastIndexOf('.') + 1);
requestCode = getRequestIDForFormat(extension);
- assert(requestCode != 0);
+ assert (requestCode != 0);
}
}
switch (requestCode) {
@@ -703,8 +706,7 @@ else if (getMimeType().equals("application/vnd.ms-excel.sheet.binary.macroenable
inputStream = new FileInputStream(tempFile);
try {
outputStream = getContentResolver().openOutputStream(intent.getData(), "wt");
- }
- catch (FileNotFoundException e) {
+ } catch (FileNotFoundException e) {
Log.i(TAG, "failed with the 'wt' mode, trying without: " + e.getMessage());
outputStream = getContentResolver().openOutputStream(intent.getData());
}
@@ -729,7 +731,7 @@ else if (getMimeType().equals("application/vnd.ms-excel.sheet.binary.macroenable
}
}
if (requestCopy == true) {
- assert(_tempFile != null);
+ assert (_tempFile != null);
mTempFile = _tempFile;
getIntent().setData(intent.getData());
/** add the document to recents */
@@ -858,6 +860,11 @@ private void loadDocument() {
if (isLargeScreen() && !isChromeOS())
finalUrlToLoad += "&userinterfacemode=notebookbar";
+
+ if(isDarkMode()) {
+ finalUrlToLoad += "&darkTheme=true";
+ }
+
// load the page
mWebView.loadUrl(finalUrlToLoad);
@@ -866,6 +873,21 @@ private void loadDocument() {
loadDocumentMillis = android.os.SystemClock.uptimeMillis();
}
+ private boolean isDarkMode() {
+ SharedPreferences recentPrefs = getSharedPreferences(EXPLORER_PREFS_KEY, MODE_PRIVATE);
+ int mode = recentPrefs.getInt(NIGHT_MODE_KEY, AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
+ switch (mode) {
+ case -1:
+ int darkModeFlag = getBaseContext().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+ return darkModeFlag == Configuration.UI_MODE_NIGHT_YES;
+ case 1:
+ return false;
+ case 2:
+ return true;
+ }
+ return false;
+ }
+
static {
System.loadLibrary("androidapp");
}
@@ -1124,7 +1146,7 @@ private String getFileName(boolean withExtension) {
try {
cursor = getContentResolver().query(getIntent().getData(), null, null, null, null);
if (cursor != null && cursor.moveToFirst())
- filename = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
+ filename = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME));
} catch (Exception e) {
return null;
}
diff --git a/android/lib/src/main/res/values-cy/strings.xml b/android/lib/src/main/res/values-cy/strings.xml
index 4b3260cc15a1f..759b404635653 100644
--- a/android/lib/src/main/res/values-cy/strings.xml
+++ b/android/lib/src/main/res/values-cy/strings.xml
@@ -4,7 +4,7 @@
Methu agor dewisydd ffeiliauMethwyd mewnosod delweddMethwyd penderfynu pa ffeil i\'w chadw
- Mae angen caniatâd cadw.
+ Mae angen caniatâd cadwDarllen yn unig yw\'r ffeil hon, mae cadw wedi ei analluogi.Yn cadw...Paratoi am y cychwyn cyntaf ar ôl diweddariad.
@@ -14,4 +14,13 @@
Gorffen...Os ydych yn ei hoffi, rhowch 5 seren i ni ar Google Play. Mae eich adolygiadau da yn ein hysbrydoli.Nid oes modd cadw\'r ffeil yn y lleoliad yma. Bydd angen ei symud i\'r fan Chwarae ffeiliau ar gyfer mynediad darllen/ysgrifennu llawn.
+ Yn ailgychwyn...
+ Methu agor y ddogfen
+ Gweld yn unig
+ Golygu copi
+ Mae\'r ddogfen hon yn ddarllen-yn-unig. Ydych chi eisiau gwneud copi i\'w olygu?
+ Defnyddio Fformat Testun
+ Defnyddio Fformat ODF
+ Cadarnhau Fformat Ffeil
+ Gall y ddogfen hon gynnwys fformatio neu gynnwys nad oes modd ei chadw yn y fformat ffeil \"Testun\" a ddewiswyd ar hyn o bryd .
\ No newline at end of file
diff --git a/android/lib/src/main/res/values-hr/strings.xml b/android/lib/src/main/res/values-hr/strings.xml
index 0a09aa47c832e..9ee63920148e9 100644
--- a/android/lib/src/main/res/values-hr/strings.xml
+++ b/android/lib/src/main/res/values-hr/strings.xml
@@ -10,7 +10,7 @@
Datoteka je zaštićena, spremanje je deaktivirano.Ovaj dokument je samo-za-čitanje. Želiš li izraditi kopiju za uređivanje\?Uredi kopiju
- Samo prikaz
+ Samo za prikazPonovo pokretanje …Zatvaranje …Ako ti se sviđa, daj nam 5 zvjezdica na Google Play stranici. Tvoje dobre kritike su nam najbolja motivacija.
diff --git a/android/lib/src/main/res/values-ia/strings.xml b/android/lib/src/main/res/values-ia/strings.xml
new file mode 100644
index 0000000000000..a6b3daec9354f
--- /dev/null
+++ b/android/lib/src/main/res/values-ia/strings.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/android/lib/src/main/res/values-jv/strings.xml b/android/lib/src/main/res/values-jv/strings.xml
new file mode 100644
index 0000000000000..a6b3daec9354f
--- /dev/null
+++ b/android/lib/src/main/res/values-jv/strings.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/android/lib/src/main/res/values-nb-rNO/strings.xml b/android/lib/src/main/res/values-nb-rNO/strings.xml
index 2fb9390ce9efa..4d5ac52df106c 100644
--- a/android/lib/src/main/res/values-nb-rNO/strings.xml
+++ b/android/lib/src/main/res/values-nb-rNO/strings.xml
@@ -19,4 +19,8 @@
Kun visningStarter på ny…Kunne ikke åpne dokumentet
+ Dette dokumentet kan inneholde formatering eller innhold som ikke kan lagres i det for øyeblikket valgte filformatet \"Tekst\".
+ Bruk ODF format
+ Bekreft filformat
+ Bruk tekstformat
\ No newline at end of file
diff --git a/android/lib/src/main/res/values-nl/strings.xml b/android/lib/src/main/res/values-nl/strings.xml
index 802550ea5c21e..5e8b430b3f610 100644
--- a/android/lib/src/main/res/values-nl/strings.xml
+++ b/android/lib/src/main/res/values-nl/strings.xml
@@ -15,7 +15,7 @@
Afsluiten...Dit document is alleen-lezen. Wil je een kopie maken om te bewerken\?Bewerk een kopie
- Alleen-lezen
+ Alleen bekijkenOpnieuw starten...Het bestand kan op deze locatie niet worden bewaard; het wordt alleen-lezen geopend. Verplaats het naar Play-bestanden voor volledige lees- en schrijftoegang.Gebruik Tekst-opmaak
diff --git a/android/templates/untitled.odt b/android/templates/untitled.odt
index d2a8dc274c6c4..1555daad7bb1e 100644
Binary files a/android/templates/untitled.odt and b/android/templates/untitled.odt differ
diff --git a/autogen.sh b/autogen.sh
index d256534c861df..c7303b23386ba 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -31,8 +31,22 @@ autoreconf || failed "autoreconf"
scripts/refresh-git-hooks || failed "refresh-git-hooks"
+if [ $# -gt 0 ]; then
+ # If we got parameters, we can execute configure directly.
+ echo -n "Result: All went OK, running $srcdir/configure "
+ for arg in "$@"
+ do
+ echo -n "'${arg}' "
+ done
+ echo "now."
+ $srcdir/configure "$@" || failed "configure"
+ exit 0
+fi
+
cat << EOF
Result: All went OK, please run $srcdir/configure (with the appropriate parameters) now.
EOF
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/browser/.eslintrc b/browser/.eslintrc
index fcaf8bb0f14c1..62939a361e5f4 100644
--- a/browser/.eslintrc
+++ b/browser/.eslintrc
@@ -20,7 +20,11 @@
"no-control-regex": 0,
"no-useless-escape": 0,
"semi": 2,
- "no-redeclare": 0
+ "no-redeclare": 0,
+ /// Rules that are set to warn will fail in CI but not when building for development:
+ "no-debugger": 1,
+ "no-unreachable": 1,
+ "no-unused-vars": 1,
},
"globals": {
"L": true,
@@ -30,6 +34,9 @@
"env": {
"browser": true
},
+ "parserOptions": {
+ "ecmaVersion": 2017
+ },
"overrides": [
{
"files": ["**/*.ts"],
diff --git a/browser/.gitignore b/browser/.gitignore
index a4e3f88e76229..8b0c25aab9298 100644
--- a/browser/.gitignore
+++ b/browser/.gitignore
@@ -8,8 +8,10 @@ index.html
bower.json
component.json
+mocha.log
mocha_tests/*.js
tscompile.done
+duplication.log
_site
dist/*.js
diff --git a/browser/Makefile.am b/browser/Makefile.am
index 34b08373dd3fb..9ba8ca26fd4e0 100644
--- a/browser/Makefile.am
+++ b/browser/Makefile.am
@@ -31,8 +31,10 @@ endif
MOCHA_DIR = $(srcdir)/mocha_tests
MOCHA_TS_FILES = $(wildcard $(MOCHA_DIR)/*.ts)
MOCHA_TS_JS_FILES := $(MOCHA_TS_FILES:.ts=.js)
+# tsc can report a failure, but still create a .js and a second make attempt will succeed,
+# so if this returns an error then delete the target
$(MOCHA_TS_JS_FILES): %.js: %.ts
- $(builddir)/node_modules/typescript/bin/tsc $< --outfile $@ --module none --lib dom,es2016 --target ES5
+ $(builddir)/node_modules/typescript/bin/tsc $< --outfile $@ --module none --lib dom,es2016 --target ES5 || (rm -f $@ && false)
JQUERY_LIGHTNESS_IMAGE_PATH = $(srcdir)/images/jquery-ui-lightness
JQUERY_LIGHTNESS_IMAGES = $(wildcard $(JQUERY_LIGHTNESS_IMAGE_PATH)/*.png)
@@ -106,7 +108,8 @@ COOL_ADMIN_JS =\
admin/src/AdminSocketSettings.js \
admin/src/AdminSocketHistory.js \
admin/src/AdminSocketLog.js \
- admin/src/AdminClusterOverview.js
+ admin/src/AdminClusterOverview.js \
+ admin/src/AdminClusterOverviewAbout.js
NODE_MODULES_SRC =\
autolinker@3.14.1 \
@@ -163,7 +166,6 @@ NODE_MODULES_JS =\
node_modules/jquery-ui/dist/jquery-ui.js \
$(shell find node_modules/jquery-ui/ui/i18n -name '*.js') \
node_modules/smartmenus/dist/jquery.smartmenus.js \
- node_modules/pako/dist/pako_inflate.es5.js \
node_modules/fzstd/umd/index.js
COOL_LIBS_JS =\
@@ -204,6 +206,7 @@ COOL_JS_LST =\
src/core/Events.js \
src/core/Socket.js \
src/core/Matrix.js \
+ src/core/Debug.js \
src/geometry/Point.ts \
src/geometry/Bounds.ts \
src/geometry/Transformation.ts \
@@ -211,7 +214,6 @@ COOL_JS_LST =\
src/geo/LatLngBounds.js \
src/geo/projection/Projection.LonLat.js \
src/geo/crs/CRS.js \
- src/geo/crs/CRS.Simple.js \
src/control/IFrameDialog.js \
src/map/Map.js \
src/control/Control.IdleHandler.ts \
@@ -247,7 +249,6 @@ COOL_JS_LST =\
src/layer/tile/CalcTileLayer.js \
src/layer/tile/ContentControlSection.ts \
src/layer/BackgroundColor.js \
- src/layer/ImageOverlay.js \
src/layer/marker/ProgressOverlay.js \
src/layer/marker/TextInput.js \
src/layer/marker/A11yTextInput.js \
@@ -295,6 +296,7 @@ COOL_JS_LST =\
src/dom/DomEvent.Pointer.js \
src/map/handler/Map.TouchGesture.js \
src/map/handler/Map.Keyboard.js \
+ src/map/handler/Map.KeyboardShortcuts.ts \
src/map/handler/Map.Welcome.js \
src/map/handler/Map.Feedback.js \
src/map/handler/Map.VersionBar.js \
@@ -328,31 +330,38 @@ COOL_JS_LST =\
src/control/Control.LokDialog.js \
src/control/Control.AlertDialog.js \
src/control/ColorPicker.js \
+ src/control/jsdialog/Util.Dropdown.js \
src/control/jsdialog/Util.FocusCycle.js \
+ src/control/jsdialog/Util.ModalHelper.js \
+ src/control/jsdialog/Util.StateChange.ts \
src/control/jsdialog/Widget.Calendar.js \
+ src/control/jsdialog/Widget.Combobox.js \
src/control/jsdialog/Widget.DrawingArea.js \
src/control/jsdialog/Widget.FormulabarEdit.js \
+ src/control/jsdialog/Widget.Frame.js \
+ src/control/jsdialog/Widget.IconView.js \
src/control/jsdialog/Widget.LanguageSelector.js \
src/control/jsdialog/Widget.MenuButton.js \
+ src/control/jsdialog/Widget.MobileBorderSelector.js \
src/control/jsdialog/Widget.MobileTabControl.js \
src/control/jsdialog/Widget.MultilineEdit.js \
+ src/control/jsdialog/Widget.Progressbar.js \
src/control/jsdialog/Widget.ScrolledWindow.js \
+ src/control/jsdialog/Widget.Timefield.js \
src/control/jsdialog/Widget.TreeView.js \
src/control/Control.JSDialog.js \
src/control/Control.JSDialogBuilder.js \
src/control/Control.MobileWizardBuilder.js \
src/control/Control.MobileWizardWindow.js \
src/control/Control.MobileWizard.js \
- src/control/Control.MobileWizardPopup.js \
src/control/Control.LanguageDialog.js \
src/control/Control.Attribution.js \
src/control/Control.MobileSlide.js \
- src/control/Control.Scale.js \
src/control/Control.StatusBar.js \
src/control/Control.SearchBar.js \
src/control/Control.MobileTopBar.js \
src/control/Control.MobileBottomBar.js \
- src/control/Control.UserList.js \
+ src/control/Control.UserList.ts \
src/control/Control.FormulaBar.js \
src/control/Control.FormulaBarJSDialog.js \
src/control/Control.SheetsBar.js \
@@ -478,13 +487,17 @@ $(DIST_FOLDER)/soffice%: $(abs_top_builddir)/wasm/soffice%
@cp $< $@
WASM_FILES= \
- $(DIST_FOLDER)/online.data \
$(DIST_FOLDER)/online.js \
$(DIST_FOLDER)/online.wasm \
- $(DIST_FOLDER)/online.wasm.debug.wasm \
$(DIST_FOLDER)/online.worker.js \
$(DIST_FOLDER)/soffice.data \
$(DIST_FOLDER)/soffice.data.js.metadata
+
+if ENABLE_DEBUG
+WASM_FILES += \
+ $(DIST_FOLDER)/online.wasm.debug.wasm
+endif
+
endif
$(TYPESCRIPT_JS_DIR)/%.js: $(srcdir)/%.ts
@@ -531,7 +544,7 @@ $(INTERMEDIATE_DIR)/admin-src.js: $(COOL_ADMIN_TS_JS) $(COOL_ADMIN_JS)
@$(NODE) node_modules/eslint/bin/eslint.js --resolve-plugins-relative-to $(abs_builddir) --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc --no-eslintrc $(srcdir)/admin/src
@awk 'FNR == 1 {print ""} 1' $(COOL_ADMIN_TS_JS) $(patsubst %.js,$(srcdir)/%.js,$(COOL_ADMIN_JS)) > $@
-$(INTERMEDIATE_DIR)/cool-src.js: tscompile.done $(call prereq_cool) $(COOL_JS_DST)
+$(INTERMEDIATE_DIR)/cool-src.js: tscompile.done $(call prereq_cool) $(COOL_JS_DST) $(abs_top_srcdir)/scripts/unocommands.py
@mkdir -p $(dir $@)
$(abs_top_srcdir)/scripts/unocommands.py --check $(abs_top_srcdir)
@printf "Checking for obsolete JS build intermediates in this makefile... "
@@ -683,9 +696,25 @@ $(DIST_FOLDER)/admin/%: $(srcdir)/admin/%
@mkdir -p $(dir $@)
@cp $< $@
+if ENABLE_DEBUG
install-data-hook:
mkdir -p $(DESTDIR)$(pkgdatadir)/browser; \
cp -a dist/ $(DESTDIR)$(pkgdatadir)/browser/;
+else
+install-data-hook:
+ mkdir -p $(DESTDIR)$(pkgdatadir)/browser; \
+ rsync -a --exclude='src' \
+ --exclude='debug.html' \
+ --exclude='framed.doc.html' \
+ --exclude='framed.html' \
+ --exclude='load.doc.html' \
+ --exclude='multidocs.html' \
+ --exclude='tsconfig.tsbuildinfo' \
+ dist $(DESTDIR)$(pkgdatadir)/browser/;
+if ENABLE_WASM
+ find $(DESTDIR)$(pkgdatadir)/browser/dist -type f ! -iname "*.png" -exec brotli --force {} \;
+endif
+endif
libs:
@mkdir -p $(abs_srcdir)/libs
@@ -700,6 +729,7 @@ pot:
admin/src/AdminSocketOverview.js \
admin/src/AdminSocketSettings.js \
admin/src/Util.js \
+ js/global.js \
js/w2ui-1.5.rc1.js \
src/control/ColorPicker.js \
src/control/Control.AlertDialog.js \
@@ -710,6 +740,7 @@ pot:
src/control/Control.DownloadProgress.js \
src/control/Control.FormulaBar.js \
src/control/Control.FormulaBarJSDialog.js \
+ src/control/Control.IdleHandler.ts \
src/control/Control.JSDialogBuilder.js \
src/control/Control.LanguageDialog.js \
src/control/Control.Menubar.js \
@@ -718,7 +749,6 @@ pot:
src/control/Control.MobileWizardBuilder.js \
src/control/Control.MobileWizardWindow.js \
src/control/Control.MobileWizard.js \
- src/control/Control.MobileWizardPopup.js \
src/control/Control.Notebookbar.js \
src/control/Control.NotebookbarBuilder.js \
src/control/Control.NotebookbarCalc.js \
@@ -734,15 +764,19 @@ pot:
src/control/Control.Tabs.js \
src/control/Control.Toolbar.js \
src/control/Control.TopToolbar.js \
- src/control/Control.UserList.js \
+ src/control/Control.UIManager.js \
+ src/control/Control.UserList.ts \
src/control/Control.Zotero.js \
src/control/Parts.js \
src/control/Permission.js \
src/control/Ruler.js \
src/control/Signing.js \
src/control/Toolbar.js \
+ src/control/jsdialog/Widget.MobileBorderSelector.js \
src/control/jsdialog/Widget.TreeView.js \
src/core/Socket.js \
+ src/core/Debug.js \
+ src/docstate.js \
src/errormessages.js \
src/layer/tile/CanvasTileLayer.js \
src/layer/tile/CommentListSection.ts \
@@ -753,6 +787,7 @@ pot:
src/map/handler/Map.Feedback.js \
src/map/handler/Map.FileInserter.js \
src/map/handler/Map.Keyboard.js \
+ src/map/handler/Map.SlideShow.js \
src/map/handler/Map.WOPI.js
html2po --pot --input=html/cool-help.html --output=po/templates/cool-help.pot --duplicates=merge
@@ -795,6 +830,7 @@ build-tests: $(MOCHA_TS_JS_FILES)
@echo "Build of mocha test finished."
MOCHA_TEST_LOG = "`pwd`/mocha.log"
+DUPLICATION_TEST_LOG = "`pwd`/duplication.log"
check-local: $(MOCHA_TS_JS_FILES)
@echo "Running mocha tests..."
@echo > ${MOCHA_TEST_LOG}
@@ -805,6 +841,15 @@ check-local: $(MOCHA_TS_JS_FILES)
exit 1; \
fi
+ @echo "Checking code duplication..."
+ @echo > ${DUPLICATION_TEST_LOG}
+ @if npm run duplication 2> ${DUPLICATION_TEST_LOG} 1>&2; then \
+ echo "Code duplication tests finished successfully."; \
+ else \
+ cat ${DUPLICATION_TEST_LOG}; \
+ exit 1; \
+ fi
+
# the delay (in milliseconds) between each emulated key stroke for each view
typing_speed=100
# The duration of the typing (in milliseconds)
diff --git a/browser/admin/admin.strings.js b/browser/admin/admin.strings.js
index 1d5fb8ce5dd10..4493067956958 100644
--- a/browser/admin/admin.strings.js
+++ b/browser/admin/admin.strings.js
@@ -1,4 +1,13 @@
/* -*- js-indent-level: 8 -*- */
+/*
+ * Copyright the Collabora Online contributors.
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * 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/.
+ */
/* Stringtable for Admin Console User Interface */
var l10nstrings = {};
@@ -55,7 +64,8 @@ l10nstrings.strLogLevels = _('Log Levels');
l10nstrings.strCloseModal = _('Close');
l10nstrings.strUpdateLogLevels = _('Update Log Levels');
l10nstrings.strVersionInfo = _('Version Information');
-
+l10nstrings.strLicense = _('License');
+l10nstrings.strAbout = _('About');
if (module) {
module.exports = l10nstrings;
}
diff --git a/browser/admin/adminClusterBody.html b/browser/admin/adminClusterBody.html
new file mode 100644
index 0000000000000..91cc600d70fcc
--- /dev/null
+++ b/browser/admin/adminClusterBody.html
@@ -0,0 +1,47 @@
+
+
+
+
+