summaryrefslogtreecommitdiff
path: root/sc/source
AgeCommit message (Collapse)Author
2018-10-29sc: fix: range/step calculation for progress barSerge Krot
Change-Id: I733e4003b65b410d44d9a1132be4e9e10ac24c3e Reviewed-on: https://gerrit.libreoffice.org/62305 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-10-29loplugin:oncevarNoel Grandin
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd Reviewed-on: https://gerrit.libreoffice.org/62498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-29tdf#42949 Fix IWYU warnings in sc/source/ui/inc/[f-p]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie40401e8706dda219b8578d180983811114cabed Reviewed-on: https://gerrit.libreoffice.org/62208 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-29Notebookbar: add context-Printpreview to calc tabbed NBandreas kainz
Change-Id: I9b63a515c407692f5632cb5e1f391593cfd68736 Reviewed-on: https://gerrit.libreoffice.org/62433 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-29tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I0516dc68cf7d451eafc044be8e50a66d2bddf15f Reviewed-on: https://gerrit.libreoffice.org/62484 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: Iaa1a1811b638aadfe6b06b3465a182cb675031b5 Reviewed-on: https://gerrit.libreoffice.org/62476 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I2b2ea62ff4ed3e16cd4fa2a5e588d001d21121cb Reviewed-on: https://gerrit.libreoffice.org/62465 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I1e5098e11f1e5e2f7c5518ea05c57512f58b585b Reviewed-on: https://gerrit.libreoffice.org/62464 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc Reviewed-on: https://gerrit.libreoffice.org/62450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-27uitest: integrate the calc input bar into the ui testingMarkus Mohrhard
Change-Id: Ib73d09b648c0663de57e4b205e7154d6af1366f8 Reviewed-on: https://gerrit.libreoffice.org/62412 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-10-27tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-26Use CheckStringResultLen() also for CONCATENATE(), CONCAT() and TEXTJOIN()Eike Rathke
Change-Id: Ifbc2b127998e037be3f014bebf8721bef15ef53b Reviewed-on: https://gerrit.libreoffice.org/62385 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-10-26missing includeStephan Bergmann
Change-Id: I57dfc006d849918179a2398ef22be7585cb0993f
2018-10-26Let REGEX() return #N/A instead of #VALUE! if no match, tdf#113977 follow-upEike Rathke
So match can be checked with IFNA(REGEX(...);...) and IF(ISNA(REGEX(...);FALSE();TRUE()) Change-Id: I2b75dce78ad8a955aa6f94ea5d225a79ae0e2dc5 Reviewed-on: https://gerrit.libreoffice.org/62386 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-26use unique_ptr when Clone()'ing PoolItemsNoel Grandin
and fix a handful of small leaks in the process Change-Id: I876e12ff5305f9dda84532d4182fb91657d6fa0c Reviewed-on: https://gerrit.libreoffice.org/62389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26loplugin:singlevalfields improvementNoel Grandin
look for any kind of types, not just POD types, helps to find smart pointer fields that are only assigned nullptr Change-Id: I2d887e98db012f03b646e1023985bcc196285abc Reviewed-on: https://gerrit.libreoffice.org/62382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26Change kScInterpreterMaxStrLen now result string length limit to 256MBEike Rathke
This is arbitrary. Change-Id: I88875e674464984c174e27fa6038080cc7366ecf Reviewed-on: https://gerrit.libreoffice.org/62375 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-26Use SAL_MAX_INT32 in CheckStringPositionArgument()Eike Rathke
... as that does not affect the result string length. Change-Id: Ia4426b4444845b3966da6a8c46089d8a98a38cb0 Reviewed-on: https://gerrit.libreoffice.org/62374 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-26Introduce kScInterpreterMaxStrLenEike Rathke
... and use that instead of SAL_MAX_UINT16 where string operations are involved. Change-Id: I41248bc1a876c19cd917269e44a6e91f51e569f5 Reviewed-on: https://gerrit.libreoffice.org/62373 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-26Rework GetStringPositionArgument() to return sal_Int32Eike Rathke
... and set FormulaError::IllegalArgument for illegal values. Change-Id: Iaf4c5123a3290ee1860d16fcf270e8c2a2e0845f Reviewed-on: https://gerrit.libreoffice.org/62372 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-25return std::unique_ptr from CloneSetWhichNoel Grandin
Change-Id: I709122cb8cd7c257e7eb2bd564c529689e6d555a Reviewed-on: https://gerrit.libreoffice.org/62350 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-25Resolves: tdf#113977 implement REGEX() spreadsheet functionEike Rathke
REGEX( Text ; Expression [ ; Replacement ] ) Using ICU regular expressions http://userguide.icu-project.org/strings/regexp Change-Id: I4cb9b8ba77cfb5b8faab93037aa0d947609383d7 Reviewed-on: https://gerrit.libreoffice.org/62332 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-25tdf#118747 sc: use manual height for previous rows in TransferObjVasily Melenchuk
This can ensure, that visible area will not shift if autoheight will change height of previous rows. Change-Id: I66e013e9f3f27396f13b26fde37353cb63e47258 Reviewed-on: https://gerrit.libreoffice.org/62279 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24ScDoubleItem is deadNoel Grandin
i.e. no way to get any useful information out of it, at least since commit 8b3fcb6a4f80e803586120535768745f6637b34d Date: Fri Aug 11 10:01:25 2017 +0530 Removing unused SfxItemPool serialisation from svx Which means that SID_RANGE_VALUE is also useless. Possibly the commit that added this had a bug, and it meant to use SvxDoubleItem, which implements the necessary QueryValue/PutValue methods to be able to interact with macro code. Change-Id: I6ffb0c46f6f0864f202d71f0e157d7e1d0f54f51 Reviewed-on: https://gerrit.libreoffice.org/62232 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24Introduce OutputDevice type OUTDEV_PDFJan-Marek Glogowski
Originally I thought mpPDFWriter can be used to create PDF from any OutputDevice, but it's actually just set for the internal VirtualDevice of the PDF writer. So this gets rid of all the special mpPDFWriter and GetPDFWriter() handling and replaces it with checks for OUTDEV_PDF. But since ImplPDFWriter used to be a OUTDEV_VIRDEV, this also introduces OutputDevice::IsVirtual(), which now replaces most of the direct OUTDEV_VIRDEV checks. Change-Id: I11824143b6b8833ecc81119762448cbdf1145dbc Reviewed-on: https://gerrit.libreoffice.org/62257 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-24weld AdvancedSettingsDialogCaolán McNamara
make run virtual and fold executes into it, so GenericUnoDialog can call run on tabdialogs to do the right thing, and allows Start_Impl to be private again Change-Id: Ic457edfbdc7457f4c49d4e8ad679903f38ad9b42 Reviewed-on: https://gerrit.libreoffice.org/62227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-24clang-tidy performance-unnecessary-copy-init in scNoel Grandin
Change-Id: I93ded61c22bd533a6ffaddd20d6e527f176e7651 Reviewed-on: https://gerrit.libreoffice.org/62218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23sc: speed-up: avoid usage of svl::SharedString where it is possibleSerge Krot
Change-Id: I55a1a634927cb1d7a04267d02322fcfa41d390d0 Reviewed-on: https://gerrit.libreoffice.org/61572 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-10-23Resolves: tdf#120689 omit <definedName> for ocMacro in OOXMLEike Rathke
Change-Id: I7578d568d2afe5d3a45b31a8a349cd370b03fc67 Reviewed-on: https://gerrit.libreoffice.org/62204 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-22pvs-studio: V571 Recurring checkCaolán McNamara
Change-Id: I1ad7bcfa557b38488adf26b434433e6bae259f43 Reviewed-on: https://gerrit.libreoffice.org/62190 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22Remove ScLookupCache from ScLookupCacheMap it had been added toStephan Bergmann
...instead of removing an arbitrary ScLookupCache with a matching ScRange from the first ScLookupCacheMap that happens to contain one. 79449d73900d7a9bf061244d76f5f8eecc441198 "make VLOOKUP in Calc thread-safe" introduced per-thread ScLookupCacheMaps, so that multiple ScLookupCacheMaps can contain ScLookupCaches with identical ScRanges. For example, UITest_calc_tests6 adds ScLookupCaches for ScRange 1!R2C18:R97C18 to different threads' ScLookupCacheMaps. That causes confusion so that calling ScDocument::RemoveLookupCacheHelper to remove an ScLookupCache from a mismatching ScLookupCacheMap accesses a different ScLookupCache* pCache = (*it).second.release(); that may already have been destroyed; see failing ASan/UBSan builds like <https://ci.libreoffice.org//job/lo_ubsan/1067/>. Change-Id: I70c33b236dc502b8a98e0e313d422424eec5dbca Reviewed-on: https://gerrit.libreoffice.org/62194 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-22tdf#120703 (PVS): redundant nullptr checkMike Kaganski
V668 There is no sense in testing the 'pMed' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Ia630fd30d86e9b8f9ce85077edbd949274bbee70 Reviewed-on: https://gerrit.libreoffice.org/62125 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-22tdf#120410: Disable insert/delete row/page break if sheet is protectedXisco Fauli
Follow-up on f7982d4dfa85f15a6f0c25e9795a5847ecfcbf31 Change-Id: I2defd3474fdbb0b87898df7734bb076ab95c8c08 Reviewed-on: https://gerrit.libreoffice.org/61950 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-10-22pvs-studio: V794 The assignment operator should be protectedCaolán McNamara
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669 Reviewed-on: https://gerrit.libreoffice.org/62166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V668 no sense testing against null as memory was allocated by newCaolán McNamara
category V668 complete Change-Id: I986d4cb89a7c72d54d71ea01fc598a9958deee24 Reviewed-on: https://gerrit.libreoffice.org/62138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V728 An excessive check can be simplifiedCaolán McNamara
for... "The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression" subcases, where the args are already bool Change-Id: Ica8b5c4974c513f7f7ad8acf17ca931e85ebc8af Reviewed-on: https://gerrit.libreoffice.org/62146 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V1001 variable assigned but is not used by the end of the functionCaolán McNamara
Change-Id: Ida759ae9fce3d384b19e41683bdcd796eb158efe Reviewed-on: https://gerrit.libreoffice.org/62147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21tdf#120703 (PVS): redundant nullptr checksMike Kaganski
V668 There is no sense in testing the 'pClipDoc' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V560 A part of conditional expression is always true: pDoc. V560 A part of conditional expression is always true: pMergeFlagAttr. V560 A part of conditional expression is always true: pMergeFlag. Change-Id: Ief75a140cca58fe458dc3c1fd18a9bbaa1ea39cb Reviewed-on: https://gerrit.libreoffice.org/62143 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-20return by unique_ptr from CreateFieldControlNoel Grandin
Change-Id: Ic8bf9829c3320aca452fd1a40e9843fdbdbfa219 Reviewed-on: https://gerrit.libreoffice.org/61906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19Turn ScStyleSheet::Usage into scoped enumStephan Bergmann
...to avoid -Werror,-Wshadow from Clang trunk with <https://reviews.llvm.org/D52400> "Improve -Wshadow warnings with enumerators", warning about shadowing of USAGE in e.g. enum ESCHER_BlibType in include/filter/msfilter/escherex.hxx Change-Id: If492c5086402e46158d3de5d4d6b00b61412c655 Reviewed-on: https://gerrit.libreoffice.org/61985 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-19index validity check looks dubiousCaolán McNamara
Change-Id: Ib57a26e51a69cc48f82b3474d11fe4f8c8398e07 Reviewed-on: https://gerrit.libreoffice.org/61977 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19copy and paste errorCaolán McNamara
Change-Id: If352e7a0f6e8dab2a9acc9aa2cde56b40cedb50c Reviewed-on: https://gerrit.libreoffice.org/61974 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19index validity check looks dubiousCaolán McNamara
Change-Id: I0952bbaabeb8353b27b478ad6b17bc9348c6f61a Reviewed-on: https://gerrit.libreoffice.org/61978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19Turn ScGridWin::AutoFilterMode into scoped enumStephan Bergmann
...to avoid -Werror,-Wshadow from Clang trunk with <https://reviews.llvm.org/D52400> "Improve -Wshadow warnings with enumerators", warning about shadowing of SortAscending/Descending in enum SvSortMode in include/svtools/treelist.hxx Change-Id: I7022d3c6338c5ff50edf6362577f89f6609cd3e9 Reviewed-on: https://gerrit.libreoffice.org/61960 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19Revert "Notebookbar: add context-Printpreview to calc tabbed NB"Christian Lohmaier
This reverts commit 3f9c477929c261a8862411c00153e4c7d0d0ae7c. Breaks the JunitTest_sc_unoapi tests with clang