summaryrefslogtreecommitdiff
path: root/sc/inc
AgeCommit message (Collapse)Author
2018-01-22sc: std::iterator is deprecated in C++17Michael Stahl
Change-Id: I947dcf61e95bdc68d19eab7daca4c31ba8047d5e Reviewed-on: https://gerrit.libreoffice.org/48224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-20RowInfo copy ctor was presumably killed in errorStephan Bergmann
...by 3c6b7c8b43d23dd7de46c02ee2cfa5bd2a97f168 "loplugin: unnecessary destructor sc" Change-Id: I67868187565cb25b40a6380298deaefca0d76b0b Reviewed-on: https://gerrit.libreoffice.org/48218 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19inline some definesNoel Grandin
which don't add any value anymore Change-Id: I45977d972d4d02926630b749d3ec736416138cf5
2018-01-17Move implementation to CheckLinkFormulaNeedingCheck() for further reuseEike Rathke
Change-Id: I541d2b6e12a88371c064b901b00e71206ee0c18e
2018-01-16Add ServiceProvider "com.sun.star.sheet.GlobalSheetSettings"Jens Carl
Change-Id: I31a93cd6a7b46f1746aee694668295fabe4fa8fd Reviewed-on: https://gerrit.libreoffice.org/47926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-15Revert "lok: sc: copy / paste confusion -- workaround"Marco Cecchetti
This reverts commit f0684222540b96d8366ce175c522b64472361b80. This workaround is no more needed because of commit 1b7a827 Change-Id: Icd13b245d5965c2b2ece326f7f5705cf06cf1b64 Reviewed-on: https://gerrit.libreoffice.org/47761 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2018-01-15More loplugin:cstylecast: scStephan Bergmann
Change-Id: Iaaa5b99cdff49bc1e88443ee23d98c005ff84911
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-14drop AreaLink_ImplCaolán McNamara
Change-Id: Ib171eb330be3a64b9688f880b2075fbd09875a20 Reviewed-on: https://gerrit.libreoffice.org/47845 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-13turn update links warning dialog into an infobarCaolán McNamara
Change-Id: Ib53c21d9ea76af11ed9af2115af7cd617c0f149b Reviewed-on: https://gerrit.libreoffice.org/47823 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-12More loplugin:cstylecast: scStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I987ac3a6d062600a5e21c3462c70595dfaa51796
2018-01-12handle ocWebservice similarly to ocDdeCaolán McNamara
might have too much in here seeing as we don't need to worry about ocWebservice calling into itself Change-Id: I0145f38cc1c1f9ff514a496f7101d81cde9e7c67 Reviewed-on: https://gerrit.libreoffice.org/47777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-12Better handle ScDde formulas with missing dde-link entriesCaolán McNamara
typically each ScDde formula has a matching table:dde-link which results in a ScDdeLink getting inserted during the load. If that dde-link is missing then no ScDdeLink exists and ScDde() will create a new one without cached content. So detect that ScDde is used in the freshing loaded ods and defer fetching new content until the right time. Change-Id: I016b53288076d83dd49e92e245346a5f7f560522 Reviewed-on: https://gerrit.libreoffice.org/47768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-12move implementation of ScMatrixCellResultToken copy-constructorJochen Nitschke
from header to source file. Revert "no matching function for call to 'intrusive_ptr_add_ref'" This reverts commit a49be6bd585ac4610cbf04ca3525f2d90a770367. Also reverts small part of commit fd3fc84e590fc84f62ce3bace668fe40a25f54b5 Change-Id: I5b48cf7e9f830ec411202c5364d0caac76449095 Reviewed-on: https://gerrit.libreoffice.org/47680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-11only call GetHasMacroFunc to set SetHasMacroFuncCaolán McNamara
and bHasMacroFunc is not accessed any other way, so this is an oxbow Change-Id: Iada84c1c4cbc2a914b78693347fa1a3521c85e6d Reviewed-on: https://gerrit.libreoffice.org/47757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-10tdf#113572: allow switching to data range in copypasted chartVasily Melenchuk
- enable data range toolbar button for charts with internal data table and possiblilty to switch to data range - show warning before destoying data table - recreation of data provider Change-Id: I2a08b723be80d411e970bfe2ee53dee7d3d52faa Reviewed-on: https://gerrit.libreoffice.org/44605 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-09no matching function for call to 'intrusive_ptr_add_ref'Stephan Bergmann
...with clang-cl, in instantiation of member function 'boost::intrusive_ptr<const ScMatrix>::intrusive_ptr' requested at sc/inc/token.hxx(291,20): class SC_DLLPUBLIC ScMatrixCellResultToken : public formula::FormulaToken Change-Id: Id8485d937744759ddbe36e8508c54e2a996df4d2 Reviewed-on: https://gerrit.libreoffice.org/47672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-08tdf#61418 Show message on protected sheets for conditional formatting.Gulsah Kose
.uno:ConditionalFormatDialog, .uno:ColorScaleFormatDialog, .uno:DataBarFormatDialog, .uno:IconSetFormatDialog and .uno:CondDateFormatDialog show an error message on protected sheets for conditional formatting. The patch was sent for the ULAKBIM/Pardus project. Change-Id: Id3c1d6f76d1245b0395082b24fa5175c14f55555 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/47395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-01-05SCITEM_PRINTWARN is unusedNoel Grandin
and mpPoolDefaults doesn't need to be a pointer Change-Id: I02735b22466711d7260d2ff0cbc6bf0cab5d83b2 Reviewed-on: https://gerrit.libreoffice.org/47450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04Add ServiceProvider "com.sun.star.sheet.TableAutoFormats"Jens Carl
Change-Id: If058d47116e0a287fc5b2155f5ae6b36cbd8fa47 Reviewed-on: https://gerrit.libreoffice.org/47359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-02clang-tidy modernize-use-equals-default in sc/source/core/toolJochen Nitschke
remove default-able copy-ctors/assignments Change-Id: I40255393899275a5825ffef4df3f08c6ce5348c2 Reviewed-on: https://gerrit.libreoffice.org/47140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-01loplugin:passstuffbyref improved return in scNoel Grandin
Change-Id: I487cfe96e9fe65f9be39b2488880410bc7b4baea Reviewed-on: https://gerrit.libreoffice.org/47228 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-31improve const-correctness in ScCaptionPtrNoel Grandin
mostly to make my passstuffbyref loplugin happier Change-Id: I148b6b418100de860dfc49aaec6c544d0fe14c72 Reviewed-on: https://gerrit.libreoffice.org/47225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29simplify copy of ScQueryParamJochen Nitschke
define copy assignment for ScQueryParamBase and use default copy implementations for other structs. Change-Id: Ie384a4f9a3647e8492b4921055df0f2c6bff708e Reviewed-on: https://gerrit.libreoffice.org/47141 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-24sc: compact ScColumnAshod Nakashian
Remove ScDocument* member from ScColumn and re-use the one in ScAttrArray. This saves 8 bytes and makes the code more homogenious by using GetDoc() member everywhere. (cherry picked from commit 1168a11278ed3c2a00058e1f802f6e44cb925318) Reviewed-on: https://gerrit.libreoffice.org/46680 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit dc3f0bde0bdef2a1e94055be146b433cb9fc54ba) Change-Id: I16a94b7ef7c45ef3af14e812b45f255f39939a6e Reviewed-on: https://gerrit.libreoffice.org/46990 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-23Revert "unused SID commands in sc"Noel Grandin
This reverts commit 9c4350441191ccfd6af3d73e13b4eb59af7ed6d1. Eike Rathke: Odd, I don't even remember what these slots were used for.. Ugh.. now I think I know.. (very) old recorded Basic macros used slot:number with the dispatcher instead of the .uno:... commands, so removing/renumbering slots may actually break those. I'm not sure if we already deprecated the slot number thing in an earlier release or maybe it was already done back in OOo times, I simply don't remember. Must be at least 1.5 decades since slot numbers were replaced with .uno commands, but old recorded macros are still supported. However, our qaDevOOo tests and some other tests (in Java) still use slot:#### notation, git grep 'slot:[0-9]' I think best is to revert this change and abandon the other SID removals. Change-Id: I091cf71dd38772dac7491afd6f28951b54510eaf Reviewed-on: https://gerrit.libreoffice.org/46963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-21unused SID commands in scNoel Grandin
Change-Id: Ifb732e0a52ac7222e0dfb7054981708fa5722b35 Reviewed-on: https://gerrit.libreoffice.org/46886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-21no need to play define games with SID_DRAW_CHARTNoel Grandin
since it's only being used in sc/ Change-Id: I1efc54c1816dfb6b91b6bc407767a19cf795c168 Reviewed-on: https://gerrit.libreoffice.org/46885 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-21tdf#79077: Load/save PapersizeFromSetup into ODF for sw and scKatarina Behrens
Change-Id: I0fc1a771927dc7116768cfbb7f7e31006e41e1c8 Reviewed-on: https://gerrit.libreoffice.org/45332 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-19tdf#114479 : Use the SvNumberFormatter from ScInterpreterContextDennis Francis
This fixes one of the crash mentioned in the bug report, during loading of the bug document. The crash being the assert failure in ScDocument::GetFormatTable(). Change-Id: Iffb8ede1416f34f0cd9852fa3f8d1f199406c013 Reviewed-on: https://gerrit.libreoffice.org/46549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-12-19remove unused typedefsNoel Grandin
Change-Id: I6fd7a9fed3a80c91a3766fceefd43c5db0aa5275 Reviewed-on: https://gerrit.libreoffice.org/46763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19inline use-once typedefsNoel Grandin
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18Defer cell value insertion until later.Kohei Yoshida
Because Calc's formula engine expects all named expressions to be present at the time of re-calculations, we need to delay insertion of cell values until after the named expressions are inserted into the document. Change-Id: I54c7d3dc86b3e2c5c192337b1cebfbdfb901ab1f Reviewed-on: https://gerrit.libreoffice.org/46665 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18Remove almost duplicate code blocks.Kohei Yoshida
Change-Id: Ib75d0caa41876908091bed374d3afd802928acf7 Reviewed-on: https://gerrit.libreoffice.org/46661 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18convert EEHorizontalTextDirection to scoped enumNoel Grandin
Change-Id: Icb7298742ae80fa17d5e6f6a3a09a6bb30892b6d Reviewed-on: https://gerrit.libreoffice.org/46590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18Handle merged cells.Kohei Yoshida
Change-Id: Iaa7194d4226300e495982bb1f90f72c31d748955 Reviewed-on: https://gerrit.libreoffice.org/46660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18Remove unused method.Kohei Yoshida
Change-Id: Idc7919f04898b0298d6448d2dd84222b211cf5db Reviewed-on: https://gerrit.libreoffice.org/46659 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18Take into account the fact that ScDocument already has one sheet.Kohei Yoshida
ScDocument already has one sheet upon creation, so we need to avoid appending sheet when the request is for the first sheet. Change-Id: Ie5526d6791e545f5faa0bf3f16988351c09e94c8 Reviewed-on: https://gerrit.libreoffice.org/46658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18Initial step on enabling the orcus-based Excel 2003 XML filter.Kohei Yoshida
Still some work remains in the orcus interface implementation code in sc. Change-Id: Idc4d95b489e8e55fbe3593557399610abe6c4ae0 Reviewed-on: https://gerrit.libreoffice.org/46655 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-16Do not recalculate the same weight over and over again, tdf#114251 relatedEike Rathke
Remember it at the group so if for some reason the group is not calculated as group then the individual cells of the group don't iterate over the RPN again to calculate the same value. This does not solve tdf#114251 in any way, just side-cars. Change-Id: Ia26d4a7fe608d8aaa30686ce95c1caa25da02469 Reviewed-on: https://gerrit.libreoffice.org/46601 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-12-15tdf#113861: Unittest for chart datatable labels expansionVasily Melenchuk
Change-Id: I4ed9019fc1e637e344ab1cb80f650b32aa034a9a Reviewed-on: https://gerrit.libreoffice.org/45670 Reviewed-on: https://gerrit.libreoffice.org/46541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-15lokdialog: Give non-programmatic name to autofilterPranav Kant
Change-Id: I8670a5aaa1703677cab173b2341c6e70e689f61a (cherry-picked from 04abf03ecb18ccf1f805faa763d6f29013efc6bb)
2017-12-15tdf#113621: don't write whole column refs for conditional format rangesMarkus Mohrhard
Change-Id: I6b21345fb08cc7b7cf0cdc40532d480a8d5f72ae Reviewed-on: https://gerrit.libreoffice.org/46493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-12-12Do not use threading for formula group if...Dennis Francis
...there is at least one opcode in the token array that is in the blacklist set of opcodes for threading. Cleaned up the logic by removing FormulaVectorEnabledForThreading from ScFormulaVectorState enum and created two separate boolean fields in ScTokenArray to keep track of whether OpenCL or threading could be used. Change-Id: Ieca0004b33a3cfea6ca5c0ff90bc8cea8746d102 Reviewed-on: https://gerrit.libreoffice.org/45564 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-11tdf#95295: don't add duplicate conditional formatsMike Kaganski
This tries to make sure that on copy, any conditional formatting that has same entries (conditions and formats) as another condition in the table, is not appended to the conditions list, but updates existing condition's range. This should prevent multiplication of entries with duplicating conditions and formats, and fragmenting ranges. Existing unit tests had to be adjusted, because they had ensured exactly that behaviour that is changed in this commit: that new items are added to the list, and e.g. multiple elements are created when a single cell is copied to a range. Change-Id: I46adb883bab7249571b912d56fea0c7918b3516d Reviewed-on: https://gerrit.libreoffice.org/45656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08tdf#86085 add slot for toggling thousands separatorJim Raykowski
In preparation of adding a button to the toolbar. Change-Id: Icd97f828def1aacbb92297e8e74bdd2310c4d0f8 Reviewed-on: https://gerrit.libreoffice.org/45731 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-12-08Adapt description to realityEike Rathke
Change-Id: I24133fb6c52bd7500037364120cb11d1b1f099c2
2017-12-08sc lok: 1 view has 1 clipboard to transfer dataHenry Castro
In tiled rendering case, each view copy and paste the contents of the clipboard associated with the view Change-Id: Ic7b0d38ce4741af8c2053926ffd5172ab81aaaf5 Reviewed-on: https://gerrit.libreoffice.org/41113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>