summaryrefslogtreecommitdiff
path: root/binaryurp
AgeCommit message (Collapse)AuthorFilesLines
2021-06-07Revert "improve logging message"Noel Grandin1-2/+2
This reverts commit 9f0484c2bca8e7ec5e0d83289fae9b474b8598e0. Reason for revert: this patch was unnecessary, the operator<< for css::uno::Exception alreadys logs the message, I got confused Change-Id: I45932be060059eac92d460a70c944e1b19b5c375 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-07improve logging messageNoel Grandin1-2/+2
Change-Id: Ib8f4fdbe3d644c035a125f7ae0a035a95bcafc76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-05Simplify Sequences initializations (accessibility/binaryurp)Julien Nabet1-2/+1
Change-Id: I4b388b7faa1dc47f27d29aaaff9041fe81a29f71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116739 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-17small perf improvement in readMemberValuesNoel Grandin1-0/+2
Change-Id: I5d5973401a87b69dd54721d16ed19e227a6c2ac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115674 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann7-31/+31
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-3/+2
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-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
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-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski1-1/+1
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-16loplugin:referencecasting in basctl..binaryurpNoel1-1/+1
Change-Id: I3fbc287cf76e453e2c464837d2431ff19501fde3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel2-2/+2
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13tdf#123936 Formatting files in module binaryurp with clang-formatPhilipp Hofer5-35/+45
Change-Id: If0965d1d1fa500d74bad16871f7036fe4bb6d869 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105647 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-05tdf#42949 Fix new IWYU warnings in directories [ab]*Gabor Kelemen1-2/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib0008b9bb095f27e5e436d6b507dc709ab7bf01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105313 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-04tdf#124176 Use #pragma once in binaryurpGeorge Bateman18-72/+18
This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: I7141f07eca2b8338be6bd6b24580256cda6ba092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100129 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
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-05binaryurp: create instances with uno constructorsNoel Grandin3-46/+10
See tdf#74608 for motivation Change-Id: Ide39715f83b0183f560e16fa69fcb3112496936d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: binaryurpStephan Bergmann1-1/+1
Change-Id: I67340a41005d93d11686ed5f5d49bf6e4938f8c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97523 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-25Rephrase commentStephan Bergmann1-3/+3
760980b0b510acac555f0c252fbaa10a4751bded "Fix typos" had, IMO incorrectly, removed one "that" from ..., so that that asynchronous request would... Lets rephrase the original comment in a less problematic way. Change-Id: Ic13ffaad43e2777eb36425363851b53f2f641865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97087 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I2bccc7beb2e9dfccd84b118a33a7aee9753a8be1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97040 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-23HACK to decouple URP release calls from all other threadsStephan Bergmann1-2/+19
Abandoned <b9ecec7c74687ed5a9470cffb7d02e0e6e83107e> "Don't call out to UNO with SolarMutex locked" documents a deadlock where a synchronous documentEventOccurred call made with SolarMutex locked evokes an asynchronous release call back (serviced on a different physical thread, but which blocks the original thread) that then wants to acquire the SolarMutex. While we usually appear to get away with wrapping those UNO calls in SolarMutexReleaser (though knowing all too well that that is nothing but a bad hack that may well cause crashes and deadlocks at least in theory), the place in SfxBaseModel::postEvent_Impl was obviously too sensitive for that hack: It did cause enough different crashes (e.g., hitting assert(pSchedulerData == pMostUrgent); in Scheduler::ProcessTaskScheduling, vcl/source/app/scheduler.cxx) and deadlocks (e.g., different threads now taking the SolarMutex and JobExecutor's mutex in framework/source/jobs/jobexecutor.cxx in different orders) to make me search for a different "fix", so I came up with this hack instead. Change-Id: Icd26926279cb86ce529edb4544a3ec0bc9a8b108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-10Improve a SAL_WARN messageStephan Bergmann1-1/+2
Change-Id: I31f809e5f6fec109bd0fb58e8290323500d44f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-04Properly handle initial object queryInterface return valueStephan Bergmann1-1/+17
<https://wiki.openoffice.org/wiki/Uno/Remote/Specifications/Uno_Remote_Protocol# The_queryInterface_Message> specifies that this shall return an ANY either of type VOID (so handle that) or of type css.uno.XInterface with non-null value (so throw exceptions for any other kinds of return values). Various Linux Jenkins builds had recently started to sporadically fail during UITest_calc_demo, hitting the assert( type.get()->eTypeClass == typelib_TypeClass_ANY || type.equals(css::uno::TypeDescription(data_.pType))); in the call to binaryurp::BinaryAny::getValue (binaryurp/source/binaryany.cxx), e.g. <<https://ci.libreoffice.org/job/lo_tb_master_linux_dbg/29831/>. While it is unclear why those failures happen, they highlight that this code did not properly handle all possible (valid or invalid) input. Change-Id: I95db574aa102ff75fa22fd24c697a0cfa24b7aff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95527 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-15use for-range on Sequence in basctl..canvasNoel Grandin1-3/+3
Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28tdf#42949 Add back includes to binaryurp/Gabor Kelemen3-0/+5
mistakenly identified by IWYU as unused Change-Id: Ia9fbce12883e5b45c6b6dfbc27046aca0075a895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87566 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann1-1/+2
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-27tdf#42949 Fix IWYU warnings in binaryurp/Gabor Kelemen9-17/+31
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I293036c7f6ab1af9b9b8736558c6d37124ec6d21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87116 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): binaryurpStephan Bergmann1-1/+1
Change-Id: Ia8ae32426b886fff7824612898b485d090ca51c6 Reviewed-on: https://gerrit.libreoffice.org/76694 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-11Use hasElements to check Sequence emptiness in accessibility..canvasArkadiy Illarionov1-1/+1
Similar to clang-tidy readability-container-size-empty Change-Id: I24c3f04b4eed3c1cd973166885660f113a26844f Reviewed-on: https://gerrit.libreoffice.org/71805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22New loplugin:dataStephan Bergmann2-8/+8
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19Some uses of C++17 class template argument deductionStephan Bergmann1-2/+2
Change-Id: I47c469c0fcdff41d83729be9489c946e81ef3686 Reviewed-on: https://gerrit.libreoffice.org/68020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-14Use C++17 nested namespace definitions (in binaryurp)Stephan Bergmann9-33/+15
Change-Id: I21594a9fec47ac4a0dd1b821a6b47ea468445c42 Reviewed-on: https://gerrit.libreoffice.org/66295 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11tdf#112689:Replace chained O(U)StringBuffer::append() with operator+Furkan Ahmet Kara1-4/+2
Change-Id: Ieea40ab9cd15260b02222174b9ac389d8c9f387b Reviewed-on: https://gerrit.libreoffice.org/65746 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-12-08Use [[maybe_unused]] instead of cast to voidStephan Bergmann1-2/+1
Change-Id: I1db02a4eff2d6f16bfb18bda2155d8a26c4a9335 Reviewed-on: https://gerrit.libreoffice.org/64814 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2-2/+2
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-06Use structured bindingStephan Bergmann1-10/+9
Change-Id: I8254d350320115be532c6d595dc56268c8de3ad2 Reviewed-on: https://gerrit.libreoffice.org/64653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-1/+2
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-09-11Revert "clang bugprone-unused-return-value"Noel Grandin1-2/+4
comment from sberg: aren't these changes broken in general, when the called function may throw an exception before it takes ownership of the passed-in pointer? So revert, except for (a) PlainTextFilterDetect::detect, which was definitely a leak (b) SwCursor::FindAll, where unique_ptr was being unnecessarily used This reverts commit 7764ae70b04058a64a3999529e98d1115ba59d1c. Change-Id: I555e651b44e245b031729013d2ce88d26e8a357e Reviewed-on: https://gerrit.libreoffice.org/60301 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08clang bugprone-unused-return-valueNoel Grandin1-4/+2
most of these changes just make the change of ownership when using std::unique_ptr clearer, but there is one definite leak fix in PlainTextFilterDetect::detect Change-Id: I8282a68007222a4fee84004f394bde0cca8569e9 Reviewed-on: https://gerrit.libreoffice.org/60159 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29replace rtl_allocateMemory with std::mallocNoel Grandin1-1/+1
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19inline use-once typedefsNoel Grandin1-2/+1
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin4-6/+6
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Replace list by vector in incomingrequest (binaryurp)Julien Nabet1-2/+2
Change-Id: Ic08f45f614cfa4643b55142e85e8eeac223abd82 Reviewed-on: https://gerrit.libreoffice.org/44893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-23Revert partly 9d1f61a61893435b26f7239136ad92b7354545a8Julien Nabet1-1/+5
The use of erase/remove idiom is wrong here since "there can be multiple registrations of the same listener" See Stephan's comments in https://gerrit.libreoffice.org/#/c/44892/3/binaryurp/source/bridge.cxx Change-Id: Iebf979ca25520392ba9de6439d5bf19b8e3446b2 Reviewed-on: https://gerrit.libreoffice.org/45104 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-18Replace some lists by vectors in binaryurpJulien Nabet4-40/+38
+ use for range loops Change-Id: Ied18e378b73826c5a47957cad6cf86a4e19a9230 Reviewed-on: https://gerrit.libreoffice.org/44892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26loplugin:constmethods in unotoolsNoel Grandin1-1/+1
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d Reviewed-on: https://gerrit.libreoffice.org/43865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-11binaryurp: consistently use "" and <> for include directivesMike Kaganski30-243/+243
Change-Id: If328428d7f88d8a160888857acd3a07bbd8dab83 Reviewed-on: https://gerrit.libreoffice.org/43318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin5-16/+10
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-08clang-tidy modernize-use-emplace in b*Noel Grandin5-21/+14
Change-Id: I51e0369ba2e1fe0b7c934531f71d3bda95ba09ec Reviewed-on: https://gerrit.libreoffice.org/42109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25Replace use of oslInterlockedCount with std::atomicStephan Bergmann2-4/+6
The assumption in using std::size_t is that every acquisition can be associated with a unique memory location in the local address space, so the counter cannot overflow. Change-Id: I0d004a81d9bf52cf07d13481d9024fcc10b6db6d Reviewed-on: https://gerrit.libreoffice.org/41580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-2/+2
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15use more SAL_N_ELEMENTS part 3Noel Grandin1-1/+1
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>