summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2021-06-15uitest: sc: use guarded wrapper in testXisco Fauli
maybe it helps to know why it's failing on amd64 Change-Id: I6f3e4747393c823c4f1f98fc9208ed2ab16c270c Change-Id: Ie804b0485dc3cf4206bfe88884d1c1a420cee593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117247 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-15tidy up .uiCaolán McNamara
Change-Id: I7400a4994c57e4652daca6215385bfd8e4d46369 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117266 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15fix some 32-bit compile errorsNoel Grandin
Change-Id: I7ce0e71a51709b0ae90b7e509f00f608fffad47d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-15button text should be Yes not yesCaolán McNamara
Change-Id: Ib92a1119046c79ce36968ad0814161ef7c4b0982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117237 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15rework paste special a littleCaolán McNamara
to avoid GtkButtonBox, it appears a little cramped under gtk otherwise Change-Id: Ie80a0474f6bc246de7b673e255434071bafcfbeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117243 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15Resolves tdf#142499 - Make fat cross cursor optionalHeiko Tietze
Change-Id: I9a9182f8783f951e49cdb8f897578f99281c25d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116858 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-06-15drop height-request that appears on just one of four buttonsCaolán McNamara
Change-Id: Ib3d197886a10a0acfe8f856d10dc5e33be8fd72d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117242 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15make the 4 buttons have the same packing propertiesCaolán McNamara
Change-Id: I526d5adaaee1601690151bea90780fc02996c804 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117241 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15resave with latest gladeCaolán McNamara
Change-Id: I820a121c92ae3279267a725fcf8f710737d6ea26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117240 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15only three of four of these buttons have always-show-imageCaolán McNamara
Change-Id: Ic4bb951d0a7800b5d920a3b40c2bb4b06ecbc629 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117203 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15editengine-columns: add sidebar property panelMike Kaganski
Change-Id: I90aefc10f9ddddeb64a65799480777bc4287abae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117107 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-15remove deprecated Expander spacing propertyCaolán McNamara
which is the spacing between expander indicator and expander label Change-Id: Ib840cec6744bd7f0714d38b8296d2f17dc9a916d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15we don't pack ok/cancel with 'secondary' that's for the help buttonCaolán McNamara
Change-Id: I3b6484f4b362c718fb3abb3584d426a4c0f0cecf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117198 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-15resave with latest gladeCaolán McNamara
Change-Id: Ib9eb3b74114ee70dd8111bd56e373996d044356a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117197 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14only one of the radiobuttons in a group should be activeCaolán McNamara
Change-Id: I0475bdd0633b54a644e205628577fac18a3af974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14if active is set group shouldn't be setCaolán McNamara
Change-Id: I26db5a96f176df7bd2ef6ef83c40150856845383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117141 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14set the active button as group leaderCaolán McNamara
Change-Id: Ia3c99d03a9affec493e445bc7edf83be4d333677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117139 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14ucalc_copypaste: improve readability and shortenscito
The tests are written in a simpler and shorter way. (The same, but 858 lines less.) I've transformed the code with several regex in VSCode. I've made a manual clean up at the end. The regex are listed below in the form *** search regex replace regex *** aString = m_pDoc->GetString\((\d+,\s*\d+,\s*\w+)\); \s*CPPUNIT_ASSERT_EQUAL\(OUString\("(.*)"\), aString\); CPPUNIT_ASSERT_EQUAL(OUString("$2"), m_pDoc->GetString($1)); *** m_pDoc->GetFormula\((\d+, \d+, \w+), \w+\); \s*CPPUNIT_ASSERT_EQUAL\(OUString\("(.*)"\), \w+\); CPPUNIT_ASSERT_EQUAL(OUString("$2"), getFormula($1)); *** m_pDoc->GetFormula\((\d+, \d+, \w+), \w+\); \s*CPPUNIT_ASSERT_EQUAL_MESSAGE\("(.+)", OUString\("(.+)"\), \w+\); CPPUNIT_ASSERT_EQUAL_MESSAGE("$2", OUString("$3"), getFormula($1)); *** ScAddress \w+\((\d+, \d+, \d+)\);(\s*//.+)? \s*ScPostIt\* \w+ = m_pDoc->GetOrCreateNote\(\w+\); \s*\w+->SetText\(\w+, "(.*)"\); setNote($1, "$3");$2 *** ScAddress (\w+)\((\d+, \d+, \d+)\);(\s*//.+)? \s*ScPostIt\* \w+ = m_pDoc->GetOrCreateNote\(\w+\); \s*\w+->SetText\(\w+, "(.*)"\); ScAddress $1 = setNote($2, "$4");$3 *** ScAddress (\w+)\((\d+, \d+, \w+)\);(\s*//.+)? \s*ScPostIt\* \w+ = m_pDoc->GetOrCreateNote\(\w+\); \s*\w+->SetText\(\w+, "(.*)"\); setNote($2, "$4");$3 *** m_pDoc->GetNote\(ScAddress\((\d+, \d+, (\d+|\w+))\)\) m_pDoc->GetNote($1) *** "There should be(\s+\w+) note on (\w+) "$2:$1 note *** HasNote\(ScAddress\((\d+, \d+, (\d+|\w+))\)\) HasNote($1) *** ASSERT_DOUBLES_EQUAL\((-?\d+), CPPUNIT_ASSERT_EQUAL($1.0, *** \w+ = m_pDoc->GetString\((\d+, \d+, (\d+|\w+))\); \s*CPPUNIT_ASSERT_EQUAL\(EMPTY_OUSTRING, \w+\); CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString()); *** \w+ = m_pDoc->GetString\((\d+, \d+, (\d+|\w+))\);(\s*//.*)? \s*CPPUNIT_ASSERT_EQUAL_MESSAGE\("(.+)", EMPTY_OUSTRING, \w+\); CPPUNIT_ASSERT_EQUAL_MESSAGE("$4", EMPTY_OUSTRING, m_pDoc->GetString($2));$3 *** fValue = m_pDoc->GetValue\((\d+, \d+, (\d+|\w+))\);(\s*//.*)? \s*ASSERT_DOUBLES_EQUAL_MESSAGE\("(.*)", (-?\d+), fValue\); CPPUNIT_ASSERT_EQUAL_MESSAGE("$4", $5.0, m_pDoc->GetValue($1)); *** fValue = m_pDoc->GetValue\((\d+, \d+, (\d+|\w+))\);(\s*//.*)? \s*CPPUNIT_ASSERT_EQUAL\((-?\d+(\.0)?), fValue\); CPPUNIT_ASSERT_EQUAL($4, m_pDoc->GetValue($1));$3 *** m_pDoc->GetFormula\((\d+, \d+, \w+), \w+\);(\s*//.*)? \s*CPPUNIT_ASSERT_EQUAL_MESSAGE\("(.+)", OUString\("(.+)"\), \w+\); CPPUNIT_ASSERT_EQUAL_MESSAGE("$3", OUString("$4"), getFormula($1)); *** aStr = m_pDoc->GetString\((\d+, \d+, \w+)\);(\s*//.*)? \s*CPPUNIT_ASSERT_EQUAL_MESSAGE\("(.*)", OUString\("(.*)"\), aStr\); CPPUNIT_ASSERT_EQUAL_MESSAGE("$3", OUString("$4"), m_pDoc->GetString($1)); *** m_pDoc->GetNote\((\d+, \d+, (\d+|\w+))\)->GetText\(\) getNote($1) *** Change-Id: I4000b7f89a0bee1d2d52abfd6c1b055470e39d02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117085 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-13Assert on valid order of which ids in ranges on SfxItemSet creationMike Kaganski
This allows to make sure we actually use sorted which ranges, and then it's safe to call SfxItemSet::MergeRange when needed. Also this change relaxes the previous requirement that ranges must be separated by at least one; this allows to have adjacent ranges, like in RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_GRFATR_BEGIN, RES_GRFATR_END-1, where RES_FRMATR_END is equal to RES_GRFATR_BEGIN. Allowing this makes possible to (1) self-document the ranges, so it's clear which ranges are included; and (2) be safe in case when these constants would change, so that the one merged range would not unexpectedly contain everything inserted between RES_FRMATR_END and RES_GRFATR_BEGIN. Change-Id: Iaad0f099b85059b3aa318a347aa7fbd3f6d455c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116909 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-12tdf#128018 - Add column/row labels to the descriptive statisticsAndreas Heinisch
Change-Id: I22840433954a217ef5b5c1d3ea20e935d322e767 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116852 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-06-11Related: tdf#127013 Check loaded separators for validityEike Rathke
... not only if something is present at all. That way future restrictions can reset separators. Change-Id: I738bcb9e052e8dbecb0a6cd07bbae8f4a8ea1c35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117072 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-06-11Resolves: tdf#127013 differentiate non-/array separators and restrictEike Rathke
Change-Id: I9ff6b816b0c7af9081954fa407a4d516a576a338 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117068 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-06-11Simplify vector initializationsJulien Nabet
Change-Id: Icf8972be204799e9b3b3824ab18d8584911fe1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117061 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-11Simplify Sequences initializations (sc)Julien Nabet
Change-Id: I0c581b3a900a6b89c0f4e203310d65600545987f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116929 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-11cid#1473844 Untrusted loop boundCaolán McNamara
and cid#1474351 Untrusted loop bound cid#1474118 Untrusted loop bound this time without second guessing the original intent Change-Id: Iaa6b636a08ed29feaf709fbcbac7deac761a0fc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117045 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-11Resolves: tdf#142758 Revert record parse misunderstandingCaolán McNamara
of 'Related: cid#1474351 Untrusted loop bound' and add in documentation for the records This reverts commit 2134d83b8d6e73ca8eacd812eb3431bff38c74f6. This reverts commit 7c2e6058439da9d061e5e0bbd07c8b6d4f2ffcbf. This reverts commit 3748fe3e4fc22a400b3120010192b75754e38b17. Change-Id: I5b407eb4388a8d67fc863cc6070fbbf8b15321d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117044 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-11tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)
FontworkBar::getState does not need to check for SfxItemState::UNKNOWN at all, actions solely depend on FontWork object being selected. This also greatly simplifies that method. Also, the optimization by passing in a variable to checkForSelectedFontWork and remember if already computed can be removed - also in other places where it had to be given, but was not re-used at all Change-Id: I35b1f36195feb1d645619665d2dd65a84b75b118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-10tdf#136766 Zoom slider in calc print preview has white backgroundNoel Grandin
I cannot figure out any way to make transparent stuff on the toolbar behave under all rendering backends, so just revert this this reverts commit 00cffc20e40b2412c7e9867eed24c9834504e24f Date: Mon Sep 7 13:28:33 2020 +0200 tdf#135181 Calc print preview zoom slider print preview not transparent (gen) commit 444c7c736be7545344298a9cbb3a69886edc5ecb Date: Mon May 18 18:23:13 2020 +0200 tdf#125538 fix background of zoom control Change-Id: I7c351796b2c0778c1520fc8177d05567b2ae8a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-09tdf#139734 remove redundant asserts after loadFromDesktopsarynasser
Change-Id: Ibabb1775ea86a6dd548ee718ed1dede6ffc60be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113898 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-09drop unnecessary pWin arg to InitAccCaolán McNamara
on the only path InitAcc has a non-null pWin arg the caller ctor has already set mpWindow to pWin which is also all that InitAcc does with its pWin arg Change-Id: I668232117be41fd33bf9ca41db882b5124d61ff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-09ScTextWnd is set since the ctor now so drop from InitAccCaolán McNamara
Change-Id: Ia1ccf9393f229d13fde23f2e425ff1cf169ebd9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116922 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
The "INTEGRATION: CWS sheetzoom: #i24372# allow separate zoom per sheet" commits 0846c467a921a27ebd3691e4bc187ece8d0ae7aa (sc/source/ui/inc/viewdata.hxx) and 8d808f64ed32d55adc7af34c3615993ada02f117 (sc/source/ui/view/viewdata.cxx) had moved the aZoomX, aZoomY, aPageZoomX, aPageZoomY data members from ScViewData to ScViewTableData (and added aDefZoomX, aDefZoomY, aDefPageZoomX, aDefPageZoomY data members to ScViewData in their place), and introduced the local variables > Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?) into ScViewData::ReadUserData, so the pre-exisiting assignments to them in that function, which used to assign to the ScViewData data members, now started to do dead assignments to those local variables. (8d808f64ed32d55adc7af34c3615993ada02f117 had similarly added local variables > Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?) to the top of ScViewData::ReadUserDataSequence, but they have already been cleaned away by 305bf19e390aebdf2d20ea052a92f782e8d1185c "loplugin: unused variables".) Change-Id: I0053ba85b3e33fc515cf4724655baa3c5063826d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116818 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-09tdf#141769 ScTextWnd has to be available before the editview is createdCaolán McNamara
Change-Id: Iec3b4180c4dc83723224b7122a1513cb8fe3ea0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116917 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-09Resolves tdf#142513 - Order of ZoomIn and ZoomOut at Print PreviewHeiko Tietze
Change-Id: I630e11bdbf4604b779756a6169e4a777c5baeba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116888 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-06-09unit test: lok: text selection message testDennis Francis
Change-Id: Ie551461e323a2705c5b0b159dd50e8a1eef7d364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116429 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 42b08e239983063e559af8bd249213bba79eee48) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116543 Tested-by: Jenkins
2021-06-09autocomplete: allow cycling through possible matchesDennis Francis
Conflicts: sc/source/ui/app/inputhdl.cxx Change-Id: I4a4b11312f36885d1c6fbe43c4850d55293b2557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115859 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit ccbbd6bac6aaf5691a66a56b82d2592153336191) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116539 Tested-by: Jenkins
2021-06-08editengine-columns: Implement layoutMike Kaganski
This changes the way how different parts access positions of lines and paragraphs. Now there is ImpEditEngine::IterateLineAreas, which performs uniform iteration over all ParaPortions and lines in order, calling a user-provided callback function for each portion and line; it passes all information about current portion, line, area, and column to the callback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08cid#1485887 Unchecked return valueCaolán McNamara
Change-Id: Ie7cf188ef4aa72ea5266b0925363c904b4a7812c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116814 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-08unit test: lok: edit cursor invalidation messageDennis Francis
Conflicts: sc/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: I255e3b637329fc1fb41d24e79a770051ee827162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116428 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit d1a1b8ac3d7eea4b571d8015e31549f39a0b20ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116542 Tested-by: Jenkins
2021-06-07sd: use registerOOXMLNamespaces and registerODFNamespacesXisco Fauli
While at it, fix incorrect r:Relationships with rels:Relationships Change-Id: Ia8e6556b0e7d3839e00936626627471a7a276071 Change-Id: I77f950dabd4d2131256673e517625d31ade9aa76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116800 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-07move remaining copy/paste tests from ucalc to ucalc_copypastescito
MixData test cases test the special paste with operations such as ADD. testCopyPasteMatrixFormula belongs also to the copy/paste tests Change-Id: I2b142b3f95edbc740dd8c8a00de9a00bcf8a22d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116743 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-06UITest: introduce guarded context managersMike Kaganski
They should be used wherever we need to make sure to execute some action in tests regardless of the assertion success. They follow their plain counterparts, and execute finalizing code at all outcomes. This e.g. allows to assert when a dialog is open, and have it properly closed on failure, so that the test is not left in hung state. Only two wrappers are implemented now: load_file and execute_dialog_through_action. sc/qa/uitest/chart/chartLegend.py is updated to use them. Change-Id: Ib9cf44304f0d3ab8fa3377922ed36d2d866031b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116692 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-05Blind fix for sporadically failing UITestsMike Kaganski
Attempting to avoid this problem: ====================================================================== ERROR: test_tracked_changes_acceptall (trackedChanges.CalcTrackedChanges) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:/lo/src/core/sc/qa/uitest/calc_tests4/trackedChanges.py", line 127, in test_tracked_changes_acceptall gridwin = xCalcDoc.getChild("grid_window") uno.com.sun.star.uno.RuntimeException: Could not find child with id: grid_window ====================================================================== ERROR: test_tracked_changes_reject (trackedChanges.CalcTrackedChanges) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:/lo/src/core/sc/qa/uitest/calc_tests4/trackedChanges.py", line 173, in test_tracked_changes_reject gridwin = xCalcDoc.getChild("grid_window") uno.com.sun.star.uno.RuntimeException: Could not find child with id: grid_window ====================================================================== ERROR: test_tracked_changes_rejectall (trackedChanges.CalcTrackedChanges) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:/lo/src/core/sc/qa/uitest/calc_tests4/trackedChanges.py", line 239, in test_tracked_changes_rejectall gridwin = xCalcDoc.getChild("grid_window") uno.com.sun.star.uno.RuntimeException: Could not find child with id: grid_window The problem looks unexpected, since UITest.create_doc_in_start_center waits for "OnNew" event, but who knows... Change-Id: I38207944f0f2fb67cf6e97ee1c220bbd95dc7047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116698 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-04lok: Hide file name from Text Import Dialog (csv)merttumer
Change-Id: Id496ce68030a471ac73556f52bcd808d79d34589 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116173 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116302 Tested-by: Jenkins
2021-06-04loplugin:unusedmethodsNoel Grandin
Change-Id: I79bd2f0eaa7287f0568366ee5627e11a65d2aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116717 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-04uitest: one more fix for File Open dialogXisco Fauli
Similar to 4839b7ca3b5a730edf90ebebc749db145efec098 <Fix UITests that use File Open dialog to load documents> Change-Id: Ia848ba8129c7e99dc8ea610033e5c22809db7b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116723 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-04Fix UITests that use File Open dialog to load documentsMike Kaganski
It relied upon the component being loaded before the next Python code line is executed. OTOH, UITest.load_file uses EventListener to wait for the OnLoad event, which should be reused in all such cases. This moves the waiting code to a dedicated context manager, and modifies UITest.load_file to use it. Respective tests using the File dialog also use the new manager to wrap the action starting the loading process. Change-Id: Ic6eb0533b06e0ccc63dffc2ddc0e91d8159cae4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116693 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-04sc: use XmlTestTools::registerOOXMLNamespaces()Xisco Fauli
after 1ba1bb1cacdc8825d01559859100a2b575967e55 <test: introduce XmlTestTools::registerOOXMLNamespaces() to reduce copy&paste> Change-Id: I5f8fcb977233c30bae74e7cc9fde45d41a523b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116686 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-04tdf#68976 fix paste transposed regression for notes/patternsscito
Starting position was not correctly taken into account for notes/patterns in the initial fix. It worked only for source range starting in A1 (0/0), i.e. a special case. The unit tests tested only this special case. The unit tests are generalized: Starting in B2 instead of A1, i.e. the source range was shifted. The paste destination results remain the same, except absolute references. Change-Id: I2f7bfa9e559d99b173ff833fed3cff21658e0e31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116501 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-06-04tdf#141683 fix missing flag in multi sel pasted transposed as linksscito
For transpose, the links for option 'as links' will be set during TransposeClip(). Thus, formulas will be created. So, the formula flag must be set for subsequent copying to the document. This flag must be set in the multi range selection code path for transposed as links. I've adapted the tests. Unfortunately, this fix cannot be tested directly with automatic tests. However, the same behavior is applied in the unit tests. Change-Id: Ia16a8371894a784fc7fcfa1c7b5242f552bef956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116332 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>