Commit Graph

1048 Commits

Author SHA1 Message Date
3f65d353a6 Clean up function declarations
Change-Id: Ife3cb18d22c57c9c2e59317b68cf11a4bf94a40a
2014-04-09 09:53:01 +02:00
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
c04f4393f5 Unused declaration
Change-Id: Ib753cacf91baa6a761ac8f971b67c0f5ade555b6
2014-04-03 08:20:19 +02:00
5cd46e2b3b Use boost::noncopyable
Change-Id: I9cba1299c54f196a5a7b35384f4c15bbbea273bb
2014-04-03 08:20:19 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
288efb1b48 Remove unused inline function
Change-Id: Ieafdefb5a6981ee2f375cb9ba852de7b21688b42
2014-04-01 09:22:21 +02:00
a3b0d947b0 Work around MSC "'override' cannot be used with 'inline'" bug
Change-Id: If736316402c49153d4c8552672c90552548f90b8
2014-03-26 17:27:01 +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
7bb5f9e1a2 Adapt to sal/log.hxx
Change-Id: Ic197b0fc962ff33b0f0a3c7f04d8208ea9123094
2014-03-25 16:17:09 +01:00
9ed5d36981 Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: Ib4fa4669adb217be810840b3f8e4f0e2dda0f7c5
2014-03-18 13:29:14 +01:00
db9d30a8ee Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: Ic7bd99f920fc954e2eeb734e324d15b1af01e30d
2014-03-18 13:29:14 +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
85543a2700 coverity#708238 Uninitialized pointer field
Change-Id: I83552efc825d54da9e00d4a9a637118565bd30ca
2014-03-14 15:58:27 +00:00
a5cbf154df coverity#708240 Uninitialized pointer field
Change-Id: I127cfc84412984e9c190f3e5b2e37cf76ebf82f1
2014-03-14 15:58:26 +00:00
0a87796793 No need for Invocation_Impl::setMaterial to be virtual
Change-Id: I5f78d97bcd55c0db71d7c5e3383678586c2cf392
2014-03-12 16:24:43 +01:00
5bce6e34cd stoc: simplify deprecated XTypeProvider.getImplementationId
Change-Id: I57eca2dcf316232c26c528015c4ba18ba3c4760d
2014-03-10 17:39:58 +01:00
25d154bbf9 Use getTypes instead of getImplementationId as cache key
so we can hopefully deprecate getImplementationId and make all implementations
return an empty sequence.

Change-Id: I161b5fce727541ea2c8303b5d228dbc4939a55b6
2014-03-07 16:19:56 +01:00
524bebc924 Clean up introspection caches
Change-Id: Ied10da0f491e7723245056a4c98540f8b56ffe5d
2014-03-07 16:19:56 +01:00
0d8d1c0284 Clean up ImplIntrospection class
Change-Id: I416e2cb8e22d200dfb72d512a4b4278ca582cd10
2014-03-07 16:19:56 +01:00
28f7f5f67c -Werror=unused-parameter
Change-Id: Ida1c78309cc0cde3082ce4340084aa34986c63c5
2014-03-07 14:03:28 +01:00
03fcda4881 Convert com.sun.star.comp.stoc.Introspection to direct construction
Change-Id: Ia01efee8c7cc28d1f71fd87c735a6cbc205b3eaf
2014-03-07 11:03:55 +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
35e44118b8 Remove visual noise from stoc
Change-Id: I19edfb2796298c4870124d0d1e9488974a010bb8
Reviewed-on: https://gerrit.libreoffice.org/8316
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 07:47:23 -06:00
4a9347fa32 Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I8e11ffe888aac8887c4c0875c41de51f343debae
2014-02-25 16:33:15 +09: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
bd20500cf3 Simplify access to theCoreReflection singleton
Change-Id: I9901991a320b87895230a92095c9c7d3109380a6
2014-02-07 12:03:03 +01:00
9e77c2fb7c Remove UNOIDL "array" and "union" vaporware remnants
...and deprecate what cannot be removed for compatibility.

Change-Id: I1ea335af775b867b468b8285113631167729a92a
2014-01-31 10:15:47 +01:00
612dac063a bool improvements
Change-Id: I0dc09b7a6ee2849bd0c2ffc31be45f81cd2c15ee
2014-01-29 11:08:32 +01:00
48fc43550a bool improvements
Change-Id: Ic29ea184cb40f6f49313ac2ff1abb4a37246d5bd
2014-01-28 20:26:22 +01:00
e357c93e7b coverity#440504 Dereference before null check
Change-Id: Ia7c817ca0b002279bee8699e4940c57937657ad4
2014-01-28 11:29:17 +00:00
e3133ae237 Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx).  This change should be
transparent to client code.

Missing overloads of insert() for bool have been added to OStringBuffer and
OUStringBuffer (which required dropping one !VALID_CONVERSION check that would
now pick that overload, but would be flagged by
compilerplugins/clang/pointertobool.cxx).

Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-23 18:43:53 +01:00
c2c530da69 Introduce static inline cppu::acquire(), and make use of that.
This is much better approach compared to the callback function, as it allows
passing arguments to the c++ constructor directly, while still allowing some
additional initialization after having acquired the instance.

Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-22 15:09:28 +01:00
f278397787 Change _get_implementation()'s not to do initialization directly.
Many of the initalizations (in eg. framework) have to be done on an
acquire()'d object, so instead of doing the initialization directly, return
the initialization member function back to the createInstance() /
createInstanceWithContext() / ... and perform the initialization there.

As a sideeffect, I belive the calling initialize() from servicemanager is not
that much a hack any more - whoever converts the implementation to be
constructor-base has the choice to provide the callback, or still initialize
through XInitialization, where the callback is preferred by servicemanager
when it exists.

Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-21 21:25:22 +01:00
9eefbbe5de bool improvements
Change-Id: I9e5e77ad2c29ccdae1a794b7a0223858d8a662a6
2014-01-21 18:24:05 +01:00
a3f32769fc Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.

Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
2014-01-21 15:54:52 +01:00
721e30bf54 bool improvements
Change-Id: I00e7cdadc4e66fa9656c0a63f4ef18d3673b8e8a
2014-01-21 13:24:30 +01:00
306efefe22 Minimize the constructor functions to a bare minimum.
Most of the constructors are supposed to be only a call of

  new TheInstance(arguments)

or an equivalent; so let's just change the constructor caller accordingly, to
accept unacquired new instance.

If there are exceptions that need to do more heavy lifting, they do not have
to use the constructor feature, or there can be a wrapper for the real
implementation, doing the additional work in their (C++) constructor.

Change-Id: I035c378778aeda60d15af4e56ca3761c586d5ded
2014-01-20 17:37:40 +01:00
73eca35b0a Unify ctor functions for component implementations.
There is no need to use different styles for writing the same thing.
It also makes it easier in future to use search & replace.
But of course, there are also some more complicated functions.

Change-Id: I773da20378af0e0d5a27689d3903df7063fb8ac0
2014-01-18 17:02:40 +01:00
a700ce8e2b Unify ctor functions to have _get_implementation suffix.
Change-Id: I07fe0671d0633ef9480a4f3431df6a64c7902db8
2014-01-15 15:12:01 +01:00
4337a0664f Use const& arguments parameter for ctor functions.
Change-Id: I19ce8bd1a23123ac9a62a7fc95cd54fea5315221
2014-01-15 08:51:27 +01:00
382b013275 Some ConfigurationProvider -> theDefaultProvider simplifications
Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
2014-01-08 09:10:29 +01:00
82625bb98e remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
Convert code like:
    buf.append( static_cast<sal_Unicode>('!') );
to:
    buf.append( '!' );

Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-07 09:43:37 +02:00
ae3a0c8da5 Add .component <implementation constructor="..." feature
...to directly call constructor functions of ComponentContext-based C++
implementations of (non-single-instance) UNO services.  The case where these
calls would need to be bridged across different environments (e.g., from gcc3
to gcc3:affine) is not yet implemented.

bootstrap.component and expwrap.component are adapted accordingly as a proof-of-
concept (which had previously been adapted to use the prefix="direct" feature,
which may become unnecessary again in the end, depending on how to handle
single-instance services/singletons).  More to follow.

Change-Id: I18682d75bcd29d3d427e31331b4ce8161dbb846d
2013-12-19 08:48:56 +01:00
e20f27f0a0 bootstrap component: Split into implementation functions.
Change-Id: I91cb0177edd79485eab885e995e79b1a19a769d5
2013-12-18 07:15:49 +01:00
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
909b27df48 remove unnecessary double calls to OUString constructor
Change-Id: Ib2690e3ec9987b97363687b61fe8ddae4ace9058
2013-12-17 11:49:04 +02:00
08fe82e59c Remove unnecessary use of OUString constructor in + expressions
Convert code like
  aFilename =  OUString::number(nFilePostfixCount) + OUString(".bmp");
to
  aFilename =  OUString::number(nFilePostfixCount) + ".bmp";

Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +02:00
a83b2af9ab Clean-up uno/lbnames.h
Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
2013-12-16 21:43:12 +01:00
2f7b329297 [API CHANGE] remove cppu::loadSharedLibComponentFactory w/ rPrefix again
...it was never meant to be called by client code anyway and is no longer needed
to be exposed since the global service manager implementation moved to
cppuhelper.

Change-Id: If2d0510b2364084d36edeb156a3459d9b8aeb983
2013-12-13 15:13:57 +01:00