summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2019-03-09loplugin:unusedfieldsNoel Grandin
Change-Id: Ifb2c9a2d1d7dcc0ed3e8458c1a13933ccababd4c Reviewed-on: https://gerrit.libreoffice.org/68939 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unusedmethodsNoel Grandin
Change-Id: I242f56f2bc5dc8fce6db1ba8f1f8269da4fec0fa Reviewed-on: https://gerrit.libreoffice.org/68938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09tdf#45904 Move XRefreshable Java tests to C++Jens Carl
Move XRefreshable Java tests to C++ for ScAreaLinkObj. To make this test work, had to provide parameter aSourceArea (in this case file sc/qa/extras/testdocuments/scarealinkobj.ods). All the other depended tests of ScAreaLinkObj had to adjusted to the new test environment. Also fixes i84711, because the XRefreshable test runs independent from the other tests, as mentioned in the bug description. Change-Id: I8847813431e2fdd60ed95be0f7d115bcaeafe500 Reviewed-on: https://gerrit.libreoffice.org/68949 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-09Resolves: tdf#123714 tdf#123736 all split formula groups; tdf#120013 relatedEike Rathke
Add all split shared formula groups to regrouping and mark for listening, even if the references had not be to adjusted. This partly also resolves tdf#120013 but there's more to that, a remaining partial group is not updated. Change-Id: If6d1fef7e545017232a1b7e29b4d60dd58775e88 Reviewed-on: https://gerrit.libreoffice.org/68951 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-03-08tdf#45904 Move XPropertySet Java tests to C++Jens Carl
Move XPropertySet Java tests to C++ for ScAreaLinkObj. Change-Id: I4b0ef0870d2ac3aac474df2e8c7114470e0128e8 Reviewed-on: https://gerrit.libreoffice.org/68948 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-08set empty text for GtkMenuButtons which will later have textCaolán McNamara
Change-Id: Ib08cca8faf2822e5a62f745c4213cf0ca2cc09d7 Reviewed-on: https://gerrit.libreoffice.org/68923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-08Use std::set::count instead of std::set::find + iterator comparisonMike Kaganski
std::set::contains from C++20 is not here yet :-) Change-Id: I50b5db2d44cb0effa64ab89a16205145883ce374 Reviewed-on: https://gerrit.libreoffice.org/68922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-08tdf#123939: string and error are same type for pivot cache in XLSXMike Kaganski
Change-Id: Id39d322661f7537e8999acafee655c0cc16a78c1 Reviewed-on: https://gerrit.libreoffice.org/68911 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-08tdf#123923: make COUNTIF propagate errors in its first parameterMike Kaganski
In a specific case, Err:504 was emitted by COUNTIF when its 1st parameter was #REF!. This value was written into pivot cache definition when exporting to XLSX. Clearly Excel only expected propagated #REF! there, emitted error to user, and dropped the pivot table. This problem made XLSX pivot table cache generated by Calc unusable by Excel, despite ECMA-376 Part 1, 18.10.1.27 tells that the error value is application-dependent. The change makes COUNTIF to propagate errors received in its 1st parameter, instead of owerwriting them with own Err:504. This will likely need to be extended to other functions, if similar problems would arise. Change-Id: I459fa163a0e3e5f2c658631d66e096f4d46b1ace Reviewed-on: https://gerrit.libreoffice.org/68868 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-08new loplugin constvarsNoel Grandin
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-08tdf#45904 Move XNamed Java tests to C++Jens Carl
Move XNamed Java tests to C++ for ScDataPilotItemObj. Change-Id: I2fcffbd7e7329357ac30fa14716bf2bcf49c5666 Reviewed-on: https://gerrit.libreoffice.org/68891 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-07Correct and improve test set up of ScDataPilotItemObjJens Carl
Change-Id: I65fb4a444e7e072004adcc9f9ad7af77a3f9f919 Reviewed-on: https://gerrit.libreoffice.org/68888 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-07Prefix variable nMaxFieldIndexJens Carl
Prefix variable nMaxFieldIndex with m_ to show it's a data member of the class. Change-Id: I207b3552f460b3433af6892abb6c4693e990d7bb Reviewed-on: https://gerrit.libreoffice.org/68887 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-07tdf#42949 Fix IWYU warnings in include/basic/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dd7984affc4343f148c66077feaac19176adf51 Reviewed-on: https://gerrit.libreoffice.org/68769 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06Add XServiceInfo tests to ScDataPilotFieldObjJens Carl
Change-Id: I7de8902b6857782acb5d2b3566d5768481baab51 Reviewed-on: https://gerrit.libreoffice.org/68824 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-06Move variable nMaxFieldIndex out of namespaceJens Carl
Change-Id: I9396abb722b24d8ee6b2d5f8fccac140a1014436 Reviewed-on: https://gerrit.libreoffice.org/68784 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-06Simplify Sequence constructionStephan Bergmann
Change-Id: I52ea31734f7765176e20514c5d02cb3ee5928cdb Reviewed-on: https://gerrit.libreoffice.org/68812 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-06hookup MenuButton::SetDropDown to GtkMenuButton draw-indicatorCaolán McNamara
Change-Id: I556d61256bed8f607eed5a9c6e0ed3fcfd63af2c Reviewed-on: https://gerrit.libreoffice.org/68802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06tdf#45904 Move XPropertySet Java tests to C++Jens Carl
Move XPropertySet Java tests to C++ for ScDataPilotFieldObj. Change-Id: I9fa5d153cced1aae8892d2422025dfcdcda73c69 Reviewed-on: https://gerrit.libreoffice.org/68782 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-06tdf#45904 Move XNamed Java tests to C++Jens Carl
Move XNamed Java tests to C++ for ScDataPilotFieldObj. Change-Id: Ieecd8799f56dcfa9279d4d523d470a62d9aed203 Reviewed-on: https://gerrit.libreoffice.org/68781 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-06Remove unnecessary calls to Reference::is() after an UNO_QUERY_THROWJens Carl
Change-Id: Icb5ab21168e91951a81c09752e7b53e11813aa1b Reviewed-on: https://gerrit.libreoffice.org/68780 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-06do not access uninitialized values when printing (tdf#121439)Luboš Luňák
The assert in the bugreport is triggered by ScPrintFunc::CalcPages() passing uninitialized values of nEndRow (and others). These variables apparently get initialized only by constructors that take ScPrintState. These ctors also set (the somewhat poorly named) bState and the call to CalcPages() is guarded by this. However, GetPrintState() will simply create ScPrintState filled with these uninitialized values and later on this will be used with these ctors, so bState will be set, but nEndRow will be bogus. Although 5217a2a0bf27e496cc429ee45dff7c239b466ae6 introduced tdf#121439, this strange bState logic and unitialized variables has been these since the initial commit, and the code doesn't take any precautions to check whether the values are valid or not, so I assume this always was just lucky enough to work and 5217a2a0bf finally triggered a problem. Given that it's rather unclear to me how this is supposed to work properly, just add an extra flag to both ScPrintFunc and ScPrintState marking whether the values are set or not and make CalcPages() depends on this flag instead. Change-Id: I0620de6562865c24f5a0edca2566b01546bf2e2b Reviewed-on: https://gerrit.libreoffice.org/68739 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2019-03-05Use already available index in following getToken callMatteo Casalin
Change-Id: I1617af942d59c59039e97400a8c39bbc36c3bceb Reviewed-on: https://gerrit.libreoffice.org/68124 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Use indexed getToken()Matteo Casalin
Change-Id: I3f34ccb4253c587088f621f914b315e56f96008f Reviewed-on: https://gerrit.libreoffice.org/68123 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Simplify ShapeAnchor::importVmlAnchorMatteo Casalin
Change-Id: Ibee7914a0c5027b4679163e6a5108f646ad66546 Reviewed-on: https://gerrit.libreoffice.org/68122 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Index returned by getToken is always lower than string lengthMatteo Casalin
Change-Id: I7de7a3eaf7b4ae6ef97b0c23fb755ad108db19e6 Reviewed-on: https://gerrit.libreoffice.org/68118 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Index returned by getToken is always lower than string lengthMatteo Casalin
Also take care of handling possibly empty strings, for which the initial 0 index would fail the comparison. Change-Id: I280fac697554f2a4513a641ac258b1d2baf803f4 Reviewed-on: https://gerrit.libreoffice.org/68117 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Index is not needed for single getToken callMatteo Casalin
Change-Id: I46d466c0526797e5c246dea3c68a6b2f865964e0 Reviewed-on: https://gerrit.libreoffice.org/68116 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Introduce o3tl::underlyingEnumValueStephan Bergmann
Change-Id: I6554eb86326159b0da707539f45c411f61c0f3de Reviewed-on: https://gerrit.libreoffice.org/68761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05fix ScDetOpList::operator==Noel Grandin
should be comparing the values of the elements, not the pointers. Regression from commit 927447356fb7025d2b61073f525adc24643c7925 Date: Sat Sep 12 16:49:29 2015 -0600 replace boost::ptr_container with std::container<std::unique_ptr> noticed while doing some other plugin work Change-Id: I96230e52571e9a96e1c96f53f61bbc5afe902b31 Reviewed-on: https://gerrit.libreoffice.org/68738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Add missing DoCloseAurimas Fišeras
Change-Id: I7c6f055a93ece2c80eb0f9c4974829d479d1edca Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/68617 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05Add missing DoCloseAurimas Fišeras
Change-Id: Ie315d490da6d8c1f62edc54d662e169fa827f610 Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/68618 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Rename SVBT16ToShort to SVBT16ToUInt16Stephan Bergmann
For one, it that way matches reality (as it returns sal_uInt16, not short or sal_Int16) and its SVBT32ToUInt32 counterpart. For another, I plan a follow-up commit of introducing an additional SVBT16ToInt16 to explicitly return sal_Int16. Change-Id: I28915e6593ccdca0c11d7b2fa593e96e359a9532 Reviewed-on: https://gerrit.libreoffice.org/68686 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-04Fix some UITests to use copies of SRCDIR documentsStephan Bergmann
...so that running those tests with a read-only SRCDIR succeeds. (Needed to move sc/qa/uitest/calc_tests/data/tdf76731.ods to fit the changes made to sc/UITest_statistics.mk; all documents used by that test need to be at the same place.) Change-Id: I5c4a28539b9bacde3ca8983502ceed8e4688c787 Reviewed-on: https://gerrit.libreoffice.org/68683 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-04tdf#121040 sc: use pixel-per-twips in X for horizontal value conversionSerge Krot
Change-Id: I25bc3b3ec42ef5b026c2cd9572e8ff1863ed8c2d Reviewed-on: https://gerrit.libreoffice.org/68492 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-04Fix typo: KATAGANA -> KATAKANATakeshi Abe
No functional change offered, but this reduces some amount of confusion. Japanese word "Katakana" ("kata" + "kana") does not undergo Rendaku [1] while "Hiragana" ("hira" + "kana") does. [1] https://en.wikipedia.org/wiki/Rendaku Change-Id: I07824147d72397c312a0774eca1fdcc7549abc59 Reviewed-on: https://gerrit.libreoffice.org/68661 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-04simplify UNO getTypes methodsNoel Grandin
Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-03weld SvxMacroAssignDlgCaolán McNamara
and SvxEventConfigPage, SvxMacroTabPage_, SvxMacroTabPage Change-Id: I98a2e71794f098015927dc7cd7ec4e258f56e703 Reviewed-on: https://gerrit.libreoffice.org/68649 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-03Add XServiceInfo tests to ScAnnontationObjJens Carl
Change-Id: I866b057f768b29f14f7eaa75bc8db3591ddca836 Reviewed-on: https://gerrit.libreoffice.org/68635 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-03tdf#45904 Move XTextRange Java tests to C++Jens Carl
Move XTextRange Java tests to C++ for ScAnnotationObj (also fixes i109517). Change-Id: Id7e45d9f1159b45fb267cb28dc875b62eae12e24 Reviewed-on: https://gerrit.libreoffice.org/68634 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-03tdf#45904 Move XSimpleText Java tests to C++Jens Carl
Move XSimpleText Java tests to C++ for ScAnnotationObj (this also fixes i109517). Change-Id: Ieed0c94ed7a426c921c099a1edb520cbfd830656 Reviewed-on: https://gerrit.libreoffice.org/68632 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-03More test cases for FOURIER formulaDennis Francis
This adds test cases for N(data length) for non powers of 2. This tests real and complex input cases. It also tests polar and non-polar output case. The reference(expected) numbers were obtained using fft() of Matlab R2018b. Finally the inverse transform is compared is compared with original inputs for correctness. Change-Id: Ibc13fb5ce900facd3fb0896e85a4e0d1694ad7f3 Reviewed-on: https://gerrit.libreoffice.org/68640 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-03FOURIER : use Bluestein's algorithm for N != 2^kDennis Francis
For inputs that are not an even power of 2, use Bluestein's algorithm[1] to match the output of fft()/ifft() in Octave/Matlab() in those cases. This algorithm is slower than radix-2 FFT algorithm but still has the asymptotic time complexity of O(N lg(N)). This patch also introduces considerable speedup in case of real valued inputs. DFT of a real valued input of length N can be computed using any DFT algorithm with a N/2 length complex valued input, provided we do some pre and post processing[2]. All implementations in this patch are written from scratch using the below theory references. [1] https://en.wikipedia.org/wiki/Chirp_Z-transform#Bluestein.27s_algorithm [2] Jones, K., 2010. Fast Solutions to Real-Data Discrete Fourier Transform. In The Regularized Fast Hartley Transform (pp. 15-25). Springer, Dordrecht. --------------------------- Below are some perf measurements for various input cases :- Timing numbers are only for the DFT computation part and does not include the time for writing data to the spreadsheet model. We don't use threading yet, so these are numbers for just one cpu-core. Exact Powers of 2 ================= Real Input size,Time (ms) 32768,2 65536,4 262144,21 1048576,185 Complex Input size, Time(ms) 32768,2 65536,5 262144,30 1048576,400 Even non-powers of 2 : 2^k - 2 ================================ Real Input size,Time (ms) 32766,8 65534,20 262142,105 1048574,1440 Complex Input size, Time(ms) 32766,15 65534,36 262142,313 1048574,3332 Odd non-powers of 2 : 2^k - 1 ================================ Real Input size,Time (ms) 32767,16 65535,39 262143,313 1048575,2729 Complex Input size, Time(ms) 32767,16 65535,38 262143,309 1048575,2703 Change-Id: Iccc31455e526ee5e6d18c20812dfa53defcf869f Reviewed-on: https://gerrit.libreoffice.org/68639 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-02tdf#45904 Move XNameAccess Java tests to C++Jens Carl
Move XNameAccess Java tests to C++ for ScDataPilotItemsObj. Change-Id: Id8e83bb68408600f471148df7527467a371590fb Reviewed-on: https://gerrit.libreoffice.org/68611 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>