summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use more SAL_N_ELEMENTS part 2Noel Grandin
Change-Id: If00e371c3cd3ae616309a172c875faed016e391b Reviewed-on: https://gerrit.libreoffice.org/38773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: I5a1530746e834223aff05075400bdaa4b9135963
2017-06-14Final result of Reference array is svMatrix instead of svRefList, tdf#58874Eike Rathke
So {=OFFSET(A1,{1;2;3},0)} or {=OFFSET(A1,B1:B3,0)} return a column vector and {=OFFSET(A1,{1,2,3},0)} or {=OFFSET(A1,B1:D1,0)} return a row vector like they did before. Excel doesn't handle this at all and returns #VALUE! instead. Change-Id: Iba14ba4ca089568ddc724a22d3093bfe6b73b995
2017-06-14Let CreateItemSet return unique_ptrStephan Bergmann
...and address resulting loplugin:useuniqueptr Change-Id: Ia79eb8d59ce5092b2d93b656eab687096baedf17
2017-06-13Use FormulaTokenArray::FirstRPNToken()Tor Lillqvist
Change-Id: I834ad8cd53e2c52ae6cd8f78d5bec0870b0d5c3f
2017-06-13Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: If43aaff9665b5be2d9b358dea0f3369be755791a
2017-06-13Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: Idd80ed837ab35890ecdda386965eb037ff4af5c5
2017-06-13Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: Id839dde6453b75e59a6903eb0e18ce6f2d75adbf
2017-06-13Use FormulaTokenArray::FirstToken() in more placesTor Lillqvist
Change-Id: I4cb4a739027f03a81d758db552f9951880a79fdd
2017-06-13Use FormulaTokenArray::FirstToken() in more placesTor Lillqvist
Change-Id: I7dabdfee3c90dd87c86d1b92a7131d695a5f07d4
2017-06-13Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: I5b8e8997586255004820df97f1ea10494b536d3b
2017-06-13Use FormulaTokenArray::FirstToken() in one more placeTor Lillqvist
Change-Id: Ie331b77ec2079c4f0dca2808cafaa728378f699d
2017-06-13Use FormulaTokenArray::FirstToken() in one place where we canTor Lillqvist
Change-Id: I1ecc1fc69e8be1ba329f2436903654740dbfea9a
2017-06-13Use FormulaTokenArray::FirstToken() in one place where we canTor Lillqvist
Change-Id: I84a108d9c0f1a0982fb7144b32be007498e5f0ea
2017-06-13Use unique_ptr for SfxPrinter::pOptionsStephan Bergmann
Change-Id: I46be77225c0323f8b7f293de9c022f0de6f425b7
2017-06-13Final result of svRefList can be an array in some cases, tdf#58874 relatedEike Rathke
Actually {=OFFSET(A1,{2;4},0)} worked already before the change for arrays of references, make it work again. Further there was a difference between that and {=OFFSET(A1,{2,4},0)} (row vector vs column vector in array context) which to reintroduce would need to treat a final Reference result differently (as matrix) from an intermediate Reference result (as array). Change-Id: I9240d0cb8ba2db8a0276640463da5f0cabec58cf
2017-06-13Handle SUMPRODUCT with reference list and array of references, tdf#58874Eike Rathke
Note that Excel does not handle this the same, strangely it returns 0 for array of references, not even an error, as if all products involved a 0 somewhere. For reference list (union operator) it returns #VALUE! Change-Id: I4540a4f221518c8991c7fa3cf3f1f08f28a49038
2017-06-13Let SfxSetItem ctor take SfxItemSet by unique_ptrStephan Bergmann
Change-Id: I219dd03477862169cd50eecc14822f6a023f879a
2017-06-13This SfxItemSet appears to be unusedStephan Bergmann
Change-Id: Ib9a48e48ceda4d85f6ecca7e2bb436e8aa99d56b Reviewed-on: https://gerrit.libreoffice.org/38703 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-12tdf#50916 : Refactor table1.cxx ScTable::GetNext*() methodsDennis Francis
Refactored ScTable::GetNextPos() and ScTable::GetNextMarkedCell() methods in table1.cxx for dynamic column container. Change-Id: I5dfe9e5b2236e6ede68119f4e1252610990e498b Reviewed-on: https://gerrit.libreoffice.org/38599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-12Use unique_ptr fro ScMergePatternState::pItemSetStephan Bergmann
Change-Id: I672785b273eaa8862f43112d7f25ae495b65b0c7
2017-06-12tdf#95883 Select Unprotected Cells in CalcGulsah Kose
Change-Id: I20a71f66154675de9c2c47ff32e859c899fe9103 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/37424 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12tdf#106423: dbase file can have no recordsJulien Nabet
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=4e3ff19b33c84557fd20e68960499933b4e52638 tdf#84834 sc: stricter type detection for dBASE files Log test file from tdf#84834 still opens in Writer as expected Change-Id: Ibf5a0f586e3a132455d2363e61e5cc7ea249002d Reviewed-on: https://gerrit.libreoffice.org/38660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-12Take new FormulaTokenArrayPlainIterator into use in one more fileTor Lillqvist
Change-Id: I0a7565e2cc666151440d9fdb0a0e7b90263a88e5
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-11Fix typosAndrea Gelmini
Change-Id: I81740a3ff9474e971556e9e7d4aa245151163d0e Reviewed-on: https://gerrit.libreoffice.org/38608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-11Revert "tdf#55631: DBASE import with CP850 encoding"Julien Nabet
This reverts commit 9fe9685627c51926459a897594ead9f64deee579. Will propose a new fix Change-Id: I5c4eb38453251d2c2243ee1bae8841428c8780bf Reviewed-on: https://gerrit.libreoffice.org/38658 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-10coverity#1397206 Resource leakCaolán McNamara
Change-Id: I66f912cfc88a0122c6c23f149040277b738d9d78 Reviewed-on: https://gerrit.libreoffice.org/38636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-10tdf#55631: DBASE import with CP850 encodingJulien Nabet
Don't consider RTL_TEXTENCODING_IBM_850 as RTL_TEXTENCODING_DONTKNOW partially reverts https://cgit.freedesktop.org/libreoffice/core/commit/?id=b00c4ec0967f8712d721b31ccb2dd0778c9e973b) Indeed DBaseImport method is only called from ScDocShell::ConvertFrom (sc/source/ui/docshell/docsh.cxx) it calls it with "ScGlobal::GetCharsetValue(sItStr)" sItStr is initialized with these lines: 1272 if ( pSet && SfxItemState::SET == 1273 pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) 1274 { 1275 sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); 1276 } 1277 1278 if (sItStr.isEmpty()) 1279 { 1280 // default for dBase import (from API without options): 1281 // IBM_850 encoding 1282 1283 sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 ); 1284 } In our case, Calc asks for encoding and we provide RTL_TEXTENCODING_IBM_850 so we're not even sure sItStr could be empty after the first if Change-Id: I023b89a98d6430300ac147353ad6cbed1f2d3410 Reviewed-on: https://gerrit.libreoffice.org/38620 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-10tdf#50916 : More refactoring in table1.cxxDennis Francis
Refactored ScTable::FindNextVisibleColWithContent() and ScTable::FindAreaPos() for dynamic column container. Change-Id: I5afdbe98d4f0eb69f42b56308b57b87777861740 Reviewed-on: https://gerrit.libreoffice.org/38556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-06-10Unit test for COUNTIFS, SUMIFS, AVERAGEIFS with array of references, tdf#58874Eike Rathke
Change-Id: Ie833716fcde0b82dcaa2e5b66deb2952ee912b7f
2017-06-10COUNTIFS, SUMIFS, AVERAGEIFS, MINIFS, MAXIFS with reference arrays, tdf#58874Eike Rathke
Change-Id: I3959d67bd206f68ba1d20499d919838773b2e7df
2017-06-09Some compilers can't init vector from empty {}Eike Rathke
Change-Id: I82767a92d1f816cb7fa8ef4f96d694ca5658dfc0
2017-06-09missing includeStephan Bergmann
Change-Id: Id016d56f4ce36f07c86cf7d028f5e6beaafd3dff
2017-06-09Add unit test for COUNTIFS and AVERAGEIFS in array contextEike Rathke
To cover different code paths and use of sc::ParamIfsResult::mfCount Change-Id: I7d0cfa9de3ac5460822c4d5075de54791f7abff8
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09Add unit test for SUMIFS in array contextEike Rathke
Change-Id: I5318ab8bb4d896f3c936ec8d04eba3908b59861a
2017-06-09Too many aRes..., rename aResArray to vConditionsEike Rathke
Change-Id: Ic514a4fe34b2f9658bae61ecb4cc5c3c8361669b
2017-06-08With reference lists there can be more than 255 queriesEike Rathke
Change-Id: Ia5dc32fbcd8ad738d5ec0f20cc233b58fcadc882
2017-06-08Add '~' reference union/list operator to range finder delimitersEike Rathke
... so formula expressions using it actually get the ranges highlighted. Change-Id: Ibb0d2b49101e62b1f219a14d1669a501a450aaf4
2017-06-08Remove a TODO and explainEike Rathke
Change-Id: Ic648fd2b0a1424aa5ae5d924b29dfd2cb8dddbf9
2017-06-08EditEngine: Added ODF_TEXT_FLAT paste for scVarun Dhall
Change-Id: I40acd32229faa9a4ec9941592a4a952b7d05ef01 Reviewed-on: https://gerrit.libreoffice.org/38464 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-08Take FormulaTokenArrayPlainIterator into use in one more placeTor Lillqvist
Change-Id: If81494b9279d3c1f2c3887097f1b0036c18cab78
2017-06-08Take FormulaTokenArrayPlainIterator into use in one more fileTor Lillqvist
Change-Id: I94b8054cc978c04ae994380ea0c564a4b16de26d
2017-06-08Take FormulaTokenArrayPlainIterator into use in one more placeTor Lillqvist
Change-Id: I70e3bd1129da76e11b5f71b1b56d79898eb3d5be
2017-06-08Take FormulaTokenArrayPlainIterator into use in one more fileTor Lillqvist
Change-Id: Ib7f9b3961a3885be8c39ec5a20e7f383ecc9cc37
2017-06-08Redundant nColSize,nRowSize, use nDimensionCols,nDimensionRows, tdf#58874 prepEike Rathke
We guarantee that all references are of same size. Change-Id: I61888a257691f902cb958741f6b63779d9744e10