summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
AgeCommit message (Collapse)Author
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in scNoel Grandin
Change-Id: I84e0b4784ddc66864b29e3b1f20c926aa17fc77f Reviewed-on: https://gerrit.libreoffice.org/77523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15replace ".get->" with "->"Noel Grandin
Change-Id: I327a6fda1fe0170da33e06b735f09a39421c8a58 Reviewed-on: https://gerrit.libreoffice.org/77469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini
Change-Id: I331ac595c68601cee49fa726e5a074d4a9341d12 Reviewed-on: https://gerrit.libreoffice.org/77297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-09Simplify Sequence iterations in scArkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: I047fb2e6ec9591166339b9748c5013a32185f14b Reviewed-on: https://gerrit.libreoffice.org/76912 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): scStephan Bergmann
Change-Id: I1bfd2bb623aac5ac457a0b719da64ab393ccd0ba Reviewed-on: https://gerrit.libreoffice.org/76654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-20loplugin:referencecasting in scNoel Grandin
Change-Id: Ife30500d1ff67e06afc4d64634febfb4c161c702 Reviewed-on: https://gerrit.libreoffice.org/75976 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16cid#1448349 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iba1a4bf89ab02521e0692f217571b113e12a5b79 Reviewed-on: https://gerrit.libreoffice.org/75703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21reference childwins are all weldedCaolán McNamara
Change-Id: I050b4bdff4eaa645316538725c69e83bee4a90c5 Reviewed-on: https://gerrit.libreoffice.org/74526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09crashtesting: crash on importing tdf#123420-2.xlsxDennis Francis
since commit c2f1c68ffb6dfa1ce7de09dcc428d6c53549e88d Date: Fri Apr 19 23:15:53 2019 +0530 tdf#122590: follow-up : import x14:cfRule priorities Fix is to import the priorities for iconSet x14:cfRule too. Thanks to Caolán McNamara for notifying me about the regression. Change-Id: Ib5b703a6911ab6480d42ac1e004a144043d3ad24 Reviewed-on: https://gerrit.libreoffice.org/72035 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-05-04tdf#122590: follow-up : import x14:cfRule prioritiesDennis Francis
If there are x:cfRule's and x14:cfRule's with matching range-list, then insert the conditional-fmt entries into the document in the order of the priorities. That is don't just append the x14:cfRule entries to the document after the x:cfRule entries are inserted. There was also a off-by-one bug in the priority export of x14:cfRule entries. This caused the priority numbers to be duplicated. This is also fixed. Change-Id: I5b0d11c4456b2966b808f6ee589075a870f43768 Reviewed-on: https://gerrit.libreoffice.org/71311 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-05-04tdf#122590 Import and export xlsx x14:cfRule element for type = cellis.Gülşah Köse
Change-Id: I3d940269ec25657b64c714400a2828781dd9dd3e Reviewed-on: https://gerrit.libreoffice.org/69713 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-04-25tdf67629 FILEOPEN Particular .xlsx hangs SpreadsheetNoel Grandin
Seems like this is a somewhat pathological document, has lots of duplicated ranges. Checking for duplicates makes it load in <10s on my machine Change-Id: I25da24e0f8b1d4ad99d00474be168c75586ea579 Reviewed-on: https://gerrit.libreoffice.org/71251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-24simplify call sites of SfxItemPool::PutNoel Grandin
use template to make return type match input type, so we don't need to cast at the call sites Change-Id: I1e65f362c67f74c9a230cdbc1db12545b28eb499 Reviewed-on: https://gerrit.libreoffice.org/71216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-22tdf#124883: don't drop data field names on importMike Kaganski
The name attribute of dataField element was already read in PivotTable::importDataField; and then it was ignored in PivotTableField::convertDataField. ScDataPilotFieldObj had no handler for name in its ScDataPilotFieldObj::[gs]etPropertyValue, although it has [gs]etName for that - so this change puts pieces together to allow to use the imported name correctly. Change-Id: I5357601b26e6635ab132ff6a1294645995aff97e Reviewed-on: https://gerrit.libreoffice.org/71068 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-20tdf#124810: Roundtrip pivot table style info from XLSX.Mike Kaganski
Also provide a default pivot table style for those tables that don't have a style info. Let's use the style settings that Excel uses. Change-Id: I8006a33a0aa0e92629f7db0a9c24a6ff52d17945 Reviewed-on: https://gerrit.libreoffice.org/70933 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-26tdf#74664: FOURIER: add 5th optional parameter MinimumMagnitudeDennis Francis
This parameter is used only if Polar=TRUE. All frequency components with magnitude less than MinimumMagnitude will be suppressed with a zero magnitude-phase entry. This is very useful when looking at the magnitude-phase spectrum of a signal because there is always some very tiny amount of rounding error when doing FFT algorithms and results in incorrect non-zero phase for non-existent frequencies. By providing a suitable value to this parameter, these non-existent frequency components can be filtered out. By default the value of this 5th parameter is 0.0, so *no* suppression is done by default. Change-Id: I422ad1bf91f42b320e98e58a19c99bf8528e4708 Reviewed-on: https://gerrit.libreoffice.org/69471 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@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-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-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-02-19BIFF return class A for Array, tdf#74664 follow-upEike Rathke
Change-Id: I146e2cdf922b11dc36ade91d21c9b2208453adfc
2019-02-19tdf#74664 : Adds FOURIER() formulaDennis Francis
FOURIER(Array, GroupedByColumns, Inverse, Polar) is a matrix formula that computes discrete Fourier transform[DFT] of input array(first argument) via a radix-2, decimation-in-time fast Fourier transform algorithm. Unit test for this is coming up in a new commit. The data in input array(first argument) can be :- 1) grouped by columns (needs to be indicated by flag GroupedByColumns = TRUE) In this case the array can contain 1 or 2 columns, where the first column contains the real part of input series and second column if present contains the imaginary part of the input series. If there is only 1 column, the input series is treated as purely real. If the number of rows is not a power of 2, zeroes are appended to the input series internally to make the series length equal to the next nearest power of 2. 2) grouped by rows (needs to be indicated by flag GroupedByColumns = FALSE) In this case the array can contain 1 or 2 rows, where the first row contains the real part of input series and second row if present contains the imaginary part of the input series. If there is only 1 row, the input series is treated as purely real. If the number of columns is not a power of 2, zeroes are appended to the input series internally to make the series length equal to the next nearest power of 2. The third argument "Inverse" is a boolean flag to indicate whether an inverse DFT needs to be computed. This argument is optional and the default value is FALSE. The fourth argument Polar is a boolean flag to indicate whether the final output needs to be in polar coordinates. This argument is optional and the default value is FALSE. The result of DFT consists of two columns - first column contains the real parts (or the magnitudes if Polar=TRUE) and second column contains the imaginary parts (or the phases if Polar=TRUE). Implementation: A fairly straighforward non-recursive implementation of radix-2 FFT algorithm is written from scratch. Reference: Heckbert, P., 1995. Fourier transforms and the fast Fourier transform (FFT) algorithm. Computer Graphics, 2, pp.15-463. The normalization factor used in DFT / and inverse DFT in this implementation matches that of fft() and ifft() functions of Matlab/Octave. It also matches the one used in Wikipedia article on DFT: https://en.wikipedia.org/wiki/Discrete_Fourier_transform. Change-Id: If4a40a6ef62bce1f03c589ae5357b2049f66fe64 Reviewed-on: https://gerrit.libreoffice.org/67938 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-02-18tdf#122624 XLSX OLE in DOCX: import view positionsLászló Németh
of the visible sheet of an embedded spreadsheet, instead of showing always the first column and row. Change-Id: I7b712d97f152da3cecf8371e21cf0a82ef21f199 Reviewed-on: https://gerrit.libreoffice.org/67867 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-02-09loplugin:indentation in scNoel Grandin
Change-Id: Ieafabbafde456edba5adbe1fd587c32f04aedb98 Reviewed-on: https://gerrit.libreoffice.org/67562 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-07tdf#122594 OLE import in DOCX: show selected sheetLászló Németh
of an embedded XLSX OLE object, instead of showing always the first sheet. Change-Id: I583a17dc8a3cd06ee15fbbb950328f0b9b164a63 Reviewed-on: https://gerrit.libreoffice.org/67516 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-01-29sc: Fix CJK Unified Ideographs range in commentsTakeshi Abe
i.e. 4E00-9FAF -> 4E00-9FFF. According to <https://www.unicode.org/mail-arch/unicode-ml/y2003-m02/0351.html>, the confusion was partly due to older Unicode specification. As of Unicode 4.1 the trailing end (9FB0-9FFF) is in fact in use by "CJK Additions": <https://www.unicode.org/versions/Unicode4.1.0/> Change-Id: Ibd3704a81341743b3fa80686d3fcfc0bd11104ef Reviewed-on: https://gerrit.libreoffice.org/67087 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-01-29pass ScConditionalFormat around by unique_ptrNoel Grandin
Change-Id: If15ac08d8334a386312870d3ebebb385cf55e5f6 Reviewed-on: https://gerrit.libreoffice.org/67050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-29o3tl::make_unique -> std::make_unique in scGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib69a4a2a08b1edbc0f40beac00f7f68075b479a1 Reviewed-on: https://gerrit.libreoffice.org/66967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24Simplify containers iterations in sc/source/filter/[h-o]*Arkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I7e024d5bf97d942b8b43465e0779cf9e30df8eb0 Reviewed-on: https://gerrit.libreoffice.org/66827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-20Check id in outer loopArkadiy Illarionov
Change-Id: I24ecf429d26c19823cd76128d2b5e0ec3bdf82c7 Reviewed-on: https://gerrit.libreoffice.org/66639 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-10pass ScTokenArray around by unique_ptrNoel Grandin
Change-Id: I611554b1c4cbc506dbfc32748e9f14c9e8eb5156 Reviewed-on: https://gerrit.libreoffice.org/66022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-19tdf#42949 Fix IWYU warnings in sc/source/filter/oox/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ibf5b7a813910f2ab37d8705b99bd8a9a19706c43 Reviewed-on: https://gerrit.libreoffice.org/65061 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-17tdf#99438: sc: support for .xltx exportVasily Melenchuk
Added support for content types for template and template with macros (.xltm, but no user interface for this yet). Fixed preferred extension for template: by default it is .xltx and not .xltm (macro-enabled), because MS Excel is very strict about matching of content-type and extension here. Fixed wrong namespace in FilterService for ExcelFilter. Change-Id: Ie717d31d72203601324860f069918d75082add4a Reviewed-on: https://gerrit.libreoffice.org/65111 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05Resolves: tdf#121887 RowModel::mnRow is 1-based, alwaysEike Rathke
Basically this was always wrong. Original code didn't treat the r attribute as optional and resulted in an invalid -1 row for such cases, hence the RowModel wasn't applied later. Then commit af8e6f4f544ecd01d3eda5f38bbd4779d5e8b2c6 CommitDate: Wed May 29 22:05:02 2013 +0200 r is an optional attribute in c and r, fdo#65059 introduced a 0-based SheetDataContext::mnRow but assigned that to a 1-based RowModel::mnRow as well if r attribute was missing, and did not update SheetDataContext::mnRow if r attribute was given. commit ff56553e34dfed01b9226ce7a516dbeb6da32124 CommitDate: Thu Mar 13 18:39:22 2014 -0400 fdo#76032: This row index is 1-based whereas our own mnRow is 0-based. then correctly assigned the decremented r attribute to SheetDataContext::mnRow but did not touch the assignment to RowModel::mnRow if r was not given. Probably confused by the ++mnRow already there which is correct but not sufficient for the assignment. Which we now finally fix herewith.. Change-Id: Iae1563ed01b95e7852ddad4fd59374c07186b493 Reviewed-on: https://gerrit.libreoffice.org/64580 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-11-24convert Unit to scoped enumNoel Grandin
and drop unused UNIT_REFDEVX,UNIT_REFDEVY values Change-Id: I4e516f2c51672f6541f3cf7c03a87aebc4a1f1f6 Reviewed-on: https://gerrit.libreoffice.org/63944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-24remove unused FuncFlags::BIFFIMPORTONLY,STATE::S_WK1Noel Grandin
Change-Id: I94d88f871bfc78a066f6fd583b7fb7a7305944c8 Reviewed-on: https://gerrit.libreoffice.org/63943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-19Removed duplicated includesAndrea Gelmini
Change-Id: Idd6a5e84d93016f97745e6d9b99e4f79f7614ea7 Reviewed-on: https://gerrit.libreoffice.org/63554 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-19tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-16loplugin:buriedassign in scNoel Grandin
Change-Id: I1408fd35a50a95e12895979b797548c89f7f4c74 Reviewed-on: https://gerrit.libreoffice.org/63469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16entirity of writer rebuilding when vcl widget headers changeCaolán McNamara
which seems a bit excessive Change-Id: If0ab5a33bfbbd399e270f3e140c9d44d843985aa Reviewed-on: https://gerrit.libreoffice.org/63422 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-14tdf#42949 Fix IWYU warnings in include/svl/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ide75232858599c275e023c2300201090acd22307 Reviewed-on: https://gerrit.libreoffice.org/63237 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>