330 Commits

Author SHA1 Message Date
Stephan Bergmann
2200177856 clang-cl loplugin: bean
Change-Id: Iedaf2fc0c1e2cab446687c6c73cceb3c6b77e6e1
Reviewed-on: https://gerrit.libreoffice.org/29880
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:32 +00:00
Stephan Bergmann
667c9c1897 Revert "Don't use the (win32) jawt_md.h as we don't have that when cross-compiling"
This reverts commit db57823374ee65b80cd53c5fd4234ad3bf6e287d, as it causes
loplugin:externandnotdefined under clang-cl, and cross-compiling Windows on
Linux seems a rather dead project for now.

Change-Id: Ia7fd742385fa0d609007f70e5116a99729224f77
Reviewed-on: https://gerrit.libreoffice.org/29835
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14 19:27:59 +00:00
Stephan Bergmann
583cfc97e9 Remove debug code
...that got introduced with c30b5d2a382162be94e6a6ac5d5794a074ebfaaa "cid#1358838
cid#1358839 cid#1358840 assert to avoid null pointer dereference"

Change-Id: I50faaf291ac9059ee557d059393a97a0fcc397bf
2016-05-02 11:04:04 +02:00
Miklos Vajna
c30b5d2a38 cid#1358838 cid#1358839 cid#1358840 assert to avoid null pointer dereference
Change-Id: I95f069cb3efa7137c9382c9d9eb6d1353471d28e
Reviewed-on: https://gerrit.libreoffice.org/24498
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-04-29 16:18:15 +00:00
Miklos Vajna
db4cba7603 beans: if loading a library fails, show the reason
Don't do it for the MSVC libraries though, e.g. on my system loading
msvcr70 fails, but the SDK example works without problems.

Change-Id: I81bc0b64967e7abb74ca1fff7a2e4b4dbd75d5a5
Reviewed-on: https://gerrit.libreoffice.org/24432
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-04-27 16:42:31 +00:00
Miklos Vajna
e58aa27adf bean: fix the OfficeBean SDK example
Regression from 26b4f5be815bc7c77deb3d38d23b51c9dea9fcd1 (java:use
System.arrayCopy to copy arrays, 2015-06-09), as the old code used to handle
the case when aArguments was null.

How to reproduce:

1) Source the SDK environment.
2) cd instdir/sdk/examples/DevelopersGuide/OfficeBean/
3) make OOoBeanViewer.run
4) Click new document... -> Text Document -> NullPointerException

Change-Id: I5521c7fd200f6c74c5f2665f2e4a99f0d6abfeeb
Reviewed-on: https://gerrit.libreoffice.org/24366
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-04-25 14:56:08 +00:00
Christian Lohmaier
0531039157 neither doxygen nor javadoc make use of <type scope="…"> annotations
even more so when they are invalid xml.
Thus obsolete since the switch from autodoc to doxygen, see also
https://lists.freedesktop.org/archives/libreoffice/2013-June/053077.html

Change-Id: Ifc2ef7754eca70bf923a2f7e4a652a8d394c370b
2016-03-11 13:47:43 +01:00
Christian Lohmaier
82bf21f4d0 NoConnectionException is com.sun.star.comp.beans.NoConnectionException
and not com.sun.star.lang.NoConnectionException

Change-Id: Ie7b5a2aaa365fefeca1de470c18edc68c29e4a74
2016-03-11 13:47:41 +01:00
Christian Lohmaier
ee69514c84 javadoc is HTML 4, not xhtml or html5, so <br/> is not allowed
Change-Id: I0da91e0f6cb7fca09cb5ae08f6d3ef13829653d9
2016-03-11 13:47:40 +01:00
Caolán McNamara
1ffa92cfe3 coverity#1326333 Unguarded write
Change-Id: I94026a7b66a0cac01a1e42d8eee0ec7b4d5fc513
2016-03-04 11:24:27 +00:00
Andrea Gelmini
534b2a4b58 Fix typos
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3
Reviewed-on: https://gerrit.libreoffice.org/21797
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-05 06:48:38 +00:00
Chris Sherlock
001272c9d4 officebeans: RVP no longer used, only local used now
Change-Id: I5f09d25a6e267c793c469c08e8f7f46521fdcd49
2016-02-05 14:02:01 +11:00
Andrea Gelmini
92e60e1b80 Fix typos
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727
Reviewed-on: https://gerrit.libreoffice.org/21103
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-01-05 07:32:28 +00:00
David Ostrovsky
1fd41f43eb Add build toolchain to upload LibreOffice API to Maven Central
Set up the toolchain to create sources and javadocs artifacts in
addition to JARs created during the build. Use Buck build tool for
that: [1]. This is a fork of Google's build tool Blaze, created by
Xooglers at Facebook. This build tool (like Blaze itself) uses
Python to write build files.

Add needed tools and build files to install LibreOffice API artifacts
to local Maven repository or deploy them to Maven Central.

To build all needed artifacts LibreOffice must be built regularly
with GNU make first. To build the rest of the API (sources and
javadocs):

  $> buck build api

To replace version number with upcoming release version:

  $> solenv/bin/version.py 5.1.0

To install the API to local Maven repository:

  $> buck build api_install

To deploy the API to Maven Central:

  $> buck build api_deploy

Detailed documentation is added to document the prerequisites and
the workflow to upload LibreOffice API to Maven Central.

* [1] https://buckbuild.com

Change-Id: Ibdd552a01110836703bc069abe829b9921491cac
Reviewed-on: https://gerrit.libreoffice.org/20343
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-03 23:32:11 +00:00
David Ostrovsky
9ca2de8c59 Expose metadata to deploy LibreOffice artifacts on Maven Central
As outlined in the requirements to deploy the artifacts on Maven
Central, the metdata must be provided:

* Project Name, Description and URL
* License Information
* Developer Information
* SCM Information

[1] http://central.sonatype.org/pages/requirements.html

Change-Id: I0bcd19a22d0e1a48f0faec0b414f816f7da5b318
Reviewed-on: https://gerrit.libreoffice.org/20315
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-01 08:45:25 +00:00
Noel Grandin
3f50c6e050 java: remove ((unnecessary)) parentheses
Change-Id: I39fbe3a260c8dbfc203662c54eec4db064b88195
2015-11-05 14:55:16 +02:00
Noel Grandin
eda52500c7 java:avoid empty if statements
Change-Id: I9c66dd5331f422d8d6271157fece2b346d8b3756
2015-11-05 13:43:02 +02:00
Caolán McNamara
69eaba2e9b coverity#1328488 DLS: Dead local store
Change-Id: Ief4b5909d40ee3c3c86f60eeb980591a3e8b230e
2015-10-22 16:45:04 +01:00
Caolán McNamara
8536c27960 coverity#1326431 Dereference null return value
Change-Id: Ib85b3e03d2a9ce6339cd2496e33cc09cff2b9952
2015-10-20 21:18:36 +01:00
Noel Grandin
9ca4c4f086 cid#1326334 Unguarded read
Change-Id: I8cfe2805f2b8c1ae23fa955a28ff9ec43f353e38
2015-10-16 12:51:40 +02:00
Caolán McNamara
ab22d11279 coverity#1326731 Dm: Dubious method used
and

coverity#1326732 Dm: Dubious method used
coverity#1326734 Dm: Dubious method used
coverity#1326735 Dm: Dubious method used
coverity#1326739 Dm: Dubious method used

Change-Id: Id9d39decf7442b503079ebcfe8c881f0f2fe3eb3
2015-10-15 14:26:05 +01:00
Noel Grandin
a1624a8ecd cid#1327023 to cid#1327077 SIC: Inner class could be made static
Change-Id: I41f89c4feefe4e012d72c663ebb9bbcb4aa7f163
2015-10-15 09:23:16 +02:00
Noel Grandin
6228929041 cid#1326360 Data race condition
Change-Id: Ie7af8c5e5d96b74faab18fd82355a0ab0ecc4f65
2015-10-14 12:30:56 +02:00
Noel Grandin
fa59d0c587 cid#1326347 Check of thread-shared field evades lock acquisition
Change-Id: Iaeb21e3a5798c817315f619e0c1c57bd0c37f175
2015-10-14 09:55:19 +02:00
Andrea Gelmini
2957be02c5 Fix typos
Change-Id: I776c517ba87838c0c3391f79010a30fa7fe2abd3
Reviewed-on: https://gerrit.libreoffice.org/18939
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-02 08:54:51 +00:00
Andrea Gelmini
799cc41b53 Fix typos
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0
Reviewed-on: https://gerrit.libreoffice.org/16834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-08 05:48:18 +00:00
Andrea Gelmini
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
Noel Grandin
0c18bedb73 java: 'final static' to 'static final'
this is the canonical order, and it makes the code easier to read

Change-Id: I272e7f1e140296e582702b6dbf77a03eefb65470
Reviewed-on: https://gerrit.libreoffice.org/16242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-06-15 08:45:19 +00:00
Noel Grandin
efd4bfa818 java:regulatize the order of 'final' and public/private
Make the order be 'public static' or 'private static'
Just makes the code nicer to read.

Change-Id: I182424bda45a2d68642e5d04c6091d268ace1fe2
Reviewed-on: https://gerrit.libreoffice.org/16202
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-11 09:34:00 +00:00
Noel Grandin
26b4f5be81 java:use System.arrayCopy to copy arrays
instead of a for loop

Change-Id: I3fbd92c5f96970543c2da3843e54a733bf811e72
2015-06-09 13:10:44 +02:00
Noel Grandin
441407571e java:Non-synchronized method should not override a synchronized method
Change-Id: I46307828757ee1142747c14d2942515340083605
2015-06-09 13:10:43 +02:00
Noel Grandin
83f25d3c6e reduce sleep when connecting to soffice from Java
500ms is an eternity on modern machines

Change-Id: I7f16935e9b09c734d05d2430dc0efb3be44617b8
Reviewed-on: https://gerrit.libreoffice.org/16038
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-06-03 06:45:31 +00:00
Stephan Bergmann
79a359fea1 jboolean-related clean-up
Change-Id: Iecd03d0343b9b7c3a8b23b5a1e9654148b94d44c
2015-05-08 09:49:01 +02:00
Noel Grandin
ba233e87ef remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'

Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-23 09:26:58 +02:00
Noel Grandin
43cc8ad33e java: remove dead code
found by UCDetector

Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
2015-01-05 08:23:29 +02:00
Stephan Bergmann
b03eb878a8 Remove unnecessary bean/inc/comp_LocalOfficeWindow.h
Change-Id: Ia3f5d11aace705f36016aabda7f325ba46aa8640
2015-01-02 18:31:10 +01:00
Noel Grandin
a96c308e52 java: these fields can be converted to local variables
Change-Id: Ifefb5de196a3e5cbaa8945759da42886c69daacf
2014-12-19 10:41:53 +02:00
Noel Grandin
7557f23b31 java: reduce visibility of fields and methods
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-11 06:09:03 +00:00
Noel Grandin
c199b76d88 java: remove some unused local variables
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
2014-12-05 11:15:57 +02:00
Noel Grandin
db203e59d6 java: remove some unused fields
Change-Id: I1b6fb6b47439c448ac31983702772e2115c70d56
2014-12-05 11:15:56 +02:00
Stephan Bergmann
6ae099ff43 Deprecated com.sun.star.beans is gone
Change-Id: Ifce16ea732dd79730bff7bfa6269bd8b1d8e8aa6
2014-12-02 21:44:08 +01:00
Noel Grandin
a3a57bebcd java: fix some raw types warnings
Change-Id: I0e00739ac36ccc8704ad3c4e4adfa377a6b01f43
2014-11-18 12:44:34 +02:00
Noel Grandin
0063cf2856 java: make fields final where possible
found by PMD

Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18 12:44:28 +02:00
Noel Grandin
7577481809 java: rather use @Deprecated annotation
than an empty @deprecated tag

Change-Id: I1646ce1c0c8823ac5be0153aeb8eb2b830e7ebfa
Reviewed-on: https://gerrit.libreoffice.org/12525
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-18 08:07:34 +00:00
Noel Grandin
9813516d5e Revert some changes that affected the bean/com/sun/star/comp API
from commits
  8583da1e934a49791ef8d86668f3d5c3c5dae1d7
    "java: remove unused fields"
  68cd011c907d00493bf2bfde531c1e244819596b
    "java: reduce scope, make some methods private"
  da677dfd59c2b551f3335ee0a5d5dfb33f9869c5
    "java: reduce scope, make fields private"
  e701b3f732fa7f70cb273183e9ae8dbfd840f5e4
    "java: reduce scope, make constants private"

Change-Id: I7fe0381c0e17b41bad2e4256c5511fe1f7863498
2014-10-28 10:50:18 +02:00
Robert Antoni Buj i Gelonch
e61c4b5f06 java: prevent overflow by using 'long int' arithmetic in multiplication
Change-Id: I8dda8f4621f265208c713c9edcfe725f1c9c5998
Reviewed-on: https://gerrit.libreoffice.org/12001
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-25 12:07:22 +00:00
Noel Grandin
93056481e8 java: when rethrowing exceptions, store the original
Change-Id: I8a2a264597d0b1ae06b08136fea36003682380b5
2014-10-17 08:26:22 +02:00
Noel Grandin
12b01b920f java: no need to call String.valueOf to append to a String
Change-Id: I5ef45b971d24dde814ab8cbb2e9503d9da4f0d73
2014-10-17 08:26:19 +02:00
Noel Grandin
9341bf3dc3 java: when rethrowing, store the original exception
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
2014-10-16 12:27:15 +02:00
Robert Antoni Buj i Gelonch
0c48deb59f bean: String comparison
Change-Id: Id2449ac887c92f87deb3b871b178ac16d3d6b4b8
Reviewed-on: https://gerrit.libreoffice.org/11922
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 23:50:58 +00:00