Commit Graph
915 Commits
Author SHA1 Message Date
Noel Grandin 00659bcdbb improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states

So
(1) use more useful names
(2) combine the two parameters into one enum

Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07 10:19:32 +00:00
Colomban Wendling 293db294e3 test: Add AccessibilityTools::nameEquals()
Some accessible names contain a suffix when OSL_DEBUG_LEVEL > 0, which
makes it tricky to compare to a known value.  To fix that, introduce a
helper that knows how and when to deal with the suffix properly that
can then be used to easily check accessible names.

As we already have a similar, yet private, helper for menu items on
Windows (that include the keybinding label as a suffix), merge the two
together in a unified solution for comparing names.

Change-Id: I7e67edbc7817218ef3e097062d25888172056c21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142257
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-01-25 08:22:01 +00:00
Xisco Fauli 958c08ad86 sd: test exporting to odp/pptx with password protection
exporting to ppt with password protection is not supported

Change-Id: Ic04c0046b91b76688c947bb4ae3b3cf90046080c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143459
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29 14:04:50 +01:00
Xisco Fauli 236a96c7cf sc: test exporting to xls/xlsx with password protection
Change-Id: I79ebc0d4f65c26aab8c04399a47ce1cbc631cf76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143432
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29 11:25:08 +01:00
Mike Kaganski c802c5f390 Require valid attribute in getXPath
The reason for accepting empty attribute was eliminated in commit
2f91ab025d (Merge two assertXPath
overloads that both check number of nodes, Nov 25 16:36:57 2022)

Change-Id: I6cd77eb0f73650dfdafd55946b5269ffe3f0bde5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143304
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-25 20:57:39 +01:00
Mike Kaganski 2f91ab025d Merge two assertXPath overloads that both check number of nodes
Change-Id: I67eec623b90ab20330fa0c268152211b6bbdbe1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-25 17:19:10 +01:00
Mike Kaganski ec345c02d8 tdf#152200: Make sure to not write objects into field character runs
Similar how it's done for preceding objects immediately after calculating
'ofs', we also need to make sure to create a separate run for the objects
that may be anchored after the last character; otherwise, the field that
was just processed (and is waiting in the attributes) would be put out of
place, inside an inner run (e.g., in a text box inside the object).

Change-Id: I2702693595acf4befdbd25ef07a9f7c444926aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143297
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-25 16:54:30 +01:00
Xisco Fauli 6c3cebd5aa UnoApiTest: factor out createTempFile
Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-23 14:43:56 +01:00
Xisco Fauli fc3993c679 tdf#152014: sc_uicalc: Add unittest
Change-Id: I7be721d9409890fe1f26125f06561e85cb1ddb27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143113
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 16:49:36 +01:00
Xisco Fauli b61ca6f7bf CppunitTest_sc_uicalc: inherit from ScModelTestBase
so createScDoc handles the dispose of new documents
saveAndClose can go now

Change-Id: I7f88ef6ff9aaece72461489a31b0ef456ce5e170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142781
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16 20:08:29 +01:00
Xisco Fauli a865d042ef CppunitTest_sc_subsequent_export_test: inherit from UnoApiXmlTest
Some notes:
* testLinkedGraphicRT needed to be adapted. Saving to
Calc Office Open XML doesn't keep IsLinkedGraphic.
Reported in tdf#152036. No idea why it didn't fail before

* Some tests used "generic_HTML" as export filter format, which
is wrong. Instead, "HTML (StarCalc)" should have been used.
But then, the test would have failed with
- unsatisfied query for interface of type com.sun.star.sheet.XSpreadsheetDocument!
So trying to export to html in those tests is not expected.
No idea why it didn't fail before

* testTdf90299 fails now with
- Expected: 'file:///tmp/lu23738863wthph.tmp/dummy.xls'#$Sheet1.A1
- Actual  : 'file:///tmp/lu23738863wthph.tmp/lu23738863wthpg.tmp/dummy.xls'#$Sheet1.A1
I added a TODO to check it later

* testNamedRangeBugfdo62729 fails on mac with an infinite loop

Change-Id: I63168583a47f510d1ac22971a274e28d085de61b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142576
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15 11:56:34 +01:00
Xisco Fauli 7986d35eee move password handling from SwModelTestBase to UnoApiTest
so other places inheriting from UnoApiTest can also import/export
protected documents

Change-Id: I0e2716204dbb171c9e17e3939b266977e1b96dda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142592
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11 20:09:41 +01:00
Szymon Kłos 3f4e11bd40 lok: masterpage: use EditMode as parameter in invalidation callback
Change-Id: I3905fc9e6376ca1cef3e438e7a5f229d3720b1f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138961
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142501
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-10 10:15:46 +01:00
Xisco Fauli 87dce617eb UnoApiTest: factor out common code
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09 19:08:32 +01:00
Xisco Fauli 4170b94c44 SwModelTestBase: inherit from UnoApiXmlTest
it seems setUp/tearDown can also go as well.
See the discussion in gerrit.

Change-Id: I5e81dcdcb2e070eb4beb737f3cb25c86cb9d042b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142465
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09 11:34:05 +01:00
Xisco Fauli 248be1fe7d UnoApiTest: simplify code by using tempfile member
SwModelTestBase does the same. this will help to make
SwModelTestBase inherit from UnoApiTest

Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08 11:54:22 +01:00
Xisco Fauli 6f77eda1f4 CppunitTest_sc_html_export_test: inherit from UnoApiXmlTest
Change-Id: Iee06f883704484bf62bf1d9988580d72ba40db22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142232
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-03 17:33:42 +01:00
Xisco Fauli 2dd592f083 UnoApiXmlTest: add new wrapper for XmlTestTools tests
Change-Id: I767f464ec666330a2e8e832b6d6f5736a6bef54d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142228
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-03 16:21:57 +01:00
Xisco Fauli bdb76c9ff1 CppunitTest_sc_jumbosheets_test: inherit from UnoApiTest
Split a couple of tests into 2, one for ods and the other for xlsx
Change-Id: I9f6f908b150c435933739335f6618d335ce8f9a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141889
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-26 21:38:56 +02:00
Xisco Fauli b45ab31f2b UnoApiTest: do not dispose on save
Change-Id: Id100591517da48ec8e5cfd38f5c44ac0d7b16198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141888
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-26 19:34:28 +02:00
Xisco Fauli 51d366712c ChartTest: inherit from UnoApiTest
Change-Id: Ie826b66364f61bdab555228ca3a348f86b34847f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141824
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-25 17:03:53 +02:00
Xisco Fauli ff97d04739 UnoApiTest: use validate when saving files
Change-Id: I0f04fae8b4ff922f5e14ae413cd63cc92a66077e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141797
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-25 11:24:43 +02:00
Xisco Fauli 0692cd8d19 CppunitTest_sd_svg_export_tests: inherit from UnoApiTest
Change-Id: Ib630949127d7087cddbb92737528690cafe9be26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141782
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-24 22:20:54 +02:00
Xisco Fauli 331a013ee3 UnoApiTest: factor out common code
Change-Id: Ia8874d65ea8d7eb26d10b18e37ba2bac1a7d756b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141730
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-24 18:05:04 +02:00
Xisco Fauli 89c732913d test: merge CalcUnoApiTest and UnoApiTest into one
Change-Id: I24ec4c2c1c6d83865ef78a6460cde68cef84fdb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141638
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21 21:23:37 +02:00
Xisco Fauli 03d6d07d8c CalcUnoApiTest: work with mxComponent directly
Change-Id: If6f2104ef3136952341c9d5d59a1f9784d0fe4b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141628
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21 18:59:47 +02:00
Xisco Fauli 4856b94ae1 CalcUnoApiTest: factor out common code
Change-Id: I1a56f152d6c6e6bca55ef20d0d52da2d82b77a8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141565
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-20 19:59:29 +02:00
Xisco Fauli f3a82a8ba5 sc: factor out common code in tests
Change-Id: I58558dd87f235bf3699f3f65271522bb1e7a2ea0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141529
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-19 15:19:02 +02:00
Xisco Fauli e6ce4b980d CalcUnoApiTest: factor out tearDown
Change-Id: Iae1ae76c1903ff3155da2dd407f1237c29f91840
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141375
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17 14:48:29 +02:00
Heiko Tietze 27f98935f9 [API CHANGE] Resolves tdf#131136 - Remove option "Use printer metrics"
Option is out-dated and access via UI confusing
* UI access removed from Tools > Options > General (Impress, Calc)
resp. > Compatibility (Writer)
* Unit tests updated
* Tip-Of-The-Day cleaned-up
* remove UsePrtMetrics value

Change-Id: Ib645f6e1f648455e0536a437be14c2c6a7b25a49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139863
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-10-06 18:55:20 +02:00
Noel Grandin 4b95451f85 split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires
to stay on it's happy path

Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29 09:11:18 +02:00
Michael Stahl d621a8839c libxml2: upgrade to release 2.10.2
Fixes CVE-2022-2309

Change-Id: I180218be275d3b6d38f8f74aa51c57e50d2734ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139911
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-09-14 21:35:59 +02:00
Michael Weghorn 206543c7be [API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bit
With 16k column support in Calc enabled by default in

    commit 4c5f8ccf0a
    Date:   Tue Mar 8 12:44:49 2022 +0100

        change default Calc number of columns to 16384 (tdf#50916)

, the number of Calc cells in a spreadsheet is larger than
SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more
enough and using it resulted in integer overflows in
methods handling corresponding Calc cells in the a11y layer.
This e.g. had the effect of the Orca and NVDA screen readers
not announcing focused or selected cells properly when their
a11y child index was out of the 32-bit integer range.

Switch the internal a11y child indices to 64 bit to
be able to handle this properly internally.

Since the platform APIs (at least AT-SPI on Linux and
IAccessible2 on Windows; from what I can see LO's macOS
a11y bridge doesn't directly expose the child index)
are still restricted to 32 bit, larger child indices
still cannot be exposed via the platform APIs.

As a consequence, use of the the IAccessible2 and
AT-SPI methods that use the child index remains
problematic in those cases where the child index
is larger. However, as an alternative to using the
AT-SPI Table interface and the IAccessibleTable/
IAccessibleTable2 interfaces with the child index
to retrieve information about a specific cell,
both AT-SPI and IAccessible2 also provide interfaces
to retrieve that information directly
from the cell object (TableCell interface for AT-SPI,
IAccessibleTableCell for IAccessible2).

Those interfaces are already implemented/exposed
for winaccessibility (s. `CAccTable`) and the
qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface`
methods implemented in `QtAccessibleInterface`).
With the switch to 64-bit internal a11y child indices,
these now behave correctly for cells with a child
index that doesn't fit into 32 bit as well.

NVDA on Windows already uses the IAccessibleTableCell
interface and thus announcing focused cells works fine
with this change in place.

Orca on Linux currently doesn't make use of the AT-SPI
TableCell interface yet, but with a suggested change to
do so [1], announcement of selected cells works
with the qt6 VCL plugin with a current qtbase dev branch
as well - when combined with the suggested changes
to implement support for the AT-SPI TableCell interface
in Qt [2] [3] and the LO change based on that [4] and
a fix for a nullptr dereference [5].

The gtk3 VCL plugin doesn't expose the AT-SPI
TableCell interface yet, but once it does so
(via `AtkTableCell`), it also works with the
suggested Orca change [1] in place.
(Adding that is planned for an upcoming change,
works with a local WIP patch.)

For handling return values that are larger than what
platform APIs support, the following approach has
been chosen for now:

1) When the return value is for the count of
(selected) children, the maximum value N
supported by the platform API is returned.
(This is what `ScAccessibleTableBase::getAccessibleChildCount`
did previously.)
The first N elements can be accessed by their
actual (selection) indices.

2) When the return value is the child/cell index,
-2 is returned for objects whose index is greater
than the maximum value supported by the platform
API.
Using a non-negative value would mean that the
index would refer to *another* actually existing
child. A child index of -1 on the other hand
tends to be interpreted as "child is invalid" or
"object isn't actually a child of its (previous)
parent any more)". For the Orca case, this would
result in objects with a child index of -1
not being announced, as they are considered
"zombies" [6].

What's still somewhat problematic is the case where
more than 2^31 children are *selected*, since access
to those children still happens by the index into
the selection in the platform APIs, and not all
selected items are accessible this way.
(Screen readers usually just retrieve
the first and last element from the selection and
announce those.)

Orca already seems to apply different handling for the
case for fully selected rows and columns, so
"All cells selected" or "Columns ... to ... selected"
is announced just fine even if more than 2^31
cells are selected.

(Side note: While Microsoft User Interface
Automation - UIA - also uses 32-bit indices, it also
has specific methods in the ISelectionProvider2
interface that allow to explicitly retrieve the
first and last selected item,
`ISelectionProvider2::get_FirstSelectedItem` and
`ISelectionProvider2::get_LastSelectedItem`, but
we currently don't support UIA on Windows.)

Bound checks at the beginning of the methods from the
`XAccessibleContext`, `XAccessibleSelection` and
`XAccessibleTable` interfaces that take a child index
(or in helper methods called by those) should generally
already prevent too large indices from being passed to
the methods in the lower layer code that take smaller
integer types. Such bound checking has been
been added in various places where it wasn't present yet.
If there any remaining issues of this
kind that show after this commit, they can probably be
solved in a similar way (s.e.g. the change to
`AccessibleBrowseBox::getAccessibleChild` in this
commit).
A few asserts were also added at
places where my understanding is that values shouldn't
be larger than what is supported by a called method
anyway.

A test case will be added in a following change.

[1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131
[2] https://codereview.qt-project.org/c/qt/qtbase/+/428566
[3] https://codereview.qt-project.org/c/qt/qtbase/+/428567
[4] https://gerrit.libreoffice.org/c/core/+/138750
[5] https://codereview.qt-project.org/c/qt/qtbase/+/430157
[6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155

Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-09-02 15:47:37 +02:00
Luboš Luňák 32cbd1c57d lok: make sure flushPendingLOKInvalidateTiles() is called
SwViewShellImp::AddPendingLOKInvalidation() collects invalidations,
but this was relying on something eventually calling
flushPendingLOKInvalidateTiles(), which wasn't guaranteed.
If e.g. a spellchecker caused an invalidation from in idle callback
and nothing else changed, then the LOK callback handling code
didn't know there was something pending. So add an explicit
call to ensure to notify about these pending invalidations.

Change-Id: I0a9cb0d5aba2fdbbac126cd8a4a3412bef1cab25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136531
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-25 10:28:35 +02:00
Mike Kaganski 0b85a66cc3 Return std::optional instead of using bool* argument
Change-Id: I47f03411a6677f22291bea4dc06920ab9052349a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138399
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-17 09:28:59 +02:00
Colomban Wendling 0185ddd6d5 Add infrastructure and basic tests including slight UI interaction
This introduces a couple helper base classes for implementing
accessibility tests more easily, and includes a few tests as examples,
including basic document layout check and minimal UI interaction
through menus.

Change-Id: I8961af8be1e7d52dc55fe27c758806d9b4c3c5d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137337
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-01 17:03:40 +02:00
Colomban Wendling d6ce547a1a Better report unknown constant names by including their values
Change-Id: Id93dedf39ad0e2d1968e80878dd1a1bb07d94b61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137336
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-07-27 17:35:03 +02:00
Colomban Wendling 150f89d3b3 Fix comparing some Writer objects
Offscreen objects in Writer are not exposed as children of their
parent, but might be reachable through relations. In this case, similar
objects can easily be mistakenly deemed equal (e.g. empty paragraphs
will have the same role, empty name and description, etc.).

Try to avoid this by taking into account the object's relations, which
should at least have different targets if they are not the same.

Change-Id: Ie6e1aaf388006b76d014ba2bd26aabef88d7dd6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137335
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2022-07-27 17:04:17 +02:00
Colomban Wendling 8fe5a832b0 Make AccessibilityTools available more widely and use it
Move AccessibilityTools helper to test/ and use it in accessible_relation_set
test replacing the copied over feature and consolidating the test as well.

Change-Id: Ia5ea69bb08bb2a86e3eb6c3dba2ab182b612561d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137307
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-07-27 10:41:03 +02:00
offtkp a4a0e7b24c Replace old png writer in baseindex.cxx
Change-Id: I660579ed6ea886f9ab3fc913b785f92740f48dc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137125
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-19 13:10:17 +02:00
offtkp 2bd224ba3b Replace old png writer in screenshot_test.cxx
Change-Id: I5271b56bcce32e1ce71544421b9581518b05455e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137124
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-19 13:09:58 +02:00
Colomban Wendling 2dde21ea74 unittest: Split out registry entries to alter UI definition search path
Accessibility tests will require testing the normal UI, so will need
not alter the search path for definitions.  It will however benefit
from other environmental overrides (locale, fonts, etc.).

The solution here splits out to a separate registry the piece of
configuration that alter the UI, so users can select the features set
they need.

The default gb_CppunitTest_use_configuration is updated to keep working
the same as before, using both layers.

gb_CppunitTest_use_unittest_configuration is replaced by specific ones
for each configuration layer, and the two direct call sites removed as
they were redundant anyway (gb_CppunitTest_use_unittest_configuration
is only a subset of gb_CppunitTest_use_configuration).
New macros are gb_CppunitTest_use_common_configuration for the common
layer and gb_CppunitTest_use_user_ui_configuration for the UI one.

Change-Id: I75f82092079752b4e173e48ab463636e7b7515b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136997
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-12 16:27:18 +02:00
Noel Grandin 2bf18879d7 clang-tidy modernize-pass-by-value in test
Change-Id: I375ff43a60d0058be36dd07e409027ad1dcd1bcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136558
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-28 12:42:54 +02:00
Stephan Bergmann 1b7a4ea1d5 -Werror=maybe-uninitialized
Change-Id: I640fbd373262c008c44b616fbc0c05d28778226d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136083
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-20 08:32:20 +02:00
Stephan Bergmann c46d27cfe4 Just use Any ctor instead of makeAny in test
Change-Id: I926cabc8be39344ec254e87b429f4d1bc8cfc94f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133763
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03 20:03:32 +02:00
Samuel Mehrbrodt d0cacf09a1 tdf#99708 Save formula bar height to document
Save the current state of the Calc formula bar to the document.
Number of visible lines is saved into the document settings
and restored when loading that document.

Also adds a UNO property, so that the formula bar height can be
changed via UNO.

Change-Id: Ifef0c9e42cb4f7465516629d2c22974367e0eb33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133499
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-05-03 14:52:07 +02:00
Noel Grandin 5200a73627 use more string_view in various
found by examining uses of OUString::copy() for likely places

Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01 08:30:18 +02:00
Caolán McNamara a5ec011963 Chinese Traditional defaults needed for CppunitTest_sw_layoutwriter2
Change-Id: Ia11843d7e99e969a2d965de0355e0f9c81709c57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133625
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-30 11:50:45 +02:00
Caolán McNamara 60f073c185 set a CTL_SPREADSHEET font from more_fonts for cppunit tests
Change-Id: Iff38496dbdcaec91048e6dd409addac1d0668e21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133614
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-29 13:58:16 +02:00
Caolán McNamara 75277f27e3 set CTL_HEADING for cppunit tests to something from more_fonts
Change-Id: Ieb2878048017cc186fb98fa3c79eaf72b8e7b798
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133565
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-29 09:46:17 +02:00