summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2018-06-03sc: prefix members of ScDocShellHenry Castro8-741/+741
Change-Id: I7c2a4e5e850b26da515719f7df869f12c49b0ad3 Reviewed-on: https://gerrit.libreoffice.org/55148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-06-02add mutex protection to more ScGlobal functionsLuboš Luňák1-31/+22
Similarly to ScGlobal::Get(Case)Collator(), these also may be called by multiple threads. Change-Id: If0b1f2669282354ce79cdd251698f3aa1c6a30d4 Reviewed-on: https://gerrit.libreoffice.org/54798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-02uitest - Calc consolidateZdeněk Crhonek2-0/+82
Change-Id: I2d38570f6dbd6046dacbbc9aa1eb9dac657c4f1c Reviewed-on: https://gerrit.libreoffice.org/55213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-06-02fix memory leak in double-checked initLuboš Luňák1-1/+1
The pointer indeed shouldn't be just a local argument but a reference to the global variable, otherwise just the argument gets set. Change-Id: Ib7060943b089336b409d4861540a861ca2793cde Reviewed-on: https://gerrit.libreoffice.org/55209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-02Removed executable permission on data filesAndrea Gelmini3-0/+0
chmod -x for odp, ods and so on Change-Id: I74397d9b8e24575130d2776ed90f4cfc13e1f03c Reviewed-on: https://gerrit.libreoffice.org/52570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01Fix typosAndrea Gelmini1-1/+1
Change-Id: Icc6fd609d3e57277822c4de76bd3baf4b1900840 Reviewed-on: https://gerrit.libreoffice.org/55176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-01UITest_calc_tests: split this into 4 partsMiklos Vajna48-0/+63
Before: make -sr UITest_calc_tests -> 10m48.934s After: make -sr -j4 UITest_calc_tests UITest_calc_tests2 UITest_calc_tests3 UITest_calc_tests4 -> 5m40.113s As a start just split based on the number of .py files in the directories, one could improve this further by making them even more equal based on number of lines or something. Change-Id: I7a98a29e5d18a7600575956a7d8a0ec81e804269 Reviewed-on: https://gerrit.libreoffice.org/55174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-01ofz#6440 timeout during fuzzingCaolán McNamara1-1/+8
Change-Id: I720c64b9bb14cee33ffab5547a7353e83f23a14c Reviewed-on: https://gerrit.libreoffice.org/55147 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-01tdf#87995 Missing setting for save thumbnail in settings.xml.Ilhan Yesil2-1/+11
If the user unchecks "Save preview picture with this document" in the dialog field and saves the document, the appropriate flag is now written to settings.xml by introducing the setting named "SaveThumbnail". Change-Id: I4916b4149a9494dd1891c0e05cb9a985ba0a9121 Reviewed-on: https://gerrit.libreoffice.org/52768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin7-42/+42
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-31sc: disable test that fails on WindowsHenry Castro1-1/+0
reference "Daily Screenshot Build on Windows - Build # 410 - Failure!" https://ci.libreoffice.org/job/lo_tb_master_win_screenshot/410/ Change-Id: I4fe6b46e7c2a7a1904ffb86dd68d689f7ada9def
2018-05-31move related functions next to each otherLuboš Luňák1-14/+11
And remove a pointless assert (the object is now created on demand). Change-Id: Ib42164b57216499e53ebc4ed5d1bc270055db2e7 Reviewed-on: https://gerrit.libreoffice.org/55046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-31assert(!bThreadedGroupCalcInProgress) in ScGlobal get-or-create functionsLuboš Luňák1-0/+19
Similarly to ScGlobal::Get(Case)Collator() these could possibly lead to a race condition of several singleton creations at the same time. That doesn't seem to be the case after few tests, but better check. Change-Id: I1edb613b5e034fcc952a43afc91f1d7288028861 Reviewed-on: https://gerrit.libreoffice.org/54797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-31move mbThreadedGroupCalcInProgress from ScDocument to ScGlobalLuboš Luňák8-23/+26
Some code, such as statics in ScGlobal, cannot(?) easily access ScDocument. Moreover whether Calc is currently performing threaded calculations is not really a state of a document but of Calc itself. Still keep the state accessible via ScDocument for the pipe-dream future where it possibly really will be a state of the document. Change-Id: I2b112221e7fa1b2b4469cfd289fc201025585a5f Reviewed-on: https://gerrit.libreoffice.org/54796 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-31tdf#96698 - calc: add support for custom validation (through a formula)Marco Cecchetti13-15/+130
Now it is possible to select a `custom` validation in the validation dialog: this type of validation let's the user to define a formula, the cell content is valid when the formula is evaluted to true, and not valid when evaluated to false. The `cutom` validation is correctly saved and restored for ods documents, and is correctly imported and exported to xlsx documents This patch contains an adaptation of a preliminary work of Justin Luth for importing custom validation from xlsx documents. Thanks Justin! Change-Id: Idc26654ba69a6f73d1b208d63acdad4b880c776d Reviewed-on: https://gerrit.libreoffice.org/49084 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-05-31SOSAW080: Cleanup of SdrModelArmin Le Grand4-16/+11
First step: Find all constructors/derivations, mark all of them. Removed two-value-constructors, adapted code as needed Reduced constructors for SdrModel/FmFormModel to a single one. Removed PathName for List creation, this is not needed and anyways all calls used the default SvtPathOptions().GetPalettePath(). This is also true for usage of IsFuzzing() that is also part of the default creation process (without path). All usages that need an extra-List were setting it after construction explicitely. Removed UseExtColorTable. This prevents a single List to be not created by default, the ColorTable which is replaced later by all callers that used this. This is not needed since the default ColorTable gets constructed just by default, no expensive stuff is triggered (e.g. loading the ColorTable). Thus now a default ColorTable is created and kept for a short moment, destructed again when a ColorTable is explicitely set. Doing so is also more safe - it avoids not creating a default-ColorTable and then not setting one (what would be urgently required). f23c24a8548d5246b77b1cc359ba89564538e81a f124468c3898c5842d37123bdeb87d79a2b19c62 Change-Id: I865de4bb23f673c6684d83c2c6390439506dc5b6 Reviewed-on: https://gerrit.libreoffice.org/55028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-31Implement NewWorkbook and WorkbookOpen Automation callbacks in CalcTor Lillqvist3-1/+40
Change-Id: I1ff31d692100695a706bf128c18c4e3ae8b55ce3
2018-05-31Add Author property to ooo::vba::excel::XWorkbook and implement itTor Lillqvist2-0/+20
Corresponds to the Author attribute of css::document::XDocumentProperties. I.e. the initial creator of the document. Change-Id: I07d3ce9dfb87900948d2bb7af14109b17546fb4c
2018-05-31Initial steps to make also Calc usable from Automation clientsTor Lillqvist8-5/+162
Largely parallel to what we do for Writer. Yes, there is a fair amount of duplicated code now for the outgoing ("sink") stuff in sw and sc, that should be factored out (to vbahelper, probably). Change-Id: I8df4a81c3b9043e8d6b0b206e3c04660205987c7
2018-05-31drop Graphic::GetBitmapNoel Grandin1-1/+1
so that we flush out various code using Bitmap, in favour of using BitmapEx. This is part of the process of making Bitmap largely an internal detail of vcl Change-Id: Iaf2ead5e3d9960838723fb55b812b97108093d74 Reviewed-on: https://gerrit.libreoffice.org/55062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-31drop last use of TransferableHelper::GetSystemClipboardCaolán McNamara1-1/+1
Change-Id: I405b0cac0db5f08aa2f9fb73927c4c21f0250988 Reviewed-on: https://gerrit.libreoffice.org/55076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-31SwModule is a convenient (?) place for passing events to Automation clientsTor Lillqvist28-16/+92
Generate Application.DocumentChange and Application.Quit events. SfxHintId::DocChanged seems to correspond nicely enough to Application.DocumentChange. It is generated a bit eagerly, but as its documentation is fairly vague and no specific detailed information is passed in parameters anyway, it probably doesn't hurt if a client gets it a bit more often with LO than with some other product. Can now remove the FIXME-marked Quit event things in SwVbaApplication. Now need oovbaapi in many makefiles for them to compile. Change-Id: I4d0c5b93b584f198bcc854002eec7aaba7909ecc Reviewed-on: https://gerrit.libreoffice.org/55106 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-05-30sc: Insert a space for consistencyTakeshi Abe1-2/+2
Change-Id: Ifb1429eb3ad6d1093a7b5126ea3d15c4509cf8cc Reviewed-on: https://gerrit.libreoffice.org/54981 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-05-30protect one-time creation in ScGlobal::Get(Case)Collator() by a mutexLuboš Luňák1-12/+41
Otherwise there is a race condition when calc uses threading, and lp#390983-2 sometimes crashes. Change-Id: I390928c02b8e7d74bebef2dcc98a5c21cb3a8197 Reviewed-on: https://gerrit.libreoffice.org/54795 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2018-05-30use BitmapEx in the screenshot stuffNoel Grandin1-2/+2
part of the process of moving Bitmap usage to BitmapEx Change-Id: I4f02f8aa60d19a3639d623a998491447adf79e15 Reviewed-on: https://gerrit.libreoffice.org/55031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-30Revert "UITest_calc_tests: disable randomly failing assert for now"Luboš Luňák1-2/+1
Fixed by my previous commit. This reverts commit 27cc0064a8a52c9000d0249581e80fe7a0c8a7b6. Change-Id: Ib64e7341251d848b4db0dbb1f58c4fcef51437ed
2018-05-29weld SvxTransformTabDialogCaolán McNamara1-1/+1
Change-Id: Ib6dabd04e3f834b61363d5a620de7f0219a1e644 Reviewed-on: https://gerrit.libreoffice.org/55012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-29uitest for bug tdf#104117 and tdf#80693Zdeněk Crhonek2-0/+112
Change-Id: I29bdf088c83ce69152d5c3edee2c855bfece4585 Reviewed-on: https://gerrit.libreoffice.org/55019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-05-29loplugin:unusedfields-in-constructor in scNoel Grandin18-79/+42
Change-Id: I074bb272b692dea553e1ec1e625c8afd766627d6 Reviewed-on: https://gerrit.libreoffice.org/54997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-29avoid using EditEngine in ScEditUtils::GetString() if possibleLuboš Luňák1-0/+3
According to 1ecdc7aaf66 it is really needed only for resolving fields, so if there's no field, simply concatenate the contents, as used to be the case before that commit. This should be faster and also safer in the case of Calc's threading enabled. Change-Id: I23a2e1873deb8538e2a1ae0dd80af7e5356c18a5 Reviewed-on: https://gerrit.libreoffice.org/54986 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-29forcepoint#40 null derefCaolán McNamara2-4/+4
presumably since commit 0098bee792c3e208ea4f6ef1c676958d3f4cd207 Date: Thu Sep 21 06:48:09 2017 +0200 tdf#112501: Pivot table: popupbuttons are placed on wrong cells Change-Id: I5413c0ba06fca25cb22256a20ef9640767dd9e50 Reviewed-on: https://gerrit.libreoffice.org/54968 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-29tdf#42949 Fix IWYU warnings in sc/inc/m*Gabor Kelemen7-7/+11
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I43882919048c23e9b8d305f8cbba8f120207bb93 Reviewed-on: https://gerrit.libreoffice.org/54824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-28sc: simplify ScModule::GetClipDocHenry Castro1-15/+9
Change-Id: I36a79a41b989d37efc35a9f9b4bebca9bdaf9ee9 Reviewed-on: https://gerrit.libreoffice.org/54935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-05-28blacklist ocDBSum for calc's threadingLuboš Luňák1-1/+2
Triggers a number of asserts on hard-recalc (Shift+Ctrl+F9) with ooo#58183-1 that would require passing ScContextInterpreter* to a number of functions, so just blacklist it. Change-Id: I0c3666a3423cea7c77f530480b8b63506c4bbad2 Reviewed-on: https://gerrit.libreoffice.org/54933 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-28uitest Calc Fill random numberZdeněk Crhonek1-0/+58
Change-Id: I6922a537f06c7cced0f8b5390c8261c57d07b29b Reviewed-on: https://gerrit.libreoffice.org/54928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-05-28DBase: synchronize DB types known on Calc with those known on BaseJulien Nabet1-1/+1
by adding 0x31, VisualFoxProAuto on array of valid marks in lcl_MayBeDBase See https://opengrok.libreoffice.org/xref/core/connectivity/source/inc/dbase/DTable.hxx#40 and https://opengrok.libreoffice.org/xref/core/include/connectivity/dbtools.hxx#823 Yes, it should be great to have only 1 enum Change-Id: Ic3fb74c838aab5e744cbe1d70ad8ca4ce2c00b8d Reviewed-on: https://gerrit.libreoffice.org/54894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-28lok: sc: tunneling the ascii import dialog on paste actionMarco Cecchetti7-40/+63
Modified CreateScImportAsciiDlg signature so that we are able to pass a pointer to a dialog parent window to ScImportAsciiDlg. Now the execution of the ScImportAsciiDlg dialog in ScViewFunc::PasteDataFormat is asynchronous, both for lok and desktop case. In order to achieve this result it has been needed to modify the lifespan of some objects previously local to PasteDataFormat. Since PasteDataFormat returns a boolean, I took care to check how this return value is used. I found out 2 cases: 1) in ScViewFunc::PasteFromSystem where it is used for popping up an error dialog box, informing the user in the case that the paste operation is failed; 2) in ScGridWindow::ExecuteDrop where it is used for informing the sysyem window manager of the success or fail of the drag and drop action. The first case is now handled by a lamba invoked on dialog execution end. The second case is always handled as the paste operation was successfull (hoping it doesn't do any real difference). The asynchronous call and the behaviors described above occur only when the paste operation involves some kind of text. Change-Id: Id4f96180a9336f665a22a2441ea490af993431b0 Reviewed-on: https://gerrit.libreoffice.org/53576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2018-05-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I4faf601f9b690bdf284d8ee472091f38ca96d5f1 Reviewed-on: https://gerrit.libreoffice.org/54908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-28weld ScTabBgColorDlgCaolán McNamara8-106/+108
Change-Id: I864382bc55dead850c13faae9958fb660fd4f156 Reviewed-on: https://gerrit.libreoffice.org/54809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-28tdf#100756 slowdown in manipulating spreadsheet via UNONoel Grandin1-17/+8
regression from commit 5bce32904091ffe28884fd5c0f4801ee82bad101 SfxHint: convert home-grown RTTI to normal C++ RTTI the cost does seem in this case to be mostly the dynamic_cast, but since we don't need it anymore, just remove it Change-Id: Icbf51b89c036b86cfb3e4c2a827228ccf25bb3a6 Reviewed-on: https://gerrit.libreoffice.org/54899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:unusedmethodsNoel Grandin1-2/+0
Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20 Reviewed-on: https://gerrit.libreoffice.org/54821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28sc: release XTransferable2 when used with VBA compatibility helpersHenry Castro8-14/+97
Copy, Cut, PasteSpecial and Insert is used by Range excel object, so after finishing executing the VBA script ensure to release XTransferable2 interface Change-Id: I967a7ba1a1d101282f7a1b9d4b2e2ac3004f1c07 Reviewed-on: https://gerrit.libreoffice.org/54497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-05-27misleading comment: not every sheet is examinedJustin Luth1-1/+1
In fact, if there are no sheet-local names defined, then the loop will not even be entered. Only the sheets that actually contain the desired item will be iterated through. Change-Id: I1fa94d8b9190f43b2896a002acdec18397225395 Reviewed-on: https://gerrit.libreoffice.org/54742 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-05-27uitest for bug tdf#54018Zdeněk Crhonek2-0/+55
Change-Id: I4a5356e275f1132898aec758a79f3a38c71d35ea Reviewed-on: https://gerrit.libreoffice.org/54820 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-05-26fix build failure on some systemCaolán McNamara1-0/+1
Change-Id: I63e1164d5ee431450f1c780758d9fd6f69cf6916
2018-05-26Rename bNeedEdit → bUseEditEngineKhaled Hosny1-15/+15
Make it a bit clear that edit here means edit engine not merely text editing as one would naïvely assume. Took me a while to realize that! Change-Id: I570a0556d3272c480dc1ae95640de32f56ab9607 Reviewed-on: https://gerrit.libreoffice.org/54783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2018-05-26UITest_calc_tests: disable randomly failing assert for nowMiklos Vajna1-1/+2
make -sr UITest_calc_tests UITEST_TEST_NAME="tdf53482.tdf53482.test_tdf53482_Range_contains_column_headings_file" passed for me 10 times in a row without problems after this, while 'make check' randomly fails here & there since the introduction of this test. Change-Id: I5c3eae027297e0b488cf72161815239a8b03aa60 Reviewed-on: https://gerrit.libreoffice.org/54825 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-25Fix typoAndrea Gelmini1-3/+3
Change-Id: Ib7e080864f809294a4a6ae78694730fb07120753
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin5-9/+25
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25loplugin:passstuffbyrefNoel Grandin3-4/+4
Change-Id: I785e96599bbda029adf4698d11d7f981750dec07 Reviewed-on: https://gerrit.libreoffice.org/54802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>