Commit Graph

1681 Commits

Author SHA1 Message Date
Noel Grandin
5e028ad5dc simplify some string handling in tracing calls
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3
Reviewed-on: https://gerrit.libreoffice.org/39159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23 14:38:14 +02:00
Noel Grandin
7b5fac67fd loplugin:unusedfields in accessibility..comphelper
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695
Reviewed-on: https://gerrit.libreoffice.org/39137
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23 09:01:24 +02:00
Noel Grandin
809e2d33b4 create comphelper::RefCountedMutex
and merge the two existing implementations of the idea - SotMutexHolder
from package and RefCountedMutex from connectivity

Change-Id: I87f09f359ac798cf934381a2c75225dab71dd43e
Reviewed-on: https://gerrit.libreoffice.org/38972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20 14:13:35 +02:00
Noel Grandin
8ed77fae3e loplugin:oncevar in codemaker..connectivity
Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd
Reviewed-on: https://gerrit.libreoffice.org/39000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20 11:54:20 +02:00
László Németh
81413799eb comphelper: add a profiling API
Using the guard style ProfileZone aZone("foo").

Test macro:

Sub TimeLog
toolkit = createUnoService("com.sun.star.awt.Toolkit")
toolkit.startRecording()
toolkit.processEventsToIdle()
toolkit.stopRecording()
a = toolkit.getRecordingAndClear()
s = ""
For Each i in a
s = s + i + ", "
Next i
Print s
End Sub

Change-Id: Iceaf9143d0387c87e7936dc67eecbbf71ee8d74a
Reviewed-on: https://gerrit.libreoffice.org/38786
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-06-15 16:10:09 +02:00
Stephan Bergmann
1d0890bb24 Missing include
Change-Id: I3345d989dc279f080d26c60888daa67154b3c0e9
2017-06-15 15:37:57 +02:00
Noel Grandin
ec8c98f598 use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623
Reviewed-on: https://gerrit.libreoffice.org/38789
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15 08:24:33 +02:00
Jochen Nitschke
a3bedb7ae8 use local statics for getUnoTunnelImplementationId
replace uses of double checked locking pattern and
rtl::Static

Change-Id: I479d9d94f652b4fb4c67388405823a5f4e2b6ed4
Reviewed-on: https://gerrit.libreoffice.org/38690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13 09:13:37 +02:00
Mohammed Abdul Azeem
7260bb7160 Setting Buffered(threaded)Stream as default:
Also cleaning up bUseBufferedStream parameter.

Change-Id: Ibf9c9fcefbdcd229ffaa1d3b169ff87f00e91ceb
Reviewed-on: https://gerrit.libreoffice.org/38661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-12 13:07:17 +02:00
Arnaud Versini
a7532d8f06 Remove VCLExternalSolarLock and IMutex.
Next step is to remove OContextEntryGuard.

Change-Id: I9460fb67fba6f3bfb3c809b730c33f38d225a64e
Reviewed-on: https://gerrit.libreoffice.org/38411
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 08:45:48 +02:00
Noel Grandin
d4eabd5da8 pass comphelper::PropertySetInfo around using rtl::Reference
and remove some manual ref counting

Change-Id: Ib78122fbbf914e87e0aef1f8fffe3952639e5b22
Reviewed-on: https://gerrit.libreoffice.org/38607
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 08:36:20 +02:00
jan Iversen
2a48fd3fbb allow build without tls and ssl
support for using
--disable-openssl AND --without-tls

(needed if you want to avoid including crypto code).

Change-Id: I77650e9db679ddf1690560eda069d8645acacfc4
Reviewed-on: https://gerrit.libreoffice.org/38604
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@libreoffice.org>
2017-06-11 11:23:28 +02:00
Noel Grandin
17a2c9e8e2 clang-tidy performance-unnecessary-value-param
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192
Reviewed-on: https://gerrit.libreoffice.org/38400
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05 09:22:51 +02:00
Stephan Bergmann
94d9d895ed Remove some unnecessary scaffolding around SAL_WARN calls
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
2017-05-31 18:17:03 +02:00
Noel Grandin
2ccde70d60 teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 08:50:31 +02:00
Noel Grandin
ef513fd4b0 remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28 19:44:08 +02:00
tagezi
6dbf9543c6 tdf#36541 Wrong syntax highlighting in BASIC IDE
-- and // are not comments in Basic

Change-Id: I6cd16f2d19eec280ead7d59a6162cd03ac267474
Reviewed-on: https://gerrit.libreoffice.org/38074
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-05-27 12:54:52 +02:00
Jochen Nitschke
a0b93fe081 cleanup unused css/script/ includes
but keep exception includes in headers for now

Change-Id: I826828675a2d14b906e57068cbced2e790e12bce
Reviewed-on: https://gerrit.libreoffice.org/37846
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20 10:23:38 +02:00
Stephan Bergmann
bb134f41f0 loplugin:stringcopy: comphelper
Change-Id: Icb7d43c95ee5d53fdf6b1cdb92953df8488d1ef1
2017-05-19 17:18:53 +02:00
Johnny_M
2c3f58eff2 Translate German comments and debug strings (leftovers in dirs a... to c...)
Translates all (leftovers) found using a custom regex, in directories not
shown by /bin/find-german-comments and beginning with "a" to "c".

Change-Id: I3b0152ee78ad80a29d714cbd98bf888f31be4763
Reviewed-on: https://gerrit.libreoffice.org/37573
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-05-15 15:27:52 +02:00
Noel Grandin
389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00
Jochen Nitschke
959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Markus Mohrhard
cf45dda9a5 add MD5 hashing to generic digest class
Change-Id: If3abc80f8511d9c7bf0d5197ce28ef4cf60a6b45
Reviewed-on: https://gerrit.libreoffice.org/36792
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-29 07:55:10 +02:00
dennisroczek
91a1342aa2 tdf#39468 cleanup source code comments
* translate German source code comments
* remove ascii art
* remove bogus source Code comments
* remove old StarOffice/Sun internal bug tracker references

Change-Id: I443bf2fdba3780c411d69809111daf3aa3a48451
Reviewed-on: https://gerrit.libreoffice.org/36005
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27 22:20:40 +02:00
Caolán McNamara
2c6eb5dcad remove ResourceBasedEventLogger in favor of its base EventLogger
because there are no resources in use anymore

Change-Id: I37e4a100aabbf6214533738da3e528ed2f434eae
2017-04-27 16:35:07 +01:00
Caolán McNamara
8e9c618dd2 drop writeonly unused struct
Change-Id: I6a7d58899991109264d86059a16b4a3a540f1491
2017-04-27 16:20:13 +01:00
Caolán McNamara
65330ab268 the only use of this argument is sdbcl which is a deleted resource file
Change-Id: I31c140dcab9a291c4ede62e56d296a224dcd47c8
2017-04-27 16:16:25 +01:00
Miklos Vajna
265a320cbb comphelper: fix loplugin:unreffun warning
Change-Id: Ie3d398568dbb4e237b8d03349c0286f2776e7cdd
2017-04-27 15:44:53 +02:00
Caolán McNamara
8efb852024 another name for a nonlocalized string is a string
Change-Id: Ic4ff92720edd1c10dd6d5eff026e79cb02990005
2017-04-27 13:29:58 +01:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
Noel Grandin
e0c7b254c0 simplify ChainableProperySet and MasterPropertySet
bunch of methods that do nothing

Change-Id: If7806018721bb101825d3489ca8e7fe70e175af4
Reviewed-on: https://gerrit.libreoffice.org/36778
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-23 07:52:33 +02:00
Caolán McNamara
a4df49725b fix --with-tls=openssl build
Change-Id: I10bab565a5a152755fbc38268559657b4ec539b2
2017-04-22 21:08:19 +01:00
Markus Mohrhard
b7324ecbf3 add generic digest class
Change-Id: Ic5d2d8fbb0bb4edc4c966e185be81f6ca673950e
Reviewed-on: https://gerrit.libreoffice.org/36790
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-21 22:43:54 +02:00
Noel Grandin
8c8f2a5285 remove unnecessary explicit linefeeds from end of SAL and OSL log calls
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf
Reviewed-on: https://gerrit.libreoffice.org/36727
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21 09:15:11 +02:00
Noel Grandin
8fced917aa clang-tidy readability-simplify-boolean-expr in accessibility..cui
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc
Reviewed-on: https://gerrit.libreoffice.org/36677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19 14:38:35 +02:00
Caolán McNamara
169bd77182 [API-CHANGE] drop css.comp.logging.SimpleLogRing
Change-Id: I2f61a8ec24a28a917b458673df6ed45ac1f93e72
Reviewed-on: https://gerrit.libreoffice.org/36447
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-12 21:07:47 +02:00
Caolán McNamara
7b9f22fb62 try and silence coverity#1403659 Data race condition
Change-Id: Ibe8629b9f61230b41840351a3486050e6ad9eb8c
2017-04-07 09:50:32 +01:00
Caolán McNamara
4852422253 split closeOutput up
Change-Id: Id6408fa804e1049ceab012ec0220d8e6f8d8e555
2017-04-06 11:42:07 +01:00
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 bdaa13a877)

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
9899ffd244.

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 9899ffd244.

Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
2017-03-13 12:11:04 +01:00
Michael Stahl
9899ffd244 comphelper: fix MSVC hang in ThreadPool::shutdown()
Commit aa68c99d88 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