2154 Commits

Author SHA1 Message Date
David Ostrovsky
94f1950744 Add missing include
Change-Id: I454b39a76595aedbbe1ca64f9b1982e5c27623cd
Reviewed-on: https://gerrit.libreoffice.org/22708
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2016-02-26 07:50:47 +00:00
Norbert Thiebaud
8d17a0f71b WaE: vs2015 shadow local
Change-Id: Ia1cb87653775bf9226bac46842b309d55fbaf084
Reviewed-on: https://gerrit.libreoffice.org/22598
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: Jenkins <ci@libreoffice.org>
2016-02-22 02:31:27 +00:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Stephan Bergmann
fdfcb1c8de Fix loop to actually get executed
Change-Id: I736868fbaa0783a2ed8be04c99f440f1cb964048
2016-02-01 11:42:13 +01:00
Noel Grandin
0dfcb858c1 boost::unordered_map->std::unordered_map in bridges
Change-Id: Idf77d0871f932cf94003013db81c1bb67edbef16
2016-02-01 10:13:30 +02:00
Stephan Bergmann
ef99aad586 Quickfix for Win 64-bit C++ UNO bridge (more than 20 params)
See <https://wiki.documentfoundation.org/Development/msvc-x86_64#Broken_C.2B.2B-UNO_Bridge>,
increase the number of supported params to 32 to at least make the
ooo.vba.excel.XApplication.Intersect case (and thus CppunitTest_sc_macros_test)
work.  The true fix will be to abandon this simplistic approach, as elegant as
it may have appeared.

Change-Id: Ieeb17f682bd5ea8cb7a6188b89978698949461aa
2016-01-27 08:34:52 +01:00
Caolán McNamara
4cf87913db this dir has lain unused for years now
Change-Id: Ia6638f316b9d7c67e45a30b5808c68b54fdb1680
2016-01-09 21:02:24 +00:00
Caolán McNamara
5ee8e22a26 cppcheck: noExplicitConstructor
Change-Id: I94db78ca12e0f3389f00ea5c557f0b64d452f613
Reviewed-on: https://gerrit.libreoffice.org/21150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-07 09:11:53 +00: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
Caolán McNamara
0725bdfc30 Kill check for ancient FreeBSD version
along the lines of ...

commit cee2655445319133095b0f6b19fc5b31d321099f
Author: Baptiste Daroussin <bapt@FreeBSD.org>
Date:   Thu Dec 10 17:38:06 2015 +0100

    Kill check for ancient FreeBSD version

which removed the other uses of this

Change-Id: I56a4448b27683ff8a86e4d760fec4f6bfc2d0bd6
2015-12-19 21:09:26 +00:00
Stephan Bergmann
27f5679c84 tdf#95903: Fix return value handling in msvc_win32_x86-64 bridge
...where a return value was double-deleted if it was "complex" (i.e., generated
by callee into caller-provided memory) but not related to UNO interface types
(so doesn't need any mapping, like sequence<css.beans.Property> returned by
css.beans.XPropertySetInfo.getProperties).

Change-Id: I4cfc16ba63022686afd016ef5b64419e8dee53a4
2015-12-15 16:52:19 +01:00
Baptiste Daroussin
cee2655445 Kill check for ancient FreeBSD version
Change-Id: Ia6f7d55d2d8d346695658549d2e86eef77215377
Reviewed-on: https://gerrit.libreoffice.org/20625
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-11 07:28:09 +00:00
Stephan Bergmann
4a1edf626a More loplugin:nullptr automatic rewrite (within templates)
Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
2015-12-10 17:34:31 +01:00
Stephan Bergmann
871b5abf11 Work around missing __CxxDetectRethrow in clang-cl
Change-Id: Ia42d39f04b22986d3fd873655b48dc31d834caee
2015-12-02 08:02:20 +01:00
Caolán McNamara
5d7bd6b929 default to trying the linux bridge for all linuxy like things
Change-Id: I1fcf3afadefcd5af472523fd8fca123fb3ab4095
2015-11-26 09:33:37 +00:00
Stephan Bergmann
0f54e537c6 missing namespace
Change-Id: Ib291151508756035fbfde1805ba48e746d96dd59
2015-11-19 16:46:13 +01:00
Stephan Bergmann
2b66862f22 ...and make it clear that RegParamKind /is/ used
...and will not erroneously be removed a third time

Change-Id: I7007dbd1d3a1762523c0ce54a04c37a5d2203a48
2015-11-19 14:08:00 +01:00
Stephan Bergmann
9124ab7422 REGPARAM_INT/FLT /are/ used
...broken with 53f16c39f5c4c69ab603bf9098daec71f7a0acb8 "remove unused typedefs
and inline use-once typedefs"

Change-Id: I4b1343b98733ae998c7f9c594a86d65348402d28
2015-11-19 13:58:59 +01:00
Stephan Bergmann
6b26ed763f -Werror,-Wunused-private-field
Change-Id: I590f8aa06b193e789de86435038d799cf219ffd6
2015-11-18 17:19:16 +01:00
Stephan Bergmann
4cc07334fd -Werror,-Wdynamic-class-memaccess
destination for this 'memcpy' call is a pointer to dynamic class '__type_info';
vtable pointer will be overwritten
source of this 'memcpy' call is a pointer to dynamic class 'type_info'; vtable
pointer will be copied
explicitly cast the pointer to silence this warning

Change-Id: Ic9a55dfa11643ac2c7ebc02332325a2f58516d04
2015-11-18 17:19:16 +01:00
Stephan Bergmann
6c8a5bcfe9 -Wmicrosoft-cast
Change-Id: Idc7b1c8c953634c26aad0923344457eae6fb1583
2015-11-18 17:19:16 +01:00
Stephan Bergmann
033d1acd16 -Werror,-Wmicrosoft-exception-spec
Change-Id: Icd92fe15c3534f440017709bcdbe9aadf1c83c6d
2015-11-18 17:19:16 +01:00
Noel Grandin
53f16c39f5 remove unused typedefs and inline use-once typedefs
and improve the script a little

Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84
Reviewed-on: https://gerrit.libreoffice.org/20033
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18 10:38:08 +00:00
Stephan Bergmann
46bdc50066 Don't assume sal_Unicode is unsigned short
Change-Id: Ic025383863651f1ab70c4a819737106279d9aa1c
2015-11-17 10:30:13 +01:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann
ba8a957bfa Generalize COM_GCC_IS_CLANG -> COM_IS_CLANG
...in anticipation of building with clang-cl.exe on Windows

Change-Id: I1d723c9d3b5ca8a2bc6b27ef0189a7b053581398
Reviewed-on: https://gerrit.libreoffice.org/19928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-12 17:37:11 +00:00
Stephan Bergmann
520cd4e688 loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: If07e4116c43cbddefbf443c4cbd754dde48c90a0
2015-11-10 16:20:34 +01:00
Stephan Bergmann
655c2d5193 loplugin:nullptr (automatic rewrite)
Change-Id: Ib05cdd5a0f2a2e0f4c08504d89d0b6201cbcb429
2015-11-10 10:31:17 +01:00
Noel Grandin
dfcb982ae8 java:no need to explicitly create these constructors
the compiler will do it for you

Change-Id: I770670e70a43664a87ce28b48fc822d891d8fb41
2015-11-05 14:55:14 +02:00
Benjamin Ni
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
David Ostrovsky
1b218f3597 Pass emit-debuginfo flags to MSVC bridge_noopt_objects, if applicable
Since df62a2c81bef2bcd96a5f14802e41815f0bdc2da gb_DEBUG_CFLAGS
was passed to bridge_noopt_objects target for MSVC to track
down EH breakage on 64 bit architecture. It was erroneously
done unconditionally. Fix it to only pass when one of:

--enable-dbgutil
--enable-debug
--enable-symbols

is present.

Change-Id: I2728c30156541be418c88a0ea284c0c6a16abba5
Reviewed-on: https://gerrit.libreoffice.org/19744
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 20:36:07 +00:00
Stephan Bergmann
5e04886917 Remove spurious vertical whitespace
Change-Id: I077a17eada47b9c1509c21c18a6e4cd06172de3b
2015-11-02 17:53:29 +01:00
Stephan Bergmann
3f7c8ce1dc Don't rely on __builtin_alloca when creating a call stack
...at least recent Clang trunk ASan+UBSan build apparently adds instrumentation
code that made that (arguably optimistic) setup fail

Change-Id: I186a7abdfe5cc69e624583b1281d3989cefd7d53
2015-11-02 17:21:55 +01:00
Stephan Bergmann
3dbea3aa84 Pass emit-debuginfo flags into special bridge compilations, if applicable
(i.e., if any of --enable-dbgutil, --enable-debug, or --enable-symbols);
introduce gb_DEBUGINFO_FLAGS for the platform-specific flags

Change-Id: I4306fa30ced57d40d5b1206a0b26a886411118ef
2015-11-02 17:01:06 +01:00
Michael Stahl
0b6a0d4c31 bridges: loplugin:cstylecast
Change-Id: I8613f1f7f2155aa972fa4f841ebfcf6e07e45821
2015-10-30 16:09:37 +01:00
Noel Grandin
3bc5df7f32 UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 08:59:59 +00:00
Noel Grandin
065c8b48a6 use uno::Reference::set method instead of assignment
Change-Id: I58410209f32f988f258a588364e0b037c2790211
2015-10-30 08:10:22 +02:00
Serge Krot
0b018d202d tdf#39440: fix several warnings reported by cppcheck
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae
Reviewed-on: https://gerrit.libreoffice.org/19587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-25 22:31:44 +00:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Samuel Mehrbrodt
338f19a8ce Emscripten: First steps of porting to Emscripten
See https://wiki.documentfoundation.org/Development/Emscripten for details

Change-Id: I977a8b9e98b9be13c263fef48f567b92347d0492
Reviewed-on: https://gerrit.libreoffice.org/18643
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-05 10:24:35 +00: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
Michael Stahl
592b43acb6 bridges: fix build with --enable-assert-always-abort
Change-Id: I6079481046ca3f7d66975d41fccc15b862a3223b
2015-09-30 21:16:21 +02:00
Stephan Bergmann
c762354ceb Return the std::unique_ptr itself here, not a raw pointer
Change-Id: I786e05bebd243d661ced147ad51e4a843916a3b0
2015-09-28 10:06:26 +02:00
Matteo Casalin
f290e30e95 Fix typo
Change-Id: I81e897153281a70756ffd442f9384751c025c016
2015-09-13 11:09:49 +02:00
Julien Nabet
81d62c5f48 cppcheck: Mismatching allocation and deallocation
+ Typo: excecptionTypeSizeArray->exceptionTypeSizeArray

Change-Id: I6fac3bea1eba094e87717d20a08ec7cf6151e2df
2015-09-13 09:42:01 +02:00
David Ostrovsky
1aad95eb96 Actually fix uno bridge on MSVC 14.0
VC runtime was substantially refactored on MSVC 14.0. Among other,
_tiddata structure defined in crt/src/mtdll.h was replaced with
__vcrt_getptd defined in crt/src/vcruntime/vcruntime_internal.h.

All members before

  unsigned long      _NLG_dwCode

were removed, so that the approach to access the member

  void *      _tpxcptinfoptrs; /* ptr to exception info pointers */

with __pxcptinfoptrs() and compute the offset to the _curexception
member of _tiddata doesn't work on MSVC 14.0.

As of MSVC 14.0 __vcrt_getptd symbol isn't exported but Microsoft
have introduced methods to access current exception, current exception
context and processing throw (the later can be accessed through C++17
std::unhandled_exceptions() that was made available in MSVC 14.0):

* __current_exception()
* __current_exception_context()
* __processing_throw() aka std::unhandled_exceptions()

Make use of __current_exception() which we can hope will be maintained
going forward.

Change-Id: Ibfffa5fba62d6928328ac976cb1b24937277363e
Reviewed-on: https://gerrit.libreoffice.org/18475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-09-12 09:17:15 +00:00
David Ostrovsky
b9bf1123f3 Fix x86-64 bridge on MSVC 14.0
Change-Id: I6729a5028351a8a1c3d2b2d2f4bc7ab73e0730f2
Reviewed-on: https://gerrit.libreoffice.org/18213
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-02 13:25:05 +00:00
Caolán McNamara
f51994efcd cppcheck: noExplicitConstructor
Change-Id: I4bdbcd9debdf6a385d3b6f199b71b09d7e27b0fa
Reviewed-on: https://gerrit.libreoffice.org/17810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17 20:14:32 +00:00