summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)AuthorFilesLines
2017-07-11use more range-for on uno::SequenceNoel Grandin1-3/+2
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use more begin()/end() for SequenceNoel Grandin1-4/+2
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-05new loplugin unnecessaryparenNoel Grandin1-1/+1
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:casttovoidStephan Bergmann1-3/+1
...cases that were initially missed due to the broken containsProcessingConditionalInclusion() Change-Id: Ib7d801ab5173ee590ef35a9e075d3ce4d4aa06da
2017-07-02loplugin:casttovoid: scriptingStephan Bergmann6-42/+12
Change-Id: I9f77eca5a80ad4e9d3cee8f7400a245f5fa78bbb
2017-06-26loplugin:oncevar in scaddins..sotNoel Grandin3-40/+17
Change-Id: I657a131374b9f1153135e00ed429889518b91427 Reviewed-on: https://gerrit.libreoffice.org/39258 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21s/ERRCODE_SBX_OK/ERRCODE_NONENoel Grandin1-2/+2
adds no value Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7 Reviewed-on: https://gerrit.libreoffice.org/39056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke5-6/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke2-1/+1
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin3-20/+9
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/resource/ includesJochen Nitschke1-1/+0
Change-Id: I1e2c795cef64799d5e28e5fafec6cd72f621abba Reviewed-on: https://gerrit.libreoffice.org/37853 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/uri/ includesJochen Nitschke1-1/+0
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9 Reviewed-on: https://gerrit.libreoffice.org/37860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/script/ includesJochen Nitschke6-6/+2
but keep exception includes in headers for now Change-Id: I826828675a2d14b906e57068cbced2e790e12bce Reviewed-on: https://gerrit.libreoffice.org/37846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>