summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2018-07-06Added Delete Column Transformation in Data Provider DialogManuj Vashist1-4/+55
Change-Id: Ibebd92c426d1653642c5b9d037d6368636561fcd Reviewed-on: https://gerrit.libreoffice.org/56786 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-06Limit GetNextPos() loops to range also for nMoveX, tdf#68290 follow-upEike Rathke1-85/+98
And straighten the code a bit to use one init block and return early if nothing marked or not protected. Change-Id: I4c9247479a137cb7f9435180f3f54667d28a29ef Reviewed-on: https://gerrit.libreoffice.org/57025 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-05sc: Prefer std::vector to std::dequeTakeshi Abe1-9/+8
There seems no need for choosing deque in the first place 5099046dccb69af04e2a3adafad8e06c0832bd06. Change-Id: I194e6bee37d8f6f177aee96681b3014119aa11c1 Reviewed-on: https://gerrit.libreoffice.org/56997 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-05Remove obsolete (cargo-cult copied) dependenciesJens Carl1-28/+0
Change-Id: I9696a9ad3c0f5c3e6bb12a81dd2386e927eebed2 Reviewed-on: https://gerrit.libreoffice.org/56987 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-05Adjust indentation to match surrounding codeSamuel Mehrbrodt1-1/+1
Change-Id: I631fe8553907c5ddc979a139c8cc77d3902d204a Reviewed-on: https://gerrit.libreoffice.org/57014 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-07-05block ocText for calc's threadingLuboš Luňák1-0/+1
It may end up calling XColorList::CreateStdColorList(), and XPropertyList is not thread-safe (gnome#627759-1 with disabled mnOpenCLMinimumFormulaGroupSize). Change-Id: I79c8335c6e8e3aaf39e01c68e6dbf6011820971a
2018-07-05tdf#105225 fix new background tab page in calc format cells dialogJim Raykowski1-1/+1
Change-Id: I56cca8d22e98364eb369f3ccf54ca1acb3eb8516 Reviewed-on: https://gerrit.libreoffice.org/56983 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-07-05use std::unique_ptr for ScTable in ScDocumentNoel Grandin8-98/+75
Change-Id: Ic817fbd7953afe9007f9ec6071f53c8beca6dd18 Reviewed-on: https://gerrit.libreoffice.org/56949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-05find-unneeded-includes: stop proposing internal libstdc++ headersGabor Kelemen1-9/+0
They wouldn't really compile anyways and only cause unnecessary blacklist entries. Some '- memory' entries can already be removed from the blacklists. Change-Id: Iab53d5a57121f61abe935e712dc23a55390235bf Reviewed-on: https://gerrit.libreoffice.org/56979 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-05Turn SAL_WARN into assertEike Rathke1-1/+1
... as it indicates a programming error. Change-Id: I526846fe695fc7ed28336ea20cdba0c0db2e922a
2018-07-05Limit GetNextPos() loops to range, if available, tdf#68290 follow-upEike Rathke1-17/+58
It's unnecessary to check all columns if there was a range marked anyway. Also use GetPrintArea() only for bUnprotected and enlarge the result a bit to cover the case where a protected form may be empty but not have vidsual indications either. Also adding nMoveY to nCol was nonsense all the time already, what was actually meant is to add the direction of movement. Worked by chance because nMoveY was always +1/-1. Change-Id: Ic1175a607a1169f3ef0e28d0f3a91f8c526314f4 Reviewed-on: https://gerrit.libreoffice.org/56966 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-04Check for HasAttrFlags::Protected instead ATTR_PROTECTION, tdf#68290 follow-upEike Rathke1-1/+4
ATTR_PROTECTION at ScAttrArray is not sufficient as also conditional formatting may apply protection to otherwise unprotected cells. This now actually enables travelling Enter->Right in the sample document of tdf#68290 to advance to the next row / first col if at the end of a row for such protected cells. This matches what the ScTabView::MoveCursorRel() call then does via ScTabView::SkipCursorHorizontal() and ScTabView::SkipCursorVertical() (additionally checking protection options for selectable cells which should be done in ScTable::GetNextPos() as well). Actually when getting things straight the call to MoveCursorRel() may not be needed anymore and MoveCursorAbs() could be sufficient, but *only* if we can differentiate between viewshell cursor travel and UNO gotoNext()/gotoPrevious() calls. Change-Id: I0fcb0ecd748bbde982b260db4f4696166cfc5e78 Reviewed-on: https://gerrit.libreoffice.org/56947 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-04simplify ScChartListenerCollection listener managementNoel Grandin1-67/+19
Change-Id: I95961bc77b5f07c9eb57675ce2cada79fec4a2e2 Reviewed-on: https://gerrit.libreoffice.org/56942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScDPDataDimensionNoel Grandin2-16/+15
Change-Id: I74d6fd6a291d518c26180836706e4195f1144c8f Reviewed-on: https://gerrit.libreoffice.org/56944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04Remove now moot OSL_ENSUREEike Rathke1-3/+0
Change-Id: Ifaf18cfa74a57898f4762a284ec088ece8b8270e
2018-07-04Resolves: tdf#117458 let Enter move left/right again, tdf#68290 follow-upEike Rathke3-12/+17
Regression from commit b0a391d62c1df7525069a02913a52af940d92ecc CommitDate: Tue Jan 30 23:12:04 2018 +0100 Circular movement of cursor in a table with hidden columns/rows, tdf#68290 related where for nMoveX case nNewX - nCurX and nNewY - nCurY were both 0. Also don't abuse the bMarked flag for GetNextPos() as bUnprotected if nothing is marked, in which case also bKeepSel doesn't make sense. Change-Id: I59af09f1cfa397e68ce16d151ba7eee6e6598a75 Reviewed-on: https://gerrit.libreoffice.org/56935 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-04loplugin:useuniqueptr in ScChart2DataSequenceNoel Grandin2-5/+5
Change-Id: I340d9fbde1aa53097c162b61505593ee6d9fde35 Reviewed-on: https://gerrit.libreoffice.org/56902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScTabViewNoel Grandin7-59/+51
and remove pDrawOld, was not being used for anything useful. Change-Id: I65ded5758ca5f7636bf7188012707410f59fb81d Reviewed-on: https://gerrit.libreoffice.org/56910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScCellTextDataNoel Grandin3-15/+15
Change-Id: I60a0ffe27b2bbd7d2661fc0fa288730cb71be0b2 Reviewed-on: https://gerrit.libreoffice.org/56904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04lok: sc: ctrl-clicking links doesn't workMarco Cecchetti2-75/+84
I think there is no reason for not execuring the code below if ((bDouble || bIsTiledRendering) && .... ) { ... } for both desktop and online. So since the code for open the clicked URL is below such if clause, I changed the code so that we return only when it's really a double click event. Moreover I reverted back the code for executing the list validation pop-up to its original place, since there is no more the need to have it executed in two places. Change-Id: Idbec2e6e45cd7ee8282005169e1132a11d4cac33 Reviewed-on: https://gerrit.libreoffice.org/54151 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-07-04loplugin:useuniqueptr in ScCellsEnumerationNoel Grandin2-6/+5
Change-Id: I2ab494c977e6c877064ba6561d850b62bef2b438 Reviewed-on: https://gerrit.libreoffice.org/56911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScCellRangesBaseNoel Grandin2-19/+18
Change-Id: I4416b012f20c71885211350e605e7ad856642fea Reviewed-on: https://gerrit.libreoffice.org/56909 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScOutputDataNoel Grandin2-9/+6
Change-Id: Ic3b8802262910502cc2f7b638e41e0e865c03f6c Reviewed-on: https://gerrit.libreoffice.org/56908 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScPreviewNoel Grandin2-15/+11
Change-Id: I081066d34ed6b134b5354f8df7f9801356ef181c Reviewed-on: https://gerrit.libreoffice.org/56907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScDrawViewNoel Grandin2-7/+3
Change-Id: Idbc47bdb3ff16d29a93365654b36b047c564de70 Reviewed-on: https://gerrit.libreoffice.org/56906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScNoteMarkerNoel Grandin2-3/+3
Change-Id: I4880f23a6c5879807430b60e812c6c697cf69268 Reviewed-on: https://gerrit.libreoffice.org/56905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04loplugin:useuniqueptr in ScSimpleEditSourceHelperNoel Grandin2-11/+11
Change-Id: Iebe62753d9e6f83f985e4c55fb938d5861613898 Reviewed-on: https://gerrit.libreoffice.org/56903 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04Make ThreadPool::pushTask take param by std::unique_ptrNoel Grandin4-6/+7
And fix leak in XclExpRowBuffer::Finalize, was not freeing the synchronous task it creates Change-Id: Id1e9ddb5d968e6b95d9d2b5ca0c9e50774580182 Reviewed-on: https://gerrit.libreoffice.org/56874 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04Menubar Calc: move document compare features to track changes groupandreas kainz1-2/+3
same layout than in writer Change-Id: I9fd0e745b6376c3047c4fa8408543fe11a4852ce Reviewed-on: https://gerrit.libreoffice.org/56899 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-07-04Fix typoAndrea Gelmini1-1/+1
Change-Id: I28a12befa0df6dcfcec7bad39c8691425b5b5d9d Reviewed-on: https://gerrit.libreoffice.org/56852 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-03Resolves: tdf#118221 whole cell kerning default is offEike Rathke1-0/+4
So set that at OutputDevice, there is no cell attribute for kerning, all kerning on is handled by EditEngine output. Change-Id: I23ac2b2cf59f3a4651cc9b614df03860a9cb9146 Reviewed-on: https://gerrit.libreoffice.org/56866 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-03sc: Eliminate the case of MAXROWCOUNT_DEFINE <= 65536Takeshi Abe1-12/+0
It is 1024*1024 since b3579d71c6536ab1d03cc47249d582a574fd054a. Change-Id: I7f523f21229de8f4fa378aa85f124863a67b21c8 Reviewed-on: https://gerrit.libreoffice.org/56843 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-03sc: A micro optimization of PERCENTILE() for interpolation casesTakeshi Abe1-4/+2
As the leading std::nth_element() already partitions the vector, all we have to do is to pick the minimum in its latter part. Change-Id: I7767edc538819251c8fe9d26441ae57b06b2f865 Reviewed-on: https://gerrit.libreoffice.org/55575 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-03ScFormEditData copy functions can be deletedStephan Bergmann2-7/+2
Change-Id: Id6aad74198da68aa6475bcd3b17c993a51ccabe9 Reviewed-on: https://gerrit.libreoffice.org/56846 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-03ScAsciiOptions copy assignment op can be left implicitly definedStephan Bergmann2-35/+0
...which removes a -Wdeprecated-copy (because the copy ctor is already not user- declared) with GCC trunk towards GCC 9 (and makes SetColInfo unused). Curiously, the user-provided copy assignment op didn't copy the eLang member, but assume that was by accident rather than on purpose. Change-Id: I3116500b748f0625acf1368d0106ade94f0dfa26 Reviewed-on: https://gerrit.libreoffice.org/56845 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-03tdf#118452 Don't crash when multi thread calculation is disabledGabor Kelemen1-1/+1
...by default configuration. Change-Id: If6075ae66537f613434dd38766324436f2426517 Reviewed-on: https://gerrit.libreoffice.org/56840 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-07-03loplugin:useuniqueptr in ScHeaderFooterTextDataNoel Grandin2-12/+10
Change-Id: Ia359ee8e9e4876f6bbf86702c476c9f9602295a0 Reviewed-on: https://gerrit.libreoffice.org/56832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03loplugin:useuniqueptr in ScFunctionAccessNoel Grandin2-4/+4
Change-Id: I678bfbc54a1c35540bb7f2b76f4f7e5c7c62b23c Reviewed-on: https://gerrit.libreoffice.org/56826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03loplugin:useuniqueptr in ScHeaderFieldsObjNoel Grandin2-3/+3
Change-Id: Ibf9251880e658605e83179c9de7ac2104d2c1c14 Reviewed-on: https://gerrit.libreoffice.org/56825 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03move SvTreeList::*Sibling to SvTreeListEntryNoel Grandin4-11/+11
since they don't depend on SvTreeList at all Change-Id: If48c83976a95943e5cfa92490d68f74281cf4b5f Reviewed-on: https://gerrit.libreoffice.org/56819 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03store the data provider settings in the documentMarkus Mohrhard3-6/+7
Change-Id: I049187432437a4bf2539fae54d44ad1266c54149 Reviewed-on: https://gerrit.libreoffice.org/56787 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-02Export data transformations to odfVikas4-2/+154
Change-Id: Ie36aef4a4ee550a1bb5407305f13726d55eeea58 Reviewed-on: https://gerrit.libreoffice.org/56665 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-02tdf#109042 : Add support for multivariate regression...Dennis Francis10-405/+882
to regression tool. This means we now support more than one X variable(independent variable). One caveat is that all X variable observations needs to be present adjacent to each other in the same table. For example if data is grouped by columns, a valid organization of X variables look like :- X Variables ----> A B C ... XVar1 XVar2 XVar3 ... XVarN | 0.1 0.45 0.32 ... Observations 0.34 0.23 0.54 ... | 0.23 0.56 0.90 ... | 0.32 0.11 0.78 ... V This patch also makes our regression tool output to have similar structure to what Excel and Gnumeric does. This means more statistical measures are added including confidence intervals for all parmeter estimates. We already have support for Logarithmic and Power regression in addition to plain Linear regression. This patch's multivariate support extends to all of these types of regressions. Earlier all regression statistics were computed separately from scratch, which mostly compute the same regression multiple times. This would slow things down if the data-set being analysed is big. This is not true anymore as we use LINEST() formula. LINEST() formula provides all the necessary statistics needed in regression analysis, so here it is called just once and its output components are referenced to compute other statistics(derived). Following are the UI changes for the regression dialog box :- 1. Changed the regression-type selectors from check-boxes to radio-buttons. So only one type of regression can be done at a time. This is because the output of a single regression type itself shows a lot of information and if do all types of regression, it is hard to read and interpret especially for bigger data-sets with lots of X variables. 2. Allow the variable's ranges to have label in them, via a checkbox. If labels are provided, they are used to annotate the variable specific statistics and the user can easily identify the stats corresponding to each variable. 3. More robust input validity checks, with error messages at the bottom of the dialog to let the user know which of their entry is invalid. 4. User can enter the confidence level (default = 95%) for computing the confidence intervals of each estimate. 5. Make residual computations optional via a check-box, as this involves writing a table with all X's and Y with predicted Y and residual for each observation. If the data-set is big, or the user just care about the estimates and confidence intervals, they can avoid this. Finally the patch includes a uitest that tests all 3 types of regressions with a small dataset. The ground truths for the tests were obtained by running regression tool in Gnumeric. Change-Id: I9762b716eae14b9fbd16e2c7228edf9e1930dc93 Reviewed-on: https://gerrit.libreoffice.org/56809 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-02Resolves: tdf#56910 detect a Space (blank) separator if not selectedEike Rathke4-17/+83
On populating the CSV import dialog for the first time attempt to detect a possible space (blank) separator if field separators don't include it already. This can be necessary because of the "accept broken misquoted CSV fields" feature that tries to ignore trailing blanks after a quoted field and if no separator follows continues to add content to the field assuming the single double quote was in error. If this blank separator is detected it is added to field separators and the line and subsequent lines are reread with the new separators. Change-Id: I3c6d74ce8883f1d279a810e800e54b349d85ac71 Reviewed-on: https://gerrit.libreoffice.org/56810 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-07-02loplugin:constantparamNoel Grandin1-10/+7
Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5 Reviewed-on: https://gerrit.libreoffice.org/56778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02loplugin:unusedmethodsNoel Grandin2-7/+0
Change-Id: I92665f577bfe39497905063da517a05b8008c3cc Reviewed-on: https://gerrit.libreoffice.org/56743 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02pass OutlinerParaObject around by std::unique_ptrNoel Grandin3-8/+8
SdrText::SetOutlinerParaObject was modified to not check for self-assign, and instead assert because the existing check was no longer possible. Fix bug in SdrUndoObjSetText::Undo(), where it was calling SdrText::SetOutlinerParaObject unnecessarily, because NbcSetOutlinerParaObjectForText already does that. Optimise Outliner::GetEmptyParaObject by creating a new constructor for OutlinerParaObject, so we don't need to copy the new object we get back from GetEmptyTextObject, unnecessarily. Change-Id: I57c475583d6c31658c154e24992b3d587bad9841 Reviewed-on: https://gerrit.libreoffice.org/56730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02sc: Replace DblMin() with std::min()Takeshi Abe1-6/+1
Change-Id: Ic9ca0e9c1a63519026152f9aa1a038f183de1e4d Reviewed-on: https://gerrit.libreoffice.org/56581 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-02Move writesort() method from WriteDatabaseRange to free functionVikas2-71/+73
Change-Id: I732a0693aae92c5e654d1f8f414b7d6bd38b0562 Reviewed-on: https://gerrit.libreoffice.org/56662 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-06-30sc: Spare an OUStringBuffer by replacing removeChars()Takeshi Abe1-13/+2
... with OUString::replace(). Change-Id: I8d6ae6ff1674dafaafb276cb0efc72e01579f9bb Reviewed-on: https://gerrit.libreoffice.org/56759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>