summaryrefslogtreecommitdiffstats
path: root/basic
Commit message (Collapse)AuthorAgeFilesLines
* tdf#129227: this was always appending, not prependingMike Kaganski2019-12-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression after 0761f97525b3f3ce2cd73f8db28bf389a3c44f57 The change replaced // From 1996-03-06: take the HandleLast-Flag into account sal_uInt16 nPos = r.m_Factories.size(); // Insert position if( !pFac->IsHandleLast() ) // Only if not self HandleLast { // Rank new factory in front of factories with HandleLast while (nPos > 0 && r.m_Factories[ nPos-1 ]->IsHandleLast()) nPos--; } r.m_Factories.insert(r.m_Factories.begin() + nPos, std::unique_ptr<SbxFactory>(pFac)); with r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac)); Before that commit condition in while was always false, so decrementing nPos had never happened, and insertion to the end was always performed. This change restores that. Change-Id: I778d6fdc93e9078a541a9b98c9432b5cf88d9791 Reviewed-on: https://gerrit.libreoffice.org/84609 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit ffd319a7589e0e9fcb83681f7f1e7c26a383ae5d) Reviewed-on: https://gerrit.libreoffice.org/84666 Tested-by: Jenkins (cherry picked from commit 87b421d25ef79e197d344e6bd515f1eadd06bfc9) Reviewed-on: https://gerrit.libreoffice.org/84743 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#129107 objects in basic disappearNoel Grandin2019-12-044-22/+33
| | | | | | | | | | | | | | | Reverts part of "loplugin:useuniqueptr in SbModule" This reverts commit 263d7325691f4b0a1bda155f1c53bbcf712e9f09. because SbClassModuleObject is playing silly buggers with ownership by messing with fields in its SbModule superclass. Change-Id: I725332d080663e94b57f4bd4e1fb05aeeddf9038 Reviewed-on: https://gerrit.libreoffice.org/84352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 30c707666dbe810c577dc14bc995dc91c2293b17) Reviewed-on: https://gerrit.libreoffice.org/84430
* tdf#128434 free the BasicManager event listenerJan-Marek Glogowski2019-11-211-1/+5
| | | | | | | | | | | | | | | This gets rid of the last 72 lost bytes I could identify in the huge valgrind logs to look like its PDF generation related. Change-Id: Idda3c2c5b7f5ce0211199b86503037b74438ccf2 Reviewed-on: https://gerrit.libreoffice.org/83302 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 48b23bbfa0271ed327f668933b92d2ae9b99e806) Reviewed-on: https://gerrit.libreoffice.org/83350 (cherry picked from commit d8cde1cf69bb170da74018e629e1b65830924e0b) Reviewed-on: https://gerrit.libreoffice.org/83370 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
* -fsanitize=nullabilityStephan Bergmann2019-05-271-1/+3
| | | | | | | Change-Id: I27336c512ed0b46b32344a05611e6ba17e45adef Reviewed-on: https://gerrit.libreoffice.org/73023 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typoAndrea Gelmini2019-05-151-1/+1
| | | | | | | Change-Id: I715da280563c7c3f03eb9b521478db4481ae4b2f Reviewed-on: https://gerrit.libreoffice.org/72322 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin2019-05-132-3/+3
| | | | | | | | | | | By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* an uno -> a unoCaolán McNamara2019-05-104-11/+11
| | | | | | | | Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* regenerate PCH headers for the 4 new levelsLuboš Luňák2019-05-091-21/+20
| | | | | | | | | Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* downgrade warning to infoCaolán McNamara2019-05-071-1/+1
| | | | | | | | Change-Id: Id337f26471f54d7d52c293629b9d19901b188c63 Reviewed-on: https://gerrit.libreoffice.org/71897 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#68339 Other: BASIC Syntax errorJens Carl2019-05-034-0/+186
| | | | | | | | | | | Allow expressions (operands) of comparison operators prefixed with the Logical Operator "Not". Change-Id: I1b070e2288dac26b1f1186d38cf5d2f4ad99a406 Reviewed-on: https://gerrit.libreoffice.org/71332 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Jens Carl <j.carl43@gmx.de>
* Resolves: tdf#124605 ditch "if operand 1 is Empty, result is operand 2"Eike Rathke2019-05-021-25/+11
| | | | | | | | | | | | | | | | | | It has been like that since the initial import but is utter nonsense. It might had (doubtfully) served some early StarBasic compatibility quirk, but is wrong and was implementation defined buggy behaviour. The Option VBASupport 1 even explicitly disabled it. In future we may want to implement the VBA Nothing value for an SbxEMPTY at least for boolean operators, but this for Calc user defined macro functions might even need a distinguished SbxEMPTYCELL or such. Or an explicit SbxNOTHING. Change-Id: I28919d982d0e60b9b840a12271dc717effa59662 Reviewed-on: https://gerrit.libreoffice.org/71701 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* implement std::hash for css::uno::Reference and rtl::ReferenceNoel Grandin2019-04-301-2/+1
| | | | | | | | | | | | | | | | The declaration in BarChart.cxx is particularly suspicious, because it was using a < for the KeyEqual template parameter. Been there since: commit b2c3233e5f267b5d244d722a94424a3b224b3314 Date: Thu Dec 21 20:08:33 2017 +0900 chart2: suspend/resume setting rects dirty for 3D shapes comphelper::OInterfaceCompare is no longer necessary Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975 Reviewed-on: https://gerrit.libreoffice.org/71537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typoAndrea Gelmini2019-04-251-1/+1
| | | | | | | Change-Id: I7db23f84a3de4772b38c9538704f501a9169ce09 Reviewed-on: https://gerrit.libreoffice.org/71267 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#123043 make type character detection unicode-awareTomoyuki Kubota2019-04-231-1/+1
| | | | | | | Change-Id: I98886a7d13a43cc3202d45f96ceb5062f76f0784 Reviewed-on: https://gerrit.libreoffice.org/71013 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
* Fix uses of variables before their lifetimes beginStephan Bergmann2019-04-171-1/+1
| | | | | | | | | | | | | | | All of those have been broken with recent loplugin:sequentialassign changes (and have been found with a new plugin to be commited). The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks suspicious, but has been effectively like that ever since at least c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just marked it with a TODO comment for now. Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf Reviewed-on: https://gerrit.libreoffice.org/70874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Initial VS 2019 SupportTomoyuki Kubota2019-04-161-1/+1
| | | | | | | | Change-Id: I8e08efb549ebd52c37183a1185d6de73f2b00601 Reviewed-on: https://gerrit.libreoffice.org/64630 Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
* loplugin:sequentialassign in accessiblity..canvasNoel Grandin2019-04-122-7/+3
| | | | | | | Change-Id: I984717138ac85c1af5fc363fda06f5c2b5497965 Reviewed-on: https://gerrit.libreoffice.org/70641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typoAndrea Gelmini2019-04-081-1/+1
| | | | | | | Change-Id: I1413e1872b1f2cd29256b33cdc7ac7ae09faf46c Reviewed-on: https://gerrit.libreoffice.org/70394 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-081-1/+1
| | | | | | | Change-Id: Ia5b4b50e919964b0746a68b008c9f7a86240c3a6 Reviewed-on: https://gerrit.libreoffice.org/70398 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-081-1/+1
| | | | | | | Change-Id: I7b9802f224b497004df8cce7abd2bb8e52c79128 Reviewed-on: https://gerrit.libreoffice.org/70395 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#120703 PVS: Silence V522 warningsMike Kaganski2019-04-072-12/+24
| | | | | | | | | V522 There might be dereferencing of a potential null pointer. Change-Id: I680f1628133216de6336ac5ffa846447ffd55a41 Reviewed-on: https://gerrit.libreoffice.org/70352 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Fix typoAndrea Gelmini2019-04-071-1/+1
| | | | | | | Change-Id: I27f9b30f76b6bbd255a346c00d64e2499e7f3b5e Reviewed-on: https://gerrit.libreoffice.org/70360 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-071-2/+2
| | | | | | | Change-Id: I88a8fb94cb1e7653d63a77bdb63d1303cc848704 Reviewed-on: https://gerrit.libreoffice.org/70361 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-041-2/+2
| | | | | | | Change-Id: I9df2f892066d5072f63f5bf68e1f9b2aa3905772 Reviewed-on: https://gerrit.libreoffice.org/70229 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#120703 PVS: remove redundant static castsMike Kaganski2019-03-311-1/+1
| | | | | | | | | | V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Remove unused using declarations in directories [a-d]*Gabor Kelemen2019-03-271-1/+0
| | | | | | | | | | Found with: run-clang-tidy-7 -checks=-*,misc-unused-using-decls Change-Id: I50f6dfa881ac4e752668e762ade0943aaf28ab96 Reviewed-on: https://gerrit.libreoffice.org/69601 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Simplify containers iterations in basctl, basegfx, basic, bridgesArkadiy Illarionov2019-03-166-67/+38
| | | | | | | | | Use range-based loop or replace with STL functions Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c Reviewed-on: https://gerrit.libreoffice.org/69223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/basic/*Gabor Kelemen2019-03-079-1/+13
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dd7984affc4343f148c66077feaac19176adf51 Reviewed-on: https://gerrit.libreoffice.org/68769 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* log nice exception messages whereever possibleNoel Grandin2019-03-072-2/+6
| | | | | | | Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove some unnecessary typedef struct... sugarNoel Grandin2019-03-061-2/+2
| | | | | | | Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* simplify UNO getTypes methodsNoel Grandin2019-03-041-13/+3
| | | | | | | Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Some more WIN32 -> _WIN32Stephan Bergmann2019-03-013-3/+3
| | | | | | | | | | | ...at least some of which have presumably been missing from ce43d0ae9279edbf1ad108fe0d8325327a038d49 "use consistent #define checks for the Windows platform" by accident (and some just clean up comments) Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b Reviewed-on: https://gerrit.libreoffice.org/68580 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* o3tl::make_unique -> std::make_unique in include/ & o3tl/Gabor Kelemen2019-02-201-1/+0
| | | | | | | | | | | | Also the last few remaining occurrences of the header Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I18f435270057f2d09e21d6ea262532cbcc974598 Reviewed-on: https://gerrit.libreoffice.org/67843 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* pretty up logging of exceptionsNoel Grandin2019-02-191-4/+3
| | | | | | | | | | | | | | | Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fix comparison of std::lower_bound resultNoel Grandin2019-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | turns out using a compare operator that takes something other than the element type as a parameter is really hard to get right. The changes in: basic/source/classes/propacc.cxx comphelper/source/property/propagg.cxx vcl/source/font/font.cxx are a regression from commit 35e80e9726b5fee6a00caa58349a4b5d924dad7c Date: Fri Oct 19 16:01:19 2018 +0200 when calling std::lower_bound The change in toolkit/source/awt/vclxtoolkit.cxx is a regression from commit 76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58 Date: Tue Oct 9 16:27:11 2018 +0200 loplugin:staticvar in various Change-Id: Icf6db22e1fc091517a53dd3624913c8c2071c106 Reviewed-on: https://gerrit.libreoffice.org/67954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#112689: Replace chained O(U)StringBuffer::append() with operator+Yusuf Sonmez2019-02-111-5/+4
| | | | | | | Change-Id: I84fcc109087fe72cf68cf6cc1b8cf4045488ff46 Reviewed-on: https://gerrit.libreoffice.org/67601 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
* new loplugin writeonlyvarsNoel Grandin2019-02-112-5/+0
| | | | | | | | | | largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#112689: Replace chained O(U)StringBuffer::append() with operator+Muzaffer Kadir YILMAZ2019-02-111-4/+3
| | | | | | | Change-Id: Iba19864313dc5039f5ca27be3d0c68785612346a Reviewed-on: https://gerrit.libreoffice.org/67602 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
* loplugin:indentation in basctl..bridgesNoel Grandin2019-02-0811-68/+65
| | | | | | | Change-Id: Ie4e27466c4258c6f774a3ebb82ec3a88c28fd753 Reviewed-on: https://gerrit.libreoffice.org/67525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typoAndrea Gelmini2019-02-071-2/+2
| | | | | | | Change-Id: I9b57e73303cb12e818cd761878d0c11c38f4cc3e Reviewed-on: https://gerrit.libreoffice.org/67481 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-01-271-2/+2
| | | | | | | Change-Id: Iccc171ce433e38c4eea4e73dcdba76720aa78056 Reviewed-on: https://gerrit.libreoffice.org/66969 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Clean up dead uses of DISABLE_ATLStephan Bergmann2019-01-241-2/+2
| | | | | | | | | | ...after e597ef0489d9d5504721d21eefa15c65da0fb240 "No need for --disable-activex and --disable-atl any longer" Change-Id: I6ea0026fd18e0097aaaf0c1b05618e2a9ddf1a94 Reviewed-on: https://gerrit.libreoffice.org/66871 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Minimum Supported Version is VS2017himajin1000002019-01-161-1/+1
| | | | | | | Change-Id: Id771f1fe0d8c6702a52836f6229a944d259fed4c Reviewed-on: https://gerrit.libreoffice.org/66424 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
* o3tl::make_unique -> std::make_unique in basctl...bridgesGabor Kelemen2019-01-169-54/+44
| | | | | | | | | | Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I9a20a58c68d12656359dcaa060d8ab41f621af32 Reviewed-on: https://gerrit.libreoffice.org/66262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#122250 Crash when running extensionNoel Grandin2019-01-141-1/+5
| | | | | | | | | | | | | | | | as a consequence of commit 4e07987ce8134312920682e3481c3f8e3d7b66c3 Date: Thu Aug 25 15:08:55 2016 +0200 cid#1371154 Missing move assignment operator this extensions appears to pass bogus data into VCLXWindow::setProperty, so I had to workaround that when debugging Change-Id: Ib6728c0a990bd7cfbfed43d79b7560bd2f7f5a67 Reviewed-on: https://gerrit.libreoffice.org/66293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann2019-01-112-3/+4
| | | | | | | | | ...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#112689: Replace chained O(U)StringBuffer::append() with operator+Doğa Deniz Arıcı2019-01-101-3/+2
| | | | | | | | Change-Id: Ieb5c1e13ae647b49fd563f1759d744bd5f008ce1 Reviewed-on: https://gerrit.libreoffice.org/65758 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* convert "*xxx.get()" to "*xxx"Noel Grandin2019-01-082-2/+2
| | | | | | | Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen2019-01-073-0/+3
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Remove unneeded cast, constify OUStringMatteo Casalin2018-12-281-2/+2
| | | | | | | Change-Id: I4a92779f86104cdad420069620eec50cea85b29c Reviewed-on: https://gerrit.libreoffice.org/65662 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>