1643 Commits

Author SHA1 Message Date
Noel Grandin
ff339c89b5 loplugin:constantparam part2
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746
Reviewed-on: https://gerrit.libreoffice.org/36072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:42:40 +00:00
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30 12:21:40 +00:00
Jens Carl
6a101635b2 tdf#39468 Translate German comments
Translate German comments and terms

Change-Id: Ic80dd218bfae5a3523e12cda77b911a4413b8dc6
Reviewed-on: https://gerrit.libreoffice.org/35819
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-29 19:20:32 +00:00
Michael Stahl
ab4f53eaad sw: plain-text ASCII export: filter out all CH_TXT_ATR_*
These control characters are Writer implementation details and should
not be available via public interfaces.

This filter is also used by SwXTextRange::getString().

Change-Id: If656ee3d451dbefe2f7a905e8b63a44cdb787809
2017-03-29 17:31:49 +02:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Michael Stahl
64c09371d6 comphelper::ThreadPool: guard against concurrent shutdown/pushTask
To join a thread, the mutex must be released - another thread
in pushTask() could add a new thread to maWorkers at that point,
which must of course not be deleted.

Avoid the problem by transferring ownership of the to-be-deleted
threads to the calling thread.

(regression from bdaa13a87744e424d3c210fc7f3f9e4f199d8279)

Change-Id: I9d4fcfe4cb46a336586b5663934a12d47b2d8ccb
2017-03-22 11:39:32 +01:00
Stephan Bergmann
7778d9f51b Prevent calls to rtl/character.hxx functions with (signed) char arguments
...that would implicitly be sign extended (for plain char only if it is signed),
so non-ASCII char values would trigger the isUnicodeCodePoint assert.

Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91
Reviewed-on: https://gerrit.libreoffice.org/35523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-22 09:00:57 +00:00
Michael Stahl
bdaa13a877 comphelper:: fix MSVC hang in ThreadPool::shutdown(), try #2
This takes a different approach than commit
9899ffd244dd367ba69dffe1f21f4f0222064a46.

Change the ThreadPool to automatically shutdown and join all threads
whenever waitUntilDone() is called.  Then start the threads again
in pushTask().

Because the ThreadPool is meant to be used synchronously with
waitUntilDone() called after adding all required tasks, this should
obviate the need to call shutdown() before process exit, as
there won't be any threads running at that point.

Change-Id: I2b8e639004a94cf05ccb4522aa1f0d3dac88a936
Reviewed-on: https://gerrit.libreoffice.org/35510
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-21 16:15:36 +00:00
Caolán McNamara
3f243471b5 ofz: segv on nullptr
Change-Id: I5ec64411b101972ddd150a782b845d4f790ea873
2017-03-19 21:34:58 +00:00
Miklos Vajna
3902bb7a45 Revert "comphelper: fix MSVC hang in ThreadPool::shutdown()"
As it causes "unopkg.bin:
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/comphelper/source/misc/threadpool.cxx:96:
comphelper::ThreadPool::~ThreadPool(): Assertion `mbTerminate' failed."
in
<https://ci.libreoffice.org/job/lo_gerrit/8283/Config=linux_clang_dbgutil_64/console>
and also locally. Revert till it's clear if that assert() should be a
SAL_WARN() or unopkg has to be fixed.

This reverts commit 9899ffd244dd367ba69dffe1f21f4f0222064a46.

Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
2017-03-13 12:11:04 +01:00
Michael Stahl
9899ffd244 comphelper: fix MSVC hang in ThreadPool::shutdown()
Commit aa68c99d88fd7abe08c4aee5206c859a0cdba38e added some code using
std::condition_variable to comphelper.

Built with MSVC 2017, this causes many cppunittester.exe processes to
deadlock in ThreadPool::shutdown():

    maTasksChanged.notify_all();

This ultimately calls NtReleaseKeyedEvent(), which never returns.

The reason appears to be a bug in Windows 7, for which a "hotfix"[1] is
avaiable here, but it's apparently not distributed via Windows Update
so we likely can't rely on users or even developers having this installed.

However, the documentation of DllMain[2] and ExitProcess[3] indicates
that during shutdown, by the time global destructors are invoked
all threads other than the one that called ExitProcess have already
been terminated.

Returning from main() implicitly calls ExitProcess [4].

As it turns out the problem only happens for some CppUnitTests because
soffice.bin will call ThreadPool::shutdown() from Desktop::doShutdown()
while it is still safe.

[1] http://support.microsoft.com/kb/2582203
[2] https://msdn.microsoft.com/en-US/library/windows/desktop/ms682583(v=vs.85).aspx
[3] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx
[4] https://blogs.msdn.microsoft.com/oldnewthing/20100827-00/?p=13023

Change-Id: I6137461ca7efe9a5fbe4f8f8478fb96de3570469
Reviewed-on: https://gerrit.libreoffice.org/35066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-11 10:08:06 +00:00
Andrea Gelmini
0f0ebddb81 Fix typos
Change-Id: Ic54e808956e5cf4e8079942c0ff799f802cd4b6c
Reviewed-on: https://gerrit.libreoffice.org/35053
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:08:01 +00:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Andrea Gelmini
6fab286b2a Fix typos
Change-Id: I4f16ba5fc32cbfd6a5b01e495f3ad905da193524
Reviewed-on: https://gerrit.libreoffice.org/34808
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:42:39 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Stephan Bergmann
db760ac665 loplugin:subtlezeroinit: comphelper
Change-Id: I6b97583d9bdc0d0f8c059d0fbc9e3f41f822bf3b
2017-02-21 07:35:11 +01:00
Jochen Nitschke
f5b09b48c2 cppcheck: unreadVariable
Change-Id: I701431f0346727cbb039f18ade55b5a98c97a135
Reviewed-on: https://gerrit.libreoffice.org/34438
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20 06:05:11 +00:00
Kohei Yoshida
6ba107fbab Consistent formatting & indentation.
Change-Id: I5dce7d05156313d460533040b8f7a3de3d8c59d7
Reviewed-on: https://gerrit.libreoffice.org/34420
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-02-19 01:57:37 +00:00
Tor Lillqvist
6de3688cc6 Drop :: prefix from std in c*/
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155
Reviewed-on: https://gerrit.libreoffice.org/34324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 23:01:23 +00:00
Stephan Bergmann
20d648625b Some simplifications, using UNO_QUERY_THROW
Change-Id: I143ec0287421675fb13a03e8cf3c7054a17be37f
Reviewed-on: https://gerrit.libreoffice.org/34271
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:19:13 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Noel Grandin
8a16f665b1 makeAny->Any in canvas..configmgr
Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e
Reviewed-on: https://gerrit.libreoffice.org/33869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 10:44:01 +00:00
Noel Grandin
c0f9bdd3e6 unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f
Reviewed-on: https://gerrit.libreoffice.org/33788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02 07:48:21 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Samuel Mehrbrodt
3aae650d0f User profile backups: Don't backup user galleries
As suggested in
https://lists.freedesktop.org/archives/libreoffice/2017-January/076768.html

Change-Id: I2562064ae906eb8b2d507ec971762625692a4bbf
Reviewed-on: https://gerrit.libreoffice.org/33608
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-01-27 11:22:14 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Pranav Kant
75d8b305bb lok: New feature flag to turn off tiled annotations
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0
Reviewed-on: https://gerrit.libreoffice.org/33472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-23 19:32:03 +00:00
Noel Grandin
a90a4810ae loplugin: unnecessary destructor: comphelper..desktop
Change-Id: I9df4cb6a4b1734dac6141d6b0ee7a09e3e05f92e
Reviewed-on: https://gerrit.libreoffice.org/33453
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-23 16:59:48 +00:00
Noel Grandin
017911facd use rtl::Reference in OPropertyChangeListener
instead of manual acquire/release

Change-Id: Ie80253b5a59a3e3fcd52f98d9c26bcde42fe985a
2017-01-23 07:56:34 +02:00
Noel Grandin
f7db2b5b3f use rtl::Reference in OSelectionChangeListener
instead of manual acquire/release

Change-Id: I33e3018b5deb4240d4aff1d8136ae6f8f538c779
2017-01-20 12:52:45 +02:00
Noel Grandin
3bb8bdb93f use rtl::Reference in OContainerListener
instead of manual acquire/release

Change-Id: I83e6229029e662073e2e01e98f4846fb0a0ed643
2017-01-20 08:51:08 +02:00
Stephan Bergmann
a10b95bcc9 New loplugin:dynexcspec: Add @throws documentation, comphelper
Change-Id: I115c5c34cf97858d9fdd96432cb57bde6d4537cb
2017-01-19 18:03:24 +01:00
Noel Grandin
5830ef9a65 use rtl::Reference in DocPasswordRequest and SimplePasswordRequest
Change-Id: If1bad2bc852712b8315e44480ee81f797736bb95
2017-01-17 15:27:33 +02:00
Noel Grandin
ee2bd1ee97 use rtl::Reference in OInstanceLocker
no need to store a raw pointer and a refcount pointer

Change-Id: I2dc3b87dd870c8d8128c2249a18fda30319ba08c
Reviewed-on: https://gerrit.libreoffice.org/33157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 07:53:33 +00:00
Noel Grandin
f5e9c29136 use rtl::Reference in MasterPropertySet
no need to store a raw and a smart pointer

Change-Id: Ic6b0b716812ec1dca3111f2162379c11389e963a
2017-01-17 08:51:48 +02:00
Noel Grandin
b2a4c1e085 use rtl::Reference in ChainablePropertySet
no need to store both a raw pointer and a smart pointer

Change-Id: If0bde337e6d9fa575a2fc7104ecffa97a8c37c31
Reviewed-on: https://gerrit.libreoffice.org/33159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 06:37:00 +00:00
Noel Grandin
11880ef40a use rtl::Reference in AttacherAllListener_Impl
no need to store a raw and a smart pointer field

Change-Id: Id9ce8365a413ee2dcac8e92b99768ccbb8bf7697
Reviewed-on: https://gerrit.libreoffice.org/33158
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 06:36:44 +00:00
Noel Grandin
54019e6601 new loplugin: useuniqueptr: comphelper
Change-Id: Iafbaff60d10c9de7b57421e0c24809b08d813987
Reviewed-on: https://gerrit.libreoffice.org/33146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-16 11:29:53 +00:00
Kohei Yoshida
4ae705d02d tdf#97597: Ensure that each parsing thread has its own buffer.
Change-Id: I93077f954a49b3922930e4fc86c80228be0f4dd2
Reviewed-on: https://gerrit.libreoffice.org/33069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-14 17:30:30 +00:00
Caolán McNamara
87f9e8945f default copy ctor and assignment operator are good enough
and block default move equivalents

Change-Id: Ib8a1050803446c2e099f66602fae0465bd8165cf
2017-01-07 21:57:03 +00:00
Huzaifa Iftikhar
5c983bc2ab tdf#70998 Change word "Graphic(s)" to "Image(s)"
There was an error in the previous patch inside the file embeddedobjectcontainer.cxx
This is fixed in this patch.

Change-Id: I01c9e254e58e1683a8e6e9a0bcff3c4663bf32e0
Reviewed-on: https://gerrit.libreoffice.org/32353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-12-23 18:27:05 +00:00
Noel Grandin
46d3163f77 loplugin:unusedmethods
Change-Id: Ife4c8d948ffa116f044d43903de9485e43cfcae5
Reviewed-on: https://gerrit.libreoffice.org/32336
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-23 04:46:35 +00:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
Arnaud Versini
033ff2f9ad comphelper: cleanup class NameContainer.
Remove useless class NameContainerImpl.

Change-Id: I3066abea69ed68d597aeecdd6b3ec7264f7ebe9c
Reviewed-on: https://gerrit.libreoffice.org/31830
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12 12:18:28 +00:00
Noel Grandin
8228227168 convert OSL_ENSURE to assert in AccessibleEventNotifier
and fix the places that trigger it

Change-Id: I97a04cff25ab5aa1d42c79a971d15ba742bf384e
Reviewed-on: https://gerrit.libreoffice.org/31760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 17:27:05 +00:00
Stephan Bergmann
21f6405cbe This is presumably not meant to be exported
Change-Id: Id11393c44ddd217d3def259ea5a8df9f8bb27711
2016-12-07 22:17:56 +01:00
Samuel Mehrbrodt
4a4c4d3768 SafeModeDialog: Add option to reset bundled extension registration
Change-Id: Ic83ada7cc76142852643cefa60b4fc9286e0756a
Reviewed-on: https://gerrit.libreoffice.org/31694
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-12-06 20:09:22 +00:00
Samuel Mehrbrodt
a3597a3f37 SafeModeDialog: Rename to match reality
This doesn't remove shared&bundled extensions, but resets the registration
database from shared extensions.

Change-Id: I9f198fc7b771fd3bd31547008fd8d006a6d1b5d5
Reviewed-on: https://gerrit.libreoffice.org/31693
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-12-06 20:05:13 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00