Age | Commit message (Collapse) | Author |
|
and remove duplicated save method
Change-Id: I9bdf0e28d59ae281fccbafd266b86cdf89c112da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152421
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
With <https://gerrit.libreoffice.org/c/core/+/152157> "More conservative
SAL_WARN_UNUSED to avoid -Werror,-Wunused-private-field", these two cases would
have started to cause "unused variable declaration [loplugin:casttovoid]"
(because the call to isWarnUnusedType in compilerplugins/clang/casttovoid.cxx
would no longer return true). Just avoid that by not introducing the variables
in the first place.
Change-Id: I3d2b085082555d1765fbd32045b5157deb0af67e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152158
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If4523dc2c89d1fb1c5e11665ee60044834fcecd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150458
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
improve the check by checking for methods that exclude
using string_view, rather than checking for methods that
__can__ use string_view, which leads to exposing
some holes in our o3tl/string_view.hxx coverage.
Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which prevents constructing unnecessary temporaries via getStr()
Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Specifically in sd/source/core/annotations/Annotation.cxx
We seem to end up fixing leaks here often.
The current tools::JsonWriter API is just very hard to use correctly.
So rather return an OString, which is cheap to copy,
and push that down into the LOK code.
AFAIK that seems to end up requiring less code and less adhoc copying
of data (specifically the queueing code in init.cxx was creating
copies when converting to std::string).
Ideally, we could have some special API to avoid the new strdup()
calls in init.cxx, but not sure how to prevent other people
from accidentally using that.
Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Standardize on OUString, which is the main internal string class.
Convert from/to OUString only when communicating with respective
external APIs.
Removes about 200 conversions from the code.
Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
when applying my upcoming patch to also consider O[U]StringBuffer
Change-Id: I8619fa3280338afdfe75bdbfda6cb118d396e1c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149749
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie212c86c6c0ac20878be88d88ade5eb1c989942d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148935
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: If9e6760a6b23c63d03d337d6b111493684d67c85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148568
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
No longer needed after 269585d6b461b565fe75f77b6dbf219749edc5ab
"oox, sd: fix ever-increasing chart IDs when exporting to PPTX"
and b27b250f70f4651d387ef0646a9668950371e779
"sc: fix ever-increasing chart IDs when exporting to XLSX"
Also restored the documents modified in d913584909c2e0a235546a5f800baf45c3446d8b
"UnoApiXmlTest: merge parseExport from ChartTest" to ensure
only one chart was possible per document. Sample documents in unittests
can have more than one chart now, since the chart file name wouldn't
change
Kudos to Miklos Vajna for fixing the chart file names when exporting them
Change-Id: I10e2c44e41953a2d0d08bbb2a813134861e74660
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148461
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
The API doesn't actually work there yet because we don't get any event,
so there's no point in exposing it there, and it makes it clear it
isn't available there, avoiding future user to wonder why their tests
do not behave there.
Change-Id: I38dcc98ad3bc3b669df64bc1c53c91ef48a0d717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Use awt::XExtentdedToolkit::addTopWindowListener() instead of
Application::AddEventListener() for lower dependency on vcl::Window.
We however still require some vcl::Window for EventPosterHelper to work
without which we cannot post events to the dialog. It however doesn't
really have to be the top-level window itself, any vcl::Window high
enough the event tree would probably work.
Change-Id: I40b56a6c9e45f4e2ef2cab27a735856baef7e3c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146634
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
On e.g. Windows we need to let the dialogs fully finish starting up
before we can properly interact with them, and especially close them
again.
We notice new dialogs with the WindowActivate event, but this will
happen before the dialog is fully set up internally, leading to
failures on Windows. In practice, the WindowActivate event might be
dispatched before the dialog setup function finishes, leading to an
intermediate state at WindowActivate time.
Work around this by running the user code in an idle timer in response
to the WindowActivate event, so that the setup code can return before
the callback is dispatched.
Based on findings by Michael Weghorn, thanks!
Change-Id: Ieecee09d84144570fe1943ca12dc1db6d9f64524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146378
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Ic511f2abc62703ead40a585989c54345cf3c17ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142261
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Add a tabTo() variant that accepts a target object that should gain
focus. This is useful to work around focus issues in the implementation
(although they should be reported and fixed), and it's a simpler and
more efficient API if the caller happens to already have a reference to
the target object.
This also adds AccessibilityTools::getAccessibleObjectForName() as a
usually more useful alternative to
AccessibilityTools::getAccessibleObjectForRole() as it allows to easily
match both role and name. There is also a template version accepting
multiple role and name pairs to further refine the selected object.
Together, it makes it easy to obtain the target object and tab to it,
in situations where the other tabTo() variant either doesn't work for
some reason (as mentioned above), or is not the slickest solution.
Change-Id: I6a41b147331132711ac84776bb43ad24a091ba24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142260
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
This adds basic tests for a few dialogues, showcasing and exercising
the dialog handling code. Those tests are extremely basic but show
that it is trivial enough to interact with a dialog.
This adds a few helpers to navigate the UI using keyboard events as
well, because it's one of the best methods to verify the actual
interaction works for a user of assistive technologies.
Change-Id: Idc1f279f35ff01769138c3addb10ef851ca0dbb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142259
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Instead of waiting for the CI itself to timeout after 45 minutes, or
for an interactive caller to kill us sometime, don't wait more than 60
seconds for a WindowActivate event to show up.
This should not happen in the working code paths, but can help when
something's going wrong. Currently, this could help macos jobs to fail
sooner.
Change-Id: Iabce82b31440c14fd16478f1e574ce376027441c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146099
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Reuse existing mechanism to handle chart file names in tests.
See https://lists.freedesktop.org/archives/libreoffice/2023-February/089995.html
and 5f7861e6ce212f47420533aed302fa4b5510557d
"fix chart export tests correctly
we have a static counter that increments chart export file names. So
only the first exported file gets the file name chart1.xml and all the
following charts are incremented by one even if they are in a different
file."
Also add an assert to warn developers only 1 chart is allow per sample
document when parsing them.
Adapt a few tests to follow this rule and change file document
from testMultipleChart.docx to testExternalData.docx because
the name was misleading
Change-Id: Id7282049796f2b05492ab70b50c80065a99439be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148065
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I7e3d78e6cf80afb72be61942ac95c474dae0424d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147669
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Interacting with dialogues in tests is non-trivial, so introduce
helpers to make it simpler and less error-prone.
Add tests for the infrastructure itself as well.
Change-Id: I8ea6087a61380194eb2b5ec9f25091db00f5a550
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142258
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: Ic2990ebc2e4a9a36dcd3f90c5f634ca7dd225d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147491
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after b52117c0be97c45824d2897657084f8ac7e9bf42 "Try an override locale as
first fallback"
Change-Id: I23d8459fff4d76fd9d542d098953bf97cf5397a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after a9b97301ba75a74e6671a6b9829f7044e85db6af "Do not add empty language tag
to fallback strings"
Change-Id: Ie42929c2ce6331012358f72026ae774b9dd0e369
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147207
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...not the whole CppUnit::assetion_traits<T> classes (where applicable). That
avoids spelling out the (identical) equals member functions, and also leaves
around the less and lessEqual member functions, in case they want to be used
after all.
Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
c3bd52f81bf733a0b9b0560794a54b2ac1e0f444 "Use the (first segment of the)
original locale value for the workaround again" had stated: "The added test
code unfortunately doesn't actually test this piece of code, and somewhat
unexpectedly receives the "default" value from the empty string locale default,
rather than the "en-US" value from the higher precedence "en-US" locale default,
because `aFallbacks` happens to contain an empty string, so we already leave
Access::getChild early in the 'Find the best match using the LanguageTag
fallback mechanism, excluding the original tag' block." But, of course, the
relevant code can well be tested after all, using a localized property that
does not have a default no-xml:lang value.
(And add a TODO comment about the unexpected "default" vs. "en-US" in the
original test code, in case the LanguageTag::getFallbackStrings behavior ever
changes and the test starts to fail.)
Change-Id: I526a830a5929b6b5ad17ba57af5943954b07b86a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147137
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9abe06e6f1f2b6b39cbbf07043dd9c5062ff0460
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147108
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
(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>
|
|
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>
|
|
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>
|
|
Change-Id: I79ebc0d4f65c26aab8c04399a47ce1cbc631cf76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143432
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
The reason for accepting empty attribute was eliminated in commit
2f91ab025de850fe5af8114565755a8deed55911 (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>
|
|
Change-Id: I67eec623b90ab20330fa0c268152211b6bbdbe1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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>
|
|
Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I7be721d9409890fe1f26125f06561e85cb1ddb27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143113
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
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>
|
|
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>
|
|
Change-Id: Iee06f883704484bf62bf1d9988580d72ba40db22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142232
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I767f464ec666330a2e8e832b6d6f5736a6bef54d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142228
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
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>
|
|
Change-Id: Id100591517da48ec8e5cfd38f5c44ac0d7b16198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141888
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ie826b66364f61bdab555228ca3a348f86b34847f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141824
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I0f04fae8b4ff922f5e14ae413cd63cc92a66077e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141797
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ib630949127d7087cddbb92737528690cafe9be26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141782
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|