Commit Graph

31 Commits

Author SHA1 Message Date
Stephan Bergmann
31e24f487e Remove redundant Reference<> from within UnoType<> uses
Change-Id: I1aeb9c73c284e39f371e49ded98e8dba0d055056
2015-04-01 10:42:57 +02:00
Caolán McNamara
01a8bda416 boost::noncopyable->'= delete'
Change-Id: If0f898a1e912fcd2095d8ba88b2b8046596e16ea
2015-02-16 12:54:45 +00:00
Caolán McNamara
a1ceacc17e boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Noel Grandin
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
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Stephan Bergmann
afb9d333eb cid#706247 wrong exception type
Change-Id: Idc83f827b90eedcc4345345a77efbda35e08bff0
2014-02-13 11:58:31 +01:00
Stephan Bergmann
6606611c42 auto_ptr -> scoped_ptr
Change-Id: Iebfb88b6326873642356f5ba566b36c7a3672815
2014-02-07 18:43:32 +01:00
Stephan Bergmann
f6245d5bcb fdo#56511 Don't unduly delay Bridge termination
When terminate is called from the Reader or Writer thread, the final terminate
was delayed until disposal of the BridgeFactory, as an unfortunate consequence
of always trying to join on the Reader and Writer.  Instead, forgo the join in
such a case and rely on the underlying osl::Thread becoming detached after
calling termiante.

Change-Id: Ifba788c4d0d2e9b14b4f7f6b5f0f1380b712ce36
2014-02-07 14:37:51 +01:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Krisztian Pinter
f6edfefd53 RTL_CONSTASCII_USTRINGPARAM removals
Change-Id: Ib483f271d3c826a2b7192b22a174ff9f7b18c3f8
Reviewed-on: https://gerrit.libreoffice.org/2241
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
2013-02-19 22:11:16 +00:00
Thorsten Behrens
66a175834c c++ API: use css alias in generated headers, adds global css decl
This changes all generated API headers (.hpp and .hdl) to use a
namespace alias 'css' instead of the pointlessly long com::sun::star

Makes the change in cppumaker & associated tools, adds a global
namespace alias definition in sal/types.h, and removes a kiloton
of local, now pointless-to-harmful versions of that alias from all
over the code.

Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-11-30 14:36:36 +01:00
Norbert Thiebaud
b854de954f deprecate oustringostreaminserter.hxx
the intent of this header has canged over time. now it is already
systematically included with ustring.hxx and the operator overload it
provide fit nicely there...

Just to be safe, since that include as been added to the api during the
3.5 timeframe and therefore is already in 'production'
the header remain and simply attempt to include ustring.hxx
but a warning is issued indicating that this header should not be used
anymore... in a couple of major release we will thenr emove it completely

All internal users of that header are converted.

Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad
Reviewed-on: https://gerrit.libreoffice.org/634
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-18 10:10:06 +00:00
Stephan Bergmann
7a7a2c5495 Cosmetics
Change-Id: I7b217c4fb48bbee4a2872d15cf23a955b464ffca
2012-09-05 10:12:40 +02:00
Ricardo Montania
a60f911214 OUString and RTL_CONSTASCII cleanup
Change-Id: Ic56451b2c13d8561bb6e6ee92bf9147b35640a5c
2012-09-05 09:26:10 +02:00
Ricardo Montania
e47fe5cc40 Change rtl::OUString to OUString
My first commit. Any problem, question, warnings, please tell me.

Change-Id: Ibb02fe15776f3ffe74ddb9488c63a45c447bb493
2012-08-22 16:45:38 +02:00
Stephan Bergmann
edaf3e8cd1 fdo#43433: Binary URP works gracefully with old Java URP
...which did not support protocol properties yet.

Change-Id: Ic5bb346764fb039856e16169d5ae96d01422e7e0
2012-08-15 11:37:34 +02:00
Michael Meeks
b3d8fd8a41 re-base on ALv2 code. 2012-06-12 17:51:46 +01:00
Stephan Bergmann
2fa2660b55 Better fix for ThreadPool/ORequestThread life cycle
This is a follow up to d015384e1d "Fixed
ThreadPool (and dependent ORequestThread) life cycle" that still had some
problems:

* First, if Bridge::terminate was first entered from the reader or writer
thread, it would not join on that thread, so that thread could still be running
during exit.

That has been addressed by giving Bridge::dispose new semantics:  It waits until
both Bridge::terminate has completed (even if that was called from a different
thread) and all spawned threads (reader, writer, ORequestThread workers) have
been joined.  (This implies that Bridge::dispose must not be called from such a
thread, to avoid deadlock.)

* Second, if Bridge::terminate was first entered from an ORequestThread, the
call to uno_threadpool_dispose(0) to join on all such worker threads could
deadlock.

That has been addressed by making the last call to uno_threadpool_destroy wait
to join on all worker threads, and by calling uno_threadpool_destroy only from
the final Bridge::terminate (from Bridge::dispose), to avoid deadlock.  (The
special semantics of uno_threadpool_dispose(0) are no longer needed and have
been removed, as they conflicted with the fix for the third problem below.)

* Third, once uno_threadpool_destroy had called uno_threadpool_dispose(0), the
ThreadAdmin singleton had been disposed, so no new remote bridges could
successfully be created afterwards.

That has been addressed by making ThreadAdmin a member of ThreadPool, and making
(only) those uno_ThreadPool handles with overlapping life spans share one
ThreadPool instance (which thus is no longer a singleton, either).
Additionally, ORequestThread has been made more robust (in the style of
salhelper::Thread) to avoid races.

Change-Id: I2cbd1b3f9aecc1bf4649e482d2c22b33b471788f
2012-05-23 10:10:51 +02:00
Stephan Bergmann
d015384e1d Fixed ThreadPool (and dependent ORequestThread) life cycle
At least with sw_complex test under load, it happened that an ORequestThread
could still process a remote release request while the main thread was already
in exit(3).  This was because (a) ThreadPool never joined with the spawned
worker threads (which has been rectified by calling uno_threadpool_dispose(0)
from the final uno_threadpool_destroy), and (b) binaryurp::Bridge called
uno_threadpool_destroy only from its destructor (which could go as late as
exit(3)) instead of from terminate.

Additional clean up:
* Access to Bridge's threadPool_ is now cleanly controlled by mutex_ (even
  though that might not be necessary in every case).
* ThreadPool's stopDisposing got renamed to destroy, to make meaning clearer.

Change-Id: I45fa76e80e790a11065e7bf8ac9d92af2e62f262
2012-05-16 22:09:21 +02:00
Szabolcs Dezsi
d6bc02f8c4 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator 2012-04-06 20:03:42 +02:00
Stephan Bergmann
672ad9493a Clarifying comment added 2012-03-08 14:22:54 +01:00
Stephan Bergmann
d21fb1451e Adapted Reader/Writer to safer-to-use salhelper::Thread 2012-02-23 10:47:36 +01:00
Stephan Bergmann
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
Olivier Hallot
9201704ede Fix for fdo43460 Part IV getLength to isEmpty
Part IV
Module
basic (small fix per demand from Ivan Timofeev)
binaryurp
bridges
2011-12-13 00:11:25 +04:00
Takeshi Abe
7113c7152d catch by constant reference 2011-11-30 11:27:42 +09:00
Stephan Bergmann
9c53350ab8 Demote SAL_WARN that happens regularly during bridge shutdown to SAL_INFO. 2011-11-29 13:12:20 +01:00
Stephan Bergmann
ebdbd2b578 Adapted to new assertion/logging mechanisms. 2011-11-28 22:05:46 +01:00
Caolán McNamara
bc09ec8dee add mode lines to new files 2011-06-02 16:49:28 +01:00
sb
138ab06ecc sb138: #i116038# fresh implementation of binary URP bridge 2011-01-26 09:26:59 +01:00