summaryrefslogtreecommitdiff
path: root/sc/source
AgeCommit message (Collapse)Author
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17rename TextEncodingBox back to SvxTextEncodingBoxCaolán McNamara
Change-Id: I466a56a3b3204f960b9c6ce2dac836879112f5ab Reviewed-on: https://gerrit.libreoffice.org/80945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Don't use uninitialized memory when reading from the stream failsStephan Bergmann
Valgrind'ing CppunitTest_sc_filters_test failed with > Conditional jump or move depends on uninitialised value(s) > at 0x21175CE0: XclRange::GetColCount() const (/sc/source/filter/inc/xladdress.hxx:73) > by 0x2117048D: ImportExcel::ReadDimensions() (/sc/source/filter/excel/impop.cxx:248) > by 0x21188E78: ImportExcel8::Read() (/sc/source/filter/excel/read.cxx:1108) > by 0x21123C3F: ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT) (/sc/source/filter/excel/excel.cxx:137) [...] when loading sc/qa/unit/data/xls/pass/CVE-2006-3086-1.xls. As there appears to be no error-handling concept in ImportExcel::ReadDimensions, at least zero-initialize the relevant variables. Change-Id: I11dbd2a1032ecc723f65a563ef022d7eb3c970ff Reviewed-on: https://gerrit.libreoffice.org/80948 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Don't use uninitialized memory when reading from the stream failsStephan Bergmann
Flathub arm builds (but not other arches) had often (but not always) failed when processing sc/qa/unit/data/qpro/pass/ofz14090-1.wb2 in CppunitTest_sc_filters_test (e.g., <https://flathub.org/builds/#/builders/1/builds/724>: > Test name: ScFiltersTest::testCVEs > equality assertion failed > - Expected: 1 > - Actual : 0 > - file:///run/build/libreoffice/sc/qa/unit/data/qpro/pass/ofz14090-1.wb2 ) Valgrind revealed that this was due to using unintialized memory when the various maIn.Read... in QProToSc::Convert failed, starting with the use of uninitialized nFmla[i] after maIn.ReadUChar( nFmla[i] ); At least make things deterministic by setting the relevant variables to zero. (Another approach could be returning early with some ConvErr status.) Change-Id: I4c06aa8da5f777170cdc7bbe3ca1d61b23d3f326 Reviewed-on: https://gerrit.libreoffice.org/80947 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17weld ScImportAsciiDlgCaolán McNamara
notably the csv control is always LTR even in RTL mode, but the surrounding ScrollingWindow follows the environment direction, except the horizontal scrolling widget itself must LTR scroll. Change-Id: I72ee2b9dade73a11bcc4391e755fdb02886a884d Reviewed-on: https://gerrit.libreoffice.org/80765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Cache last used number-format-type in interpreter-contextDennis Francis
if in cpu-threaded mode so that we can avoid the unnecessary locked SvNumberFormatter::GetType() calls (Mapping between NF index and NF-type does not change while formula-group-threading is running). Change-Id: I648bc08c885da845f0b09cd57013cc1c23e01a61 Reviewed-on: https://gerrit.libreoffice.org/80848 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-10-17move SSE2sum code to separate cxx file...Dennis Francis
and compile it with -arch:SSE2 if Windows. This code however gets called only if cpuid::hasSSE2() is true, so this does not cause problems with machines without SSE2 support. Change-Id: Ice23ac71d4c577b8811b08c74a3ca500a94fdc09 Reviewed-on: https://gerrit.libreoffice.org/80847 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Reuse pre-allocated ScInterpreter for HandleStuffAfterParallelCalculationDennis Francis
Change-Id: Idf10bb214d6d82370512eeb39ba7786dd9bceb38 Reviewed-on: https://gerrit.libreoffice.org/80846 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Pre-allocate an ScInterpreter object for each thread...Dennis Francis
and reuse them for interpret'ing all cells under the respective threads. This gives a sizeable win in the execution time especially for long formula-groups. Change-Id: Ib340950f21e863b5b821d20c092214d8bc5012aa Reviewed-on: https://gerrit.libreoffice.org/80845 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:stringadd look through a couple more known-good methodsNoel Grandin
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16sc: rowcol: migrate the Sc*IteratorNoel Grandin
Change-Id: I1e9a2b769d62ed3293de724ec50664bd8d22003e Reviewed-on: https://gerrit.libreoffice.org/80841 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15back isShowing with IsReallyVisibleCaolán McNamara
Change-Id: Ibae8fa0d21cd2c0b49c3c8709087319502f70cb0 Reviewed-on: https://gerrit.libreoffice.org/80824 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15only need an OutputDevice not a full vcl:WindowCaolán McNamara
Change-Id: I79e0a5877a531cd1b0badf3adcc721254ad441d9 Reviewed-on: https://gerrit.libreoffice.org/80820 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-15Resolves: tdf#128137 cursor jumping during edit, etc.Caolán McNamara
The mbNeedUpdate hackery to block changes caused by the user was subverted by the async handling of the treeview selection. a) add a call to wait and process outstanding async events within the protected block b) move the needupdate down to the range manager to block updates during this block in CheckForFormulaString too c) when updating the visible rows, also update the selected rows even if they are not visible. Change-Id: I4c67d6cd2780f55d5eab5f856f6fda21703b4977 Reviewed-on: https://gerrit.libreoffice.org/80794 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-15move HAVE_FEATURE_DESKTOP/OPENCL to their dedicated headersLuboš Luňák
HAVE_FEATURE_OPENCL is included by a common Calc header and HAVE_FEATURE_DESKTOP is included by a common Writer header, causing pretty much their full rebuilds if any feature changes. Change-Id: If29bf78bd4fd70b37981e0826a577777fd255c89 Reviewed-on: https://gerrit.libreoffice.org/80776 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14Add document-level option to lock down content extractionSamuel Mehrbrodt
Setting this option will prevent copying/dragging any content from LO to another program or even another LO window. Change-Id: Ifbc032a4fa69ac1a17d4b500f5a30f5399d84ed7 Reviewed-on: https://gerrit.libreoffice.org/80586 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-13rename FontPrevWindow back to SvxFontPrevWindowCaolán McNamara
Change-Id: Ife6f7bbc64f397e502d50c629769a8b637a591c8 Reviewed-on: https://gerrit.libreoffice.org/80718 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-11Removed duplicated includeAndrea Gelmini
Change-Id: Iafda4f1b69e805217202bf6098ae80282b92b5ed Reviewed-on: https://gerrit.libreoffice.org/80696 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-11lok: Don't activate chart on insert.Michael Meeks
Change-Id: I6b28438251c8f3eb6805ce4623e85b6fbd7710a4 Reviewed-on: https://gerrit.libreoffice.org/80657 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11ofz#16433 TimeoutCaolán McNamara
Change-Id: Id89826fd5317cc421cdb70467cc83ad08476d100 Reviewed-on: https://gerrit.libreoffice.org/80644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-11sc: rowcol: migrate some viewdata.Michael Meeks
The ScViewData is able to not have a document for a time, curious to allow a model-free view, but there it is. Change-Id: I402fa5f814f3cc674b733353c5d3fa2de1970e23 Reviewed-on: https://gerrit.libreoffice.org/80631 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11ofz#15997 TimeoutCaolán McNamara
Change-Id: Ib7f4649bcaeb35a7eb756e35e1f9656fdc4d3df6 Reviewed-on: https://gerrit.libreoffice.org/80645 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-11Handle SinglePageSheets option for pdf exportMuhammet Kara
When the single page sheets option is selected on the pdf export dialog of Calc, a pdf for general preview of the document is created, which is not meant for printing. Each sheet is exported as a single page, thus causing the resulting pdf to have pages with different sizes. This is a follow-up to commit 079cd016408d54d91 Change-Id: I038761f06bbf4b0425df89bcda4ee111a61be1d5 Reviewed-on: https://gerrit.libreoffice.org/79895 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/80635 Tested-by: Jenkins
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10Don't show chart wizard on mobileSzymon Kłos
Change-Id: Ic4c65293462d56e1ecedcaaad71575f50b6c1dba Reviewed-on: https://gerrit.libreoffice.org/80592 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 805ee5251c5ad92b0738f155a63694bc1ecd0f38) Reviewed-on: https://gerrit.libreoffice.org/80598 Tested-by: Jenkins
2019-10-09loplugin:redundantpointeropsStephan Bergmann
(All related to uses of std::shared_ptr, which builds against libstdc++ apparently missed (fix forthcoming) and which I only now found with my macOS build against libc++.) Change-Id: If581e689f0e5ff62d9ce35513c9ff87b00328766 Reviewed-on: https://gerrit.libreoffice.org/80548 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-09sc: rowcol: store sheet maximum sizes in ScDocument.Michael Meeks
For now, hard coded to MAXCOL, MAXROW while we re-factor. Change-Id: I5e1aafc91ba1434a9a248d33bf0da4f4a2dc3a1b Reviewed-on: https://gerrit.libreoffice.org/80434 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Eike Rathke <erack@redhat.com>
2019-10-09Related: tdf#123765 fix up some screenshottingCaolán McNamara
and add in two special cases for the mentioned cui dialogs Change-Id: Ibd2bf8e9e5bff131f2c009c784652f4500842326 Reviewed-on: https://gerrit.libreoffice.org/80488 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-09cid#1448346 Improper use of negative valueCaolán McNamara
Change-Id: I30b1bf8fd1dcbbdf0804f33b04133bf450eced55 Reviewed-on: https://gerrit.libreoffice.org/80526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-09cid#1452393 silence Using invalid iteratorCaolán McNamara
Change-Id: Idf3ec9c751f8c7d93ce82e25613757627b867cc4 Reviewed-on: https://gerrit.libreoffice.org/80521 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-08tdf#123339 XLSX: fix horizontal alignment in commentsSzabolcs Toth
Import and export of VML element TextHAlign weren't supported by Calc, losing horizontal aligment of the comments assigned to the spreadsheet cells. Change-Id: I41766d3004dd07ab34a2619e28532281366bf235 Reviewed-on: https://gerrit.libreoffice.org/79963 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-08tdf#125289 Use default colors from the new standard paletteGabor Kelemen
These look quite similar to the previous ones and we have translatable strings for them Change-Id: Ib40f4087830098341dcd32ce81673f6f187fe685 Reviewed-on: https://gerrit.libreoffice.org/77074 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2019-10-08implement gtk dialog screenshottingCaolán McNamara
Change-Id: If4e570f775bd1e29dfb75cb7e5dd9d9dfc35e654 Reviewed-on: https://gerrit.libreoffice.org/80416 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-08use cppu::WeakImplHelper in ScDataPilotDescriptorBaseNoel Grandin
Change-Id: I16f7ba16f08c186bbdb32af5206089c497e1c8c1 Reviewed-on: https://gerrit.libreoffice.org/80411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in ScCellRangesBaseNoel Grandin
Change-Id: Ic1f380ef1ace1e3d57853e070e00c91a19d831db Reviewed-on: https://gerrit.libreoffice.org/80410 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-07cid#1454630 Uninitialized scalar fieldCaolán McNamara
Change-Id: Id8b7e4dfb021b836d5d14ce9ca73f3835288a7a4 Reviewed-on: https://gerrit.libreoffice.org/80343 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-07SvSimpleTableContainer is now unusedCaolán McNamara
Change-Id: I7762d95290a0b35de4f909895a4e28b52c436ed9 Reviewed-on: https://gerrit.libreoffice.org/80307 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-07DialogClosed doesn't existCaolán McNamara
Change-Id: I3f098cf0b364abb1423b5cecb8cca763f053fa4b Reviewed-on: https://gerrit.libreoffice.org/80336 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-06Related: tdf#127935 set default activate handler to toggle row expansionCaolán McNamara
Change-Id: I2bbfb1445b8d2e748f642cdf4723d41b7f072e2b Reviewed-on: https://gerrit.libreoffice.org/80305 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-06improve SfxPoolItem operator== implementationsNoel Grandin
(*) make them all call the superclass operator== (*) make the base class check which and typeid to ensure we are only comparing the safe subclasses together (*) remove a couple of operator== that were not doing anything useful Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316 Reviewed-on: https://gerrit.libreoffice.org/80308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-05Let's bring XML Source out of the list of experimental features.Kohei Yoshida
Change-Id: I872a047fe3791253aa52b19d544fb5f26ff22f9d Reviewed-on: https://gerrit.libreoffice.org/80296 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-10-05Convert various FID_VALID_* to SfxUInt16ItemNoel Grandin
Change-Id: Ic21ec69513ee520cedc026b8c2d657464beed19b Reviewed-on: https://gerrit.libreoffice.org/80250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-05Convert SID_ENUM_PAGE_MODE to SfxUInt16ItemNoel Grandin
Change-Id: I5cffa31b45b7752ba3ff18c8a92da9766fcf8de6 Reviewed-on: https://gerrit.libreoffice.org/80241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>