summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2018-06-11new loplugin:shouldreturnboolNoel Grandin
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-10uitest for bug tdf#83901Zdeněk Crhonek
Change-Id: I7a718dd1cedb71e3c7430936a0f5b855af18090b Reviewed-on: https://gerrit.libreoffice.org/55563 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-10uitest for bug tdf#117522Zdeněk Crhonek
Change-Id: I02f0dfc9d6bb1cced1304db7e645b94413cff626 Reviewed-on: https://gerrit.libreoffice.org/55561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-09adding some fuzz to row height tolerance testsThorsten Behrens
Expanding on a4ab0c08e74746a96dcf23c3d50cd2e65ee31342 there's another test that on some tinderboxes was a few permille off. Adding 1% fuzz in comparison, seems we've now aquired some font layout instabilities across platforms. Change-Id: I7b068105c6ffad44b055e4dc37deb03c6040ab09 Reviewed-on: https://gerrit.libreoffice.org/55509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-09Fix typosAndrea Gelmini
Change-Id: Icc2923f023ec4e3219d1641f8c9d983c526bd0a8 Reviewed-on: https://gerrit.libreoffice.org/54811 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-09uitest Calc - statistics - samplingZdeněk Crhonek
Change-Id: I6339cab59ea26ad624237f6bd2e001ff7e01ac51 Reviewed-on: https://gerrit.libreoffice.org/55495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-09remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"(Noel Grandin
Possibly this was useful once upon a time, but now it's just noise. If it failed, we're going to crash on the next line when we call a method on that pointer anyway. Change-Id: Ic601f0c3344f6895f8a6ffb3bc6f8bcb45d00a92 Reviewed-on: https://gerrit.libreoffice.org/55082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-09delete space in string in Calc-Statistics-Descriptive StatisticsZdeněk Crhonek
Change-Id: Ib3a40744a08befc09c6ae37a75ab38a4c7f2334d Reviewed-on: https://gerrit.libreoffice.org/55494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-06-09properly go to next row when walking mdds containerLuboš Luňák
Since only elements from nOffset up to nEnd are iterated, then the difference is not just nEnd but (nEnd-nOffset). Without this, ScColumn::HandleRefArrayForParallelism() skips some cells and e.g. fdo#77750-1 asserts in ScFormulaCell::MaybeInterpret(). Change-Id: I4d595e9faff51f08bf074d549185c24aa00d8a45 Reviewed-on: https://gerrit.libreoffice.org/55488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2018-06-08Row height tolerance level increase for unittestVasily Melenchuk
Changes in tests done in 1e55a47e89a9d9d6cf9cb3993484022aaf2c097b have issues on Mac machines and row height after recalculation produces somewhat different results there making exact comparison fail. Change-Id: Ie5813c75116374437625e693f2e407f3b6cf58d1 Reviewed-on: https://gerrit.libreoffice.org/55454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-08tdf#62268: allow row height recalculation on document loadVasily Melenchuk
During document load rows with style:use-optimal-row-height="true" should recalculate it's height. Change-Id: Ib38b5b753d9ff8352116d77851d228c5d77bd530 Reviewed-on: https://gerrit.libreoffice.org/52521 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-07lok: sc: scroll issueMarco Cecchetti
Problem: users A and B open the same empty document, and the initial document height is the same for both views, say 100 rows; user A goes to row 1000 and enters some text user B is not able to scroll below row 100 Change-Id: I68efe03473c6f82d68182a951034d2e95ffa7765 Reviewed-on: https://gerrit.libreoffice.org/53996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2018-06-07sc: A putative micro optimization of MEDIAN() for even-length arraysTakeshi Abe
As the previous run of std::nth_element() already collects all of smaller elements than the upper median into the first half of the vector (which may also contain an equal one to the upper median, that's OK), we can safely ignore the later half for finding the lower median. Change-Id: I64c97ee03b02ea363399077244dd99d0d10defcb Reviewed-on: https://gerrit.libreoffice.org/55370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-06-06blacklist ocExternal for calc's threaded calculationsLuboš Luňák
Opcode ocExternal is used for functions implemented as UNO calls, which has a number of problems: - ooo#118213-2 contains GETEOMONTH(), which maps to ocExternal, which calls AnalysisAddIn::getEomonth() in scaddins, which ends up calling ScModelObj::getPropertyValue(), which deadlocks on SolarMutex - it uses ScUnoAddInCollection class, which uses delayed initialization (even though it's created on-demand), which is not thread-safe; however, it seems that the initialization is generally done already while loading a file, so this is possibly in practice safe - who knows what all kinds of race conditions there are in all the functions this may call via UNO Change-Id: I80c4264102b8bc492853852c2c12e5cd2a8ea99e Reviewed-on: https://gerrit.libreoffice.org/55382 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-06tdf#116552 restore copy on focus and jump focus to sourceCaolán McNamara
This is surely an utter abuse of focus and an a11y disaster, but it used to work this way. Change-Id: I265a2bafbc2cdd17ff4a5b7c2805def63c510d5c Reviewed-on: https://gerrit.libreoffice.org/55373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-06Translate German comments and debug stringsJohnny_M
And correct a few comments (translation and grammar) Change-Id: Ifafa521c683e9ca65aeba8031cd4cbfc1fadc137 Reviewed-on: https://gerrit.libreoffice.org/54888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-06fix broken control flow in ScTokenArray::CheckToken()Luboš Luňák
Before commit b366adcf5aca this function didn't do anything for unhandled opcodes, but the commit made the else branch disable vectorization for "the rest" of opcodes. That meant that basic opcodes such as ocAdd, which didn't get thrown out by the SC_OPCODE_START_BIN_OP block (since they are in the allowed subset), ended up in the else block and vectorization got disabled. Change-Id: I9eb408b601f48b8d7b5022ec85225d92729cd778 Reviewed-on: https://gerrit.libreoffice.org/55362 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-06fix misplaced case labelsLuboš Luňák
Jump opcodes such as ocIf are quite clearly not in the function range, as can be seen in include/formula/opcode.hxx . This used to be harmless, since originally ScTokenArray::CheckToken() didn't do anything in the default case, but commit b366adcf5aca changed it to disable vectorization for unhandled opcodes. Change-Id: Ia182f446f1da819e18309075aa00251674640c74 Reviewed-on: https://gerrit.libreoffice.org/55361 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-06tdf#42949 Fix IWYU warnings in sc/inc/[a,c]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Quite a bit of fallout management was necessary. Several files were not checked earlier because of IWYU problems. Also a few mistaken entries from the yaml file are corrected. Change-Id: I943dfb955e096896961ac487d26ce57a6cb76cc2 Reviewed-on: https://gerrit.libreoffice.org/55303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05Remove superfluous temporary rExtendRangeEike Rathke
... and rename temporary rCurrentRange to aCurrentRange. Change-Id: I423d3c4ea018ec210cf4a59eb284cc6c5f2e8986
2018-06-05Resolves: tdf#117372 preserve preselected sort area, if so, then extend or notEike Rathke
Previously if an entire column was selected, the top data row was taken and then that X,Y position used to extend to the data area. Else the current view's X,Y was used to extend to the data area. Now keep a selection and use current X,Y only if there is no area selected. Change-Id: I19ce52bc2ebf4813b779600a4738ed1f82643aa7 Reviewed-on: https://gerrit.libreoffice.org/55348 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-05sc: Stop pushing an extra errorTakeshi Abe
as MustHaveParamCount() already does it when returning false. Change-Id: Ia4f8998a2f65eea5e6be3fd21b5ca724d13770d0 Reviewed-on: https://gerrit.libreoffice.org/55265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-06-05Add "Unsupported inline array content." BadArrayContent message, tdf#117879Eike Rathke
Change-Id: I176884ea5161c4f12419431a74bfb2c6fbed4e0f Reviewed-on: https://gerrit.libreoffice.org/55317 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-05Fixes svg vs. png issue for some iconsheiko tietze
Change-Id: Ia2c4a6a2888ef223655a61cf8ace11276739615f Reviewed-on: https://gerrit.libreoffice.org/55312 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05Append error number if no message availableEike Rathke
"Err:###" instead of just "Err:" in the status bar for default unspecific message. Change-Id: Ic1a07e29e1f5eed4ce1ed9300c1f848c7380002e
2018-06-05loplugin:includeform (`make perfcheck`)Stephan Bergmann
Change-Id: Ibbac74cdbc25ffb0a922d602000ae716adf2fd9b
2018-06-05Adapt `make perfcheck`Stephan Bergmann
...to 7d275e3ab35b3f9bfd7ff16290393ca027c50355 "Implement NewWorkbook and WorkbookOpen Automation callbacks in Calc" Change-Id: I1ae8c3873a4832e2b4e9fdc43506b1a5e98d9dd4
2018-06-05Resolves: tdf#117879 preserve formula after inline array errorEike Rathke
Use FormulaError::NestedArray for now to be able to backport without new string resources. Introduce a more specific error in another change. Change-Id: I49bf731f0b17c81dc6a125718bf104e218e508cc Reviewed-on: https://gerrit.libreoffice.org/55300 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-06-04uitest for bug tdf#77509Zdeněk Crhonek
Change-Id: Ide912b1c3323520a0d83a5e505fba1ff87fa694a Reviewed-on: https://gerrit.libreoffice.org/55291 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-04uitest / Calc consolidate;one more testZdeněk Crhonek
Change-Id: I6b04b943bb5a62e35a7dd0dc8749652312488435 Reviewed-on: https://gerrit.libreoffice.org/55253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-04tdf#114487 sc htmlimp: rangeNames should be 3DJustin Luth
Without a visible sheet name, these absolute ranges become relative after a round-trip. Another way to handle this would be to ensure that ODS (and other text-based formats) export Absolute in a way that can be properly imported. But handling it on import is safer and ensures UI consistency. The InitRange default is for !IsFlag3D and !IsTabRel(). Since the range already imports as absolute, just add the appropriate 3D flags. Change-Id: Ia664e6f87e235096e1c2e5b702e18505e375e2ad Reviewed-on: https://gerrit.libreoffice.org/54725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-06-04loplugin:unreffunStephan Bergmann
...since 25d6789e0e7949fa2e7441eeeb0f6e9cf701dbed "sc: disable test that fails on Windows" Change-Id: I730495fe9b6d648c75a374b2cd15024e56c85126
2018-06-04Adapt CppunitTest_sc_screenshotsStephan Bergmann
...to 7d275e3ab35b3f9bfd7ff16290393ca027c50355 "Implement NewWorkbook and WorkbookOpen Automation callbacks in Calc" Change-Id: Ic12e1cc162411dd31862bee3c710791925b6308e
2018-06-04make CreateStyleFamilies return std::unique_ptrNoel Grandin
Change-Id: Ibb7bec9ede8045a6cea42c02f61f14ad36d2b434 Reviewed-on: https://gerrit.libreoffice.org/53730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-04tdf#42949 Fix IWYU warnings in sc/inc/r*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here and a bit of fallout management Change-Id: I5dd272c6c5fa305113f4446ed49c130c6c007146 Reviewed-on: https://gerrit.libreoffice.org/55096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-03sc: prefix members of ScDocShellHenry Castro
Change-Id: I7c2a4e5e850b26da515719f7df869f12c49b0ad3 Reviewed-on: https://gerrit.libreoffice.org/55148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-06-02add mutex protection to more ScGlobal functionsLuboš Luňák
Similarly to ScGlobal::Get(Case)Collator(), these also may be called by multiple threads. Change-Id: If0b1f2669282354ce79cdd251698f3aa1c6a30d4 Reviewed-on: https://gerrit.libreoffice.org/54798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-02uitest - Calc consolidateZdeněk Crhonek
Change-Id: I2d38570f6dbd6046dacbbc9aa1eb9dac657c4f1c Reviewed-on: https://gerrit.libreoffice.org/55213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-02fix memory leak in double-checked initLuboš Luňák
The pointer indeed shouldn't be just a local argument but a reference to the global variable, otherwise just the argument gets set. Change-Id: Ib7060943b089336b409d4861540a861ca2793cde Reviewed-on: https://gerrit.libreoffice.org/55209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-02Removed executable permission on data filesAndrea Gelmini
chmod -x for odp, ods and so on Change-Id: I74397d9b8e24575130d2776ed90f4cfc13e1f03c Reviewed-on: https://gerrit.libreoffice.org/52570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01Fix typosAndrea Gelmini
Change-Id: Icc6fd609d3e57277822c4de76bd3baf4b1900840 Reviewed-on: https://gerrit.libreoffice.org/55176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-01UITest_calc_tests: split this into 4 partsMiklos Vajna
Before: make -sr UITest_calc_tests -> 10m48.934s After: make -sr -j4 UITest_calc_tests UITest_calc_tests2 UITest_calc_tests3 UITest_calc_tests4 -> 5m40.113s As a start just split based on the number of .py files in the directories, one could improve this further by making them even more equal based on number of lines or something. Change-Id: I7a98a29e5d18a7600575956a7d8a0ec81e804269 Reviewed-on: https://gerrit.libreoffice.org/55174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-01ofz#6440 timeout during fuzzingCaolán McNamara
Change-Id: I720c64b9bb14cee33ffab5547a7353e83f23a14c Reviewed-on: https://gerrit.libreoffice.org/55147 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-01tdf#87995 Missing setting for save thumbnail in settings.xml.Ilhan Yesil
If the user unchecks "Save preview picture with this document" in the dialog field and saves the document, the appropriate flag is now written to settings.xml by introducing the setting named "SaveThumbnail". Change-Id: I4916b4149a9494dd1891c0e05cb9a985ba0a9121 Reviewed-on: https://gerrit.libreoffice.org/52768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-31sc: disable test that fails on WindowsHenry Castro
reference "Daily Screenshot Build on Windows - Build # 410 - Failure!" https://ci.libreoffice.org/job/lo_tb_master_win_screenshot/410/ Change-Id: I4fe6b46e7c2a7a1904ffb86dd68d689f7ada9def
2018-05-31move related functions next to each otherLuboš Luňák
And remove a pointless assert (the object is now created on demand). Change-Id: Ib42164b57216499e53ebc4ed5d1bc270055db2e7 Reviewed-on: https://gerrit.libreoffice.org/55046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-31assert(!bThreadedGroupCalcInProgress) in ScGlobal get-or-create functionsLuboš Luňák
Similarly to ScGlobal::Get(Case)Collator() these could possibly lead to a race condition of several singleton creations at the same time. That doesn't seem to be the case after few tests, but better check. Change-Id: I1edb613b5e034fcc952a43afc91f1d7288028861 Reviewed-on: https://gerrit.libreoffice.org/54797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>