Commit Graph

474805 Commits

Author SHA1 Message Date
Seth Chaiklin
6aec08a3dd tdf#148591 rename two Vertical positioning regions
Page text area top --> Above page text area
   Page text area bottom --> Below page text area

Change-Id: I3a63ec09e6a3dfbd51385139ea89454bd1792a8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133288
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-23 12:47:22 +02:00
Stephan Bergmann
8279d89d6e external/libassuan: Fix fallout of defining __STDC__ on Windows
...since 1bb0e17712 "Fix autoconf>=2.70
gcc-wrapper breakage", which had the side effect of preventing various
deprecated function declarations in system headers (e.g., isascii in addition to
__isascii).  This went unnoticed so far due to the traditionally lax handling of
missing function declarations in C, and only now started to cause

> conversion.c(94,9): error: call to undeclared function 'isascii'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>           if ((isascii (*istr) && isprint (*istr)) || (*istr >= 0x80))
>                ^

etc. with clang-cl 15 trunk after
<7d644e1215>
"[C11/C2x] Change the behavior of the implicit function declaration warning".

Where undeclared functions have been used in Windows-only code, they have been
replaced with their __STDC__-declared counterparts, and for occurrences in
shared code Windows-only macro definitions have been introduced (as would have
done in the system headers too, if __STDC__ was not defined) to not clutter the
shared code with #ifdefs.

Also, for getpid (resp. _getpid), the #include <process.h> was apparently
missing from the upstream code, even without our __STDC__ hack in
external/libassuan/ExternalProject_libassuan.mk (but never caused errors until
now, either).

Change-Id: I7442394d0c6e633bca1f6c7331d7ee51651179a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133339
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-22 23:38:33 +02:00
Stephan Bergmann
b212163587 external/gpgmepp: Missing includes (Windows)
> gpgme-w32spawn.c(288,8): error: call to undeclared function 'open'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>   fd = open (trans_file, O_RDONLY);
>        ^

etc. with clang-cl 15 trunk after
<7d644e1215>
"[C11/C2x] Change the behavior of the implicit function declaration warning",
which went unnoticed so far due to the traditionally lax handling of missing
function declarations in C.

Change-Id: I805ab10d2b0aae3f8b1f46ffeda57aff2bbcef2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133340
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-22 23:20:09 +02:00
Stephan Bergmann
350c733a03 external/libgpg-error: Missing include (getpid, Windows)
This was apparently missing from d400009e7c
"gpg4libre: update gpgme, libassuan and libgpg-error" but went unnoticed so far
due to the traditionally lax handling of missing function declarations in C, and
only now started to cause

> logging.c(845,57): error: call to undeclared function 'getpid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>                                           (unsigned int)getpid (), pidsuf);
>                                                         ^

with clang-cl 15 trunk after
<7d644e1215>
"[C11/C2x] Change the behavior of the implicit function declaration warning".

Change-Id: I66dc409f629d9bda807bc9cca21a8a5ecdda79be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133338
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-22 23:19:34 +02:00
László Németh
89c3470633 LibreLogo: add basic HTML formatting support to LABEL
It's possible to format character spans in text
of LABEL, as bold, italic and underline text
using HTML tags <B>, <I> and <U> and their
lowercase equivalents. For example,

LABEL '<i>Italic, <b>also bold</b></i> and <u>underline</u>.'

Use HTML "&lt;" to avoid of the replacement. For example,

LABEL 'some &lt;i>text&lt;/i>'

prints "some <i>text</i>" instead of "some text"
with italic "text" in it.

Change-Id: I70fd97763c6c488eba23c168a541b84cff0c90e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132786
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-22 20:46:35 +02:00
Xisco Fauli
1c924efe1f tdf#148685: Unset CharUnderlineColor and CharUnderlineHasColor properties
Change-Id: Iebf482434cd393f55ae3e4690580b573624d78b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133219
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-22 19:37:36 +02:00
László Németh
0204c00f24 tdf#147453 sw: disable Delete Table functions on tracked deletions
In Show Changes mode, disable "Delete Selected Rows" icons
and the same menu options in the following cases:

- no table selection, but the text cursor in a deleted table row;

- with table selection, all selected cells in deleted table rows.

Disable also "Deleted Selected Columns" and "Delete Table"
icons and the same menu options, when the cursor is there
in a deleted table.

Follow-up to commit c4f6fee3be
"tdf#147435 sw: enable Accept Change for table selection".

Change-Id: Ic6781ccee794c7458e6979f2e981840339cd3883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133320
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-22 19:24:17 +02:00
Mike Kaganski
9c80298661 Update context names to match EnumContext::ProvideContextContainers
Change-Id: Id9bb806ba526a7557cda91ebdeb649578e64517c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133281
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-22 18:29:16 +02:00
Bartosz Kosiorek
abe3a06c45 tdf#55058 tdf#143875 EMF+ Don't change line weight while rotating
Previously when TranfromationMatrix was used with rotation,
the line weight and dashed line shapes were changed.
In worst case if angle was larger than 90 degrees,
the lines just disappear.

This patch fixes that. The line looks exactly after rotation
(with TranfromationMatrix).

The tests were updated (added some additional rotation),
to prove that now it is working correctly.

Change-Id: Ic2382fa8d1b711a6bf06c94b2d0b9da9e7d396f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133329
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-04-22 18:23:21 +02:00
Jean-Pierre Ledure
49dfec0a06 Access2Base - (access2base.py) Don't use bare except: statement
The exception hierarchy described on page
  https://docs.python.org/3.5/library/exceptions.html#exception-hierarchy
indicates that the default exception in bare
  except:
statements is BaseException. This induces that the SystemExit,
KeyboardInterrupt and GeneratorExit are also handled by the
user script.

This is a not recommended practice.

Better is to use the explicit Exception built-in exception
  except Exception:

Bug reported by Paul M on Telegram

Change-Id: Ie1ae1f732ebc60a881e7d40ba8141aa704e9cd5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133328
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2022-04-22 18:18:46 +02:00
Luboš Luňák
d5986d1c5f do not duplicate code for ScCountIfCellIterator
d468958331 improved COUNTIF performance
by copy&pasting the generic query iterator and then basically removing
what was not necessary. Which is in general a good way to improve
the performance, except for the copy&paste part, as the code has
already started to diverge (e.g. fc3b904b67).

So instead make the shared code into a template and reuse that from
specific code. This has exactly the same performance as the copy&paste
way.

Change-Id: I168319a1f4273bafc8c0742a114dafbf433968bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133324
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 18:16:48 +02:00
Luboš Luňák
4af9403cf7 move query-related iterators to a new separate file
dociter.cxx/hxx are already quite big as it is, and the query
iterators are more about queries than about iterating the document.

Change-Id: I49e3a5636e4f366efb8b4968f54567d2716ade35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133323
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 18:16:05 +02:00
Mike Kaganski
a09cf7e76a Drop a bit more special-casing for Chart's sidebar property deck
Introduced in commit 2d01ed9e8b
  Author Muhammet Kara <muhammet.kara@collabora.com>
  Date   Mon Nov 25 21:55:31 2019 +0300
    tdf#94288: Show chart props sidebar on activation

The problem was that ChartController::attachFrame, that called
SelectionChangeHandler::selectionChanged notification, did that
*prior* to setting its m_xFrame - and the notification failed
in ContextChangeEventMultiplexer::NotifyContextChange, that
checks the frame first. That prevented the proper context (with
correct application and context names) to arrive to listeners,
and the sidebar didn't update properly.

Changing the order of the calls should fix the original problem.

Change-Id: I9da8465af2ee4ed1f8eabed1c65d1c318f81a3f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133326
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-22 16:49:51 +02:00
Xisco Fauli
27953931d4 tdf#123381: sw: add table formula INT
for DOCX interoperability.

Change-Id: I4e63e213ef0a6f3a775bdf3bedfb7aca8853b479
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133091
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-22 14:44:42 +02:00
Noel Grandin
c2092e4da4 fix master after string_view patches..
crossed paths

Change-Id: I066b357dc10e2109658194b3b3682b7083ebbbbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133322
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 14:44:06 +02:00
Luboš Luňák
64cb1d10ff try to limit cell interpreting to only visible cells when drawing
If there's a document with a huge formula group, InterpretDirtyCells()
on load will only interpret the range needed for drawing. But then
scrolling just a bit could result in e.g. IsValue() call on a cell,
and that could result in unrestricted Interpret() on the whole
huge formula group, which could be slow. So explicitly interpret
just the drawn cells in the hope that it'll avoid any further
Interpret() calls.

Change-Id: I01c9f95cf8a1cf240b798feef27d21010957030c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133306
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 14:19:37 +02:00
Luboš Luňák
c315a2f7b9 limit Interpret() for dirty cells only to the given row range (bsc#1197497)
ScColumn::InterpretDirtyCells() already takes a row range, and Interpret()
can take a range inside a formula group, so don't lose the information
in DirtyCellInterpreter, otherwise a whole large formula could be
interpreted when just a subset would be enough.

Change-Id: I93e5a7a212976be6fd588de6f68204cd1a271348
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133305
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 14:19:19 +02:00
Andrea Gelmini
7a81b80310 Fix typo in code
Change-Id: I289162ed8adf93139bbc69e8f5f4a1444dd52199
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133231
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-22 13:43:53 +02:00
Luboš Luňák
2b0579fbcc remove nonsensical 'over and out' comments
First of all, it's very obvious that a return statement returns,
so there's little point in commenting that. Second, 'over' and 'out'
together is Hollywood nonsense, 'over' means "talk, I'm listening"
and 'out' means "I'm not listening anymore" ... so 'over and out'
I guess means "talk, I'm not listening" ?

Change-Id: I60a202c78b33bd063c40ef4cd51514f7a2e6c95d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133321
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 13:40:39 +02:00
Justin Luth
58cd67e096 tdf#132475 writerfilter: connect PRINTDATE with DocInfo.PrintDateTime
NOTE: This patch depends on a follow-up patch to handle the case
where no date formating instructions are provided.

NOTE: The time part might be considered a regression by some since
Word displays as local time while LO seems to display GMT time.

Although the date was being imported as a generic field,
it wasn't associated with the last printed date.

PRINTDATE is about the only field that MS Word automatically
updates without the user having to press F9 on it,
so that shows we should NOT mark it as fixed on import.
On the other hand, it doesn't update very often, so if a
user hand-modifies the result, then (without marking it as fixed)
LO will display differently from MS Word.

Hey, its a last-printed-date field I say. Who cares what
it looks like on someone else's computer. It only matters
if it is accurate and visible on yours.

This caused a unit test failure with
make CppunitTest_sw_ooxmlfieldexport CPPUNIT_TESt_NAME=testGenericTextField
because contents.match(" PRINTDATE ")
NOTE: we are losing \* MERGEFORMAT on all of supported fields on export,
but that might be OK because we don't do MERGEFORMAT anyway.

Change-Id: I7cb79ce7470cd55090a61be63848ce328d48be06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132446
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-22 13:32:35 +02:00
Noel Grandin
ca1027e7d3 use more string_view in unotools
Change-Id: If32767647d3fba22a8e4a2b10fc57f47efca01d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 13:29:40 +02:00
Noel Grandin
08a72cbb06 use more string_view in comphelper
Change-Id: Ib186d2c9aa8458ddbdd14dd44e2d3938f0f26ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 13:29:24 +02:00
Noel Grandin
fa856bdd27 use more string_view in bridges
Change-Id: I842668655dec102e1595dcbac6413fe2b49d8515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 13:29:02 +02:00
Noel Grandin
25ada1e520 use more string_view in cppuhelper
Change-Id: I846a1201b1b4fb8ca694a0b78b7d4cc2973dfbd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133258
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 13:28:35 +02:00
Noel Grandin
9820f11ad2 address review comments on "use more string in unoidl.."
on
    commit 2d9291b943
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Thu Apr 21 12:53:15 2022 +0200
    use more string_view in unoidl,codemaker

Primarily reverting the findEntity call-chain to use OUString
instead of std::u16string_view.

Change-Id: Ib01b9473c859bba3791563df753823bbf0a87ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22 13:27:56 +02:00
Miklos Vajna
e4d1731ba3 sw content controls: add LOK API
This is somewhat similar to LOK_CALLBACK_FORM_FIELD_BUTTON: if the
cursor enters or leaves a content control, then we send this message, so
the LOK client can render some kind of shading and/or border around the
content control to indicate the boundaries of the object.

Similar to selections, this can be multiple rectangles in case the
string is long enough that the layout breaks it into multiple lines.

Change-Id: I0641a19503b7a1d4cade8fe9b510605cab49f258
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133314
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-04-22 13:20:09 +02:00
Luboš Luňák
50774644bb fix an off-by-one error in GetEmptyLinesInBlock()
The function has been there since the initial commit and is not
documented, but I think it counts the shortest amount of empty
cells in the given area starting from the direction given. And
AFAICT the off-by-one error was there since the initial commit,
when it returned one less if the entire area was empty and
the direction was vertical (horizontal was fine). And
ScHTMLExport::FillGraphList() even was adjusted for this until
my recent commit changing that code). But then ad2bc869bf
added a shortcut for unallocated columns that didn't have
the error. And the error even got corrected during the rewrite
in c008dc483f, but then
01de94471c reverted that. Anyway,
so fix this, I think all the relevant code should(?) now work
properly.

Change-Id: I194691f7276a1cea75945de05cb0dda2cdca859a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133319
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 11:11:50 +02:00
Miklos Vajna
de1a94a6f3 CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()
See commit feeed3e762
(CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing,
2022-04-07) for motivation.

Change-Id: Ib4887fb471665cc03fbf0420b9cd05da1a3641fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133313
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-04-22 09:37:35 +02:00
Miklos Vajna
1f2a07e06b sd theme: add rendering for shape fill color effects
Only the no-effects variant was working previously.

Change-Id: I50811a4c49d19dc801f0d1c841cbbdb2fae1ad60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133297
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-22 08:19:10 +02:00
Rizal Muttaqin
91e0314d46 Colibre: Update Paragraph Style icons
Change-Id: Ie9380913d760fb23fe7f28a415cf7ffd2f1053fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133310
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-04-22 08:04:34 +02:00
Luboš Luňák
79ea331bbd fix checking whether a block of cells is empty
The GetEmptyLinesInBlock() call has unclear semantics and it appears
that it has an off-by-one error. Use a simple clear function
for the check.

Change-Id: I45d9b73428aedababc1ad93c202daa1de945b5bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133303
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 07:44:07 +02:00
Luboš Luňák
8b5fdf1558 use range-checked GetCellValue()
Change-Id: Ie02b6be79d1be7481ebcfbc6862295a34e38f7db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133304
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-22 07:43:49 +02:00
Justin Luth
e4243a1403 cleanup writerfilter lcl_ParseFormat
If there is no \@, then we will never match what
util::findQuotedText is looking for, so don't bother.

Change-Id: I0a6709046673d98d00d74e921d7f502c9df54b46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133265
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-04-22 05:55:38 +02:00
Luboš Luňák
1768d5705d simply return from a loop
Change-Id: I4e10945f32dfb535663ea7392f19532e45ca9ee3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133301
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-21 22:08:35 +02:00
Luboš Luňák
9ec0395a06 fix off-by-one error
Change-Id: Ic58a896a7a2edf5ba602ab9cfc5a4578fd5d0a56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133296
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-21 21:07:50 +02:00
Luboš Luňák
4dfdb5a3c9 rework GetColumnsRange() and ScColumnsRange
The problem with GetColumnsRange() was that it was clamping the range
to the number of allocated columns, but that's not always wanted,
e.g. ScDocument::InsertMatrixFormula() needs to iterate over the whole
range and allocate columns if necessary instead of ignoring them.
From an API point of view it's also not very obvious that something
called GetColumnsRange() actually does something more than just
returning the given range.

Handle this by making GetColumnsRange() return the actual given range,
and add GetWriteableColumnsRange() and GetAllocatedColumnsRange()
for the specific cases. This also required changing ScColumnsRange
to work simply on SCCOL value instead of using std::vector iterator
(since the vector may not have all the elements in the range).

Change-Id: I9b645459461efe6b282e8ac5d7a29549830f46c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133295
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-21 21:07:25 +02:00
Michael Weghorn
b68821acc7 android: Show file chooser despite package visibility filtering in API 30
While it was working just fine in my x86_64 AVD with API level 31,
opening the the file chooser on a real HW aarch64 device running
Android 12 no longer worked by tapping on the TextView in
`LibreOfficeUIActivity` after updating target API from 28
to 31 in

    commit 2ab389b251
    Date:   Tue Apr 19 10:33:27 2022 +0200

        android: Update compileSdkVersion/targetSdkVersion to 31

The

    intent.resolveActivity(getPackageManager()) != null

check was failing there, so the Activity with
`Intent.ACTION_OPEN_DOCUMENT` wasn't started there.

This looks like an issue due to package visibility filtering
introduced in target API level 30. Quoting from [1]:

> When an app targets Android 11 (API level 30) or higher and queries for
> information about the other apps that are installed on a device, the
> system filters this information by default. The limited package
> visibility reduces the number of apps that appear to be installed on a
> device, from your app's perspective.
>
> [...]
>
> The limited app visibility affects the return results of methods that
> give information about other apps, such as queryIntentActivities(),
> getPackageInfo(), and getInstalledApplications(). The limited
> visibility also affects explicit interactions with other apps, such
> as starting another app's service.

From how I understand it, the check is used to make sure that
there is an app that can handle the Intent, as e.g. the
"Android fundamentals 02.3: Implicit intents" tutorial [2]
mentions it for the example using an `Intent.ACTION_VIEW`:

> Use the resolveActivity() method and the Android package manager to find
> an Activity that can handle your implicit Intent. Make sure that the
> request resolved successfully.
>
>     if (intent.resolveActivity(getPackageManager()) != null) {
>     }
>
> This request matches your Intent action and data with the Intent filters
> for installed apps on the device. You use it to make sure there is at
> least one Activity that can handle your requests.

While that sounds reasonable to make sure there is an app that can
view specific data passed *from* the app (and [3] describes how to add
a corresponding `<queries>` element to make this use case work),
it seems to be unnecessary for `Intent.ACTION_OPEN_DOCUMENT`,
since that causes the system to "display the various DocumentsProvider
instances installed on the device, letting the user navigate through
them" and Android presumably at least provides a provider for
handling local files by itself in any case.

The `Intent.ACTION_GET_CONTENT` case used instead of
`Intent.ACTION_OPEN_DOCUMENT` for API level < 19 should
presumably be similar.

Anyway, in case there should still be any case where the
Intent cannot be handled:
`startActivityForResult` "throws ActivityNotFoundException if there was
no Activity found to run the given Intent." [4], so add
a try-catch block handling that exception instead of the previous
check.

[1] https://developer.android.com/training/package-visibility
[2] https://developer.android.com/codelabs/android-training-activity-with-implicit-intent?index=..%2F..android-training#3
[3] https://developer.android.com/training/package-visibility/use-cases#open-a-file
[4] https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int)

Change-Id: I7702b100d71333be2d78df1bc81ef2e5a7e016bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133272
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 21:01:37 +02:00
Michael Weghorn
b68362b178 android: Slightly improve style in use of arrays
Addresses these warnings shown in Android Studio
for class `LibreOfficeUIActivity`:

* "Unnecessary 'Arrays.asList()' call"
* "Raw use of parameterized class 'ArrayList'"
* "Explicit type argument ShortcutInfo can be replaced with <>"

Change-Id: I083e5fcf804209fae704b19643ce80bc92126ca8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133271
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 21:01:05 +02:00
Michael Weghorn
6515633aad android: Drop unused import and extra semicolon
Change-Id: I19557b0b1d63698a31dac61ce9fde3ce07f86451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133267
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 21:00:29 +02:00
Michael Weghorn
62524dcf15 android: Avoid using resource ID in switch-case
Adresses this warning shown in Android Studio:

> Resource IDs will be non-final by default in Android Gradle Plugin
> version 8.0, avoid using them in switch case statements

Change-Id: I8cead0ceb3b71e263b29d4283a8cfac522ed4204
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133266
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 20:59:56 +02:00
Michael Weghorn
a03d7b1871 android: Use fake exceptions on all architectures
This was previously only used for aarch64, and the
workaround does not seem to be necessary in current
Android versions on other architectures.

However, while it's e.g. not needed on an x86 AVD
with API level 21 (Android 5), at least my
x86 AVD with API level 16 (Android 4.1), which
is currently our `minSdkVersion`, fails otherwise
when trying to open any document with the below
in the ADB log.

With this (and all the previous fixes for low API/SDK levels)
in place, opening a document in Android Viewer finally
succeeds there.

> F/libc    ( 3288): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 3310 (Thread-122)
> I/stderr  ( 3288): terminating with uncaught exception of type com::sun::ucb::InteractiveAugmentedIOException
> I/stderr  ( 3288): assertion "terminating with uncaught exception of type com::sun::ucb::InteractiveAugmentedIOException" failed: file "/usr/local/google/buildbot/src/android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp", line 73, function "abort_message"
> I/DEBUG   ( 1173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> I/DEBUG   ( 1173): Build fingerprint: 'generic_x86/sdk_x86/generic_x86:4.1.2/MASTER/eng.wdu.20191218.182616:eng/test-keys'
> I/DEBUG   ( 1173): pid: 3288, tid: 3310, name: Thread-122  >>> org.libreoffice <<<
> I/DEBUG   ( 1173): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
> I/DEBUG   ( 1173):     eax 00000000  ebx b76c9f4c  ecx 00000000  edx b76cbfd4
> I/DEBUG   ( 1173):     esi b65ed000  edi 788c7d6c
> I/DEBUG   ( 1173):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
> I/DEBUG   ( 1173):     eip b7661c03  ebp 788c7d88  esp 788c7d40  flags 00210246
> I/DEBUG   ( 1173):
> I/DEBUG   ( 1173): backtrace:
> I/DEBUG   ( 1173):     #00  pc 00021c03  /system/lib/libc.so (abort+131)
> I/DEBUG   ( 1173):     #01  pc 00030ff1  /system/lib/libc.so
> I/DEBUG   ( 1173):     #02  pc 0e137175  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #03  pc 0e1372f5  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #04  pc 0e133d0a  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #05  pc 0e13323f  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #06  pc 0e133194  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #07  pc 0d369737  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #08  pc 0d3673b0  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #09  pc 0d366a7b  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #10  pc 0d377a25  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #11  pc 09a2b944  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #12  pc 098826da  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #13  pc 098cc47c  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #14  pc 098ded29  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #15  pc 098bb839  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #16  pc 098b7e23  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #17  pc 098bb8cf  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #18  pc 0987a677  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #19  pc 0987b7c7  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #20  pc 0987ab4b  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #21  pc 0987a9a7  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #22  pc 0987f90b  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #23  pc 0986d4ff  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #24  pc 09872298  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #25  pc 035625cf  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #26  pc 0355dff2  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #27  pc 035713f9  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #28  pc 03570d3b  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #29  pc 035714b8  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #30  pc 09a5fb66  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #31  pc 09a5f984  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):
> I/DEBUG   ( 1173): stack:
> I/DEBUG   ( 1173):          788c7d00  b76cca48
> I/DEBUG   ( 1173):          788c7d04  b76ca208  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d08  b76699eb  /system/lib/libc.so (_fwalk+11)
> I/DEBUG   ( 1173):          788c7d0c  b76c9f4c  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d10  00000000
> I/DEBUG   ( 1173):          788c7d14  00000000
> I/DEBUG   ( 1173):          788c7d18  00000000
> I/DEBUG   ( 1173):          788c7d1c  00000000
> I/DEBUG   ( 1173):          788c7d20  00000000
> I/DEBUG   ( 1173):          788c7d24  00000000
> I/DEBUG   ( 1173):          788c7d28  00000000
> I/DEBUG   ( 1173):          788c7d2c  00000000
> I/DEBUG   ( 1173):          788c7d30  00000000
> I/DEBUG   ( 1173):          788c7d34  00000000
> I/DEBUG   ( 1173):          788c7d38  00000000
> I/DEBUG   ( 1173):          788c7d3c  00000000
> I/DEBUG   ( 1173):     #00  788c7d40  00000002
> I/DEBUG   ( 1173):          788c7d44  788c7d6c  [stack:3310]
> I/DEBUG   ( 1173):          788c7d48  00000000
> I/DEBUG   ( 1173):          788c7d4c  00000115
> I/DEBUG   ( 1173):          788c7d50  0000007f
> I/DEBUG   ( 1173):          788c7d54  b76c9f4c  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d58  788c7d98  [stack:3310]
> I/DEBUG   ( 1173):          788c7d5c  b76c9f4c  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d60  b76ca208  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d64  788c7e04  [stack:3310]
> I/DEBUG   ( 1173):          788c7d68  788c7d88  [stack:3310]
> I/DEBUG   ( 1173):          788c7d6c  fffffbdf
> I/DEBUG   ( 1173):          788c7d70  b76ca208  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d74  b76b3b24  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d78  b7661b8e  /system/lib/libc.so (abort+14)
> I/DEBUG   ( 1173):          788c7d7c  b76c9f4c  /system/lib/libc.so
> I/DEBUG   ( 1173):          ........  ........
> I/DEBUG   ( 1173):     #01  788c7d90  b76ca208  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d94  b76b3b24  /system/lib/libc.so
> I/DEBUG   ( 1173):          788c7d98  b9b98fc0  [heap]
> I/DEBUG   ( 1173):          788c7d9c  8723cac3  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7da0  00000049
> I/DEBUG   ( 1173):          788c7da4  8723cb39  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7da8  b766b6fe  /system/lib/libc.so (vasprintf+14)
> I/DEBUG   ( 1173):          788c7dac  8d73b830  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7db0  b7670fa9  /system/lib/libc.so (__assert2+9)
> I/DEBUG   ( 1173):          788c7db4  8d73b830  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7db8  788c7df8  [stack:3310]
> I/DEBUG   ( 1173):          788c7dbc  86a0d175  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):     #02  788c7dc0  8723cac3  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7dc4  00000049
> I/DEBUG   ( 1173):          788c7dc8  8723cb39  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7dcc  b9b98fc0  [heap]
> I/DEBUG   ( 1173):          788c7dd0  b9b98fc0  [heap]
> I/DEBUG   ( 1173):          788c7dd4  788c7e04  [stack:3310]
> I/DEBUG   ( 1173):          788c7dd8  788c7e04  [stack:3310]
> I/DEBUG   ( 1173):          788c7ddc  86a09960  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7de0  00000014
> I/DEBUG   ( 1173):          788c7de4  86a09980  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7de8  788c7e38  [stack:3310]
> I/DEBUG   ( 1173):          788c7dec  788c7e1c  [stack:3310]
> I/DEBUG   ( 1173):          788c7df0  b9b1c480  [heap]
> I/DEBUG   ( 1173):          788c7df4  8d73b830  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):          788c7df8  788c8238  [stack:3310]
> I/DEBUG   ( 1173):          788c7dfc  86a0d2f5  /data/data/org.libreoffice/lib/liblo-native-code.so
> I/DEBUG   ( 1173):
> I/DEBUG   ( 1173): memory map around fault addr deadbaad:
> I/DEBUG   ( 1173):     bfa03000-bfa24000 [stack]
> I/DEBUG   ( 1173):     (no map for address)
> I/DEBUG   ( 1173):     (no map above)
> D/Zygote  ( 1176): Process 3288 terminated by signal (11)

Change-Id: I0bc6d13b1217959c5e447e7c6126006b561639a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133264
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 20:59:05 +02:00
Michael Weghorn
7084da45dd android: Explicitly load libc++_shared
While it works just fine without that in newer
Android versions, trying to open any doc in an
x86 AVD with API level 16 failed like this:

> E/AndroidRuntime( 2999): java.lang.ExceptionInInitializerError
> E/AndroidRuntime( 2999):        at org.libreoffice.TileProviderFactory.initialize(TileProviderFactory.java:23)
> E/AndroidRuntime( 2999):        at org.libreoffice.LOKitThread.<init>(LOKitThread.java:39)
> E/AndroidRuntime( 2999):        at org.libreoffice.LibreOfficeMainActivity.onCreate(LibreOfficeMainActivity.java:149)
> E/AndroidRuntime( 2999):        at android.app.Activity.performCreate(Activity.java:5008)
> E/AndroidRuntime( 2999):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> E/AndroidRuntime( 2999):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
> E/AndroidRuntime( 2999):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> E/AndroidRuntime( 2999):        at android.app.ActivityThread.access$600(ActivityThread.java:130)
> E/AndroidRuntime( 2999):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
> E/AndroidRuntime( 2999):        at android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 2999):        at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 2999):        at android.app.ActivityThread.main(ActivityThread.java:4745)
> E/AndroidRuntime( 2999):        at java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 2999):        at java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 2999):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> E/AndroidRuntime( 2999):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> E/AndroidRuntime( 2999):        at dalvik.system.NativeStart.main(Native Method)
> E/AndroidRuntime( 2999): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]:  1176 could not load needed library 'libc++_shared.so' for 'liblo-native-code.so' (load_library[1093]: Library 'libc++_shared.so' not found)
> E/AndroidRuntime( 2999):        at java.lang.Runtime.loadLibrary(Runtime.java:370)
> E/AndroidRuntime( 2999):        at java.lang.System.loadLibrary(System.java:535)
> E/AndroidRuntime( 2999):        at org.libreoffice.kit.NativeLibLoader.load(LibreOfficeKit.java:105)
> E/AndroidRuntime( 2999):        at org.libreoffice.kit.LibreOfficeKit.<clinit>(LibreOfficeKit.java:82)
> E/AndroidRuntime( 2999):        ... 17 more
> W/ActivityManager( 1421):   Force finishing activity org.libreoffice/.LibreOfficeMainActivity
> W/ActivityManager( 1421):   Force finishing activity org.libreoffice/.ui.LibreOfficeUIActivity

Change-Id: I6e383e624b9e66c0daa9ecfda4a3b176c8fa0d94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133263
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 20:57:55 +02:00
Michael Weghorn
730add0ca6 android: Use drawable tag already supported with API level 16
Use the `app:drawableLeftCompat` tag instead of
`android:drawableLeft` to set the icon to show
in the TextView.

With the latter, trying to start Android Viewer
in an x86 AVD with API level 16 resulted in this
crash:

> E/AndroidRuntime( 2510): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.libreoffice/org.libreoffice.ui.LibreOfficeUIActivity}: android.view.InflateException: Binary XML file line #80: Error inflating class TextView
> E/AndroidRuntime( 2510):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
> E/AndroidRuntime( 2510):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> E/AndroidRuntime( 2510):        at android.app.ActivityThread.access$600(ActivityThread.java:130)
> E/AndroidRuntime( 2510):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
> E/AndroidRuntime( 2510):        at android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 2510):        at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 2510):        at android.app.ActivityThread.main(ActivityThread.java:4745)
> E/AndroidRuntime( 2510):        at java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 2510):        at java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 2510):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> E/AndroidRuntime( 2510):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> E/AndroidRuntime( 2510):        at dalvik.system.NativeStart.main(Native Method)
> E/AndroidRuntime( 2510): Caused by: android.view.InflateException: Binary XML file line #80: Error inflating class TextView
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
> E/AndroidRuntime( 2510):        at org.libreoffice.ui.LibreOfficeUIActivity.createUI(LibreOfficeUIActivity.java:169)
> E/AndroidRuntime( 2510):        at org.libreoffice.ui.LibreOfficeUIActivity.onCreate(LibreOfficeUIActivity.java:147)
> E/AndroidRuntime( 2510):        at android.app.Activity.performCreate(Activity.java:5008)
> E/AndroidRuntime( 2510):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> E/AndroidRuntime( 2510):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
> E/AndroidRuntime( 2510):        ... 11 more
> E/AndroidRuntime( 2510): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi-v4/ic_folder_grey_48dp.xml from drawable resource ID #0x7f080083
> E/AndroidRuntime( 2510):        at android.content.res.Resources.loadDrawable(Resources.java:1923)
> E/AndroidRuntime( 2510):        at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
> E/AndroidRuntime( 2510):        at android.widget.TextView.<init>(TextView.java:614)
> E/AndroidRuntime( 2510):        at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:100)
> E/AndroidRuntime( 2510):        at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:95)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:194)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:115)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
> E/AndroidRuntime( 2510):        at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
> E/AndroidRuntime( 2510):        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
> E/AndroidRuntime( 2510):        ... 26 more
> E/AndroidRuntime( 2510): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector
> E/AndroidRuntime( 2510):        at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:877)
> E/AndroidRuntime( 2510):        at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
> E/AndroidRuntime( 2510):        at android.content.res.Resources.loadDrawable(Resources.java:1920)
> E/AndroidRuntime( 2510):        ... 35 more
> W/ActivityManager( 1421):   Force finishing activity org.libreoffice/.ui.LibreOfficeUIActivity

Change-Id: I4253a68f90d6c507805c7bf72aaf81011fb19339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133256
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21 20:57:21 +02:00
Andrea Gelmini
427188600f Fix typo
Change-Id: I0444ed426dddd36e464b59758545155e11e9c13a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133298
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-21 20:55:53 +02:00
Xisco Fauli
07bf0ce4e7 tdf#148651: basic_macros: Add unittest
Change-Id: Iadbe470de5a33dc633fe8f53083520988e497df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133255
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-21 19:52:16 +02:00
Zain Iftikhar
02b740a7a0 tdf#141000 replacing underscores with spaces of multi words icon pack name
patch will replace underscores with spaces of multi words icon pack name.

Change-Id: If37f6617b7c90eb912ab2f58fff0f1df225efa66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133094
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-04-21 18:52:37 +02:00
Mike Kaganski
c09f59eb61 Drop special-casing for Chart's sidebar property deck
Introduced in commit b33b2afe6a
  Author Markus Mohrhard <markus.mohrhard@googlemail.com>
  Date   Thu Jul 09 20:39:06 2015 +0200
    big step towards real chart sidebar

later in commit da57c32c5c
  Author Tor Lillqvist <tml@collabora.com>
  Date   Fri Feb 28 17:02:30 2020 +0200
    tdf#130348: Add special case for ChartDeck, too

and then in commit ff23d87cb0
  Author Mert Tumer <mert.tumer@collabora.com>
  Date   Fri May 08 17:23:12 2020 +0300
    mobile: fix calc chart wizard properties is not shown

The normal PropertyDeck can host all the chart-specific panels,
and the other decks that had "all" application context, but are
not needed for charts, have their context fixed.

This cleanup is needed for a following introduction of sidebar
in Math.

Change-Id: I5bb24d52b8dec2133213d7dddfeb91359ed4cb4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133262
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-21 18:03:43 +02:00
Xisco Fauli
e31cf19e5f tdf#147723: sw_uiwriter5: Add unittest
Change-Id: Ief6afaee548e58a31580b66d55b9b193ba23d153
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133259
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-21 17:03:09 +02:00
Xisco Fauli
c5de4d0277 tdf#148669: sc_uicalc: Add unittest
Change-Id: I2991ef99f5a617e36cfbe9499ef1c4195d52fdf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133254
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-21 16:01:24 +02:00
Noel Grandin
cdfd4d6c9a use more string_view in cppu
Change-Id: Id6b33eb39917ce7b805ea4a5d713d5d78aaa93ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133257
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-21 15:29:33 +02:00