summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2022-10-22loplugin:unusedmethodsNoel Grandin
Change-Id: I3c94d68cb85adc2005a5a5e3b03a311732f782c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-21test: merge CalcUnoApiTest and UnoApiTest into oneXisco Fauli
Change-Id: I24ec4c2c1c6d83865ef78a6460cde68cef84fdb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141638 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21CalcUnoApiTest: work with mxComponent directlyXisco Fauli
Change-Id: If6f2104ef3136952341c9d5d59a1f9784d0fe4b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141628 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21sc: remove unused methodXisco Fauli
Change-Id: I4e98ff61d5b592df970595b7aad551a9e37b93df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141615 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21sc: remove SetIsInUcalc.Xisco Fauli
it seems it's no longer needed Change-Id: I346a12a150659ddde218a895d140c9087989d516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141613 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer typesOmkarAcharekar
Change-Id: Iebd876c8c7dd5576cdd457a24726d99790befa83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141516 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-20CppunitTest_sc_pdf_export: inherit from CalcUnoApiTestXisco Fauli
in order to get rid of setUp/tearDown Change-Id: I94dcb647760c71ec8bfc2bbdf50361d81f586eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141566 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-20CalcUnoApiTest: factor out common codeXisco Fauli
Change-Id: I1a56f152d6c6e6bca55ef20d0d52da2d82b77a8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141565 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-20CppunitTest_sc_uicalc: inherit from CalcUnoApiTestXisco Fauli
so we can get rid of duplicated code in follow-up commits Change-Id: Ibfe0c25ac9aaabb20ae28008e6156f80122bc898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141564 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-20Use stable_sort for collator-backed sortingStephan Bergmann
...where ScTypeStrData::LessCase(In)sensitive is implemented in terms of ScGlobal::Get(Case)Collator().compareString. And that apparently implements only a strict weak ordering (in the C++ Standard's meaning of the term) rather than a strict total ordering (i.e., sorts different strings into equivalence classes, e.g., ScGlobal::GetCollator().compareString("guet", "guͤt") returns 0). With a randomizing debug-mode libc++, tests recently added to UITest_autofilter failed for me with > FAIL: test_tdf123095 (autofilterBugs.autofilter) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sc/qa/uitest/autofilter/autofilterBugs.py", line 45, in test_tdf123095 > self.assertEqual(get_state_as_dict(xTreeList.getChild("0"))["Text"], "乙二醇(进口料件)") > AssertionError: '乙二醇(进口料件)' != '乙二醇(进口料件)' > - 乙二醇(进口料件) > ? ^ ^ > + 乙二醇(进口料件) > ? ^ ^ when _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED is e.g. 140434132192856 and > FAIL: test_tdf125363 (autofilterBugs.autofilter) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sc/qa/uitest/autofilter/autofilterBugs.py", line 69, in test_tdf125363 > self.assertEqual(get_state_as_dict(xTreeList.getChild("0"))["Text"], "guet") > AssertionError: 'guͤt' != 'guet' > - guͤt > ? ^ > + guet > ? ^ when _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED is e.g. 139927542230616. (Those tests only required the !bCaseSens case to be stable_sort'ed, but it looks plausible that the bCaseSens case would suffer from the same issue, so lets stable_sort that one too.) Change-Id: I860ae7b58f09c85da82fca99a2962f12d70d2202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141548 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-19sc: factor out common code in testsXisco Fauli
Change-Id: I58558dd87f235bf3699f3f65271522bb1e7a2ea0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141529 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-18CppunitTest_sc_anchor_test: inherit from ScBootstrapFixtureXisco Fauli
so we can get rid of duplicated code Change-Id: I8e19489f4f3643239d43f83f71fa4c9668d77e54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141506 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-18CppunitTest_sc_anchor_test: move to slowcheckXisco Fauli
so Jenkins executes it in all platforms also move it out of 'extra' folder so we can change the inheritance to ScBootstrapFixture in a follow-up commit Change-Id: I06cb594b7f13ece2eb71c2099b6119861b4674ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141504 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-18tdf#131910 speed up chart displayNoel Grandin
the chart2 module likes cloning ScChart2DataSequence, which can take a long time if we have lots of data, so share the data via shared_ptr Change-Id: I4b0948610810c41a8569b97c58b2b52e8e3190f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-18sc: Add new wrapper for these testsXisco Fauli
Change-Id: Idfa3dc085a944fb8ffe5819b08ba9a264d58900b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-18tdf#147842 shrink selection to data area when applying to entire sheetNoel Grandin
This takes the time to apply the formating from "who knows how long" to about 500ms on my machine. Change-Id: I202d023c58ea191bf080ef3a85068e8acab52dec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141463 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-18Remove scfobj.hxxAndrea Gelmini
It's never included. It passed "make check" on Linux. Change-Id: I1a58f36b081d85ad18c2794120f3a343b30f0ac8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141476 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-18Remove helperdecl.hxxAndrea Gelmini
It's never included. It passed "make check" on Linux. Change-Id: Iadcc59130374ae318fff5dd1674d59c2906cedd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141477 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-17ScBootstrapFixture: m_xCalcComponent can be private nowXisco Fauli
Change-Id: Icc505f61f3df0736d33ffe7d5702dffc42dd1d79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141475 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17ScBootstrapFixture: factor out setUpXisco Fauli
Change-Id: Ib1549e14b849786abe3a038ac8542c6a8ec1f11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141473 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17ScBootstrapFixture: factor out tearDownXisco Fauli
Change-Id: I3dbced70b7341807451d66d8e70ed61edb44592b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141464 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17tdf#148017 harmonize sidebar .ui filesandreas kainz
Change-Id: Ia5139f7255ba0e78f7089a4313a41d583ae62961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141275 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-10-17CppunitTest_sc_parallelism: inherit from BootstrapFixtureXisco Fauli
no need to inherit from ScBootstrapFixture, this class doesn't use anything from there Change-Id: Ib3d2bfa2161c05a838d1c7a554a3d3e670e9c4a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141465 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17CppunitTest_sc_dataprovider: Adapt setUp/tearDownXisco Fauli
to follow what the rest of ScBootstrapFixture tests do Change-Id: I9e3df8a53ee2b2d56dcc822a783a9f19a531b791 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141461 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17CppunitTest_sc_datatransformation: inherit from BootstrapFixtureXisco Fauli
no need to inherit from ScBootstrapFixture, this class doesn't use anything from there Change-Id: Id3cf385c6ff1d94bfe93b855780e70a4d8e8d0a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141453 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17CppunitTest_sc_range_test: combine both classes togetherXisco Fauli
it helps to reduce duplicated code Change-Id: Ia6769d6fc91bc2315903e2cce69e7187ee362f5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141454 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17CalcUnoApiTest: factor out tearDownXisco Fauli
Change-Id: Iae1ae76c1903ff3155da2dd407f1237c29f91840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141375 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17ScBootstrapFixture: Move m_xCalcComponent to parent and use it everywhereXisco Fauli
Change-Id: I3422f907cd4ce30f0243eb28847e503446b60b86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141452 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-17tdf#132293 remove unused imports and variablesRakielle
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-14CalcUnoApiTest: Move mxComponent to parent and use it everywhereXisco Fauli
Change-Id: Ibea7a300b7f302936f872d7133aadafeb13d6d82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141350 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-14sc: inherit from CalcUnoApiTest instead of UnoApiTestXisco Fauli
like the rest of tests in sc Change-Id: I15979c6279cf9af6953f661ed8dd2f5a60f1b988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141349 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-14sc: add tearDown to these test classesXisco Fauli
Same as the rest of CalcUnoApiTest tests Change-Id: I55294231fd11fd31ed6f57459b2f0292ddb23635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141358 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-14CppunitTest_sc_vba_macro_test: Do not test specific file on WindowsXisco Fauli
tb39 fails now with C:/cygwin64/home/tdf/lode/jenkins/workspace/gerrit_windows/sc/qa/extras/vba-macro-test.cxx(605) : error : Assertion Test name: VBAMacroTest::testVba equality assertion failed - Expected: OK - Actual : Test Results ============ Failed: : Test change event for Range.Clear set: Failed: : Test change event for Range.ClearContents set: Failed: : Test change event for Range.Replace: Failed: : Test change event for Range.FillRight: Tests passed: 4 Tests failed: 4 - script reported failure in file Ranges-3.xls Change-Id: If226dfc201f124712abeec422cf79a675d25b9fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141365 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-14CppunitTest_sc_shapetest: use member XComponentXisco Fauli
Change-Id: If881b238991cfce8d866edd662fb6eb70c8f29a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141336 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-13tdf#150473 Wrap text and set min size for Function descriptionRafael Lima
This patch does the following changes to the Functions sidebar in Calc: 1) The function description now uses a TextView instead of a Label so that the text can now wrap. This is important because many descriptions are long and require more than a single line of text. 2) The minimum size of the description TextView is set to 6 lines of text. Because there's no easy way to set this minimum size (since it is inside a Slider control), then the following rule was applied. - If the user resizes the slider to less than 6 rows (in this case, moves it down), the next time a new function is clicked the slider is positioned so that 6 lines of text become visible. - Moving the slider up, thus giving more space to the description view is still allowed as prior to this patch. Change-Id: I52dfa8bef52b645fdce379408e6b790f6e8e5dea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140507 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-10-13CppunitTest_sc_macros_test: improve setup/teardownXisco Fauli
Similar to 8b4ac8c35d5e4efe3c0b83e15543a35213e786f2 "improve setup/teardown handling in VBAMacrosTest" Change-Id: I34b64a72f6cab1f85e6e2628b6fd07f408f62cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141302 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-13tdf#124098: sc, ods import: do not recalculate row heightsBalazs Varga
if we have already optimal heights in the xml, because it is not necessary and it takes a lot of time loading a file. Citing here for completeness: a) if there is no height attribute and the "use_optimal-row-height" attribute is set then calculate the row height b) if there is a height attribute just use it and do not recalculate. Maybe TODO for later: optimize row height calculation more in sc Change-Id: I9d964aad744970e5d36f239c0ce39ce98c00f273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141204 Tested-by: Jenkins Tested-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2022-10-13tdf#150664 Initialize input line correctlySamuel Mehrbrodt
Initialize code was not called when xlsx file was loaded (line count is only stored in ods format). Change-Id: I5b01f6079921af77ffd6da09ae5d5388b8beff1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141281 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-10-13tdf#125363, tdf#123095 - Use CaseTransliteration for autofilterAndreas Heinisch
Change-Id: Ib6f1edebe26a69d3316a901e00d2bc6e0c66695f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141047 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-10-12sc: remove duplicated testXisco Fauli
This is already well covered by Test::testAutoFill in sc/qa/unit/ucalc.cxx Change-Id: I5d539de101e1b4dcd19191ac40d2bc0734475889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141272 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-12sc: move UItest to CppUnittestXisco Fauli
Change-Id: I6543994abe337041de5a1aab16a5a49105aacfbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141271 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-12tdf#151460: sc_ucalc: Add unittestXisco Fauli
Change-Id: Ib0c8d09da50a09b2715a946a1955eb5a09d83d62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141269 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-12sc: qa: avoid OUStringChar for better readabilityXisco Fauli
Change-Id: Idf730e05d2ebec9003a2a4700b43b8658d858b03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141265 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-12tdf#60673: sc_subsequent_filters_test2: Add unittestXisco Fauli
Change-Id: Ia36507483e5dc325431b17e9374882ae8102bfb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141263 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-12crashtesting: exception during dtorCaolán McNamara
Change-Id: I9874778ba79540cfde32bf59c3a63ebb72889dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141215 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-11tdf#91305 related: Drop redundant only-one-column/row checkMike Kaganski
This check was introduced in commit 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92 Author Yan Pashkovsky <yanp.bugz@gmail.com> Date Fri Aug 12 23:39:30 2016 +0300 tdf#91305 fix sort calc Then commit 63592999a067d76c896ed79204330e1a4b934c80 Author Eike Rathke <erack@redhat.com> Date Thu Aug 18 17:16:50 2016 +0200 refine HasColHeader()/HasRowHeader() conditions, tdf#91305 related made the "not only one column/row" case check the same. Change-Id: I25ce867e1c64d7b89a617021de9a5e4f1c89d2a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141219 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11Resolves: tdf#151460 Scale and round time diff fiddling with floating pointEike Rathke
Change-Id: I5cf4e16692d55f30cc06723a323b4cd0408aaab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141216 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-10improve setup/teardown handling in VBAMacrosTestNoel Grandin
do the same thing that the other UnoApiTest subclasses are doing, seems to fix the problem for me Change-Id: I0d5288b638a5c8d6994fae5ae5d99f2f29bcf377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-09tdf#151429: don't convert OUStrings to system encodingMike Kaganski
... just to convert back to OUString in the end. Change-Id: I727d5e4c03d1a49f64bd5ca3d64157a9149cd9ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141125 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>