summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)Author
2015-05-18Remove include stdio (part2)Julien Nabet
Change-Id: Iae58d107d8df1c543a165086fb2b7c288e7121dd Reviewed-on: https://gerrit.libreoffice.org/15775 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-04-23loplugin:staticmethodsNoel Grandin
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
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-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann
Change-Id: I936ae26f8d5d7cdd32c15e937b7cae6668b6192c
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann
Change-Id: I7d6106bda60f8cae3e110e6757b3bf267ce15ec5
2015-03-25TyposJulien Nabet
Change-Id: I434be0034b26ac4719590238817538ecd90b8923
2015-03-17Fix various XServiceInfo implementationsStephan Bergmann
...to match what is recorded in the .component files Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-13tdf#43157: Fix format string violations in OSL_TRACE etc.Stephan Bergmann
...for a 32-bit build, similar to what ee11e221d2108212619e1bbe7f029e7d9afdba32 "tdf#43157: Fix format string violations in OSL_TRACE etc." did for a 64-bit build Change-Id: I05dd79ede3e66cb9ab7a33792319eb34b34c82dd
2015-03-12Clean up previous commitStephan Bergmann
...and add missing XServiceInfo implementations Change-Id: I719cd10b6202d94e751805e1b838eb3f193e24d1
2015-03-12scripting: use constructor syntax in vbaevents.componentChris Sherlock
Change-Id: Ie27ec9ca92137e9f8666d2080fd1bc028417e337 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-03-02pyuno, scripting: remove executable bits from python, js, bsh filesMichael Stahl
Change-Id: Id108693d84fbca7764614e126ee1b3b045baec17
2015-02-21Typo: deleteing->deletingJulien Nabet
Change-Id: I2bdde7524a97039c94a8da5ac5d2eba38c91d71a
2015-02-16Make LogUtils.getTrace actually workStephan Bergmann
Change-Id: I59e2b93ed1142bac22ead08cc101e27cfa3e02df
2015-02-16rhbz#1192732: Revert "From the context of the code, this field should...Stephan Bergmann
...not be static." This reverts commit 6d4c1f0d4a623bf7f3b3a0af2ece5c969d5aec77. Whatever made the author of that commit think rhinoWindow shouldn't be static, it clearly needs to be, as in edit()'s Runnable.run(), the usage of rhinoWindow at the end relies on rhinoWindow being set via the new ScriptEditorForJavaScript(context, url) call to initUI() (or else rhinoWindow already being set from a previous such call if already editor != null).
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: I862b29974c770aea7396f2d650208b1f3e1f4e4b
2015-01-29scripting: remove unnecessary SAL_CALLMichael Stahl
Change-Id: Ic1fbb36a509ec1dce63f1c7fa4a8955a4780517d
2015-01-26Fix types of functions called via pointer (-fsanitze=function)Stephan Bergmann
Change-Id: Ife0151a04477ce30bb132e6dfae9f4d3a74bf4b0
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-23typo: langugage -> languageAndras Timar
Change-Id: Ifabd5a7851946b3e4109e22e6e9a1ff34575c1e5
2015-01-13fdo#88256 fix crash when running javascript macroNoel Grandin
caused by my commit 8583da1e934a49791ef8d86668f3d5c3c5dae1d7 "java: remove unused fields" Change-Id: Ibcd6462e8229a0a6cb98ebfd16ce5d2ea45ca931
2015-01-04cppcheck: Possible inefficient checking for <var> emptinessJulien Nabet
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
2014-12-21fdo#39440 reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058
2014-12-19java: scripting: fix bug in removing model from mapNoel Grandin
found by PMD Change-Id: I4bd35dd30f6c77aad96932216d8459b812004a88
2014-12-18scripting: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: Iacb434225e779de4911e9acc8431662f5eabcee3
2014-12-15scripting: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
2014-12-11java: revert part of commit, scripting/ is public APINoel Grandin
revert part of my commit 7557f23b31dcfb4d86c122bb34d9675c0db9a694 "java: reduce visibility of fields and methods" Change-Id: I2049a154b60b165d4d2217495935442d6da66e97
2014-12-11java: reduce visibility of fields and methodsNoel Grandin
found by PMD Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6 Reviewed-on: https://gerrit.libreoffice.org/13409 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10java: unused importsNoel Grandin
Change-Id: I05824a6f19a5f3048a52101b96f6bf3d3099df08 Reviewed-on: https://gerrit.libreoffice.org/13403 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-05java: remove some unused local variablesNoel Grandin
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
2014-12-05java: remove some unused fieldsNoel Grandin
Change-Id: I1b6fb6b47439c448ac31983702772e2115c70d56
2014-12-02pyuno: move "officehelper.py" from scripting to pyunoMichael Stahl
... because at least in Fedora packages with system python it's a pain to use officehelper.bootstrap() because unlike pyuno it is not installed in the standard python directories but in libreoffice/program. You might think that bootstrap() is not appropriate functionality for a UNO langauge binding, but then why does ::cppu::bootstrap() exist? Change-Id: I5fd4b344a811c087d32fb6304e55105ab3cb137e Reviewed-on: https://gerrit.libreoffice.org/12968 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-11-25java: final fields that can be staticNoel Grandin
found by PMD Change-Id: I2b48f35d252d6e914c2a18a2c175b075a9d3ac0f Reviewed-on: https://gerrit.libreoffice.org/13099 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-18java: make fields final where possibleNoel Grandin
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
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-11-12java: convert fields to local variables where possibleNoel Grandin
found by PMD Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542 Reviewed-on: https://gerrit.libreoffice.org/12376 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12java: reduce excessive code indentation levelsNoel Grandin
by using early return in some methods Change-Id: I3611c8c89b3a94ef7e1772d178acf065fd7fcdc7 Reviewed-on: https://gerrit.libreoffice.org/12374 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-24coverity#1237350 use our double-locking templates for thisCaolán McNamara
Change-Id: I589468e9663ffd01a237a1684345985396bc4eac
2014-10-22Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTINGTor Lillqvist
Feature test macros that govern conditional compilation should be defined in config_*.h include files, not on the compilation command line. Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-19scripting: redundant cast to StringRobert Antoni Buj i Gelonch
Change-Id: I5e048964cc7885a32c59ff8a9eb1fc5b9523e843 Reviewed-on: https://gerrit.libreoffice.org/11859 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-17java: when rethrowing exceptions, store the originalNoel Grandin
Change-Id: I8a2a264597d0b1ae06b08136fea36003682380b5
2014-10-17java: final fields that can be staticNoel Grandin
Change-Id: I8c06be7bc0b8a38c662209f0de72a00550e25447
2014-10-17java: no need to call String.valueOf to append to a StringNoel Grandin
Change-Id: I5ef45b971d24dde814ab8cbb2e9503d9da4f0d73
2014-10-16java: when rethrowing, store the original exceptionNoel Grandin
Change-Id: I14666493e72da177fcfff1895ef3206f0e13cc01
2014-10-16java: always use braces for while loopsNoel Grandin
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
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-10-14fix import location of XScriptContextNoel Grandin
Change-Id: I3b0ec540ed37e40f59210b7fb563196aee63d1ea