Commit Graph
20 Commits
Author SHA1 Message Date
Muhammad Ammar 1a6bd7b23a tdf#163691 replace memcpy with std::copy_n in package and xmlscript
Restored #include<string.h> header in both files as follow:
- /package/source/zippackage/ZipPackageBuffer.cxx
- /xmlscript/source/xml_helper/xml_byteseq.cxx

Change-Id: I5615140028c9f29eaa87e7269135748790f19ed3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204441
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-27 18:17:24 +02:00
Noel Grandin a6ad198d09 tdf#158556 use more comphelper::ByteReader
which avoids a ton of temporary uno::Sequence being created

Change-Id: I237bb69395f692bb0272ca0daec05b81af828e01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171968
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-08-27 09:10:04 +02:00
Gabor Kelemen 7b5193e2ae Recheck modules [o-r]* with IWYU
See tdf#42949 for motivation

Change-Id: I6b4b05a5e59b256653c4caf5297fffd601b45083
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128845
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-30 16:10:57 +01:00
Mike Kaganski d0a8d4a973 Prepare for removal of non-const operator[] from Sequence in package
Change-Id: Ib5d7fa143c4c5e3b4862ed4b91acf1e2dfc4d8bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124378
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 20:17:13 +02:00
Noel Grandin 4bf1fbc957 tsan:data race in XBufferedThreadedStream
cannot read from maInUseBuffer without holding the lock

Change-Id: I4244e1132595a18c1a7ab33803e10b6c29684bf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30 17:54:32 +02:00
Gabor Kelemen d3e1ada454 Remove unused using declarations in oox...xmlsecurity
Found by:
run-clang-tidy-10 -checks=-*,misc-unused-using-decls

Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-25 09:13:27 +01:00
Stephan Bergmann 6ad13e0e5d Demote from std::unique_lock to std::scoped_lock where applicable
Change-Id: I53a019f05978bab62ad0da3d0eb08f37f8ec1e18
Reviewed-on: https://gerrit.libreoffice.org/74414
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-20 10:19:33 +02:00
Arkadiy Illarionov 0e4c542f7a Use hasElements to check Sequence emptiness in [l-r]*
Similar to clang-tidy readability-container-size-empty

Change-Id: Idd67f332b04857a39df26bad1733aae21236f105
Reviewed-on: https://gerrit.libreoffice.org/71764
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-17 11:20:15 +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
Caolán McNamara dacc1b40df ofz#9597 rethrown IOException not caught by catch IOException
under google oss-fuzz, asan + clang version 6.0.0 (trunk 315613)

when using our own exception thrower, but builtin C++11 support works

also, ofz#9266, ofz#9591, ofz#9597, ofz#9622, etc

Change-Id: I29c692da880b49268284de2f61be07fa94f33bc6
Reviewed-on: https://gerrit.libreoffice.org/58223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-31 08:40:49 +02:00
Gabor Kelemen c6e5d55171 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 from l10ntools to reportdesign

Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198
Reviewed-on: https://gerrit.libreoffice.org/58205
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-30 16:26:31 +02:00
Caolán McNamara 2a7fa39bc1 fix attempt to save and rethrow exception
Change-Id: Idff6ffef536d87d85f1092b3316d65da83527711
Reviewed-on: https://gerrit.libreoffice.org/45229
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-24 20:56:44 +01:00
Stephan Bergmann a50d42929a loplugin:includeform: package
Change-Id: I64200b2d03d579c5c83d1ec0cc8aaa839edaa7ed
2017-10-23 22:45:59 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Mohammed Abdul Azeem aff5951e7b Fixing threadedStream produce loop condition:
hasBytes() is for the consuming thread, produce loop should
be stopped as soon as we've read as much as size of the stream.

Change-Id: I0d857cc9cbcc4dd7d4a43cddbc4c457e8280353f
Reviewed-on: https://gerrit.libreoffice.org/41364
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-20 21:05:46 +02:00
Mohammed Abdul Azeem a62507eb40 tdf#108821 - fix for overflow of variables on opening huge files
This should fix the issue, as well as restrict available
to return only non-negative values.

Change-Id: I198e226e945b9bd79dec32b1686c20e2a8dfaf3e
Reviewed-on: https://gerrit.libreoffice.org/39665
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-07-07 19:58:12 +02:00
Michael Meeks 4a8f8c09ed tdf#108821 - fixed bad alloc on opening large file
Workaround for streams with size > SAL_MAX_INT32.

More complicated ways using available() and navigating cross-thread
are possible, but probably harder to maintain.

Change-Id: I721b1f38055dfcea03fef555b8a5fd93dfc1b886
Reviewed-on: https://gerrit.libreoffice.org/39374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-06 11:12:19 +02:00
Michael Meeks c573a10a6a Avoid race between mbTerminate check and wait.
package2.dll!osl::Thread::join() Line 112	C++
 	package2.dll!XBufferedThreadedStream::~XBufferedThreadedStream() Line 68	C++
 	package2.dll!XBufferedThreadedStream::`scalar deleting destructor'(unsigned int)	C++
vs.
 	package2.dll!std::condition_variable::wait<bool <lambda>(void) >...
	package2.dll!XBufferedThreadedStream::produce() Line 95	C++
 	package2.dll!`anonymous namespace'::UnzippingThread::execute() Line 29	C++

Change-Id: Iace86efc5e7fe00a5176380a8a21b2dc5e98d8a5
Reviewed-on: https://gerrit.libreoffice.org/38737
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-13 16:06:32 +02:00
Andrea Gelmini 5c1aedccd2 Fix typos
Change-Id: I81740a3ff9474e971556e9e7d4aa245151163d0e
Reviewed-on: https://gerrit.libreoffice.org/38608
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-11 21:19:40 +02:00
Mohammed Abdul Azeem 0632208977 First cut at moving unzipping into new thread:
XBufferedThreadedStream class buffers data in a new thread,
which will be available to be read from parent thread.

Change-Id: I62d367fa1dec23da39aba24b5c765b57707956bb
Reviewed-on: https://gerrit.libreoffice.org/38135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-08 14:27:45 +02:00