summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2016-11-14ScFormulaCell::Notify: bail out early in doc dtorEike Rathke
Closing a document we don't even need to check a hint ID here. Change-Id: I8cbfe50d46d6fd204a4b9ba2230e873eb5a8065e
2016-11-14coverity#703927 Unchecked return valueCaolán McNamara
make these less odd and simply return the thing they selected, rather than a bool that indicates that the rpObj arg was successfully set to non-null, so there's one flag to check not two which both mean the same thing. Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50 Reviewed-on: https://gerrit.libreoffice.org/30794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-13drop extra semicolonsDavid Tardon
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-12Actually this should be MAXROWCOUNT.Kohei Yoshida
Since the end value is non-inclusive in flat_segment_tree. Change-Id: I5f1febe378ab5c815d420ae77e38286fec8835b6
2016-11-12Address warning from the MSVC compiler.Kohei Yoshida
warning C4701: potentially uninitialized local variable 'aRange' used Change-Id: I06753a17f9b7efa35395f943f8a2ecccdd194be9
2016-11-12loplugin:staticmethodsKohei Yoshida
Change-Id: I674afe58964c27c349012de1117db3e362e72e5f
2016-11-12loplugin:stringconstantKohei Yoshida
Change-Id: Ia32a99530b8b32dc82dbca79d8c8ca1f2e090a96
2016-11-12Dump the state of the "save" data as well.Kohei Yoshida
The "save" data is basically a section of the pivot table data that needs to be saved to the file. Change-Id: I2589c0fcd6df2458d35397b358064645fd97687f
2016-11-12Let's just dump the result tree in dbgutil build.Kohei Yoshida
Change-Id: I491a36152bb2106a7917a0fd548bd5b34d7021c6
2016-11-12Let's hook up the pivot table dumper code to Ctrl-Shift-F8 as well.Kohei Yoshida
It dumps the pivot data if the cursor is over a pivot table output, else it dumps the column storage info. Change-Id: I403e381be3f64d139f8bfaca7e477742a65dde9c
2016-11-12Renaming due to the fact that it now dumps non-formula blocks too.Kohei Yoshida
Change-Id: I9d06786a93bab2f0ed0d179df8edf9b5d8128bf6
2016-11-12Keep loplugin:staticmethods happy.Kohei Yoshida
Change-Id: I2cdf67490d61b2868910e615bfc44d126d207bcb
2016-11-12Dump the other block types as well.Kohei Yoshida
Change-Id: Iff41d4c2065a03865f884b2a8a260ffd83835dc1
2016-11-12Let's not dump formula results.Kohei Yoshida
It could be too verbose. Change-Id: I5f2da92e78bb069f3bb0c9c07bb3eae6d990f810
2016-11-12Ctrl-Shift-F8 to dump the column storage where the cursor is.Kohei Yoshida
Enabled only in dbgutil build. Change-Id: I0cd095fb56893122a26b2da6882fca15e516d193
2016-11-12accidentally kept always scroll test enabled.. tdf#46200 follow-upEike Rathke
When ironing out the nitpicks and committing 453de3473cf6f383c71466a1ed15e28b844ed7e5 the stupid reviewer forgot to revert the bScrollLock=true so now the scrollock mode was always on. Change-Id: I16b00266044a9ec9c839ad05e688801a7f3c7158
2016-11-12tdf#69981 - sc: blank empty cells in TextToColumnsTamás Gulácsi
If the string is empty, we must delete the destination cell. This is done, iff we don't return early (rStr.isEmpty() check). Instead, add a fast path for the empty string. Change-Id: I950db5012e7e9337f2efd576e58198b1b49eaa0c Reviewed-on: https://gerrit.libreoffice.org/30778 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-12Aviod memory leak in ScInterpreter::ScIntersect()Mike Kaganski
When one argument is a reference list, and another is a reference, that reference is converted to temporary list. That list used to leak because of missing release. Change-Id: Ic76c9b8769b3a50980cf4d4e3468763b65f21e07 Reviewed-on: https://gerrit.libreoffice.org/30792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-12add MAXIFS testcaseZdeněk Crhonek
Change-Id: I6946fc6a6503c8e2b3b95d0d0a13d0e356f0993f Reviewed-on: https://gerrit.libreoffice.org/30728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-12add LEFTB test caseZdeněk Crhonek
Change-Id: I7370b60f417d4f1460a959c506e5ebc75d95fa61 Reviewed-on: https://gerrit.libreoffice.org/30366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-12add MEDIAN test caseZdeněk Crhonek
Change-Id: I5d823f33b4cbd4a3e3b7317bcdf6d39c6210a9a0 Reviewed-on: https://gerrit.libreoffice.org/30729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-12Guarantee that InterpretFormulaGroup() is always called first.Kohei Yoshida
This makes it easier to profile group calculations via formula log. You can always bail out of that function when unfavorable condition hits. Change-Id: I49664c3e34b9efc98f39845379631649f76769de Reviewed-on: https://gerrit.libreoffice.org/30790 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2016-11-12add REPLACE test caseZdeněk Crhonek
Change-Id: Ic9e812abd1bc0d47fe30e810f71bca97811439bc Reviewed-on: https://gerrit.libreoffice.org/30730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-12Resolves: tdf#93415 use proper sheet separator in ADDRESS A1 notationEike Rathke
So that it matches what INDIRECT can digest in the current configuration, as that is the primary use case. The actual separator used depends on "Reference syntax for string reference" and "Formula syntax" configured in Tools Options. Change-Id: Iff91be7afdb9601a87b547dd3a7d3f4d994caf5d
2016-11-11Dump the formula string here which is also useful.Kohei Yoshida
Change-Id: I604fbb41fc41319bbb17a5aef0994c8e0adc838a
2016-11-11sc: OUString cleanupMichael Stahl
Change-Id: I2fcd14adaa20d2692beb12ffd0b40b1a47538fbc
2016-11-11tdf#46200 Use the Scroll Lock key as a toggling lock key like ExcelAbhilash Singh
Change-Id: I153522a90674f3f3c4db4ff300ef5cf4075704e3 Reviewed-on: https://gerrit.libreoffice.org/30117 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-11tdf#103632 - sc: OOB sort fields unit test.Michael Meeks
Change-Id: I6734d51c8f9c4ca5a01c3e54a71f83ba15db508d Reviewed-on: https://gerrit.libreoffice.org/30761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-11-11tdf#103632 - sc: tolerate OOB sort fields from UNO API.Michael Meeks
Change-Id: Ie04b4281947a05572672838b3b4b5c6173d8fa0b Reviewed-on: https://gerrit.libreoffice.org/30576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-11-11tdf#101299 : do not show merge cells context menu for the trivial caseDennis Francis
Change-Id: I4e5726009ac5ef60ffa74f3bbbe01683c3658e95 Reviewed-on: https://gerrit.libreoffice.org/29583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-11tdf#101042 Fix for frozen windows in ExcelBartosz Kosiorek
Window protection is "not allowed to move and resize windows" in MS Excel, it is definitely not Frozen Panes ( maData.mbFrozenPanes ) Change-Id: I04f0429738a6daecb26274f169c5118dba73e895 Reviewed-on: https://gerrit.libreoffice.org/30076 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-11tdf#36038 QA test export/import extended LCID to ExcelLaurent Balland-Poirier
Change-Id: I5c8a19f62f030913f7e6dcbc0274f5d0aa197056 Reviewed-on: https://gerrit.libreoffice.org/30175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-11loplugin:countusersofdefaultparams in sc(part2)Noel Grandin
Change-Id: I1e2a0969ca7e9e0f75079a171150269dfed26507 Reviewed-on: https://gerrit.libreoffice.org/30755 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10Make sure we pass the top-left corner address.Kohei Yoshida
aRefPos may shift to the right in case of a multi-column range. Change-Id: I1ed033707b9f4f2c3523631b5035b02e59bbaa6a
2016-11-10'make screenshot' use-after-free fixesStephan Bergmann
Change-Id: I4302d0d767a1bf50fd34a78e9aa0ad6d6b0c7a22
2016-11-10'make screenshot' loplugin fixesStephan Bergmann
Change-Id: Ibebcd1c1ebfea0ecdf9d90b6f8bcc8ceb87df456
2016-11-10Refactor ScAttrArray for tdf#50916Dennis Francis
For a default column, now ScAttrArray does not store the default format. So the case of default pattern from 0 to MAXROW is represented as nCount = 0 and pData = nullptr in ScAttrArray. A new ScAttrArray object (aNextColAttrArray) is introduced as a member of ScTable. This is used to store the formatting of *unallocated* columns (whose indices are from aCol.size() to MAXCOL). In next patches for this bug, I plan to refactor table*.cxx functions related to formatting such that : 1) In formatting setter functions, if colspan of the input range spans the colrange(aCol.size() to MAXCOL) then instead of allocating columns, apply that formatting to aNextColAttrArray. 2) In formatting getter (const) functions, if requested colspan has some intersection with the colrange(aCol.size() to MAXCOL) then use the formatting info stored in aNextColAttrArray to calculate the formatting of the input range. 3) In general setter (non-const) functions if we really need to allocate new columns (example, when data is entered), use the formatting info stored in aNextColAttrArray to create pAttrArray of the new column. Change-Id: Ieb56f853209b396d92fdb2c27e39361703576423 Reviewed-on: https://gerrit.libreoffice.org/27828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-10clarify class documentationEike Rathke
Change-Id: I282a438159b9862034ba9fe4acdf87bf859b0465
2016-11-10Avoid writing to the log for the same group twice.Kohei Yoshida
This can happen when the group calculation is disabled and falls back to non-group calculations. And we only care about the first entry in case of non-group calculation of grouped cells. Change-Id: I545980acf8e35b4d0504aa2a77f86bdc85799e29 Reviewed-on: https://gerrit.libreoffice.org/30738 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2016-11-10Wrap pointer to dialog with VclPtrTakeshi Abe
Change-Id: Ifaf0f45b12d983d556ca4c7e0b4a57c47ff38597 Reviewed-on: https://gerrit.libreoffice.org/30737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10Don't let multiple JunitTests operate in parallel on ScDDELinksObj.odsStephan Bergmann
...seen a failure of JunitTest_sc_unoapi_3 with > checking: [sc.ScDDELinkObj::com::sun::star::util::XRefreshable] is iface: [com.sun.star.util.XRefreshable] testcode: [ifc.util._XRefreshable] > LOG> Execute: refresh() > LOG> starting required method: addRefreshListener() > LOG> Execute: addRefreshListener() > Method addRefreshListener() finished with state OK > LOG> addRefreshListener(): COMPLETED.OK > warn:unotools.misc:30768:84:unotools/source/misc/mediadescriptor.cxx:690: caught Exception "" while opening <file:///data/lo/core/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods> > warn:filter.config:30768:84:filter/source/config/cache/typedetection.cxx:455: caught Exception "Could not open stream for <file:///data/lo/core/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods>" while querying type of <file:///data/lo/core/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods> > Method refresh() finished with state FAILED and it appears that all of sc.ScDDELinkObj, sc.ScDDELinksObj, and sc.ScIndexEnumeration_DDELinksEnumeration try to open that file (necessarily for writing?), and the first two are in JunitTest_sc_unoapi_3 (so are executed sequentially), but the last one is in JunitTest_sc_unoapi_4 (so may be executed in parallel with the others), so that may be the reason for such sporadic failure. Easiest workaround appears to be to move the third test into the same JunitTest as the other two... Change-Id: Iefb94cf657bdc9c1eac92dd49ee6257eb5e80905
2016-11-09assert a supposed-to-be-fixed condition, tdf#89957 relatedEike Rathke
Change-Id: Ie00840e0b8cff747e131b6bc9def0ddaf57edea7
2016-11-09make MS Excel 2003 XML filter tests great again!David Tardon
Change-Id: Ica8a5a2f6046eabf4fa8081db0aa50ade23b5b3a
2016-11-09fix typoDavid Tardon
Change-Id: I2ad83dec1e409cd7b12009c31fbe4cc9d73223c1
2016-11-09tdf#102370 QA test exponent without sign during export to ExcelLaurent Balland-Poirier
Change-Id: I0adf7d97f297a8fe1003c8e4cb9a08c9070ed92e Reviewed-on: https://gerrit.libreoffice.org/30170 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-09Resolves: tdf#103689 do not slice 3D area broadcasters into separate sheetsEike Rathke
Change-Id: Ie167e5e5e953c3e8064b8e128d52f6aa6740575b
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08Ensure that the string array is null when no strings present.Kohei Yoshida
It was intended this way from day one, but the implementation didn't live up to that promise... Change-Id: I231ddc8923fdd8a205127c6a3214dd93f13378b9 Reviewed-on: https://gerrit.libreoffice.org/30678 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2016-11-08try and auto-silence coverity#1394273 Use after freeCaolán McNamara
and coverity#1394272 Use after free Change-Id: Id2340bccc6fbaeb917cb397890875bd0849ffe85