summaryrefslogtreecommitdiff
path: root/io
AgeCommit message (Collapse)Author
2022-11-24loplugin:unusedfields make some fields privateNoel Grandin
this is one of the secondary analyses this plugin performs Change-Id: I1c496e234513362338600180e51f7e71e605a7cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-11no need to allocate MemRingBuffer separately in OMarkableOutputStreamNoel Grandin
Change-Id: I80d64f18480a2c078caeaa161f55767f66021253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21io: drop unnecessary castChris Sherlock
Change-Id: Iaceab1b85e41dbb2102fe829f7abc2f8e3898a52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-21clang-tidy modernize-pass-by-value in io..jvmfwkNoel Grandin
Change-Id: I6e19d4d03957c35caa79a231927eae04ae630442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-09URE Library_io should not depend on Library_comphelperStephan Bergmann
...and apparently doesn't need to, even though that dependency got added with 6af2e7d21ce050758ad07fbb951a38b2da2b6c4c "use more comphelper::OInterfaceContainerHelper2" Change-Id: I74a4d04be9a37291bc37d908173381eb341b6df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-08osl::Mutex->std::mutex in PumpNoel Grandin
Change-Id: Idb25603ba5659b3d8cabbdddb00df60e43045b52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-08osl::Mutex->std::mutex in OMarkableInputStreamNoel Grandin
Change-Id: I935573e63471e5f38e719df51b3510992347fe09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-08osl::Mutex->std::mutex in OMarkableOutputStreamNoel Grandin
Change-Id: Ie39f8cd7f8de8dfe647d006d0fd0c62fddc72a8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-08osl::Mutex->std::mutex in OAcceptorNoel Grandin
Change-Id: I0fa5628ff601a89ed9c74212b4986689957eab1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in ioStephan Bergmann
Change-Id: I3b659072c54dde7f49aa90e5d52d24f5d762654a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-25Don't use Library_tl in URE librariesStephan Bergmann
This partly reverts 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 "log nice exception messages whereever possible", e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1 "loplugin:logexceptionnicely in starmath..svgio", d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 "OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION", and 877f40ac3f2add2b6dc37bae280d4d98dd102286 "tdf#42949 Fix new IWYU warnings in directories [h-r]*", and adapts loplugin:logexceptionnicely accordingly. Change-Id: I792b853b988c7c5f77179ca0672c30cb4223b5a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-27Recheck modules [i-l]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I758bb27e93779e3df21c463714e49354748f446f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-20osl::Mutex->std::mutex in SocketConnectionNoel Grandin
Change-Id: Ia63c9cfaf189b328c6fa492bd132f6c9767f573e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in PipeAcceptorNoel Grandin
Change-Id: Iafe6c0238d5a00bbf3c586b36c10ea7793f466b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in SocketConnectionNoel Grandin
Change-Id: Ifce8ab564c6f43f65ce02706b74f2c58d9b42bd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127123 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-05drop 'using namespace std' in h* i* j*Julien Nabet
Change-Id: I3c28651779f17e1a410505ffaa863b4773037ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123119 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-06use more comphelper::OInterfaceContainerHelper2Noel Grandin
Change-Id: I255133e1823fd63620f27421b69cd23d75ebb6fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-25Add forgotten io/Executable_io-testconnection.mkStephan Bergmann
...missing from ef88aa5e7400769c0a17c28e66b1ee957c2f667e "Resurrect io testconnection executable" Change-Id: I4a41088f1c27cfbc1275a9c00f8c59ec60898ec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116106 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-25Resurrect io testconnection executableStephan Bergmann
...which appears to be the only code that exercises osl's socket (rather than named pipe) connections, so lets have that available at least for manual execution. Addresses various compiler and loplugin warnings, and extends a wait time to more reliably have the MyThread instance already accept when the second accept (on the main thread) is done. Change-Id: I761d747b08ab45f1ac03dad8b4197fae63228e16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116103 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-26Drop these definesMike Kaganski
Change-Id: I7ff56d6f016ea90c4b5cdcbbb36141627037c0ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113125 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-02-18loplugin:referencecasting add check for new rtl::Reference operatorNoel
rtl::Reference now has a conversion operator to uno::Reference, so look for places where we can simplify the code and use that. Change-Id: Ic81db50d670bed5e875300577d4bf5f3599cc2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11loplugin:refcounting generalise type checkingNoel
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-03tdf#124176 Use pragma once instead of include guardsAlchemist
Change-Id: I491742c51ddc7c97f02b148dfb81d9ba820a759e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108600 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-10tdf#42949 Fix new IWYU warnings in directories [h-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I886b6f446293d3b1cfbf4ae05e8dbd7fabab9f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105510 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-22long->tools::Long in hwpfilter..ooxNoel
Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-27improve some exception messagesNoel Grandin
Change-Id: Ifc5d940fbf77ae13071c299fb6168bdc55dc5c95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-14io: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: Ic5942f00147e4024ffc3d5880cf3c7462bcc14de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98678 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: ioStephan Bergmann
Change-Id: I150aa3666a9e1acf5fba445b9a709ccd9d8c7e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97593 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05Make it more obvious that the error message is composedStephan Bergmann
...from a pipe name and an error number Change-Id: I1e79c1d635fd7f51faf9ede09ca862b37bd7b990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-04Upcoming loplugin:elidestringvar: ioStephan Bergmann
Change-Id: Ic68bc08ed70733728a50d3753a27ec62ed4953f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95485 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-07loplugin:flatten in ioNoel Grandin
Change-Id: I4f4dbbd4ce279cb25a8e4deba1967b5c23ce1385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26remove some unused local varsNoel Grandin
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-19sal_Char->char in idlc..linguisticNoel Grandin
Change-Id: Ib30fe34123ad7e5d892e8db9c742e08c4ca8fcd2 Reviewed-on: https://gerrit.libreoffice.org/85477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12Fix typoAndrea Gelmini
Change-Id: Ie1a06014d989f51141a15c724ab026f5423335de Reviewed-on: https://gerrit.libreoffice.org/84995 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-12-11Fix typosAndrea Gelmini
Change-Id: Idc42061d8832f9d7ca5402e756c81305a309eefc Reviewed-on: https://gerrit.libreoffice.org/84968 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-24cppcheck: performing init in init list (hwpfilter, i., l.)Julien Nabet
Change-Id: Idf5b7be45d48076fbe191fbf1a2fa63c6da71902 Reviewed-on: https://gerrit.libreoffice.org/83617 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-28loplugin:stringadd improve detectionNoel Grandin
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01loplugin:stringadd in helpcompiler..ooxNoel Grandin
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-01Simplify Sequence iterations in ioArkadiy Illarionov
Use comphelper::findValue and initializer lists. Change-Id: I4ebaf556a21b263e48b82a7290093eb8a832d9da Reviewed-on: https://gerrit.libreoffice.org/78351 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in hwpfilter, include/test, io, linguistic, oox, pyuno, reportdesign Change-Id: I5c265c4fde85dd6d7faab8ae82809c4a0e6dd69b Reviewed-on: https://gerrit.libreoffice.org/77646 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>