summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2018-01-26coverity#1428613 check IsValidReference() return value, tdf#108989 follow-upEike Rathke
Also remove the unnecessary continue;break; construct and just return if found. Change-Id: Ib32ff214a1a24ef3ad3c6f7f659a8b7fde6b2d4a
2018-01-26nMovX is SCCOLMike Kaganski
Change-Id: I748f512fc424eacb2b56cb1a080b9ff15278c8d1 Reviewed-on: https://gerrit.libreoffice.org/48652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-26tdf#114200 : added 'Trim space' feature in 'Text Import'manujvashist
made a checkbox to Trim extra white spaces from both ends while using seperators in 'Text Imort' Change-Id: Ib05d9b17525e3ebec380ec8b7eebfa35fff78f01 Reviewed-on: https://gerrit.libreoffice.org/46177 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Manuj Vashist <manujvashist@gmail.com> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-01-26Fix typosAndrea Gelmini
Change-Id: I334f0bd5636940ea8105dcf93b95b3af28894aad Reviewed-on: https://gerrit.libreoffice.org/48546 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-26tdf#103550 fix issue with HYPHEN-MINUS in Calc function JIS.Winfried Donkers
Change-Id: Ie1e25ea7a0d6f23dfe21f53ed47430be6b357984 Reviewed-on: https://gerrit.libreoffice.org/48523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-01-26[Pardus] tdf#87357 Add contextual Conditional Format command.Gulsah Kose
This patch is sponsored by ULAKBIM/Pardus project. Change-Id: Id6148d39f68ac39067cc3a09b314c4f4de773384 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/48417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-01-25Change property value to get CellContentType in sc/Jens Carl
Change the name of property value to get the CellContentType and rename variables to reflect change of the meaning. Follow up from commit cceaece18a42405190941865908636522e0ee4cb. Change-Id: I35c58174cef8ab44bd37b37fd18876ef912e16be Reviewed-on: https://gerrit.libreoffice.org/48476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-25CheckLinkFormulaNeedingCheck() for .xlsx conditional format expressionsEike Rathke
Change-Id: I31ede1a23223a798141a0891deeabd8cf88fff58
2018-01-25tdf#114519 Update cell content on sidebar number format changeJim Raykowski
In Calc, when the cursor is flashing in a cell (input mode) and the sidebar Number Format panel 'Select a category of contents' drop down selection is changed the cell contents does not update on selection change. This patch ends cell input mode on 'Select a category of contents' drop down change allowing cell to be updated to the selected number format. Change-Id: Ia1f46499ada2cfbcc82bd5babb6cf56ae0d6259c Reviewed-on: https://gerrit.libreoffice.org/46883 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-01-25tdf#45904 Move _SheetCell Java tests to C++Jens Carl
Change-Id: I5d698303a901ee103fdd4ffdea34809142afa0e5 Reviewed-on: https://gerrit.libreoffice.org/48463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-25CheckLinkFormulaNeedingCheck() for .ods conditional format expressionsEike Rathke
Change-Id: I45eb1ab5efa0ec9da2663f20427d2474ce300826
2018-01-25Prepare CheckLinkFormulaNeedingCheck() to use either RPN or tokenized codeEike Rathke
Conditional format formulas aren't finally compiled until needed so the check will have to operate on the tokenized expression instead of RPN code. Change-Id: I68837e9bd33f125ab47b10b1a6fa18175abd1627
2018-01-25[Pardus] tdf#108989 Add contextual manage names command.Gulsah Kose
If cursor in a named range .uno:DefineCurrentName command appears on context menu. Opens manage names dialog. This patch is sponsored by ULAKBIM/Pardus project. Change-Id: I730fd427fa3d6f5c92563282ff8ca3c0e668eddd Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/47925 Tested-by: Jenkins <ci@libreoffice.org>
2018-01-25Fix typosAndrea Gelmini
Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce Reviewed-on: https://gerrit.libreoffice.org/48545 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-25Sort dialog: Improve wordingSamuel Mehrbrodt
Previously it could easily be misread as "Include comments - only in boundary columns" (and the German translator obviously also read it that way). Change-Id: I37f58ebd6b1700e157d2355bbf05c4b42d5aae29 Reviewed-on: https://gerrit.libreoffice.org/48352 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-25Updating images should not depend on unrelated conditionSamuel Mehrbrodt
Instead update them unconditionally as it is done with comments. The data range has been set beforehand (considering the option to include boundary columns with images only) so at this point the swapping should happen unconditionally. Follow-up for 3a2a430ae8e2c1647c18d8904477949f6e2e7941 Change-Id: I1d75dd6e22db5cc28aa45f7b86dab013f3595199 Reviewed-on: https://gerrit.libreoffice.org/48383 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-25Assert that parameters are validSamuel Mehrbrodt
Follow-up for 3a2a430ae8e2c1647c18d8904477949f6e2e7941 Change-Id: I46a4f8a4528b73e4dcb01770af127ddea4000fdb Reviewed-on: https://gerrit.libreoffice.org/48382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-25Fix typosAndrea Gelmini
Change-Id: I18d224557173b9ae5f20399b05132f45f08022a4 Reviewed-on: https://gerrit.libreoffice.org/48544 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-24[Pardus] tdf#108989 Add contextual validity command.Gulsah Kose
When cursor is in a cell has following validity attributes SC_VALID_WHOLE, SC_VALID_DECIMAL, SC_VALID_DATE, SC_VALID_TIME,SC_VALID_TEXTLEN, SC_VALID_LIST, SC_VALID_CUSTOM, Validity command appears on context menu. This patch is sponsored by ULAKBIM/Pardus project. Change-Id: I47c0de7b62befdf02c343c1419cf32441d8f4df2 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/48067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-01-24loplugin:constparamsNoel Grandin
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504 Reviewed-on: https://gerrit.libreoffice.org/48392 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:unused-returns in vclNoel Grandin
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e Reviewed-on: https://gerrit.libreoffice.org/48331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24tdf#115093 : Do not reuse singleref tokens...Dennis Francis
...in formula group computation if the formula contains only a single reference besides any ocOpen/ocClose pairs wrapping it as the sole content. In such a case the "result" formula token returned by ScInterpreter::GetResultToken() is the same as the original singleref token, so for each row of the formulagroup, we need to use a separate singleref token. Also added a unit test in sc/qa/unit/parallelism.cxx Change-Id: I6032efc5be9b51ca1e9daf9bdd19997a949d2f43 Reviewed-on: https://gerrit.libreoffice.org/48449 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23Use a more conventional way of clearing ScRange variablesStephan Bergmann
...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of type ‘class ScRange’ with no trivial copy-assignment") Change-Id: I2178697082b1c284d26cedaa64c73b92d9e6aecb Reviewed-on: https://gerrit.libreoffice.org/48393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23offapi: Add properties FormulaResultType2 and CellContentTypeJens Carl
Add two new properties to SheetCell.idl "FormulaResultType2" and "CellContentType", because the "FormulaResultType" is returning the wrong value (com::sun::star::table::CellContentType instead of com::sun::star::sheet::FormulaResult). Also documeted the curiosity. Change-Id: Icc6538e155ba27fb9d097d8790ac9b4b230c1446 Reviewed-on: https://gerrit.libreoffice.org/48367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-23Fix typosAndrea Gelmini
Change-Id: I17e617d89d1b5ad92c5c8218958e86ca722b13e2 Reviewed-on: https://gerrit.libreoffice.org/48435 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23Flatten ScRangePairList::Join() recursionEike Rathke
Similar to ScRangeList::Join() done before. Change-Id: Ie513b4c72bc211c196e13761b63446174321a389 Reviewed-on: https://gerrit.libreoffice.org/48361 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23Flatten ScRangeList::Join() recursionEike Rathke
Joining an existing list of identical ranges could end up in a very deep (but not infinite) recursion which could lead to stack exhaustion. Recursion is unnecessary if we re-enter the loop with the picked range. Continuing the loop as it was done after recursion isn't necessary either, to the contrary, as long as there is one join try the entire list again. Commit f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8 pointed this out as the UBSan build runs with ulimit -s 8192 Change-Id: Ibbc542fc8ae6d1509744aa731771eb6e32a38841 Reviewed-on: https://gerrit.libreoffice.org/48360 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23new loplugin: pointerboolNoel Grandin
look for possibly bogus implicit conversions to bool when passing (normally pointer) args to bool params. this plugin comes in the wake of a couple of bugs caused by refactoring, where some of the call sites were not currently updated. Of the changes, the following are real bugs: desktop/../dp_persmap.cxx StartInputFieldDlg in sw/../fldmgr.cxx which occurred as a result of commit 39d719a80d8c87856c84e3ecd569d45fa6f8a30e Date: Tue May 3 11:39:37 2016 +0200 tdf#99529 sw: don't pop up input field dialog before inserting field CSerializationURLEncoded::encode_and_append in forms/../serialization_urlencoded.cxx XclExpCFImpl::XclExpCFImpl in sc/../xecontent.cxx I have no idea how to properly fix this, just made a guess. SwDocTest::test64kPageDescs in sw/qa/core/uwriter.cxx which looks like a simple copy/paste error. Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441 Reviewed-on: https://gerrit.libreoffice.org/48291 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23USHRT_MAX -> SAL_MAX_UINT16Stephan Bergmann
...that had presumably been forgotten when the surrounding code had been changed from USHORT to sal_uInt16 in cd42389ad67b403a07a0dda8e2a6e213def49251 "removetooltypes01: #i112600# remove tooltypes from sc". Plus, turning the preprocessor checks into static_asserts. Change-Id: I78271f7027af701699865913813d6dea8b0c570b Reviewed-on: https://gerrit.libreoffice.org/48358 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23tdf#98931 Consider cell-anchored images when sortingSamuel Mehrbrodt
This makes images/draw objects anchored to cells move as any other content when sorting cells. Works for sorting rows and columns. Also fixes a bug where notes attached to cells were not sorted when sorting columns. Change-Id: Id9a56a15f776d5adbe382a9bca167bff48b69a0c Reviewed-on: https://gerrit.libreoffice.org/46838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-01-22gbuild: always compile as C++17 with MSVC 2017Michael Stahl
The current update MSVC 2017.5 supports fancy new C++ features, but unfortunately in its default C++14 mode it falls over and dies with an internal compiler error as soon as it sees the WeakImplHelper variadic template. In order to work around the ICE, build everything as C++17, which somehow doesn't crash. This causes loads of deprecation warnings about obsolete std::this and badly designed std::that, almost all of them from boost headers, which are well known for following every best practice in the C++ book. Liberally sprinkle macros around to suppress the warnings for now, like we already do with the other million warnings from boost headers. Change-Id: Ia6b6ef5e457b5fe3c8cfe361ba5da39376bb7c4c Reviewed-on: https://gerrit.libreoffice.org/48225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-22StartExecuteAsync doesn't need a second paramNoel Grandin
we can just use this to store a keep-alive reference in AsyncContext Change-Id: I0152aef5386aa9753b48afdfc958790f10d13560 Reviewed-on: https://gerrit.libreoffice.org/48294 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
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-22copy ScAddress before possibly joining itCaolán McNamara
Change-Id: Ib1148584b9771da67d3f4b3141184228e1bbe3a2 Reviewed-on: https://gerrit.libreoffice.org/48271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-21tdf#113572: removed redundant calc serviceVasily Melenchuk
calc service introduced previously in commit 0074951704022d173a5fdb9df933f47be1dcbb91 is not required, interface is enough for feature implementation. Change-Id: I9cf30f2201619465da9061c7ef1e574209062cf9 Reviewed-on: https://gerrit.libreoffice.org/47960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-20Addition of focus_on_click to notebookbar ui filesMaxim Monastirsky
(automatic rewrite) Change-Id: I959b58b3b0b69de9344b0f7188594a19e8b9d4ea Reviewed-on: https://gerrit.libreoffice.org/48176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.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-20tdf#39593 deduplicate code in ScCellShelltagezi
Change-Id: I764edf0c1fb093bf64ea3ea91f98f8586d9549f5 Reviewed-on: https://gerrit.libreoffice.org/47017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-20loplugin:unusedmethodsNoel Grandin
Change-Id: If00b0e659e1818c29ae39b89f8b4f7ea29d14986 Reviewed-on: https://gerrit.libreoffice.org/48185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19Don't push error twiceEike Rathke
No harm was done as the stack is cleaned up afterwards, but it's wrong anyway and having to push the result downwards during cleanup is unnecessary. Change-Id: I0b2c153c9791ce5c287d340bac466c19cd6a5703
2018-01-19inline some definesNoel Grandin
which don't add any value anymore Change-Id: I45977d972d4d02926630b749d3ec736416138cf5
2018-01-19new loplugin:emptyifNoel Grandin
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42 Reviewed-on: https://gerrit.libreoffice.org/48128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19Fix typosAndrea Gelmini
Change-Id: Icadf5cb88024b8889d49dc9c5210d0de8deaed3b Reviewed-on: https://gerrit.libreoffice.org/48172 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-19SfxReqest::Done takes a SfxItemSet& or a boolean, not a SfxItemSet*Caolán McNamara
regression from commit c40dfabd56ade10fe35690dc9810955c2e99e2c0 Date: Fri Jan 12 11:57:22 2018 +0000 Change-Id: Ia97ba286a2da0584a2e806ad7396a3633f9d913e Reviewed-on: https://gerrit.libreoffice.org/48160 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18xSheetDoc cannot be null hereStephan Bergmann
...as the UNO_QUERY_THROW above would already have caused an exception Change-Id: Ie0453b67716c64ddaddfa6becd498952a497be63 Reviewed-on: https://gerrit.libreoffice.org/48106 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18tdf#114720: Fix subtotal crashAhmed GHANMI
A condition was added in order to not make subtotal functions if category was not checked. Change-Id: I56f11330fa16bf0d3199576ce2545cbc8d13e864 Reviewed-on: https://gerrit.libreoffice.org/48099 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-01-18Include android/compatibility.hxx from ubiquitous sal/config.hStephan Bergmann
...instead of having to add it to more and more individual .cxx files, as the need arises. Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94 Reviewed-on: https://gerrit.libreoffice.org/48108 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18Don't let testSpreadsheetViewSettingsProperties interfere with existing testsStephan Bergmann
...by giving each test its own mxComponent. At least my Windows builds started to fail CppunitTest_sc_tabviewobj with > C:/lo/core/test/source/sheet/xviewsplitable.cxx:36:sc_apitest::ScTabViewObj::testSplit > equality assertion failed > - Expected: 1 > - Actual : 0 > - Wrong column after 95307f2ca73480176634e5cc46d96a19b735e87b "tdf#45904 Move _SpreadsheetViewSettings Java tests to C++" added the call to testSpreadsheetViewSettingsProperties ahead of the call to testSplit. (And allowing multiple tests to work on shared state and interfere like they apparently do here seems rather brittle in general.) Change-Id: I73a60ae3c703e59852c8e16b09f5897849f5bdf4 Reviewed-on: https://gerrit.libreoffice.org/48070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18Fix typosAndrea Gelmini
Change-Id: I633e4921042809c628e55825b70c540767eba1d3 Reviewed-on: https://gerrit.libreoffice.org/48140 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>