summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
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#119596 DrawText Contextmenu in Writer, Calc, Draw, Impressandreas kainz
and all other sw modules Change-Id: Ifd7161f58170f32555134250b91e537eeada3c99 Reviewed-on: https://gerrit.libreoffice.org/61988 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.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#119506 Draw Contextmenu in Writer, Calc, Draw, Impressandreas kainz
and all the other sw modules Change-Id: Ie407f858bf1d17f3af4c2948fcd4cb40bc9e8c92 Reviewed-on: https://gerrit.libreoffice.org/61963 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-10-22tdf#119547 Media Contextmenu sync in all appsandreas kainz
similar layout to graphic Change-Id: Id97460cdeb1db62326b7cb2e7655a39af2c1ae99 Reviewed-on: https://gerrit.libreoffice.org/61962 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-10-22NB tabbed calc: finishing correct padding and final tab reviewandreas kainz
Change-Id: Ib0bb557a2a98d8256182aab29b98b953ffc9c7a4 Reviewed-on: https://gerrit.libreoffice.org/62172 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.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-19NB fix TextShape with uno:DrawText instead of uno:Textandreas kainz
Change-Id: If213ecdc5dd47f3870a71131d3e634f216b3da98 Reviewed-on: https://gerrit.libreoffice.org/61989 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
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-19NB tabbed: update draw tab drop down menu entriesandreas kainz
Change-Id: Id12b92eaa472e59681cf684e6f007476c884cc5a Reviewed-on: https://gerrit.libreoffice.org/61964 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.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
2018-10-18NB: Rename Menu entries for drop down menuesandreas kainz
Change-Id: Iee8cbf1d3be4f205c975d5100a8b3f2506653e26 Reviewed-on: https://gerrit.libreoffice.org/61954 Reviewed-by: andreas_kainz <kainz.a@gmail.com> Tested-by: andreas_kainz <kainz.a@gmail.com>
2018-10-18add test for bug tdf#73081Zdeněk Crhonek
Change-Id: I96f56cee0cab3fa18992281e3745164377adade3 Reviewed-on: https://gerrit.libreoffice.org/61939 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-10-18Sync Image/Graphic Tabb and context menuandreas kainz
NB: sync MenuImage in tabbed toolbar context menu: sync graphic.xml context menu in writer, calc, impress and draw Change-Id: Idab90ae9af7ac68815fe689811d6c11f948063ca Reviewed-on: https://gerrit.libreoffice.org/61938 Reviewed-by: andreas_kainz <kainz.a@gmail.com> Tested-by: andreas_kainz <kainz.a@gmail.com>
2018-10-18Notebookbar: add context-Printpreview to calc tabbed NBandreas kainz
Change-Id: Iee6c83ae03ead7ae0b2c33f6cf364c1c3c59528f Reviewed-on: https://gerrit.libreoffice.org/61892 Reviewed-by: andreas_kainz <kainz.a@gmail.com> Tested-by: andreas_kainz <kainz.a@gmail.com>
2018-10-18loplugin:staticvar in scNoel Grandin
Change-Id: I9f1d66e9af454a27a341e56bbe50a558898b65a1 Reviewed-on: https://gerrit.libreoffice.org/61900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17Remove unused FormulaLogger::maMessageStephan Bergmann
Change-Id: Ie1bc5cf4db6b46160fd950f471c9baf9ec51ebf7 Reviewed-on: https://gerrit.libreoffice.org/61873 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-17tdf#42949 Fix IWYU warnings in include/tools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-17Silence more Clang trunk -Wdefaulted-function-deletedStephan Bergmann
...similar to 3db830d354de80b319fb818a0373365a1e647264 "Silence new Clang trunk -Wdefaulted-function-deleted", after fb1d3b580763a333bbbfe115d09e1b5cd8849675 "loplugin:constfields in sc" Change-Id: I8358e862e53dd8f57169ba2d2f2c543edb93e2a5 Reviewed-on: https://gerrit.libreoffice.org/61867 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-17ScTable::CopyTable drop defaults from paramsNoel Grandin
so I can change the signature of this method safely Change-Id: I91574cc1660c14408f2dcd9dbd18c0faa1a1e5c5 Reviewed-on: https://gerrit.libreoffice.org/61864 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:singlevalfieldsNoel Grandin
tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17Notebookbar: sync tabbedbarandreas kainz
Change-Id: I6441f66f7cd078dae0c81cb1a5c62b5130187536 Reviewed-on: https://gerrit.libreoffice.org/61858 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-17Notebookbar: update calc tabbed notebookbarandreas kainz
Add Printpreview, Object, Media, Update Image, Draw Context tab Change-Id: I4433ba838ca734f2214679f9bdfa50427edfcc71 Reviewed-on: https://gerrit.libreoffice.org/61856 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-16tdf#45904 Move _XTableChartsSupplier Java Tests to C++Rahul Gurung
Change-Id: I4cd0b25cefce60e8253df65d5136d15d690dbc38 Reviewed-on: https://gerrit.libreoffice.org/61540 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-10-16coverity#1440303 use emplace_back instead of push_backCaolán McNamara
Change-Id: I51457423fdd8d39b5c11d02b450d31fa59127952 Reviewed-on: https://gerrit.libreoffice.org/61840 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-16Related: tdf#120612 help response missing from other help buttonsCaolán McNamara
Change-Id: I982b4190f5af2715f797ecd9bf798e4b4af0ecda Reviewed-on: https://gerrit.libreoffice.org/61828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-16Notebookbar: update tabbed toolbar for calcandreas kainz
remove separator in other tabbedbars Change-Id: I99c83cd09e5fa8bde2809680d5ef138c4ef499de Reviewed-on: https://gerrit.libreoffice.org/61803 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-16Unit test deleting shared formula group top cell, tdf#119623Eike Rathke
Change-Id: I9a497b9d9ae09c8764f62549a60c8a2a952bc9e9 Reviewed-on: https://gerrit.libreoffice.org/61822 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-16Resolves: tdf#119623 record group positions also for top cellsEike Rathke
So listeners can be re-established for remaining grouped cells if top cell is deleted (which ends listening and probably was the cause to exclude them here). Change-Id: Ic91b74c65013452d56b5cfbc132722c4314743c8 Reviewed-on: https://gerrit.libreoffice.org/61808 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-16tdf#42949 Fix IWYU warnings in sc/source/ui/inc/[a-e]*Gabor Kelemen
Also files starting with capital letters. Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia79de45524315e2aaa1283ee6e42c54c9e14a31e Reviewed-on: https://gerrit.libreoffice.org/61735 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-15Introduce and use ScConditionalFormatList::empty() instead of size()Eike Rathke
Change-Id: If42fdfbcac74ef2a04bd5d006272a5c1a4f510e2 Reviewed-on: https://gerrit.libreoffice.org/61804 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-15tdf#120087 Disable unuseable items in Manage DialogAbhyudaya Sharma
Fix behaviour for 'Remove' and 'Edit' buttons for the Manage Conditional Formatting dialog in Calc Change-Id: Id8fc37262464232ab8fbb76c5a9609af5982e222 Reviewed-on: https://gerrit.libreoffice.org/61475 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-10-15loplugin:staticconstfield improvementsNoel Grandin
And fix ScXMLCachedRowAttrAccess::Cache which was never setting its mnTab field, and hence would never be hit. And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow. Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c Reviewed-on: https://gerrit.libreoffice.org/61772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15Conditional formatting: Use the nElements from g_IconSetMap.Jan Holesovsky
And also kill some copy'n'paste when at that. Change-Id: Ice38b738f31e486008fdae450c9534306f3a9613 Reviewed-on: https://gerrit.libreoffice.org/61705 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>