summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)Author
2017-12-05loplugin:useuniqueptr extend to check local varsNoel Grandin
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2489000d3fd66319a8355fd4e37cfdfda47296d0) Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 (cherry picked from commit e540ccfb5eb43bd4a3d6920074dce8436720ba8e)
2017-04-18tdf#92007 python scripts with tuple-assignments fails on access from GUIWerner Tietz
Change-Id: Ice1d7d92cec56751cb26cbb31a5995ab30895125 Reviewed-on: https://gerrit.libreoffice.org/36399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 7ef47336411389ac492729bef52fe62aebe90f5a) Reviewed-on: https://gerrit.libreoffice.org/36483 (cherry picked from commit 9a6d78b722f3a49f71a680e49cf64e7cfb637c43)
2017-02-17Match conditionals in Repository.mkTor Lillqvist
Change-Id: Ibc97588de9d414e05184593e4e9c1aeba94959f3 (cherry picked from commit 7cd3c44a9ead6ff0e656e9b7ad3349557e285ee9)
2016-12-18tdf#103363: add unicodedata and import idna encoding for mailmergeJulien Nabet
Thank you Moggi for your help on how to add unicodedata module to Python! Change-Id: I071e9279d1de4748f9443ac2d624fe925288e408 Reviewed-on: https://gerrit.libreoffice.org/32140 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 486efbfc74890582b16f858b8e937d4ae9b66f64) Reviewed-on: https://gerrit.libreoffice.org/32145
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01loplugin:oncevar in sal..scriptingNoel Grandin
Change-Id: Id9ab12f3a61eb83a2288b2fd4d99ab77f5833e1b Reviewed-on: https://gerrit.libreoffice.org/30461 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01Omit the default comparatorTakeshi Abe
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31loplugin:countusersofdefaultparams in sc(part1)Noel Grandin
Change-Id: Ia2b0174654fad536ee23f6174a0b38b1843a4aa5 Reviewed-on: https://gerrit.libreoffice.org/30427 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28convert std::unique_ptr<VclAbstractDialog> to VclPtrNoel Grandin
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-28loplugin:expandablemethods in scaddins..scriptingNoel Grandin
Change-Id: I6a39184e526c9a41155565e798a7f1f2542985f2 Reviewed-on: https://gerrit.libreoffice.org/30331 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26normalize existing emacs/vim mode-lines in python filesMichael Stahl
Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
2016-10-20loplugin:expandablemethodds in scaddins..sdextNoel Grandin
Change-Id: Ife021e368efaafe9097750b4ca1a5472e94352a9 Reviewed-on: https://gerrit.libreoffice.org/30054 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-16tdf#98004 - Enhansment on Editor(Beanshell)nadith
Add a toolbar A little enhasment for the editor has been done. Added a toolbar for set of buttons that was previously in a JPanel and now it is in Jtoolbar in the editor Change-Id: Ie04232e7824c051f272d69cc109eec0e70ccf921 Reviewed-on: https://gerrit.libreoffice.org/29806 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek
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-03ClassLoader->URLClassLoaderCaolán McNamara
Change-Id: I1f46a99025ba33d08842da9b06611dcfa6b1b49c Reviewed-on: https://gerrit.libreoffice.org/29474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-01Fix typosAndrea Gelmini
Change-Id: I9701cc93a9f4315e71c133237fdd96ef6964c8ff Reviewed-on: https://gerrit.libreoffice.org/29438 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 Rathke
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-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
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-25tdf#100726 - Improve readability of OUString concatanationsGökhan Gurbetoğlu
Improved readability of OUString concatanations. Also removed unused OUStrings "sColor" and "sEntry" from the code. Change-Id: Ie9792f499cd880be72229f8a8c71f05ff8e258b6 Reviewed-on: https://gerrit.libreoffice.org/28375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-08-19Some clang-tidy misc-move-constructor-initStephan Bergmann
...by turning the relevant ctor parameters into "const &". Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc
2016-08-19Revert "coverity#1371372 Resource leak on an exceptional path"Caolán McNamara
seeing as it doesn't build universally, java 1.7 onwards apparently This reverts commit 6830d8c2083fa66cc113f587cbfc4aa5a4f8a535.
2016-08-19coverity#1371372 Resource leak on an exceptional pathCaolán McNamara
and coverity#1371366 Resource leak on an exceptional path coverity#1371376 Resource leak on an exceptional path Change-Id: Ic0fd05f02b1d78a47d4ee924dee8f10811586d0d
2016-08-19coverity#1371367 Resource leak on an exceptional pathCaolán McNamara
Change-Id: I4da5f6d427e8132d62860b46cb4def88b8afb25d
2016-08-09python macros aren't listed under scripting organizeCaolán McNamara
since... commit deb989dd6d1f86e74864131be50ed92d8d43768c Author: Kenneth Koski <mechaxl@gmail.com> Date: Mon Feb 29 22:22:10 2016 -0600 blew away the uno.ByteSequence(str) path Change-Id: I8b73883c4f246ebafd2f810ca61b19da40f833e2
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-01remove dead ASYNC codeNoel Grandin
introduced in commit 0b21b8b146fc4b982c7c9bbb866b9ff18a29332a Author: Noel Power <noel.power@novell.com> Date: Wed Oct 6 10:16:27 2010 +0100 initial commit for vba blob and never activated or touched since then Change-Id: I34f9a5f702dd8f2254aa1efb94de61569220b90c
2016-07-26masses of MessBoxes not being disposed promptlyCaolán McNamara
since... commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. There is no special ScopedVclPtr<X>::Create or ScopedVclPtrInstance<X>::Create just VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo doesn't call dispose on the owned X Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-07-15new loplugin unnecessary overrideNoel Grandin
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I678e89d9ff562446e7bbe8542a616c1b083dfcd1
2016-06-24compilerplugins: add OWeakObject::release() override checkMichael Stahl
Change-Id: I767857545d7c91615cf162790c04f0016de9fdf6 Reviewed-on: https://gerrit.libreoffice.org/26555 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-12BASIC : Add SbModule::FindMethodArnaud Versini
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-06remove unused imports in java codeNoel Grandin
Change-Id: I95041f49dd22ba9a15da3598b04a010eecf761a8
2016-05-23Convert SbxClassType to scoped enumNoel Grandin
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-19clang-tidy misc-unused-alias-declsNoel Grandin
Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124 Reviewed-on: https://gerrit.libreoffice.org/25075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-15coverity#1361587 Dereference null return valueCaolán McNamara
and coverity#1361588 Dereference null return value Change-Id: Ia282c37e94d9d4131d18b3ccf6a8b7cb12c12344
2016-05-11clang-tidy modernize-loop-convert in scripting to svtoolsNoel Grandin
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5 Reviewed-on: https://gerrit.libreoffice.org/24847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-30Fix typosAndrea Gelmini
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-24Don't use SolarMutexGuard for returning a constantArnaud Versini
Change-Id: Ia6e31d7fe9d90f8094e2043de29a896c9e840c53 Reviewed-on: https://gerrit.libreoffice.org/24347 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-21new plugin stylepoliceNoel Grandin
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: Ic3e7658ccfd23fa29af46eac971deac5a0373377
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-04tdf#97499 Fixed containers parameters clearing #4tymyjan
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513 Reviewed-on: https://gerrit.libreoffice.org/23754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04tdf#97499 Fixed containers parameters clearing #3tymyjan
Change-Id: I1c105de7e1df251533179fba77e3797ef1c4e2d4 Reviewed-on: https://gerrit.libreoffice.org/23752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01sequence->vector in scriptingNoel Grandin
Change-Id: I5efd5ed8755b6127f08f711b8b7337b87b89bbd4 Reviewed-on: https://gerrit.libreoffice.org/23700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31use SAL_N_ELEMENTS more widelyNoel Grandin
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2016-03-17loplugin:constantparam in toolsNoel Grandin
Change-Id: I3774661799c074561c694515baba42a375d0a077 Reviewed-on: https://gerrit.libreoffice.org/23301 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-14remove some unused Java codeNoel Grandin
found by UCDetector Change-Id: Ic0295a24b26e206eb53eda2da540755477df86df
2016-03-14scripting: JDK 1.5 compatibility: don't use java.awt.Font.MONOSPACEDDouglas Mencken
MONOSPACED is defined in java/awt/Font.java as /* @since 1.6 */ static final String MONOSPACED = "Monospaced"; Change-Id: I31847c939387c139971ff55f786773c7ce51448c Reviewed-on: https://gerrit.libreoffice.org/23164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>