summaryrefslogtreecommitdiff
path: root/include/basic
AgeCommit message (Collapse)Author
2015-08-31tdf#75973 : User Defined Types in password encrypted macrosLaurent Godard
save/load basic script so that when executing password protected the user defined types can be rebuilt supports array and nested types New identifier B_USERTYPE for save/open macro with user defined types No version bump but saves binary format now to current_version a unit test in sc macros-test.cxx full round trip on password protected document (ie. use binary storage) master --(0)--> master --(1)--> libreoffice 4.4 --(2)--> master --(3)--> master (0) in master, User type supported, big module supported (1) in libreoffice 4.4, user type not supported, big module supported, no loss of code (2) in master, user type not supported, big module not found, no loss of code it is OK as libreoffice 4.4 saves to LegacyVersion (see sbxmod.cxx changes) (3) in master, User type supported, big module supported (all is restored) it is OK as module was saved with CURRENT_VERSION (see sbxmod.cxx changes) Change-Id: Idab5de85e948dc11f4aba631b1569a1cc1cb4bf6 Reviewed-on: https://gerrit.libreoffice.org/17841 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-19basic: used typed LINKsNoel Grandin
Change-Id: I8770a782e7ff5529e30aee13558711bdd8a4070d
2015-05-07Remove SvStorage aliasStephan Bergmann
Change-Id: Id07ace147ff4fd4a17d05ba3cce6408def05c9c7
2015-04-30Gradually typed LinkStephan Bergmann
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 Bergmann
Change-Id: I7cd697d944dc0efbd35b852fc553ba85bc88c15e
2015-04-19callcatcher: update unusedcodeCaolán McNamara
Change-Id: I4b2a7ea03aafbfbf1fece1533da801a4326d80f9
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
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 Grandin
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13BASIC: Merge BasicLibs with BasicManagerImpl and use boost::ptr_vector.Arnaud Versini
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 Bergmann
Change-Id: I6dd7c7fbaf0d4b22abba0a7b1f5e37f0a46d0747
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: If774a3b4e2e993d26dd9b5777a55665a330b2abe
2015-03-25Typo: formated->formattedJulien Nabet
Change-Id: Iefd4d375a0dfb36732233852f906c6b85dccc2a5
2015-03-25new constantfunction lopluginNoel Grandin
Change-Id: Ie9b7a0c41fc4dbd2560ceff6bae9ab85357f518b
2015-02-16boost->stdCaolán McNamara
Change-Id: I44b208a2c5c5bf73ac025462c9f7bd499ed0a49b
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-02callcatcher: shave off a few moreCaolán McNamara
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a
2015-01-29callcatcher: large newly detected unused methods post de-virtualizationCaolán McNamara
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 Grandin
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 Grandin
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 Uchino
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 Grandin
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-03fdo#84938 replace BASERR_REASON_ constants -> enumTobias Madl
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 Gelmini
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 Stahl
Change-Id: I0abe66ded0fd69a2720ad64e1a1426aafc7dfffb
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann
...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 Grandin
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 Grandin
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 Souza
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 Bergmann
Change-Id: I55eccc6367cf3255af05c075631945f47417d682
2014-07-29convert linked list to std::vector in SbxDimArrayNoel Grandin
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 Lippert
- 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 Yoshida
SbxVarEntry is now its own class. Change-Id: I5c5ce1990fa83930acced1d507f5b0de60bf221e
2014-06-25Use boost::optional to store alias name.Kohei Yoshida
Change-Id: I809b21ea156061a265c0d83d58534df10bc273bc
2014-06-25pData -> mpVarEntries.Kohei Yoshida
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 Yoshida
Change-Id: Ibc584f4148cec49a9ac34a240cc2fa3e87daf443
2014-06-24new compilerplugin returnbyrefNoel Grandin
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 Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-29Detach all DocBasicItem objects upon process termination.Kohei Yoshida
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 Arnhold
2014-04-07Replace SV_DECL/IMPL_REF macros with SvRef templateStephan Bergmann
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
2014-04-04StarBASIC::ErrorHdl sal_Bool->boolNoel Grandin
Change-Id: I68cc6c6b63174ff16e5fda00f62172e1eaacbf0d
2014-04-04SbxObject::Call sal_Bool->boolNoel Grandin
Change-Id: I2e52ddf704679a118fbbc4efebb7cf9fb36f0c34
2014-04-04SbxObject::isClass sal_Bool->boolNoel Grandin
Change-Id: I71f7b3603df43924d7374969444b929e1eecca4e
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann
It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-03-28fdo#75280 Started cleaning up of sal_uIntPtr usage.Valentin Kettner
Converted wrong usage of sal_uIntPtr to appropriate other types in basic module. The bug is not fully fixed with this since many other occurences of sal_uIntPtr remain. Update due to code review comments: Fixed forgetting to change some declarations in iosys.cxx. Cleaned up the one remaining sal_uIntPtr in iosys.cxx Fixed adding a sal_uInt64 to a Date (uses long now instead) in methods.cxx Fixed the VarDecFromUI4 call in sbxdec.cxx from sal_uLong to ULONG . Conflicts: basic/source/runtime/iosys.cxx Change-Id: Ia6460be04967deb68b92eb62d945da8814fae605
2014-03-28Remove remaining DBG_CTOR etc. remnants from basicStephan Bergmann
Change-Id: Ia714029c2e32e28c1bb6f4f59d0c7f357eccc236
2014-03-27basic: sal_Bool->boolNoel Grandin
Change-Id: Icd78d21495f305c8f00280eee76e7262e542317d
2014-03-27basic: sal_Bool->boolNoel Grandin
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48