summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2018-01-12More loplugin:cstylecast: scStephan Bergmann232-1412/+1405
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 McNamara10-45/+252
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 McNamara7-2/+22
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 Nitschke2-1/+4
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-12Add back initialization of ScNavigatorSettings::maExpandedVecStephan Bergmann1-0/+1
...lost with 2ea92be9973e6892727eae37ae958863702b3658 "convert SC_CONVERT constants to scoped enum". And indeed, e.g., opening the document from <https://bugs.documentfoundation.org/show_bug.cgi?id=114932#c2> through steps 1 and 2 in a UBSan build reports a use of an uninitialized (bad-valued) bool in ScNavigatorSettings::IsExpanded. Change-Id: If0dfadc6bd8033e61e334f59b3028ab005a892cd Reviewed-on: https://gerrit.libreoffice.org/47767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11limit WEBSERVICE to http[s] protocolsCaolán McNamara1-0/+9
and like excel... 'For protocols that aren’t supported, such as ftp:// or file://, WEBSERVICE returns the #VALUE! error value.' Change-Id: I0e9c6fd3426fad56a199eafac48de9b0f23914b3 Reviewed-on: https://gerrit.libreoffice.org/47709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-11only call GetHasMacroFunc to set SetHasMacroFuncCaolán McNamara4-12/+0
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-11loplugin:redundantcast: scStephan Bergmann3-6/+6
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: Ia9e3cf3d5483d1d77227db67dbfa304fa6060398
2018-01-11loplugin:useuniqueptr in svlNoel Grandin1-2/+2
Change-Id: I2fdb63517349474d90cb17ad2bd667f30840e83d Reviewed-on: https://gerrit.libreoffice.org/47727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin5-11/+11
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-10tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.ekuiitr1-6/+4
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48 Reviewed-on: https://gerrit.libreoffice.org/47082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-10tdf#113572: allow switching to data range in copypasted chartVasily Melenchuk2-1/+20
- 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 Bergmann1-1/+1
...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-09tdf#45904 Move _SpreadsheetViewSettings Java tests to C++Jens Carl1-4/+10
Change-Id: I68dcabd15b4b318a833a893b4de96c64ffd2a164 Reviewed-on: https://gerrit.libreoffice.org/47625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-09tdf#45904 Move _SubTotalDescriptor Java tests to C++Jens Carl1-2/+8
Change-Id: Id4265dd6a8123624bccdfe343655525948cadee7 Reviewed-on: https://gerrit.libreoffice.org/47623 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-08tdf#61418 Show message on protected sheets for conditional formatting.Gulsah Kose2-2/+2
.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-07remove "using" directives and lazyness templatesTomaž Vajngerl1-123/+115
Change-Id: I937320d1f9da51f7d0dbeb589855f6479c712288 Reviewed-on: https://gerrit.libreoffice.org/47494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-06lok: send modified status when applying cell-formula before savingAshod Nakashian2-0/+19
Without this, the modified status resulting from applying the cell-formula immediately before saving is lost, since it is clobbered after the save. Change-Id: Ie402812d0fc0528020161fffe57e8220c5abfeb5 Reviewed-on: https://gerrit.libreoffice.org/47366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-06ofz#4982 Integer-overflowCaolán McNamara1-2/+2
Change-Id: I429d07962acb372be460bee4e1c2b1e05dcce19b Reviewed-on: https://gerrit.libreoffice.org/47500 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-06tdf#45904 Move _DocumentSettings Java tests to C++Jens Carl3-0/+201
Change-Id: Ie00a963c5eb575ae1e96f6e1aa10da1a2ce421e4 Reviewed-on: https://gerrit.libreoffice.org/47485 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-05Fix typosAndrea Gelmini1-1/+1
Change-Id: If114b42912a98b85f1b64f87bdb1f64afd15c85e Reviewed-on: https://gerrit.libreoffice.org/47457 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-05SCITEM_PRINTWARN is unusedNoel Grandin3-26/+16
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-05lokdialog: Allow language switching in SfxModule(s).Jan Holesovsky1-1/+1
Change-Id: Icef0b3610c3bfa858cdd61de6ef3f5edc1e3c96b Reviewed-on: https://gerrit.libreoffice.org/47385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-01-05tdf#45904 Move _DatabaseImportDescriptor Java tests to C++Jens Carl3-0/+225
Change-Id: I53e9a449cb18c26187f3b1676f8ab67918128499 Reviewed-on: https://gerrit.libreoffice.org/47447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-04remove SfxUsrAnyItem typedefNoel Grandin5-7/+7
and rename SfxUsrAnyItem class to SfxUnoAnyItem, the choice being made by leaving the most popular one behind Change-Id: If3818ee0966a50e3036d7e2db951910b6282c91f Reviewed-on: https://gerrit.libreoffice.org/47313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04loplugin:unusedfieldsNoel Grandin2-5/+0
fix the ReturnStmt check Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8 Reviewed-on: https://gerrit.libreoffice.org/47309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04tdf#45904 Move _TableAutoFormat Java tests to C++Jens Carl3-0/+207
Change-Id: Ib26a2d2a05d926a0d031c86812456996cb368792 Reviewed-on: https://gerrit.libreoffice.org/47361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-04Add ServiceProvider "com.sun.star.sheet.TableAutoFormats"Jens Carl2-3/+8
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-03tdf#45904 Move _TableValidation Java tests to C++Jens Carl1-2/+8
Fixes #i90346. Change-Id: Iec7e5ebfe28d3d26f5c50950ee2d3f5fc890da65 Reviewed-on: https://gerrit.libreoffice.org/47292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-03loplugin:passstuffbyref more return improvementsNoel Grandin2-2/+2
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03tdf#45904 Move _Scenario Java tests to C++Jens Carl1-2/+7
Change-Id: I313f3a56fd99e7fb29e6f729cfe13e99adf1fed6 Reviewed-on: https://gerrit.libreoffice.org/47289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-02Fix typosAndrea Gelmini2-2/+2
Change-Id: Ida13b0649f0b6b1bb25f906ca9ad3a891b45739d Reviewed-on: https://gerrit.libreoffice.org/47262 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-01-02clang-tidy modernize-use-equals-default in sc/source/core/toolJochen Nitschke25-286/+9
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 Grandin20-22/+23
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 Grandin2-5/+8
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-29Fix typosAndrea Gelmini2-2/+2
Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b Reviewed-on: https://gerrit.libreoffice.org/47145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29Fix typosAndrea Gelmini3-4/+4
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e Reviewed-on: https://gerrit.libreoffice.org/47126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29simplify copy of ScQueryParamJochen Nitschke2-40/+24
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-29loplugin:passstuffbyref improved return in svxNoel Grandin1-1/+1
Change-Id: I33bdbd416709ce46afb3c17aeab0d2e19a68ab30 Reviewed-on: https://gerrit.libreoffice.org/47150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-27Fix typosAndrea Gelmini1-1/+1
Change-Id: Icebbbb392d9187a11837b72116c00036247e9b74 Reviewed-on: https://gerrit.libreoffice.org/47104 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-25coverity#1426922 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: I6b45631448a447eb128f5e30a272f54651db77df Reviewed-on: https://gerrit.libreoffice.org/47039 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-24sc: compact ScColumnAshod Nakashian10-145/+165
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-23tdf#39593 deduplicate code in ScCellShelltagezi1-46/+27
Change-Id: Ia2a4219a9e21cdbaeaab99df52c79dfa1ce9e184 Reviewed-on: https://gerrit.libreoffice.org/47003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-23Revert "unused SID commands in sc"Noel Grandin11-2/+690
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-22tdf#39593 deduplicate code in ScCellShelltagezi1-58/+28
Change-Id: I240715d73c5ae320a3dfab786b446e229083ff4b Reviewed-on: https://gerrit.libreoffice.org/46941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-22can just use default dtorsCaolán McNamara4-9/+0
Change-Id: I4f8974876df033f68f7207dfd66526e7af10a6b3 Reviewed-on: https://gerrit.libreoffice.org/46960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-22coverity#1426736 Uninitialized scalar fieldCaolán McNamara1-2/+6
Change-Id: I6fbf7004cea04c61f89f3a720a24c9ee82f4b117
2017-12-21Have one getSkipEmptyCellsIndex(), assert array length, tdf#113979 follow-upEike Rathke1-10/+16
Change-Id: Iac38405ac7d246dfe13766b1eefc6310756bffe6
2017-12-21tdf#113979 Add option to Skip empty cellsLaurent BP5-107/+171
During "Txt to column", empty cells should erase previous content (see tdf#69981) But during paste, user may want to keep previous content. This option makes all users happy. During import of CSV file, this option is hidden. In the same time, I've tried to remove some duplicate code. Update: properties offsets are now enum and replace define const Change-Id: I88be2d0432ff804033cff050422e666fa2882efd Reviewed-on: https://gerrit.libreoffice.org/46651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-21unused SID commands in scNoel Grandin11-690/+2
Change-Id: Ifb732e0a52ac7222e0dfb7054981708fa5722b35 Reviewed-on: https://gerrit.libreoffice.org/46886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>