465 Commits
Author SHA1 Message Date
Xisco Fauli 7003eb6fc6 fix headers
Change-Id: Ia2732cc041367bc113654bc424ea6621f3961e9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211724
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:04 +02:00
Dennis Francis 22adaa8073 chart2: offer the correlation circle plot in the chart type dialog
The entry sits next to the bubble chart, under the same switch that keeps the
chart types wanting free x values out of the list where they do not belong. It
has one sub type, no three dimensional look and no stacking.

The two images are placeholders: a circle with a cross and a few arrows
out of the middle. They need a designer's hand before this ships.

A test drives the wizard the way a user would: it picks the type, types one
range whose last two columns hold the dimensions, and checks that every column
before them became a series holding that column beside the two dimension
columns. A second test reopens the ranges of that chart and checks the range
comes back as it was given.

Change-Id: If8b5275244a2456a22235a6ce2d3d51fcff6cb94
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8104
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 7a7fc603047e065ebbc20f8bc5dc814d6079e082)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210469
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-04 11:43:03 +02:00
Mike Kaganski 3dba60b256 Make sure that connection is disposed also on exception
An omission from commit f5d97d14a2
(uitest: add a way to optionally use the same soffice process for
a testsuite, 2023-03-20).

When testing locally, on some exceptions, soffice process was left
running, and following attempts to run the test failed because of
that.

Change-Id: I3f24c7756020835182dc53565e0be7660ee9f040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201003
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-05 12:41:30 +01:00
Neil Roberts 7930a07d76 uitest: Use the new service constructors to create the Toolkit
Instead of explicitly calling createInstance we can use the implicit
service constructor on the Toolkit type for a slightly nicer way to
construct it.

Change-Id: Ia06000afc0cde27209966854704ca8dd61375adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199106
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-03-04 13:53:16 +01:00
Noel Grandin 707fa629bb some 'make uicheck' fixes for windows
(1) Fix a crash when calling a disposed listbox.
(2) Load files on the main thread, prevents deadlocks

Change-Id: I24e415bb589ef9cf9e0587725a9213257748ae45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196354
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-01-01 09:10:42 +01:00
Neil Roberts 911502799b uitest/EventListener: Set executed flag after storing event details
Most of the uses of the EventListener wait for the executed flag to be
set in a check-sleep loop. If the code then tries to access properties
of the listener such as the supplements array then there was a race
condition where the waiting thread might wake up in between the time
that the executed flag is set and the details are filled in. This can
happen for example in open_subcomponent_through_command. I can replicate
this problem locally by adding a short sleep after setting executed to
True.

This is likely the cause of build failures such as the following:

https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/194139/

This patch just changes the order so that the executed flag is only set
after the event details are filled in.

Change-Id: I9ba108bc2e2fa084fd5d9e3048e34203feaa74a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195483
Tested-by: Jenkins
Reviewed-by: Neil Roberts <bpeeluk@yahoo.co.uk>
2025-12-12 09:01:14 +01:00
Neil Roberts 70e001ae2d UITest: Add a method to open a subcomponent through a command
The Base UI tests all need to open a window that operates on the same
database, such as opening the table editor etc. There seems to be a few
race conditions related to opening sub windows that occasionally make
the tests fail so the idea with this patch is to make a central place in
test.py to add code to handle opening the window and closing it when
finished. That way we can add any synchronisation needed in a central
place.

For getting access to the new frame, the three current tests were all
trying to handle this in different ways. insert_relation waits for the
OnSubComponentOpened event, create_join_undo_redo was waiting until the
current focus window changes and the edit_field test was just crossing
its fingers and hoping that the timing worked. This last one is the
likely culprit of the following Jenkins build error for the edit_field
test:

https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/193148/

The new helper method always listens for OnSubComponentOpened and then
extracts the new frame from that event.

When closing the window the shared code now always calls
waitUntilAllIdlesDispatched. .uno:CloseWin ends up being executing
asynchronously on the main thread which means that the later call to
.uno:CloseDoc can happen simultaneously. If --oneprocess is not used
then it will even end up directly calling dispose on the main frame
instead of calling CloseDoc. I haven’t been able to replicate the crash
locally, but is seems like this might be related to crashes like the one
below:

https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/193204/

Change-Id: Iab0a46c3ca9f8c9eb9ac7f4fecb07f633bd0b312
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194350
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-22 19:37:57 +01:00
Neil Roberts ce5f2d2dd4 EventListener: Store the supplement from the event
Some of the events have really useful supplements. This will be used
later to extract the frame from the OnSubComponentOpened event.

Change-Id: Id62e8bf7d4658aa4df8920992a622f51e007ff41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194349
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-11-22 19:37:29 +01:00
Neil Roberts 0deaf87f07 UITest: Wait for idle in close_doc
This is a follow-up to the commit below:

    commit a3546f2a04
    Author: Neil Roberts <bpeeluk@yahoo.co.uk>
    Date:   Tue Nov 18 14:26:42 2025 +0100

    uitest: Wait for idle when calling close_doc for a database doc

I realised that it’s possible to trigger the race condition with the
existing tdf99619_create_join_undo_redo test too. That one works by
loading an existing document instead of creating an empty database so it
isn’t fixed by the above commit. This patch moves the call to
waitUntilAllIdlesDispatched into close_doc instead so that it will
affect all UI tests. I can’t seem to trigger any race conditions with
non-database tests but on the other hand I don’t think those tests are
explicitly intending to test concurrent UI access so I don’t think it
does any harm to make them wait as well.

Change-Id: Icd49518fc8e7682a61548c1dd906bff2ed26d3c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194241
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-22 18:19:17 +01:00
Neil Roberts e8dd8f9888 uitest/framework: Throw an exception when a signal is received
When a signal is received such as when the unit test is killed by the
kill-wrapper, the framework catches the signal and terminates the
connection to LibreOffice. However it would then continue executing the
test. This makes it difficult to diagnose problems when the kill-wrapper
is invoked. This patch makes it instead throw an exception so that the
build log will have a backtrace. It also changes the resetSignalHandler
method to set the signal handlers to the DEFAULT rather than IGNORE,
because ignoring all subsequent signals seems like an unusual thing to
do and there is no comment explaining it so it seems likely to be a
mistake.

Change-Id: I8d8283cccd4de1ce55b0a6cd947c1647d28f462f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194321
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-22 11:41:32 +01:00
Neil Roberts a3546f2a04 uitest: Wait for idle when calling close_doc for a database doc
The UITest calls .uno:CloseDoc at the end of create_db_in_start_center.
This seems to end up triggering some race condition which makes any
tests using it occasionally fail. I think what happens is this:

If the document is modified when CloseDoc is called then instead of
immediately closing the document it posts an event to the event queue
which causes the main thread to start closing the document
asynchronously. In the meantime the UI test thread continues and
executes Desktop::terminate. Both the main thread and the UI test thread
end up calling XFrameImpl::setComponent simultaneously. The main thread
does this with the solar mutex held because the event handling code
locks the mutex during the entire process. The UI test thread doesn’t
hold it, but parts of XFrameImpl::setComponent require the lock so it
blocks straight away. The first part of XFrameImpl::setComponent sets
the controller to the new one and then starts disposing the old one. The
disposing implementation for OApplicationController temporarily releases
the solar mutex while it does the potentially time consuming process of
disconnecting from the database (see the SolarMutexReleaser in
ODriverDelegator::shutdownConnection). This causes the UI test thread to
unblock and continue executing XFrameImpl::setComponent. Presumably it
bypasses trying to dispose the controller because that will have already
been set to null by the main thread. It will therefore jump straight to
disposing the old component window. This invokes VCLXWindow::dispose
which ends up disposing the ODataView with the solar mutex locked. Once
it is finished and the main thread has finished disconnecting from the
database it will be able to reacquire the solar mutex and continue
invoking OApplicationController::disposing. The next step calls
attachFrame which in turn calls attachFrame on the ODataView. However
the data view has been disposed in the meantime which makes it call a
method on a null pointer because m_pAccel is now null. This will end up
throwing an uncaught std::system_error.

I tried working around this one problem by checking whether the
ODataView has already been disposed in ODataView::attachFrame. However
this then just triggers a different problem where Base tries to close
the database connection in one thread while
ODriverDelegator::flushConnections is running in another and it also
ends up throwing a std::system_error.

Seeing as there seems to be a nest of bugs in this area this patch just
makes it wait for CloseDoc to finish before continuing the rest of the
unit test. If we want to fix the problems later we could make some
further unit tests that explicitly execute CloseDoc without waiting.

Change-Id: Ie531ada3d740e9e777d2b73ee162d4818fb6c477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194181
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-11-20 09:04:17 +01:00
Neil Roberts 4edf1361ee UITest: Add a helper function to create an empty database
Adds a method that creates a database document from the start center
button similar to create_doc_in_start_center. Creating a database is a
bit more involved because it first opens a dialog asking for details
about the database. It also needs a filename immediately so a temporary
file is created to store it.

Change-Id: I3e5489ce539be0d9d9148b612b25da828866256f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194040
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-14 20:03:24 +01:00
Mike Kaganski 6b2b85b93d Document LIBO_TEST_DEFAULT_DESKTOP environment variable
As defined by commit 69586e8381 (UI
tests: use a dedicated desktop on Windows, 2024-07-17).

Change-Id: Icd4ad6dfa95301fc1f6e699349278d3a0198fd08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175296
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21 10:48:29 +02:00
Heiko Tietze cd2eba5c69 Related tdf#160226 - Math inline editing Off by default
Introduced per
I63672c054d1ead269863079e7f9c118a44b3ba19
Ib2ca942c537e466f6ff100be7f95adaead99f1d5

Change-Id: Iff2bd250c004e57800c84287483965ec3ae49187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172241
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2024-08-26 10:38:28 +02:00
Michael Stahl 8ed755cfb0 pyuno,unotest,xmlsecurity: copy GPG test files for UITtest
The problem was that running UITest_xmlsecurity_gpg changed the files in
test/signing-keys/ ... prevent that by copying the directory in that
test, which is more complicated than initially expected.

Change-Id: Ie3be922e0b2e9dae49f9a70e35ad5270c90b4fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171322
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-08-01 11:18:30 +02:00
Ilmari Lauhakangas d7628892b0 testtools, uitest, unotest: fix issues found by Ruff linter
Change-Id: I4a848b0f1f114d1262b5242786e088eb50a33cef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171145
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-07-29 10:34:57 +02:00
Mike Kaganski 5d0de0b345 Simplify use of close_dialog_through_button: allow button by name
Change-Id: I59a74e7221808308853f0d893a416fababaf2318
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170493
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-15 21:55:40 +02:00
Julien Nabet 1f8a9bfcdb Python: use is None/is not None instead of == None/!= None
Change-Id: I1c34181897506ad29a063865d752cb85ab76dbc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170408
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-07-13 09:13:54 +02:00
Noel Grandin 5ec7c4eecf fix comparison of UIObject's inside UITests
using == to compare them doesnt work, because we return
a new one with every call to getTopFocusWindow and similar.
So add a equals() method to the UNO interface to do the comparison.

Change-Id: Ie909fe9b4e84fe07f4ca87bbebf65b56d3da8f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 17:17:32 +01:00
Noel Grandin c2d4406206 add check to close_dialog_through_button
to verify that the dialog did indeed close

Change-Id: If591c9144b392a69bea0b380b4b6e4001a8382fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 12:42:20 +01:00
Noel Grandin 8093bd7017 improve logging in UITests
(1) log useful stuff that is happening instead of logging events that
are __not__ interesting

(2) add the UIObject title to the event so we know who the event belongs
to

Change-Id: Iea4b70c03482b10731f186d730afa12dac760fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165435
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 06:43:54 +01:00
Xisco Fauli 22e97c90cb related: tdf#159879: test chart dialogs
Change-Id: I91d5f4572edff99deb21dd2507c3216ef0d9e4c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164465
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-06 16:50:25 +01:00
Chenxiong Qi 74de0ebb81 tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-23 14:00:46 +01:00
Chenxiong Qi 8b6e0dd9e4 tdf#158803 Fix issues detected by pyflakes
Change-Id: Iaa329dff61db894e7d5fecd840e785a53a48b26f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160889
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-27 13:48:47 +01:00
Mike Kaganski faefc434ef Deduplicate execute_dialog_through_*
Use Python 3.3's 'yield from', which should be OK, because the
baseline rhel8 has Python 3.6. If needed, older Python could
use replacement like this:

    for dialog in self.wait_and_yield_dialog(event, xDialogParent, close_button):
        yield dialog

Change-Id: Ic70bdf19fed730e41b7ce2868990ec88423eab33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-05 19:28:28 +01:00
Xisco Fauli 6b41d3f677 uitest: remove crash report handler
Unneded since a4a1f2ecee
"Disallow crash reporting in UITests"

Change-Id: I661b6111bd5142e67ee73a82c0777771e7651300
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160324
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-12-05 09:24:59 +01:00
Xisco Fauli 07b602edbc uitest: Clean up redundant usage of gb_UITest_use_oneprocess
After 8c39af455c
"uitest oneprocess mode: default to this and clean up one test"

Change-Id: Ib6e0fc3de2997beebc650253ae3ea19a3314ae09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158844
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-06 09:26:43 +01:00
Noel Grandin 9071fa5f5f uitest: check that dialog really did open
to make it easier to debug cases where the event.executed flag is not
sufficient to indicate that the dialog has finished opening

Change-Id: Ibcbd089372e47908e3692d452f4064edbc7f788d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158751
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02 06:22:04 +01:00
Mike Kaganski be71e660fd Fix UITests on Windows
... after commit 0d21e1075f (uitest:
add signal_handler function, 2023-10-04), which added handlers
unconditionally, for signals unavailable on Windows.

Change-Id: I8b177c4110f869781b2501ee6f15ae7ff4862a94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158050
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-16 18:27:32 +02:00
Gökay Şatır c0187d9f5e SW comments: Provide parent / child relations without position.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I7acba74ef0717bc07a675be17fc1909680138f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157019
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-05 16:46:15 +02:00
Henry Castro 3d665f4ee6 uitest: add load properties parameters
Add the option to include the load properties
when invoked load_file function.

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I27cb31e2470bc76bcc5b760661e50f00fc334d64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157567
Tested-by: Jenkins
2023-10-04 19:46:13 +02:00
Henry Castro 1058d5edc0 uitest: flush print messages
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I87098a438d476529aa25b6608408d07bbc98ce0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157557
Tested-by: Jenkins
2023-10-04 17:46:52 +02:00
Henry Castro 0d21e1075f uitest: add signal_handler function
install signal handler to analyze if the
soffice bootstrap has some issues.

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I8b05b9c24bf531f4162554433180d80526cb2983
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157518
Tested-by: Jenkins
2023-10-04 15:51:10 +02:00
Miklos Vajna 2be27d23b9 UITest_impress_demo: use oneprocess mode
Before: 0m54,459s

After: 0m41,705s

Change-Id: Ie4cccff79b0df3bd4f01c10414c61ca46cade5d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157338
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-28 08:06:48 +02:00
Miklos Vajna a64d90da69 UITest_writer_tests7: use oneprocess mode
Before: 7m37,421s

After: 5m29,121s

Also UITest_demo_ui: 1m43,126s -> 0m55,159s

Change-Id: Idf705fdcdb62e27b4d42287f4c95fcd3893cdd4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157106
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-21 08:28:06 +02:00
Khaled Hosny 5416c91833 tdf#111705: Add Arabic math symbols to the symbols catalogue
Change-Id: Ieabf4d3173a7ce985a9164db8b2de4c8b6d0da36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157029
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 23:05:23 +02:00
Khaled Hosny e472b5b557 starmath: Show editing window by default again
We are not ready to get rid of it (e.g. undo does not work when it is
hidden). This flips the default introduced in:

commit e9cc014be4
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Sep 12 16:41:37 2023 +0300

    starmath: Hide editing window by default and add a menu item to show

Change-Id: If84b25d186c8d133a9fa5cfc0c3d91162c66b389
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157004
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 02:32:39 +02:00
Khaled Hosny e9cc014be4 starmath: Hide editing window by default and add a menu item to show
We are enabling inline editing bu default, so this window is of no
interest by default.

Change-Id: I66fe988790fe4f174f6cb4f691af69888b0b05b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156852
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-13 12:54:14 +02:00
Khaled Hosny ee187f6ed7 starmath: Always insert using SmCursor when inline editing is enabled
Choosing which code path based on which widget has focus is not a very
good idea, and leads to unreliable UI tests as each code path inserts
the text slightly differently (one code path inserts plain text then
parses the whole equation again, while the other parses the new text
then inserts the parsed node directly).

Change-Id: Ib2ca942c537e466f6ff100be7f95adaead99f1d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156578
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-05 20:28:34 +02:00
Laurent Balland 2b3b4026a5 tdf#154131 Add Detect scientific number option
Add a sub case of Detect special numbers for import CSV (SC_IMPORTFILE),
paste unformated text (SC_PASTETEXT) and text to columns
(SC_TEXTTOCOLUMNS). Following cases are treated:
- If "Detect special numbers" is true, then "Detect scientific numbers"
  must be true and all special formats are treated (date, time,
scientific notation) in addition to basic decimal numbers.
- If "Detect special numbers" is false and "Detect scientific numbers" is
  true only scientific notation is treated in addition to basic decimal
numbers.
- If "Detect special numbers" and "Detect scientific numbers" are both
  false only basic decimal numbers are recognized as numbers. It is the
new case treated by this change
The new option bDetectScientificNumber is append to ASCII options

Change-Id: I73dff9f75d2c7b07ce155daa29dcc4ca9f288664
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152072
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2023-05-26 23:57:16 +02:00
Miklos Vajna 8c8e4ae164 tdf#154451 uitest: use more oneprocess mode
Execution time changes:

- UITest_writerperfect_epubexport: 20,023 -> 6,083s
- UITest_svx_table: 15,214s -> 14,378s
- UITest_cui_tabpages: 13,561s -> 12,503s
- UITest_math_demo: 19,737s -> 13,578s

Change-Id: Ide03d5d9cb884297291a5ed1351de5a7602fcba4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150346
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-04-13 17:39:17 +02:00
Miklos Vajna 015da04a8f sw floattable: fix current page number when editing document with a split fly
UITest_writer_tests6's
tdf124675.tdf124675.test_tdf124675_crash_moving_SwTextFrame_previous_page
failed in the SW_FORCE_FLY_SPLIT=1 case, since the current page after
typing was 3, not 2.

It seems this change is wanted, since the total page count increases by
2, so it's consistent that the current page increases similarly with
typing. Also, repeating the UITest in Word (after positioning the cursor
at the top paragraph in the document) also produces page 3 as the
current page.

Fix the problem by locally enabling split flys for this test and then we
can assert that we match Word. This requires a new context manager, but
that set_config() is really similar to other context managers in the
class that return no value.

The original purpose of the test was to make sure we don't crash,
anyway.

Change-Id: Id0dfde23a8726c8799950a6e4fdd1d85f135eafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149315
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-03-22 13:29:47 +00:00
Miklos Vajna f5d97d14a2 uitest: add a way to optionally use the same soffice process for a testsuite
A uitest suite may have several testcases and we spend a lot of time
spinning up a new soffice process for each testcase, while we typically
do such initialization only once for per testsuites in the cppunit case,
slowing down uitests.

The problem is that this way today's uitest cases don't really have to
clean up after themselves, since they know that the next testcase will
gets its own clean state (back to the start center).

Fix the problem by adding an opt-in way, so that a uitest suite can
declare that it's safe to run the entire suite with the same soffice
process. To be more specific:
- add a new --oneprocess for test_main.py, which will create a shared
  connection to a soffice process
- UITest then closes the document (returning to the start center)
  instead of disposing the component in the oneprocess case
- UITestCase won't create its own soffice connection in the oneprocess
  case
- add a new gb_UITest_use_oneprocess method to gbuild, to request this
  new, faster behavior
E.g. on my machine this means UITest_sw_styleInspector takes 26,345s
instead of 40,652s, probably such a speedup is worth the added
complexity.

This works nicely when the testsuite is a list of simple/boring test
cases, always loading one component/document at a time and always using
close_doc() to close it. It may not be safe for testsuites that do
something special (they may fail or hang), we'll see.

Change-Id: Ib14439d48aa547c92652245ee1c0cf37d2d7b6e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149134
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-20 12:40:22 +00:00
DowwdyJ ac0e3e11d1 tdf#152850: Fix bad scoping of MathML frac command
Change-Id: I4f5d0290e522fa6f3faccd26f74540abf848629b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147153
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-21 12:11:06 +00:00
Xisco Fauli 7355c2ee8a uitest: reset value when changing the measurement unit
Otherwise, changing it in one test might affect other tests
Use @contextmanager decorator to change it back to default 'Inch'
at the end of the test even if the test hits an assert

Change-Id: I1e7b35019cd19b490aa619c0a866bb9f93820950
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-07 09:33:40 +00:00
Xisco Fauli 4f841e9a28 uitest: remove wait_until_file_is_available
Introduced in 33a49a99c7
"uitest: introduce wait_until_file_is_available" as a blind
fix for https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91
It turned out the root problem was caused by another test
and the fix is addressed in https://gerrit.libreoffice.org/c/core/+/146385
"uitest: Always change doc info setting back to false"

Change-Id: I4b3d5e24e35a33de6c128dcbf2f144b4cf48a48c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146389
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-01-31 15:03:30 +00:00
Tibor Nagy 4a4f58f06f tdf#152295 sw sd UI: don't reset tiled image size by Area tab
The background tiling images become larger when
opening and closing Area tab: reopening the image
properties in the Area tab shows that the Width
and Height got reset to the original values of the
image.

Regression from commit 686349476e
"[GSoC] Move all fill style tabs inside area tab".

Change-Id: Ibc4dfd73dedd81b1b7fe17574198dd4999aab967
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143819
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-12-19 12:20:08 +00:00
Bogdan B eedb077f88 tdf#132293 remove unused imports from uitest
Change-Id: I5943ec84a0b5ed6f44af9e3f972626813987a1cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142615
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-15 17:41:46 +01:00
Rakielle 09ba0057e3 tdf#132293 remove unused imports and variables
I used pyflakes to check for any unused imports and variables in python scripts under sc, sw, uitest directories, and then removed the unused imports and variables

Change-Id: I0690c9366087dc602ee8ea169bc1c9063033fef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141421
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17 13:32:56 +02:00
Hossein d3050ff4a1 Use Markdown instead of reStructuredText
Use Markdown markup instead of reStructuredText for
uitest/packaging/README.rst

Change from reStructuredText to Markdown in setup.py is done according
to this guide:

Making a PyPI-friendly README
https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/

Change-Id: I12cbde53518d7ceadec034827d8cb00380df1547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138555
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-09-26 00:26:05 +02:00