Commit Graph

1161 Commits

Author SHA1 Message Date
Noel Grandin
a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
Arkadiy Illarionov
038e4b3b1e Use hasElements to check Sequence emptiness in sax..sdext
Similar to clang-tidy readability-container-size-empty

Change-Id: If6a567708d3c59355d54933fad23c85195846624
Reviewed-on: https://gerrit.libreoffice.org/71763
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-12 14:18:12 +02:00
Caolán McNamara
fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Noel Grandin
22f2cf3ccc implement std::hash for css::uno::Reference and rtl::Reference
The declaration in BarChart.cxx is particularly suspicious, because it
was using a < for the KeyEqual template parameter.
Been there since:
    commit b2c3233e5f
    Date:   Thu Dec 21 20:08:33 2017 +0900
    chart2: suspend/resume setting rects dirty for 3D shapes

comphelper::OInterfaceCompare is no longer necessary

Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975
Reviewed-on: https://gerrit.libreoffice.org/71537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30 08:43:04 +02:00
Noel Grandin
8b663bc830 loplugin:sequentialassign in sd
Change-Id: I7d592b8929ca46c64a622551b039af0d6a7911db
Reviewed-on: https://gerrit.libreoffice.org/70716
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-19 13:19:45 +02:00
Gabor Kelemen
368f20001c tdf#42949 Fix IWYU warnings in comphelper
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Also re-evaluate some blacklisted headers and recheck include/comphelper/

Change-Id: Ib7eea5951e849c07cea2e2782be4e8945f71ad96
Reviewed-on: https://gerrit.libreoffice.org/70899
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-19 11:31:19 +02:00
Gabor Kelemen
80152c8c5e tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I4a3baffa8944b522b16b50975185759081662020
Reviewed-on: https://gerrit.libreoffice.org/69945
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-01 10:39:44 +02:00
Gabor Kelemen
4304226d79 tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4
Reviewed-on: https://gerrit.libreoffice.org/69481
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25 13:42:28 +01:00
Noel Grandin
19240f625f loplugin:unusedfields look for classes where we can make all the..
fields private

Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27
Reviewed-on: https://gerrit.libreoffice.org/68302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:34:52 +01:00
Noel Grandin
d3d8618608 loplugin:unusedfields in sc
Change-Id: I5e9842970821d0ae61e06e3ad35c9f571b43632c
Reviewed-on: https://gerrit.libreoffice.org/68224
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23 07:30:03 +01:00
Stephan Bergmann
e51cc9ebf3 More loplugin:simplifybool
...found with GCC 9, where the standard library iterator implementations are
apparently sufficiently different to older versions of GCC to find more cases
of !(... == ...) vs. ... != ...

Change-Id: Ibe7c5140049a69d2c5318b4b2371f2e66bd05028
Reviewed-on: https://gerrit.libreoffice.org/68012
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19 14:25:15 +01:00
Mike Kaganski
cfbd830e9c tdf#120703 PVS: remove redundant static casts
V572 It is odd that the object which was created using 'new' operator
     is immediately cast to another type.

Change-Id: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d
Reviewed-on: https://gerrit.libreoffice.org/67664
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-12 09:04:54 +01:00
Noel Grandin
0d1253c232 new loplugin writeonlyvars
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars

Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 13:25:31 +01:00
Noel Grandin
34f333445c loplugin:indentation in sd
Change-Id: I8ce307b8c467ac1e3f19faca1df15a079bc14169
Reviewed-on: https://gerrit.libreoffice.org/67563
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09 21:04:23 +01:00
Gabor Kelemen
4e8a15ca22 o3tl::make_unique -> std::make_unique in sax...svtools (except sc)
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e
Reviewed-on: https://gerrit.libreoffice.org/66751
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-28 09:52:28 +01:00
Mike Kaganski
09f80aded6 Restore original behavior of MasterScriptProvider::hasByName
Commit f3ce30ec75 changed this to return
after first non-throwing XNameContainer::hasByName, regardless if it
returned true or false.

This changes it back, to iterate over all the providers again.

Change-Id: I74fa4d4aa8760cad509442226601ab4842312b80
Reviewed-on: https://gerrit.libreoffice.org/65471
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-20 09:12:36 +01:00
Arkadiy Illarionov
b38e690296 Simplify containers iterations in scaddins, sccomp, scripting
Use range-based loop or replace with STL functions

Change-Id: I21ec2eea8f322e2792097d352fc352dc6099c7b7
Reviewed-on: https://gerrit.libreoffice.org/65461
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-20 08:15:54 +01:00
Noel Grandin
f12b6893cf use unique_ptr in StringResourceImpl
Change-Id: Id7a44c4ac5643aae96cb707d2cca217f8535ee63
Reviewed-on: https://gerrit.libreoffice.org/65404
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-19 12:34:05 +01:00
Gabor Kelemen
00b49f9ff9 tdf#42949 Fix IWYU warnings in include/vcl/s*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 14:19:50 +01:00
Noel Grandin
38187ec15b loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07 07:38:24 +01:00
Noel Grandin
21de55596c remove unnecessary "if (!empty()" checks before loops
found with
   git grep -n -A4 'if.*!.*empty' | grep -B3 -P
'(\bfor)|(\bwhile)|(\bdo)'

Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334
Reviewed-on: https://gerrit.libreoffice.org/64169
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29 07:17:37 +01:00
Noel Grandin
06ad764cfb improve function-local statics in scripting..svtools
Change-Id: Idf3785a1fbc6fc5b8efbdc4cd363047709f3af91
Reviewed-on: https://gerrit.libreoffice.org/63782
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22 12:46:56 +01:00
Jan-Marek Glogowski
c846e85f03 Guard listener cleanup of BasicProviderImpl
Otherwise JunitTest_sfx2_complex dbgutil asserts especially on
Windows with:

ucrtbased!get_wide_winmain_command_line+0x296
ucrtbased!get_wide_winmain_command_line+0xe4
ucrtbased!wassert+0x1a
vcllo!ImplDbgTestSolarMutex+0x43
tllo!DbgTestSolarMutex+0x11d
svllo!SfxBroadcaster::RemoveListener+0x2e
svllo!SfxListener::~SfxListener+0x8f
basprovlo!basprov::BasicProviderImpl::~BasicProviderImpl+0x8f
...

Change-Id: Ia183436a92bc70ed5208364987b3e97e27b5bd6e
Reviewed-on: https://gerrit.libreoffice.org/63289
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
2018-11-12 15:37:26 +01:00
Mike Kaganski
ba796f2cdd tdf#121143: don't send OnCloseApp twice; properly cleanup AppBasicManager
The OnCloseApp event is being sent twice: first time in
SfxTerminateListener_Impl::notifyTermination (in Desktop::terminate),
and the second time in Desktop::doShutdown. The second event happens
after application's Basic manager already was destroyed in
SfxApplication::Deinitialize. The Basic provider, which holds a pointer
to the manager, doesn't properly cleanup upon the manager's destruction,
thus trying to use it after free.

This removes the second (duplicate) generated OnCloseApp event, and
makes BasicProviderImpl inherit from SfxListener to allow receiving the
manager's SfxHintId::Dying notification.

Change-Id: Iabf1432c41b1925b11b5a89e5fd8a6ae8249831e
Reviewed-on: https://gerrit.libreoffice.org/62810
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-05 20:06:58 +01:00
Mike Kaganski
36880d7629 tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I1e5098e11f1e5e2f7c5518ea05c57512f58b585b
Reviewed-on: https://gerrit.libreoffice.org/62464
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28 08:23:32 +01:00
Noel Grandin
ec98adb2ec clang-tidy performance-unnecessary-copy-init in sd
Change-Id: I4a494aebdae9b9cba3794e5eee1f3a29eb3ec838
Reviewed-on: https://gerrit.libreoffice.org/62250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24 08:35:39 +02:00
Noel Grandin
76dd28afc9 loplugin:staticvar in various
looks for variables that can be declared const and static i.e. they can
be stored in the read-only linker segment and shared between different
processes

Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892
Reviewed-on: https://gerrit.libreoffice.org/61591
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22 12:47:37 +02:00
Caolán McNamara
4347b59752 pvs-studio: V728 An excessive check can be simplified
for...

"The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression"

subcases, where the args are already bool

Change-Id: Ica8b5c4974c513f7f7ad8acf17ca931e85ebc8af
Reviewed-on: https://gerrit.libreoffice.org/62146
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22 12:42:07 +02:00
Caolán McNamara
87d36feab5 keep pyuno script processing below base uri
Change-Id: Icc13fb7193fb1e7c50e0df286161a10b4ed636c7
Reviewed-on: https://gerrit.libreoffice.org/61957
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2018-10-19 16:29:43 +02:00
Noel Grandin
e61e4e5699 clang-tidy readability-misleading-indentation
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79
Reviewed-on: https://gerrit.libreoffice.org/61935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19 07:58:15 +02:00
Noel Grandin
ccb2a1f650 clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer

Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17 08:25:47 +02:00
Stephan Bergmann
7ceee0f1ec Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense.  (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)

All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.

Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09 14:47:17 +02:00
Noel Grandin
383a4f883d loplugin:constfields in scripting
Change-Id: I1484d920649817680f70de4ca00a3d46e1faf42a
Reviewed-on: https://gerrit.libreoffice.org/61554
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09 11:28:02 +02:00
Jochen Nitschke
9ed8a1bfff replace double-checked locking patterns with thread safe ...
local statics.

Change-Id: Iab4963a04d15f06e9b1a36079a36d32453e09c8f
Reviewed-on: https://gerrit.libreoffice.org/61538
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08 19:51:24 +02:00
Mike Kaganski
f3ce30ec75 tdf#120363: try to avoid asking user to enable JVM when looking ...
... for a provider for an operation.

When another provider actually handles an operation, it's useless to
ask user to enable disabled JVM just to learn that it doesn't handle
the request. So, this patch does the MasterScriptProvider operations
in two steps: first with "Enable JVM" interaction disabled, and if
failed, again with the interaction enabled to try disabled providers.

This shouldn't typically give performance penalties in case when JVM
is enabled, and when it's disabled and the operation is addressed to
another provider.

A context class designed to disable "Enable JVM" interaction is moved
from cui/source/customize/cfgutil.cxx to a new comphelper header,
which is supposed to hold similar helper context classes in needed.

Change-Id: I21be922bfd80a276d9c8f1215d62a47bb3c225f5
Reviewed-on: https://gerrit.libreoffice.org/61468
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-08 16:12:20 +02:00
Mike Kaganski
4435135e68 Use range-based loop
Change-Id: I5c1233f53ca5c9f4322ecf7a832880399d6fec5e
Reviewed-on: https://gerrit.libreoffice.org/61463
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-06 13:54:29 +02:00
Gabor Kelemen
8df9935dcb tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a
Reviewed-on: https://gerrit.libreoffice.org/60837
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-24 23:23:20 +02:00
Stephan Bergmann
206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Gabor Kelemen
9784934cb9 tdf#42949 Fix IWYU warnings in include/ucbhelper/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6
Reviewed-on: https://gerrit.libreoffice.org/60232
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-13 09:04:55 +02:00
Noel Grandin
6a85925841 loplugin:simplifyconstruct in scaddins..sd
Change-Id: Ia2c04ef9fe5113b8b04304d0f495b948b5371fb4
Reviewed-on: https://gerrit.libreoffice.org/60237
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10 11:03:26 +02:00
Noel Grandin
f2ea65c923 loplugin:useuniqueptr in StringResourcePersistenceImpl
Change-Id: Ie3a516adeed9a2cec7b187368bc047461a33dc87
Reviewed-on: https://gerrit.libreoffice.org/60113
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-09 13:34:59 +02:00
Noel Grandin
7867e1f1cd loplugin:useuniqueptr in StringResourceImpl
Change-Id: I399836e9177038dde03ec7435e549094e4d3dd04
Reviewed-on: https://gerrit.libreoffice.org/59437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-22 13:25:44 +02:00
Arkadiy Illarionov
0787ce8814 Simplify containers iterations, tdf#96099 follow-up
Use range-based loop or replace with std::any_of, std::find and
std::find_if where applicable.

Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6
Reviewed-on: https://gerrit.libreoffice.org/59143
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20 17:12:11 +02:00
Andrea Gelmini
60c5543021 Fix typos
Change-Id: I47725a9f56528a88cd3db1798eae954eff337560
Reviewed-on: https://gerrit.libreoffice.org/58611
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2018-08-13 21:47:54 +02:00
Caolán McNamara
ce2792eda3 use C++11 exception rethrowing
for those cases where we are doing relatively simple catching and rethrowing
e.g. catch in one thread and throw in main thread.

Change-Id: I6192017c4ec99dd671a9582f7b004096b0fc4525
Reviewed-on: https://gerrit.libreoffice.org/58588
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-04 18:49:48 +02:00
Gabor Kelemen
efdc775d7d Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories scripting, sd, sdext

Change-Id: I47889cd889cf1d68353184229bfd4712f1528fbf
Reviewed-on: https://gerrit.libreoffice.org/58220
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-30 17:28:49 +02:00
Arkadiy Illarionov
1774599479 tdf#96099 Remove some trivial std::vector iterator typedefs
Change-Id: Iced10ed59c475dff4d33ff06151b2015a27a860b
Reviewed-on: https://gerrit.libreoffice.org/55715
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-15 16:24:54 +02:00
Noel Grandin
51c879d864 simplify calls to *DialogFactory::Create methods
we don't need to check for nullptr here, it's never null.

Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56
Reviewed-on: https://gerrit.libreoffice.org/55114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12 08:24:04 +02:00
Noel Grandin
3a51daeace Improve re-throwing of UNO exceptions
(*) if we are already throwing a Wrapped*Exception, get the
exception using cppu::getCaughtexception.

(*) when catching and then immediately throwing UNO exceptions,
use cppu::getCaughtException to prevent exception slicing

(*) if we are going to catch an exception and then
immediately throw a RuntimeException, rather throw a
WrappedTargetRuntimeException and preserve the original exception information.

Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558
Reviewed-on: https://gerrit.libreoffice.org/54692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25 21:46:49 +02:00
Andrea Gelmini
d633e80334 Fix typos
Change-Id: Id7d66c06e18dbccd5c85ba36143bdb6cee7a5197
Reviewed-on: https://gerrit.libreoffice.org/53564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-05 09:22:04 +02:00