use the xml token "use-window-font-color" to toggle auto color on.
https: //github.com/CollaboraOnline/online/issues/6546
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib14b144ce6f593114a8130f5816f479d5cd4fe85
The +[NSString string...] selectors won't be released until
an enclosing autorelease pool is released. But since we use
ARC, we don't know where the compiler has inserted the
autorelease pool so JS messages may not be released until
after a very long time potentially causing an out of memory
crash. So, use the -[[NSString alloc] init...] selectors
instead.
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Iff0be8ee5b322347e746dc030948b82d117c43a1
Also, don't set webView.configuration.userContentController to nil as it
generates a "nil not allowed" compiler warning.
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Ibb49228a65f102fa6d97d4e5affafae8ad528c0d
This avoids an excessive number of reallocations. This is overkill
for non-binary messages, but most non-binary messages appear to be
under 1K bytes in length. In contrast, it appears that binary
messags routinely use at least 75% of the maximum possible length.
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: I522fe74bc355a78b6b561ec9475a1afb27cf54b2
Many .png tile messages are very large so avoid using
-[NSString stringByAppendingString:] calls to create the JavaScript
string.
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: I8163ef93da315122f938c9ed2b66b49a443f283f
LANG values such as en_US.UTF-8 trigger an assert in the LibreOffice
code so replace all "_" characters with "-" characters.
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Icba29a8e647eaf0887cc801d4b8763ffd821ffbf
Setting modalInPresentation to YES will ignore all events outside of
the view so set self.modalInPresentation to NO.
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I5e886079edec6f7e37676be29bfaa3061e8eb4ae
Mobile apps don't substitute these values so set them to zero length
strings.
Also, the iOS app sets the base text direction via the "dir" parameter
so add handling of that parameter in cool.html. TODO: check if the
Android and GTK apps need to implement the "dir" parameter to handle
RTL layout.
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: Ied8268ec256011281961ef610d53baeee0efe9cd
Limit escaping of non-ASCII text and splitting on the first newline to
only certain message types on iOS.
Also, fix mangled UTF-8 text on iOS in jsdialogs when using languages
like Greek and Japanese by only setting the image bytes for only the
same set of message types.
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I9cd088509ba9724108da3c9457cd3d098b45723f
Passing non-ASCII, UTF-8 text from native to JavaScript works
fine, but images become corrupted if any non-ASCII bytes are
not escaped.
The Socket._extractTextImg() JavaScript function assumes that,
in the iOS app, the first newline separates text from image data
so assume all bytes after the first new line are image data.
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I06f4377bb3b7002a76041a198076decfee9e3733
This is a near duplicate of pull request #5898
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: Ib05a285f3642ec0ca745b0c74157190fda5bd3ed
Copy pull request #5890 but completely remove the old code in the master
branch
Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I69d03bb3f10e756823ba2e32aae0c099c54928c5
core.git supports both since commit
4063dcdc7305177b167bd20b009b1dfede8b25ec (Revert naming back to lool to
fix break with LibreOffice Online, 2022-08-26), let's go with the API
name, not with the product name.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I204c4728628579edeb23d5ba76af4bb878130203
We store each byte as one character, i.e. UTF-16 unit, in the string.
Yes, this is inefficient.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I75cc211d7a8da98a4e0e5b5b3d000e7ed66c271e
Currently translated at 100.0% (457 of 457 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (455 of 455 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (5 of 5 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (457 of 457 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (455 of 455 strings)
Co-authored-by: Sebastiaan Veld <sebastiaan.veld@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/nl/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ios-app/nl/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/nl/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Translation: Collabora Online/iOS app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4ad42f81a439d04a053b18b5669ba6f42f116d7b
The ifdef conditions seems a bit over-complicated but as long as it
compiles it is good enough for me. I don't remember the details from
my earlier work on this.
Also move the inclusion of svtools/strings.hrc after the inclusion of
L10n.h so that TranslateId gets defined before it is used.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I9a1873dc3676c15c7fb4cde84c0e14bf56653443
Luckily the UISceneOpenURLOptions has a property openInPlace that
seems to be good to use for this. If openInPlace is false, that means
we should open the document read-only.
This is a stopgap fix to avoid the situation where the user does
changes to a document that is an attachment in an email message. Those
changes won't be saved anywhere they could be found later. Better to
keep the document read-only.
The ideal solution would be to ask the user right away where they want
an editable copy of the document to be stored. Later.
Signed-off-by: Tor Lillqvist <tml@iki.fi>
Change-Id: Ifd7d824d4f73cbf458f8597cd0974cf171b35be7
We keep open documents in the view controller stack. If you already
have one document loaded into this app, and then in Mail select an
attachment or in Files select a document to be opened in this app, it
will be loaded so that when you close it, you will be back editing the
earlier document.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I921907a2cbf8220a45b6dc0f304ba7eaec0befbc
Currently translated at 100.0% (457 of 457 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (429 of 429 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (22 of 22 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (110 of 110 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (5 of 5 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (22 of 22 strings)
Translated using Weblate (Czech)
Currently translated at 100.0% (110 of 110 strings)
Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/cs/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/cs/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/cs/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ios-app/cs/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cs/
Translation: Collabora Online/Android app
Translation: Collabora Online/Android lib
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Translation: Collabora Online/iOS app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6e0a781c1be42438c4cd6cf760532d7f78381c49