summaryrefslogtreecommitdiff
path: root/include/basic
AgeCommit message (Collapse)AuthorFilesLines
2015-07-19sal_uIntPtr to sal_uInt32, for consistencyMatteo Casalin3-8/+8
Change-Id: Ib78dce61e8fb8c8e3bf8c7a2b02966100a4db0e8
2015-07-17basic: try to prevent MSVC from generating copy assignmentMichael Stahl1-0/+3
Change-Id: I7232f69a465b1acaf069005b3695039bdc96c7a3
2015-07-17basic: replace boost::ptr_vector with std::vector<std::unique_ptr>>Michael Stahl1-3/+3
Change-Id: I96ea97c1df7903a28387d8e1171075be55a80ca7
2015-07-15loplugin:unusedmethods basicNoel Grandin7-40/+0
Change-Id: Iddfbde451088750f8c74f3ac72c35b5ccfbe0ab1 Reviewed-on: https://gerrit.libreoffice.org/17044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-07Replace GetAppData(SHL_IDL) with a static pointer varStephan Bergmann1-2/+0
Change-Id: Ia1e22ff95457a958ef26974091aa2092b32505bd
2015-07-03Fix typosAndrea Gelmini1-1/+1
Change-Id: Ie2bbe020fc6e3a4a4f913208c245f395849bb9ee Reviewed-on: https://gerrit.libreoffice.org/16708 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-24remove SFX_NOTIFY macroNoel Grandin3-9/+5
it has not served any purpose since we switched to using normal C++ RTTI for the SfxHint objects Change-Id: Ic81353bcb7863ce892eb75296248ca14d8fd6c86
2015-06-04convert PropertyMode to scoped enumNoel Grandin1-5/+5
Change-Id: I9b0bbf6273aa18ae918d1d69af5dcc7652181f5c
2015-05-19basic: used typed LINKsNoel Grandin1-9/+9
Change-Id: I8770a782e7ff5529e30aee13558711bdd8a4070d
2015-05-07Remove SvStorage aliasStephan Bergmann1-1/+1
Change-Id: Id07ace147ff4fd4a17d05ba3cce6408def05c9c7
2015-04-30Gradually typed LinkStephan Bergmann1-9/+9
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-28SbModule::Run return value is unusedStephan Bergmann1-1/+1
Change-Id: I7cd697d944dc0efbd35b852fc553ba85bc88c15e
2015-04-19callcatcher: update unusedcodeCaolán McNamara1-2/+0
Change-Id: I4b2a7ea03aafbfbf1fece1533da801a4326d80f9
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin5-13/+13
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-13loplugin:staticmethodsNoel Grandin3-4/+4
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13BASIC: Merge BasicLibs with BasicManagerImpl and use boost::ptr_vector.Arnaud Versini1-3/+1
Change-Id: I36fc3ce26b129b11fc2d6d2829a146b3fa57b783 Reviewed-on: https://gerrit.libreoffice.org/15267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann1-1/+1
Change-Id: I6dd7c7fbaf0d4b22abba0a7b1f5e37f0a46d0747
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann1-1/+1
Change-Id: If774a3b4e2e993d26dd9b5777a55665a330b2abe
2015-03-25Typo: formated->formattedJulien Nabet1-1/+1
Change-Id: Iefd4d375a0dfb36732233852f906c6b85dccc2a5
2015-03-25new constantfunction lopluginNoel Grandin1-1/+0
Change-Id: Ie9b7a0c41fc4dbd2560ceff6bae9ab85357f518b
2015-02-16boost->stdCaolán McNamara2-3/+3
Change-Id: I44b208a2c5c5bf73ac025462c9f7bd499ed0a49b
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara1-3/+2
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-02callcatcher: shave off a few moreCaolán McNamara1-1/+0
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a
2015-01-29callcatcher: large newly detected unused methods post de-virtualizationCaolán McNamara1-4/+0
i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin <noel@peralex.com> Date: Tue Jan 20 12:38:10 2015 +0200 new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-26followup code removal after changing virtual methods to non-virtualNoel Grandin3-13/+13
This cleanups up indentation and removes dead classes. This is a followup patch to commit 272b1dd55797aacf511fb4342b0054e3697243f6 "new loplugin: change virtual methods to non-virtual" Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin7-26/+26
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-09Resolves: #i63614# fix strange type mismatch when Iif function is usedTsutomu Uchino2-2/+6
Second or later compilation uses value type returned by previous execution of code. Use the defined type as return value of the runtime function of Basic always. (cherry picked from commit 7470c682e136a4a89c1e9474bbc79b2d61f31048) Conflicts: basic/inc/basic/sbxmeth.hxx basic/inc/basic/sbxobj.hxx basic/source/runtime/stdobj.cxx basic/source/sbx/sbxobj.cxx Change-Id: I3064e8403286a9c1401ef658bf139bedeae11f17
2015-01-08brute-force find-and-remove of unused #define constants.Noel Grandin1-12/+0
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara1-3/+3
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-03fdo#84938 replace BASERR_REASON_ constants -> enumTobias Madl1-16/+18
Change-Id: I80fe0108c2d27b72d2fadc23032cf2b52c3193a6 Reviewed-on: https://gerrit.libreoffice.org/13268 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-1/+1
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-23basic: pimplify thatMichael Stahl1-8/+7
Change-Id: I0abe66ded0fd69a2720ad64e1a1426aafc7dfffb
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann1-1/+0
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-09-06SfxHint: convert home-grown RTTI to normal C++ RTTINoel Grandin1-1/+0
Also note that I fixed a bug in SvxFontMenuControl::Notify where the if statement had the check the wrong way around. Change-Id: I611e8929c65818191e36bd80f2b985820ada4411 Reviewed-on: https://gerrit.libreoffice.org/11147 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-08-26convert SBX flag bits to type-safe enumNoel Grandin3-39/+65
Change-Id: I18d5d6a27f06ee60a5cb3dc393bf05b51bba4817 Reviewed-on: https://gerrit.libreoffice.org/11070 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-08-22Remove some useless tools/debug.hxx includesMarcos Paulo de Souza1-1/+0
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h header was necessary in some cases because of a macro or a typedef that was needed. Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9 Reviewed-on: https://gerrit.libreoffice.org/11075 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22Remove BasicManagerCleanerStephan Bergmann1-2/+2
Change-Id: I55eccc6367cf3255af05c075631945f47417d682
2014-07-29convert linked list to std::vector in SbxDimArrayNoel Grandin1-4/+7
Change-Id: I2640cfe1f9606d992f622b99ff3c607555771e23 Reviewed-on: https://gerrit.libreoffice.org/10298 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-07-17Renamed brdcst.[hc]xx to SfxBroadcaster.[hc]xxTobias Lippert1-1/+1
- Remove includes from files where they are not needed. - Update pch files Change-Id: I0188e3934ef429008c1ef495ab1d5b27f38664d5 Reviewed-on: https://gerrit.libreoffice.org/10342 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-25Remove this weird inheritance from smart-pointer-wrapped class.Kohei Yoshida1-1/+1
SbxVarEntry is now its own class. Change-Id: I5c5ce1990fa83930acced1d507f5b0de60bf221e
2014-06-25Use boost::optional to store alias name.Kohei Yoshida1-1/+1
Change-Id: I809b21ea156061a265c0d83d58534df10bc273bc
2014-06-25pData -> mpVarEntries.Kohei Yoshida1-1/+1
pData is a nightmare with grepping as it's too generic of a name. Change-Id: I01b3f1b503f21ee13c97733fa66804874a2cddc4
2014-06-25Remove this class that only derives from std::vector and not much else.Kohei Yoshida1-2/+4
Change-Id: Ibc584f4148cec49a9ac34a240cc2fa3e87daf443
2014-06-24new compilerplugin returnbyrefNoel Grandin1-1/+1
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin3-4/+5
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin3-3/+3
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-29Detach all DocBasicItem objects upon process termination.Kohei Yoshida1-0/+2
To prevent rogue DocBasicItem objects (which are global objects) from attempting to stop listening after the main app is dead. Change-Id: I68a667137ca4e0eff18278f4d2d5dd67466eaf34
2014-04-14typo: hierarchie -> hierarchyThomas Arnhold1-1/+1
2014-04-07Replace SV_DECL/IMPL_REF macros with SvRef templateStephan Bergmann8-22/+12
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
2014-04-04StarBASIC::ErrorHdl sal_Bool->boolNoel Grandin1-1/+1
Change-Id: I68cc6c6b63174ff16e5fda00f62172e1eaacbf0d