2146 Commits

Author SHA1 Message Date
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
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-30 12:21:40 +00:00
Andrea Gelmini
5a72da3d97 Fix typos
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-25 17:24:16 +00:00
Andrea Gelmini
47a9523f3f Fix typos + some German translations
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-19 10:05:45 +00:00
Andrea Gelmini
51d996354f Fix typos
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-03-02 12:34:21 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
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-28 10:17:47 +00:00
Stephan Bergmann
59a63d8161 In Java, css.uno.RuntimeException doesn't derive from css.uno.Exception
Change-Id: I83850db6e3f3ac87d52e75f122ba2b6bba3905b9
2017-02-23 11:43:22 +01:00
Stephan Bergmann
f34942333f loplugin:subtlezeroinit: scripting
Change-Id: Id59b79c8e01ca66924b8a8de1c513ce97658e361
2017-02-21 07:35:02 +01:00
Stephan Bergmann
c27586115d Some simplifications, using UNO_QUERY_THROW
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-15 14:17:41 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...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-06 17:21:16 +01:00
Noel Grandin
4978328534 convert method names in tools::SvRef to be more like our other..
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-02 08:02:54 +00:00
Noel Grandin
c0f9bdd3e6 unnecessary use of OUStringBuffer in throwing exceptions
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-02 07:48:21 +00:00
Noel Grandin
2489000d3f loplugin:useuniqueptr extend to check local vars
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-02-01 12:15:22 +00:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
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-31 08:56:20 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..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-28 09:22:55 +00:00
Stephan Bergmann
12ffd3ecdd Remove dead code
...dead ever since its introduction in d86602573305ac7c8583794a37c4bd0572b41577
"#i17307#: XFunction->XScript etc"

Change-Id: I664ff15ec2e9fda000bae7740ced427a646ddc92
2017-01-27 12:03:48 +01:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(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-26 12:54:43 +00:00
Stephan Bergmann
7b79e23260 New loplugin:dynexcspec: Add @throws documentation, scripting
Change-Id: I3a3f8ad12bad448f0ea2beb698cf4e6636d4595a
2017-01-19 18:03:14 +01:00
Julien Nabet
98397a48f1 Typo: listerner->listener
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-17 06:06:17 +00:00
Caolán McNamara
52f6b1f49e coverity#1398527 Uncaught exception
Change-Id: Id1c0273f7430ba525f231ed5bb9311c732935640
2017-01-10 08:58:07 +00:00
Stephan Bergmann
e88309519a New loplugin:externvar: scripting
Change-Id: I79b4e8718c10b5c5fce9f734a5a30ce9bc01e0c7
2017-01-09 15:41:09 +01:00
Julien Nabet
486efbfc74 tdf#103363: add unicodedata and import idna encoding for mailmerge
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-18 21:58:54 +00:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
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-15 06:45:14 +00:00
Noel Grandin
872cf486c5 Revert "verify SolarMutex when ref-counting VclPtr" series
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-13 13:04:34 +00:00
Noel Grandin
3a705ab405 OSL_TRACE->SAL in avmedia..canvas
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13 08:14:00 +02:00
Noel Grandin
81f2a9f464 OSL_TRACE->SAL in sc..scripting
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-13 06:07:57 +00:00
Noel Grandin
d6f2dd831a remove useless Mutex guards
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-12 09:16:09 +00:00
Noel Grandin
e794ce1eef verify that we hold the SolarMutex when ref-counting VclPtr
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-08 17:26:41 +00:00
Noel Grandin
a66731982e convert SFX_HINT to scoped enum
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-08 12:35:09 +00:00
Michael Stahl
d90427d767 scripting: more inconsistent Package conditions
Change-Id: Ifcefef2de15aab4dae6e14b3e689504d4fe9d11e
2016-12-07 22:45:08 +01:00
Michael Stahl
3ee7d4899e scripting: Android tinderbox can't find python package
Change-Id: I08e968563b751470e63de5f2bf91e30b31c97430
2016-12-07 21:42:10 +01:00
Tor Lillqvist
7cd3c44a9e Match conditionals in Repository.mk
Change-Id: Ibc97588de9d414e05184593e4e9c1aeba94959f3
2016-12-07 19:49:52 +02:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
803215142e convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05 12:49:02 +02:00
Stephan Bergmann
84bbf2de22 loplugin:unnecessaryoverride (dtors) in scripting
Change-Id: I59abb019929e321f9955e57da68417bd137f1530
2016-12-05 09:00:48 +01:00
Stephan Bergmann
1800862c70 loplugin:stringconstant: look into 'char const * const var = "..."'
Change-Id: I52a97b8ec273509131c2200e47527221cb62d7ee
2016-11-25 16:42:23 +01:00
Noel Grandin
389999abdb make comphelper::containerToSequence a little smarter
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-09 07:48:18 +00:00
Noel Grandin
3941482735 loplugin:oncevar in sal..scripting
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-01 12:34:51 +00:00
Takeshi Abe
cb90f0976d Omit the default comparator
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0
Reviewed-on: https://gerrit.libreoffice.org/30319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-01 04:11:44 +00:00
Noel Grandin
442eacc4e1 loplugin:countusersofdefaultparams in sc(part1)
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-31 10:03:24 +00:00
Noel Grandin
09cb920969 convert std::unique_ptr<VclAbstractDialog> to VclPtr
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-28 09:12:27 +02:00
Noel Grandin
24360897c0 loplugin:expandablemethods in scaddins..scripting
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-28 06:59:41 +00:00
Michael Stahl
aa70294ffc normalize existing emacs/vim mode-lines in python files
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-26 22:16:08 +02:00
Noel Grandin
e7324c5705 loplugin:expandablemethodds in scaddins..sdext
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-20 06:11:51 +00:00
nadith
71901bfedd tdf#98004 - Enhansment on Editor(Beanshell)
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-16 12:46:15 +00:00
Jacek Fraczek
f004aa9951 tdf#89307: Removed SvRef::operator T*()
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-10 08:48:30 +00:00
Caolán McNamara
cae57d2e58 ClassLoader->URLClassLoader
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-03 12:09:23 +00:00
Andrea Gelmini
0d4996862b Fix typos
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-10-01 20:05:49 +00:00
Eike Rathke
7d8196ea2f perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 related
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-23 15:14:03 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
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-09-13 13:19:22 +02:00
Gökhan Gurbetoğlu
b7bf1ba213 tdf#100726 - Improve readability of OUString concatanations
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-25 14:54:44 +00:00