summaryrefslogtreecommitdiff
path: root/include/test
AgeCommit message (Collapse)Author
2024-10-17extract NaN payload test from single unit testSakura286
Change-Id: I51a029c9ac729352fe435b9a70c5e8bd2cf746b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174964 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2024-10-05Use good old string literals in assertXPath and friendsMike Kaganski
These are only sent to an external API expecting char*-like strings, or for comparison. Having every assertXPath having three of _[ou]str is too much syntactic noise, making the unit tests almost unreadable. Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-07-30sw: get rid of parseDumpXisco Fauli
So parseLayoutDump is only called once per test Change-Id: Ia199e0a7eeac26fbde94f6450d2aa49828940806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171219 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-07-02BootstrapFixture: get rid of mxComponentContextXisco Fauli
Change-Id: I0318485c3c0159277e47096e0c7e0df8ed109ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169865 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-14loplugin:ostr in testNoel Grandin
Change-Id: Ie261167fc3e1ed9073210e0f8b179455da340c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167620 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-13UnoApiXmlTest: factor out common codeXisco Fauli
Change-Id: I5c7f76b61a0dab8b4ebd1ac4680a7c25f982680c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163307 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-01-30tdf#159438: when there's no frame, close previous bookmark firstMike Kaganski
Commit 260d6cc6471444b4ef20ed6673831b0b12f96333 (INTEGRATION: CWS mtg2 (1.30.120); FILE MERGED, 2005-12-21) for #i58438# made sure to process previously opened bookmarks that close at this node, before opening the bookmarks that start here. Commit 76a4305d1e90b6617054dd33036e64f005dbcf04 (sw: fix inconsistent bookmark behavior around at-char/as-char anchored frames, 2017-12-21) re-introduced the problem accidentally: it only intended to handle case when there is an anchored frame here. This change re-instates the correct order (close bookmarks first; then process collapsed ones; then open new bookmarks) in case there's no anchored frames here. To avoid a problem when a non-collapsed bookmark starts and ends at the same point (e.g., its text was deleted), it gets converted to collapsed in lcl_FillBookmark. Thus, testRemoveBookmarkText was fixed in sw/qa/extras/uiwriter/uiwriter4.cxx. There is no reason to keep the separate -begin/-end elements, especially since on the following open/save round-trip, it will become collapsed anyway. Change-Id: Ib555a76f6f776001e12908a1299c24eebf591f6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162743 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-29tdf#143148 use pragma once instead of include guardsKeldin Maldonado (KNM)
Change-Id: I42c39d991d243191f410ebb8f91940d5922a6fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162678 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-01-20this duplicated CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCECaolán McNamara
so use that instead Change-Id: I0a627fdd2f2657a3f23d47f014ff7019cab544f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162330 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-20calc doc with saved zoom in settings causes disjoint invalidations...Caolán McNamara
in multiple views, while the invalidations rectangles should be reported at the same place from each view. on load, ScTabView::SetZoom gets called with the zoom stored in the document settings, which both calls sets Zoom on the ViewData, and then calls ZoomChanged, which syncs the GridWindows MapMode from the ViewData derived GetDrawMapMode(). Later lok sets zoom via setClientArea which leaves the GridWindows MapMode untouched and out of sync with the newly changed ViewData MapMode. Typically then, on e.g. on deleting text in one view then ScViewFunc::DeleteContents or similar is called which calls ScTabView::UpdateCopySourceOverlay which calls ScGridWindow::UpdateCopySourceOverlay and that sets the GridWindow MapMode to the DrawMapMode but then *for lokit* returns early (among a few other unlikely early return cases) while every other similar func restores the orig GridWindow mode before returning. So the view which is used to make the change ends up with GridWindows synced to the ViewData MapMode, which looks like accident. While the other view remains with GridWindows with MapModes unsynced with that views ViewData MapMode. So on invalidate, the view that was used to make the change has GridWindows with MapModes that report the correct rectangle, while the other unsynced view will report an incorrect rectangle, until something happens in that view to get it to exec UpdateCopySourceOverlay and get synced. Here add the sync to ScModelObj::setClientZoom so the two MapModes remain synced once that is called. Change-Id: I2da59f50ae2b0e3ea6b7ef8b54debdab1ee98266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162312 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162322 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-11cool#7492 sfx2 lok: set language/locale on async sidebar updateMiklos Vajna
Create two Calc views, set the first view language to English, second view language to German. Type in the English view, double-click on a chart in the German view. The sidebar in the German view will have English strings in it. This doesn't happen if there is no typing right after the chart activation in the English view. What happens is that the sidebar update is async, and sfx2::sidebar::SidebarController::notifyContextChangeEvent() gets called, which registers an aync event when it calls AsynchronousCall::RequestCall(). Then later this job gets scheduled, but possibly by that time the active view is the English one, leading to English strings when chart::ColumnChartDialogController::getName() calls SchResId(), which works from the language of the current view. Fix the problem similar to what commit fb7b0b944741e4efae8d92a6e305036aff906c7a (cool#7492 sfx2 lok: just set language/locale on async binding update, 2024-01-09), did: set the language/locale from the current view before executing the async job and restore the old value once we're done. Extract the now duplicated code to a new SfxLokLanguageGuard, so in case more places have a problem with incorrect l10n, then it's meant to be a one-liner to fix further places. Change-Id: I52724a24d93fb753175a3b9b99bc33178519d981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161920 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-01-03UnoApiTest::loadFromURL -> UnoApiTest::loadFromFileMike Kaganski
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-06tdf#146619 Recheck include/t* with IWYUGabor Kelemen
Change-Id: I005257e458351285b1b35ffe49c8b42834a6db68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156990 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-26tdf#153519 use new IdleTask::waitUntilIdleDispatchedNoel Grandin
to wait until the Idle inside sw/ has done populating the navigator tree. Which required (*) moving the code down from test/ to vcl/ to avoid circular dependency issues. (*) adding a call SolarMutexGuard before Application::Yield inside IdleTask::waitUntilIdleDispatched (*) exposing the function to python by adding a method to the XToolkitExperimental UNO API Change-Id: Iee418f7a0beb1f5b53addb7fe25823d61720eb3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-08make testCondFormatFormulaListenerXLSX reliableCaolán McNamara
Change-Id: Ibd8c9b7831af73967229c578b9dcf7217d800610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157686 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-06sc: qa: add loadWithParams and SaveWithParamsHenry Castro
Add option to load and save with optional parameters. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I2d735443da11634d072742f1bf6f38f90bced2c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157141 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157569 Tested-by: Jenkins
2023-10-06xmltesttools: add assertXPathDoubleValue that takes a double with deltaIlmari Lauhakangas
and use it to make WmfTest::testSetTextAlignWmf independent of DPI Change-Id: I2048239088a8dcc3e3ab1db96413894b5bcc56d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157377 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-08-27tdf#45904: Move _Footnote Java tests to C++anfanite396
Change-Id: I1e69267a72296f55fac12326ec69d3c29e63561a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156055 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-26tdf#45904: Move _XFootnote Java tests to C++anfanite396
Change-Id: Ibdc28ab8818860b9c94abeac33713607dbcf8df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155635 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-26tdf#45904: Move _DocumentIndexMark Java tests to C++anfanite396
Change-Id: I144d06ab3abb47134060d554a4016009246aa739 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155163 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _XTextRangeCompare Java tests to C++anfanite396
Change-Id: I40390a8b05f0e685a9408f0c486f6129633bc5b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155634 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _XAutoTextContainer Java tests to C++anfanite396
Change-Id: Ie6ebc43c52204984cb6196f539c735701d13dc22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155627 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move _BaseIndexMark Java tests to C++anfanite396
Change-Id: Ie6c09c0cfedbad8168281af354590ab7c9dd374e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155162 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904 Move _NumberingRules Java tests to C++anfanite396
Change-Id: I86d559767204e1e8e1fd232db63f26a5c1ce67da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155089 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-27vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layerColomban Wendling
Add tests for the GTK3 accessibility platform layer. These tests compare the internal LO representation with what is visible to the platform, and thus the user's accessibility tools. In most cases the tests are fairly trivial as LO's internals are not far off AT-SPI2's expectations. There are however notable exceptions like for example the text attributes, that have a wildly different representation and require more complex checks matching what LO's platform layer does, the other way around. These tests use libatspi2 directly, but as the C API is awful to work with regarding resource management, there are wrappers to handle the complexity using RAII. The resulting API is fairly trivial to use. As these tests require using the GTK3 VCL plugin and for the a11y tree to be visible to AT-SPI2, they are run under XVFB using a separate dbus session through dbus-launch. Working on this has already lead to reporting and/or solving some issues: * https://gerrit.libreoffice.org/c/core/+/151303 * https://gerrit.libreoffice.org/c/core/+/151650 * https://gerrit.libreoffice.org/c/core/+/152456 * https://gerrit.libreoffice.org/c/core/+/152457 * https://bugs.documentfoundation.org/show_bug.cgi?id=155625 * https://bugs.documentfoundation.org/show_bug.cgi?id=155705 * https://gerrit.libreoffice.org/c/core/+/152748 Only a subset of the a11y APIs are covered for the moment, but the current state should make it easy to extend upon. Change-Id: I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153069 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
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>
2023-04-05fix leaks when using tools::JsonWriterNoel Grandin
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>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
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>
2023-03-13Use a more reasonable type for XDataPilotDescriptor::checkName nIndex parameterStephan Bergmann
Change-Id: If9e6760a6b23c63d03d337d6b111493684d67c85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148568 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-03Disable test::AccessibleTestBase::awaitDialog() on macos altogetherColomban Wendling
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>
2023-03-03test: Use css::awt::XExtentdedToolkit::addTopWindowListener()Colomban Wendling
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>
2023-03-03test: Run user dialog callback in idle timeColomban Wendling
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>
2023-03-03test: Add debug print support for XAccessibleActionColomban Wendling
Change-Id: Ic511f2abc62703ead40a585989c54345cf3c17ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142261 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-03test: Add helpers to get a specific object and tab to itColomban Wendling
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>
2023-03-03test: Add a few basic dialog tests and helpersColomban Wendling
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>
2023-02-25Fix typosAndrea Gelmini
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>
2023-02-24test: Add accessibility test dialog infrastructureColomban Wendling
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
2023-02-16Only specialize CppUnit::assetion_traits<T>::toString member functionsStephan Bergmann
...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>
2023-02-03test/a11y: Remove declaration for undefined methodColomban Wendling
getStateName() has been removed and superseded by debugAccessibleStateSet() in 8d8e6c84e512c1a8b33aac75965b84481d1a1d13 but its declaration was still there. Change-Id: I3c7a9dc74b7230cde2fc61a86ca7659e35ba2bdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-25test: Add AccessibilityTools::nameEquals()Colomban Wendling
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>
2022-12-21qa: hint about tolerance in namesXisco Fauli
As suggested by Mike in https://gerrit.libreoffice.org/c/core/+/144171 Change-Id: I653118985b781ebb1eed71587ae19efe45e1c800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144691 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-15UnoApiTest: introduce CPPUNIT_ASSERT_RECTANGLE_EQUALXisco Fauli
and get rid of duplicated code Change-Id: Iccbd3147fab71b43b1725af308df8ed37c807b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144173 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-25Merge two assertXPath overloads that both check number of nodesMike Kaganski
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-25tdf#152200: Make sure to not write objects into field character runsMike Kaganski
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-23UnoApiTest: factor out createTempFileXisco Fauli
Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22tdf#152014: sc_uicalc: Add unittestXisco Fauli
Change-Id: I7be721d9409890fe1f26125f06561e85cb1ddb27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-16CppunitTest_sc_uicalc: inherit from ScModelTestBaseXisco Fauli
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-15CppunitTest_sc_subsequent_export_test: inherit from UnoApiXmlTestXisco Fauli
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-11move password handling from SwModelTestBase to UnoApiTestXisco Fauli
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>