summaryrefslogtreecommitdiff
path: root/include/basic
AgeCommit message (Collapse)AuthorFilesLines
2017-12-18convert SbDEBUG constants to o3tl::typed_flagsNoel Grandin3-16/+23
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f (cherry picked from commit 06dd5b9c9e34ad932b0a111c0ecb9f1e99008a19) (cherry picked from commit 0740a13189dd0a1925489994fd542332e2e95c49)
2016-11-17loplugin:unusedfieldsNoel Grandin1-2/+1
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11loplugin:expandablemethods in avmedia..canvasNoel Grandin1-1/+0
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54 Reviewed-on: https://gerrit.libreoffice.org/30753 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08loplugin:unnecessaryvirtual in basctl..chart2Noel Grandin1-2/+2
Change-Id: Id4eeb12792c3a66b68a907cb459ab437e3d64e4c Reviewed-on: https://gerrit.libreoffice.org/30680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21loplugin:expandablemethodds in include/basic..comphelperNoel Grandin2-2/+0
Change-Id: I1aa9c12e8839325a9fd98530abc89a3d586ff62e Reviewed-on: https://gerrit.libreoffice.org/30120 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek3-5/+5
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-07loplugin:staticmethods: basicStephan Bergmann2-10/+10
Change-Id: Ic8c8c8ad4470e14d662f478f6b859cd908c9f78c
2016-09-30loplugin:constantparamNoel Grandin1-1/+1
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke1-3/+3
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-22fix windows buildNoel Grandin1-0/+2
by reverting part of commit commit 7419057e3ec4365748fa6456e207f40fd9e09c62 Author: Noel Grandin <noel@peralex.com> Date: Thu Sep 22 16:34:14 2016 +0200 loplugin:unusedmethods in chart2..svx Change-Id: I72515c9b5f3739f57d4b63a724a9fa32075b2612 Reviewed-on: https://gerrit.libreoffice.org/29197 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin1-2/+0
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-19loplugin:unusedenumvaluesNoel Grandin1-3/+0
Change-Id: I9dcc9f73af6db5b4f7cc946bc28931e5c230b34c Reviewed-on: https://gerrit.libreoffice.org/29012 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15Remove unused declarationStephan Bergmann1-1/+0
Change-Id: Ica1bb8ed197f4581da4a4df61b91a91081602b91
2016-09-14loplugin:constantparamNoel Grandin1-1/+1
clean up the plugin a little, and try to catch params which are default constructed, which doesn't seem to be working yet Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12 Reviewed-on: https://gerrit.libreoffice.org/28861 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14loplugin:constantparam in accessibility to basicNoel Grandin1-3/+1
Change-Id: Id77cbcaefebf310a5d99c6ac12d154e182fd0a1c Reviewed-on: https://gerrit.libreoffice.org/28860 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann10-18/+18
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-30Translate some German comments and messagesMaarten Bosmans1-1/+1
Change-Id: Id15e1afd991f3476e260ba40a8c45c7261113577 Reviewed-on: https://gerrit.libreoffice.org/28493 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-29BASIC : Remove useless SbxBase::GetCreatorArnaud Versini9-15/+13
Change-Id: I3d9aa358ffaefc11b7d2427f2b567c360be2c667 Reviewed-on: https://gerrit.libreoffice.org/28434 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25new loplugin: countusersofdefaultparamsNoel Grandin5-6/+6
Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04 Reviewed-on: https://gerrit.libreoffice.org/28353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-19Resolves: tdf#88953 byref args incorrectly passed in basic->c++Caolán McNamara1-0/+2
partial revert of commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 Date: Tue Jul 14 14:50:07 2015 +0200 loplugin:unusedmethods basic and partial revert of... commit e2080e70fe8b085f18e868e46340454720fa94ca Date: Wed Jun 18 12:14:29 2014 +0200 new compilerplugin returnbyref and revert of... commit 536051f8862203e0e115a5394a6379acd83cc8fe Date: Wed Jul 15 14:04:01 2015 +0200 fix Windows build after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 "loplugin:unusedmethods basic" Change-Id: I612937334fdb75365080c98a9d4da5ed7ae647e3
2016-08-17loplugin:unusedenumconstants in basctl..editengNoel Grandin2-10/+0
Change-Id: I49a23a197969d58a3a2d6b2be1fbe4a647c7fa08
2016-08-16basic: Simplify SbxArrayArnaud Versini1-3/+1
Change-Id: Idcc1e35d0a1d80591e2cebdae37a70cf029b022e Reviewed-on: https://gerrit.libreoffice.org/28147 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-15basic: SbxBase should be abstractArnaud Versini1-7/+6
Change-Id: Ief4297e5c64cfb29645463aca3cc677dc06fc95a Reviewed-on: https://gerrit.libreoffice.org/28112 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin2-2/+2
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-11BASIC : Remove useless 16bits Remove function from SbxArrayArnaud Versini1-2/+1
Change-Id: I050a034437d3370a28c9e5ab47abee369e634f7d Reviewed-on: https://gerrit.libreoffice.org/27089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann1-2/+2
Change-Id: I614d91e7e4a686613dc0cbe1b9f4fabb978ffc77
2016-06-14Resolves: tdf#59222 Crash in Basic with an array of values...Caolán McNamara2-2/+11
from a range address trying to make all SbxVariables reference count their parents is ludiciously hard, so just reference count this one known crashing case Change-Id: Ie1fa6624e8184146dd00d766cdbacef674153ef6 Reviewed-on: https://gerrit.libreoffice.org/26272 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-14drop these typedef header guardCaolán McNamara2-14/+0
Change-Id: If52f2bba475e7a8a5b7c63d5114f2725c9ce8617
2016-06-12BASIC : Add SbModule::FindMethodArnaud Versini1-0/+1
Change-Id: I3418c4a3d24b3b6630d6c80a6c8aa9d4ffb7e73a Reviewed-on: https://gerrit.libreoffice.org/24346 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03tdf#89329: use unique_ptr for pImpl in sbxvarXisco Fauli1-1/+2
Change-Id: I74734c34e72ba5d508830dbcff88f0d3b93a0766 Reviewed-on: https://gerrit.libreoffice.org/25742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03loplugin:constantparamsNoel Grandin1-1/+1
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361 Reviewed-on: https://gerrit.libreoffice.org/25769 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#89329: use unique_ptr for pImpl in basmgrXisco Fauli1-1/+1
Change-Id: I2d6c6b997155183b058872db354de1b407998d3a Reviewed-on: https://gerrit.libreoffice.org/25472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23Convert SbxClassType to scoped enumNoel Grandin1-8/+8
Change-Id: I48afcdd9924d22b52a8db21aa253061e4d38c85b Reviewed-on: https://gerrit.libreoffice.org/25259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin2-15/+0
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06teach passstuffbyref plugin to check for..Noel Grandin2-7/+7
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-13loplugin:passstuffbyref in basicNoel Grandin3-4/+4
Change-Id: Ie93b33502325f00ba95ab168a445a347148f9edd
2016-04-11Avoid reserved identifierStephan Bergmann1-2/+2
Change-Id: I6dfb2961adeb412405c58e0a0b51e130cbd3e0c3
2016-04-11clang-tidy performance-unnecessary-value-param in basicNoel Grandin1-1/+1
Change-Id: I997213ca28efc2df04d454ffaf3c81c9cbad09ac
2016-04-11make GetGlobalUNOConstant and GetUNOConstant take an OUStringNoel Grandin2-3/+3
and eliminate converting backwards and forwards between sal_Char*/OString/OUString Change-Id: Iaf52ce93f0e732ab338f75d21b95ab4b020a4d6f Reviewed-on: https://gerrit.libreoffice.org/23919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-09loplugin:constantparam in basicNoel Grandin1-5/+1
Change-Id: I5b49406535c1ec95e47fe237a23184a499b875e5
2016-03-03loplugin:unuseddefaultparams in basicNoel Grandin1-2/+2
Change-Id: I286efdac6af47a859693fccc71b445915f76945c
2016-02-09Remove excess newlinesChris Sherlock2-5/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08sequence->vector in basicNoel Grandin2-2/+3
Change-Id: Ic42f7218bda81effe870d950f666ba7653d60c66 Reviewed-on: https://gerrit.libreoffice.org/22177 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin1-32/+0
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-16BASIC : Remove useless methods in StarBasicArnaud Versini1-3/+1
Change-Id: I9e8ce92b967ee9c9485b7af15280f6a212ff599d Reviewed-on: https://gerrit.libreoffice.org/21498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-15basic: coverity#1348466 checked returnMichael Stahl1-1/+1
Kind of unnecessary but let's hope it shuts up coverity. Change-Id: I4903c9df788ce5fb9648c5fd68627ff21362828f
2016-01-12loplugin:unusedmethods unused return value in include/basicNoel Grandin6-16/+16
Change-Id: Ib1a006adaa92e257d40a20ff0d8beeb37e7c2fe0 Reviewed-on: https://gerrit.libreoffice.org/21360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12BASIC: Store directly SbxVarEntry in SbxArrayArnaud Versini1-1/+1
Change-Id: I64ae6c2a45e0ed880f5b76ca2ad420d684fdfeb4 Reviewed-on: https://gerrit.libreoffice.org/21308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2016-01-07BASIC : use std::vector instead of SbArray for Modules.Arnaud Versini2-3/+4
Change-Id: I9594efb13b3dccc637ccd61eea4b42255c2a775c Reviewed-on: https://gerrit.libreoffice.org/20817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-12-30BASIC : Remove useless allocation operator overloadArnaud Versini1-3/+0
Change-Id: I134cdbfe388347264a810bbfbff8b4f9f373e663 Reviewed-on: https://gerrit.libreoffice.org/20873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>