Commit Graph

306 Commits

Author SHA1 Message Date
9222f5d065 A UNO Any can't contain an Any
...and css::uno::makeAny<css::uno::Any>() was never meant to be used.  Introduce
css::uno::toAny for the (template-code) cases that shall return an Any for both
Any and non-Any inputs.

Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
2015-04-08 17:45:08 +02:00
714f4db8d3 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Id848d14133fee5104e79ba0683cbaf942598faa7
2015-04-01 08:40:15 +02:00
0bd502af47 Clean up remaining C-style casts among void pointers
Change-Id: I1b49c020d597b569e330482f4dbf20c15ccdae3f
2015-03-29 09:17:47 +02:00
8375ac0186 Clean up C-style casts from pointers to void
Change-Id: I3676d56e65dd2d5b36882073c63e571a79819fee
2015-03-28 19:09:23 +01:00
9bd2b842a5 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I71ebd11d850304772535cfb873086176d301172a
2015-03-26 15:33:33 +01:00
a251fe4d48 We require MSVC2013 (_MSC_VER == 1800) now
Change-Id: Ice8504041f22e00f2e5010813d9dff1d2987c8d6
2015-03-19 10:57:17 +02:00
7b83298667 Some more loplugin:cstylecast: pyuno
Change-Id: I80c9fdb45c9f58ac3cd1b0fab2631b903194e268
2015-01-20 09:06:50 +01:00
5484475fc1 include algorithm
Change-Id: I55abf17a1da2616ca2b1303747ca8cc7e402634e
2015-01-02 17:03:55 +00:00
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
3dfcc045dd pyuno: Use appropriate OUString functions on string constants
Change-Id: Ib507da6fc85d8bc81fd48108a98ef96d188643ac
2014-12-12 12:21:47 +01:00
2ad716f406 Revert "pyuno: set up fake command line in getComponentContext()"
This reverts commit 2386a92c1e6e8ec263edb4dc4fdcfeaa4673ce1f and its follow-ups
1acaa577b67158c060d2f57414f7aea86504a489 "sal: add special handling of argc==0
to osl_setCommandArgs()" and 01f27b5e5d428cc3c4aeabdcbbb8204494fbd435 "sal: fix
osl_setCommandArgs() on WNT."

The situation that osl_getCommandArgCount is called without a prior call to
osl_setCommandArgs should be considered as harmless and can legitimately not
only happen in the pyuno case discussed in the reverted commits, but also in
case binary UNO is bootstrapped from within a Java process, as happens in
test-javanative in ure/source/uretest/Makefile.

Change-Id: I2829db390e37dfe5daeda33a4c0659b7d35e565a
2014-11-25 23:22:13 +01:00
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
cd3204559c fix spelling implemenation -> implementation
Change-Id: I5ac499df1f4063a80a5d41f60778106a7b96940d
2014-11-10 13:36:03 +02:00
4d7c414a8d Add include
Change-Id: I0598e9d0c9c33c538aa02eabc2c09d96ec3c9b4d
2014-10-30 09:33:01 +01:00
922f2005f3 fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- Clean up OSL_ASSERT

Change-Id: I1f3a5dcfe08876da9bb4a8486311eb0ca9bab215
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-10-29 12:37:17 +01:00
c353caee1c loplugin: cstylecast
Change-Id: I53b69a488c70769cbb841db519bc28fd211dc087
2014-09-29 12:50:35 +02:00
e660e1ed73 pyuno: remove obsolete NOOPT comment about GCC 3.2
Change-Id: Ie280325ddc45a79f3b73ae10f6e9cf952657091b
2014-09-12 18:42:11 +02:00
6492c8576e Make the "Mac-like" or "canonical" app bundle structure always used on OS X
In other words, only executable files go in the MacOS folder. Dynamic
libraries and bundled frameworks (i.e., LibreOfficePython), and
nothing else, go in the Frameworks folder, and all other files go in
the Resources folder.

Especially, note that Java class files and rc (.ini) files also go in
Resources.

Such an app bundle structure is what Apple strongly suggests one
should use, and it has been hinted that future versions of code
signing and/or Gatekeeper will require such a structure.

There is still some ugliness thanks to traces of the historical
separation of URE from "the office". Like there are two separate
"unorc" files, one for URE, one for the LibreOffice application. IMHO,
this should be cleaned up, but is probably controversial.

(Eek! I now see there are actually *three* unorc files in the app
bundle. Not intentional. Need to fix that later.)

Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
2014-09-09 13:55:23 +03:00
0364d3b7e6 fdo#46678: pyuno: fix deadlock in Runtime::any2PyObject()
When calling XUnoTunnel::getSomething(), the function must drop the
CPython GIL to avoid deadlock since there are implementations of
XUnoTunnel that acquire SolarMutex.

Change-Id: I51ffce9bdee9a51c932902e77856f865eae81d2a
2014-08-28 16:16:01 +02:00
7a9abd681b coverity#982756 Dereference null return value
Change-Id: I0f2ef4cb61a5774c3d2251897ee914f959ae44a8
2014-08-07 18:00:45 +01:00
de61e7302d coverity#706600 Uncaught exception
Change-Id: I93868e6acc8e245f15ece38e00390dfc3bd9ee8c
2014-07-21 13:59:34 +01:00
0df43cc217 coverity#982756 Dereference null return value
Change-Id: I5bfb5c86093aca4b88b2abf39836a1c6d7cb0bea
2014-07-10 13:39:17 +01:00
0e507ae031 various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-05 08:17:52 +02:00
9828206408 Demystify magic ponies
Change-Id: I7e619daf8743d3471ece72d81f6cf1bb61741646
2014-06-04 08:55:11 +02:00
86598a4e18 coverity#982753 Dereference null return value
Change-Id: I011a600a27c801dca32734e680ea5a13dfebdfe3
2014-06-03 20:10:18 +01:00
2ca70c3b5c coverity#982755 Dereference null return value
Change-Id: I652b308d087c1ee9fff95f81297b079e3f816e07
2014-06-03 20:10:18 +01:00
b75b626ee5 coverity#982756 Dereference null return value
Change-Id: Ia29c6167df0ce061fae88d81bef9a98ca37fcce3
2014-06-03 20:10:17 +01:00
f556b1b614 coverity#982752 Dereference null return value
Change-Id: I394a13939d67b6959903e277dd78ea05cdcadfa8
2014-05-26 15:51:58 +01:00
6342a9c49e coverity#982754 Dereference null return value
Change-Id: I0d0dc196f223a988fd029cc61a8b160b2150534c
2014-05-26 15:51:58 +01:00
dfddb56699 coverity#982757 Dereference null return value
Change-Id: Ie2c88a778bb25e6909138e633fe115686e2cc026
2014-05-26 15:51:58 +01:00
88d9c87058 coverity#982758 Dereference null return value
Change-Id: Ia797bbd9c5587d2b55dd183a377e5b3dded96e7b
2014-05-26 15:51:57 +01:00
b15532a03c coverity#982761 Dereference null return value
Change-Id: I35e93ccf5992236d163d708089cd798e324157fb
2014-05-26 15:51:57 +01:00
e17245c0c2 coverity#982759 Dereference null return value
Change-Id: I72209c52d6a8d036f0903f39b91fc62a2880448b
2014-05-26 15:51:57 +01:00
5bdc28028c coverity#982760 Dereference null return value
Change-Id: I779fa5fa418370dd6c53308943374e981f65ae29
2014-05-26 15:51:56 +01:00
b074466007 coverity#982169 Unchecked return value
Change-Id: I4aa333a907ff050fff4a4c7c41120ce00961673c
2014-05-26 15:51:54 +01:00
ac76cc7e60 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23 22:11:52 +02:00
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
a81a079305 pyuno: fix warnings with system python 3.4.0
warning: missing initializer for member '_typeobject::tp_finalize' [-Wmissing-field-initializers]

Change-Id: I7ab82025fd8c2f0d8fa4943690a217c4a4dc369d
2014-05-19 20:04:22 +02:00
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
e5d0a9ad78 pyuno: sal_Bool->bool
Change-Id: I071c8984cd86b523d8ebae04b5fb2bdc1ac1a5b1
2014-05-08 11:48:14 +02:00
d69b30a84d coverity#1019376 Resource leak
Change-Id: Ifa9c5a7b3aa0d219e09fa3081e66d870a508a84d
2014-04-02 15:51:15 +01:00
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
86a32589e9 Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.

So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.

Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
d89928441d pyuno: simplify deprecated XTypeProvider.getImplementationId
Change-Id: Ia99dca3619fb893d1b9f3a46f1f1285e3fe1bc8e
2014-03-10 17:39:56 +01:00
25cedf1dc7 Introduce com.sun.star.beans.theIntrospection singleton
...deprecating com.sun.star.beans.Introspection (single-instance) service.

Change-Id: Ica2e3a3541c7dcb1aab79222c5abf40d6988c882
2014-03-07 10:33:07 +01:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
3a35e28628 Remove visual noise from pyuno
Change-Id: I27f5edf45d5968879436e2466f953576651ed8ae
Reviewed-on: https://gerrit.libreoffice.org/8290
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 09:21:35 -06:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00