summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)AuthorFilesLines
2017-05-16loplugin:checkunusedparams variousNoel Grandin1-2/+2
Change-Id: I5d1cc807134230d86e0226a12fada204004312d3 Reviewed-on: https://gerrit.libreoffice.org/37675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin1-1/+1
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock1-1/+1
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert scripting module away from OSL_ASSERT to assertChris Sherlock1-1/+1
Change-Id: I6276488e930b60855053747828547e2ed659c060
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin2-53/+13
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+1
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky6-6/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-1/+1
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12tdf#92007 python scripts with tuple-assignments fails on access from GUIWerner Tietz1-1/+6
Change-Id: Ice1d7d92cec56751cb26cbb31a5995ab30895125 Reviewed-on: https://gerrit.libreoffice.org/36399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-30remove type decorations on char literalsJochen Nitschke2-5/+5
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I4e1a613fc99b931e84a1955695364e1d25e25e5c Reviewed-on: https://gerrit.libreoffice.org/35642 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19Fix typos + some German translationsAndrea Gelmini1-1/+1
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253 Reviewed-on: https://gerrit.libreoffice.org/35406 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-02Fix typosAndrea Gelmini1-4/+4
Change-Id: If5e709c9d6e3a4fbb568bdc261cccd214dd0cbd3 Reviewed-on: https://gerrit.libreoffice.org/34784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28new loplugin unoanyNoel Grandin1-1/+1
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-23In Java, css.uno.RuntimeException doesn't derive from css.uno.ExceptionStephan Bergmann1-1/+1
Change-Id: I83850db6e3f3ac87d52e75f122ba2b6bba3905b9
2017-02-21loplugin:subtlezeroinit: scriptingStephan Bergmann2-2/+2
Change-Id: Id59b79c8e01ca66924b8a8de1c513ce97658e361
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann1-19/+3
Change-Id: I705e4e7e8446a503e3ef0e2828a22554f94585c6 Reviewed-on: https://gerrit.libreoffice.org/34259 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-06Add missing #includesStephan Bergmann7-3/+9
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin1-3/+3
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02unnecessary use of OUStringBuffer in throwing exceptionsNoel Grandin3-23/+20
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f Reviewed-on: https://gerrit.libreoffice.org/33788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin1-6/+2
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 Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin1-1/+1
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin3-7/+5
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27Remove dead codeStephan Bergmann2-202/+0
...dead ever since its introduction in d86602573305ac7c8583794a37c4bd0572b41577 "#i17307#: XFunction->XScript etc" Change-Id: I664ff15ec2e9fda000bae7740ced427a646ddc92
2017-01-26Remove dynamic exception specificationsStephan Bergmann33-873/+401
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, scriptingStephan Bergmann9-1/+32
Change-Id: I3a3f8ad12bad448f0ea2beb698cf4e6636d4595a
2017-01-17Typo: listerner->listenerJulien Nabet2-8/+8
Change-Id: Ib2cb62477630641f0302769eacdd0dd00f4e760c Reviewed-on: https://gerrit.libreoffice.org/33192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-10coverity#1398527 Uncaught exceptionCaolán McNamara2-2/+2
Change-Id: Id1c0273f7430ba525f231ed5bb9311c732935640
2017-01-09New loplugin:externvar: scriptingStephan Bergmann1-30/+30
Change-Id: I79b4e8718c10b5c5fce9f734a5a30ce9bc01e0c7
2016-12-18tdf#103363: add unicodedata and import idna encoding for mailmergeJulien Nabet1-0/+1
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>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin1-1/+1
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13Revert "verify SolarMutex when ref-counting VclPtr" seriesNoel Grandin1-1/+0
This reverts the following commits: commit 722f4e1d86710f2facd37d7e040df9e1fd585e26 tdf#104573 - Assertion failed: SolarMutex not locked commit f04ec99f5e6a543b8191ced61db4710c3c0de356 tdf#104573 - Assertion failed: SolarMutex not locked commit 71b1e3ff6374c23e65200d3bcafca387d29af04f tdf#104573 - Assertion failed: SolarMutex not locked when trying commit e794ce1eef6730e5a46d5fb0aa6db2895ede85e7 verify that we hold the SolarMutex when ref-counting VclPtr IRC discussion: <noelgrandin> sberg, maybe I should revert this whole "VclPtr assert" series, I don't have mental bandwidth to sort this out properly now <sberg> noelgrandin, what I fear is that you'll end up adding lots of SolarMutex locks to small places, where the proper fix would be to add it further out; and once such a dreaded recursive SolarMutex lock is in place (but needlessly so, once the proper fix is done), it's hard to clean that up again <noelgrandin> sberg, yeah, in that case I'll just remove all of this, leave it for another day Change-Id: Ie4f84b72b79a1b7e80164b5c7693af398c2c569a Reviewed-on: https://gerrit.libreoffice.org/31946 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13OSL_TRACE->SAL in avmedia..canvasNoel Grandin1-5/+0
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13OSL_TRACE->SAL in sc..scriptingNoel Grandin7-46/+17
Change-Id: I389d8cb733a5ee24d3119a1ebac5a5b70daff04e Reviewed-on: https://gerrit.libreoffice.org/31900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12remove useless Mutex guardsNoel Grandin1-6/+0
Change-Id: Ib1edb681b47ce98e2e810d15111932002786aa51 Reviewed-on: https://gerrit.libreoffice.org/31875 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08verify that we hold the SolarMutex when ref-counting VclPtrNoel Grandin1-0/+1
Change-Id: If0c5a8c99f0f853c9ecad0f1a4a7299d69805b34 Reviewed-on: https://gerrit.libreoffice.org/31755 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08convert SFX_HINT to scoped enumNoel Grandin1-1/+1
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07scripting: more inconsistent Package conditionsMichael Stahl1-4/+6
Change-Id: Ifcefef2de15aab4dae6e14b3e689504d4fe9d11e
2016-12-07scripting: Android tinderbox can't find python packageMichael Stahl1-1/+1
Change-Id: I08e968563b751470e63de5f2bf91e30b31c97430
2016-12-07Match conditionals in Repository.mkTor Lillqvist1-2/+2
Change-Id: Ibc97588de9d414e05184593e4e9c1aeba94959f3
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin3-3/+3
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin1-1/+1
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05loplugin:unnecessaryoverride (dtors) in scriptingStephan Bergmann1-12/+0
Change-Id: I59abb019929e321f9955e57da68417bd137f1530
2016-11-25loplugin:stringconstant: look into 'char const * const var = "..."'Stephan Bergmann1-6/+2
Change-Id: I52a97b8ec273509131c2200e47527221cb62d7ee
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin1-1/+1
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 Grandin4-27/+11
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 Abe1-1/+1
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 Grandin3-3/+3
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 Grandin1-1/+1
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-28loplugin:expandablemethods in scaddins..scriptingNoel Grandin4-39/+5
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>