summaryrefslogtreecommitdiff
path: root/include/com
AgeCommit message (Collapse)Author
2024-01-20suppress COPY_INSTEAD_OF_MOVE suggestions for uno::ReferenceCaolán McNamara
rtl::Reference, uno::Any and rtl::O[U]String where we have implemented move ctors to take let the compiler take advantage of any little optimization possibility that it can take but where the potential optimization probably doesn't outweigh enforcing dusting error-prone std::move all over every case where the compiler doesn't/can't use the move ctor but could. Change-Id: Icf184d96d3278a1740a76c7eb1150e60392351ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162337 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-12add a toAny variant that takes a && valueNoel Grandin
to avoid some unnecessary construction - we hit this path when going through the comphelper makeProperty functions sometimes Change-Id: Idbc4550c9ca26d4a940397d6fe038db5c342867f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05Simplify O(U)String::number implementationMike Kaganski
Change-Id: I059f0324597a90aee01c95170a48ac5578f3caee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150037 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-24Introduce query() and queryThrow() to css::uno::AnyMike Kaganski
Similar to commit f3ffdc1a5fe965016550f20ada405ef638bf5f75 (Introduce non-static query() and queryThrow() to css::uno::Reference, 2023-03-23), this adds a syntactic sugar for css::uno::Reference ctors: css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(anAny, css::uno::UNO_QUERY); would become auto xSomeInterface(anAny.query<css::SomeNamespace::SomeInterface>()); and css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(anAny, css::uno::UNO_QUERY_THROW); would become auto xSomeInterface(anAny.queryThrow<css::SomeNamespace::SomeInterface>()); Change-Id: I06f8d97fe200a7dd03ecc965a431eb54b10a3c91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149549 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-24These must be constMike Kaganski
Change-Id: I6af7a8933662dc5b8585c14d1cb66e2aad883252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149444 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-23Introduce non-static query() and queryThrow() to css::uno::ReferenceMike Kaganski
As a syntactic sugar for the respective ctors: css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(xAnotherInterface, css::uno::UNO_QUERY); would become auto xSomeInterface(xAnotherInterface.query<css::SomeNamespace::SomeInterface>()); and css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(xAnotherInterface, css::uno::UNO_QUERY_THROW); would become auto xSomeInterface(xAnotherInterface.queryThrow<css::SomeNamespace::SomeInterface>()); Change-Id: Ic42da364562b702cd468cc708fbda70394c4f2a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149368 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-23tdf#154319: fix TOC field codes parsingMike Kaganski
Change-Id: I734697f52df14ca5b316481df8a58fef72ab9571 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149254 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-30tdf#152289: implement external glossary relations roundtripMike Kaganski
Change-Id: I20f4439abfbf73485734fd8373fffb2916d390f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143470 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-20optimise Any::operator=(&&) a littleNoel Grandin
uno_any_destruct will get called by the other Any anyway, so no need to do it ourselves. And inline the helper now, since it is only used in the one spot. Change-Id: If4227ce7e9d8ef83e3440ac1d9fe2579ed3583e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05Deprecate css::uno::makeAny; completely disable it for LIBO_INTERNAL_ONLYStephan Bergmann
There is just no good reason not to use a css::uno::Any constructor instead, so simplify the code base. For URE backwards compatibility, keep it around as deprecated for !LIBO_INTERNAL_ONLY. Change-Id: I9409d8853cac270d47377a31ba35a1fc23fa9800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133879 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-02Add css::uno::Any(OUStringNumber) overloadStephan Bergmann
...like was already present for css::uno::makeAny, in preparation of getting rid of makeAny Change-Id: Ic838a8297ec65dae75da6a1deb5933d562070753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133679 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-15LIBO_INTERNAL_ONLY stuff does not need to be SAL_CALLNoel Grandin
Change-Id: I9d7ccaab19ad20509601642745e3fdaea50304ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129818 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2022-01-15Let loplugin:nullptr look into template instantiationsStephan Bergmann
It missed some occurrences of 0 when only looking into uninstantiated template code, as Clang doesn't model them with an ImplicitCastExpr, even if the target is known to be a (dependent) pointer type. Looking into all template instantiations of course carries the risk that a given use of 0 is meant to be interpreted as a pointer in some and as an integer in other instantiations. But the only case where that happened in the current code base is RegistryValueList::getElement (include/registry/registry.hxx), where {} is arguably a better choice anyway. (And which would presumably also hold for any future such cases.) Change-Id: I708bcfc8bedc0a49c9282d7814eb325afa29905c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128462 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-09uno sequences with different sizes are not equalLuboš Luňák
This should often the case, and should be way faster than the UNO data comparison. Change-Id: Ied648d75779ef3aafd293c36906a1bab66bdeade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128098 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-20Add css::uno::Sequence move assignment operatorStephan Bergmann
Coverity had reported it as lacking, which b0b2d7f040c6a7c5dc1f3949693b368ca54ea3b5 "cid#1495784 Missing move assignment operator" and c4aa4b55e21915ca072daa7db93edabc043f26ab "cid#1495784 Missing move assignment operator" had worked around by instead modifying the calling code. But even though a move constructor would be of little benefit, a move assignment operator does have the slight performance benefit of avoiding some refcount manipulation, so add it anyway. Change-Id: Ibc9ca4557dd8beb6070b3451cb6103a8aadd10e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127188 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-12Add a comment clarifying intended replacement for non-const operator[]Mike Kaganski
Change-Id: Ib6cd01e1da3e23521e2ae385b8f50046000da410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125103 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-05Drop non-const Sequence::operator[] in internal codeMike Kaganski
This makes all non-const operations on Sequence explicit, to avoid repeated COW checks in loops. Generally it would be desirable to replace uses of Sequence with general-purpose containers wherever possible, and only use Sequence for UNO API calls. This change uncovered a very serious pre-existing problem inherent to the Sequences used e.g. in range-based loops in our code: taking a non-const reference to elements of a sequence, and then modifying them at some later stage, brings a danger to also modify copies of the Sequence, that were created between the points of taking the reference and modifying it. This caused the change to oox/source/drawingml/customshapeproperties.cxx, where CustomShapeProperties::pushToPropSet took begin()/end() non-const iterators to aGeoPropSeq at the start of the loop, and then in the loop modified its elements and copied the Sequence passing it to XPropertySet::setPropertyValue. This was the same also prior to 2484de6728bd11bb7949003d112f1ece2223c7a1, and only happened to not cause problems because of *accidental* use of non-const operator[] on the copy of the Sequence inside SdrCustomShapeGeometryItem ctor, which *inadvertently* triggered COW, detaching the two copies one from another. This only emphasizes that we should minimize use of Sequences in the codebase. I anticipate other similar problems uncovered by this change, that happened to not break existing unit tests. Change-Id: Id691d994a06eb14297c487ebb84d8e062e29fd47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123725 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-28Prepare for removal of non-const operator[] from Sequence in includeMike Kaganski
Change-Id: I85ca453f3add5ac5b59dc6f1ccb2cdb55f0a463c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124333 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-24remove uno::Type move constructorNoel Grandin
not necessary for the optimisation I was going for, and actually less efficient than just using the copy constructor Change-Id: I0f2019a0bf032283fb6c8d5d834603ea7a5ce3c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-24uno::Type needs a move operatorNoel Grandin
speeds up some operations where Type is stored in a vector Change-Id: Id7112e51d4e4707bc6d261313e994c6ffef54d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-16loplugin:referencecasting in reportdesignNoel
Also, I needed to add castToXInterface() to the upcasting Reference::Reference constructor, to resolve ambiguity in casting to XInterface. Change-Id: Ica60190bc842444c37de56407b586aa267f08372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-01tdf#130978 Add a comment to each published APImsrijita18
Added comment in include/com/sun/star/uno header files Change-Id: Ie483d781f8e7f8e16382660ea2be0d0e47a6a088 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110018 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-09-25cid#1448292 coverity has difficulty with css::uno::SequenceCaolán McNamara
current attempt isn't working, try a different approach to silence these warnings Change-Id: I0cc97df0897abc665dfbb683d7aa0df55f8affb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103387 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22__coverity_tainted_data_sanitize__ can't be constCaolán McNamara
apparently, so use const_cast on its input instead Change-Id: Ib0dfd94c144a2509470ca7a9b3b8fbfacbfd7581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103148 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-20fix __coverity_tainted_data_sanitize__ signatureCaolán McNamara
argument of type "const sal_Int8 *" is incompatible with parameter of type "void *" Change-Id: I0f1dba700516043d54c4e46edae9753312b5ad2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103071 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-12Replace remaining uses of sal_CharJulien Nabet
+ remove sal_Char check on compilerplugins Change-Id: I0f7da14e620f0c3d031d038aa8345ba4080fb3e9 Change-Id: Ia6dba4f27b47bc9e0c89159182ad80a5aee17166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-23Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLYStephan Bergmann
It looks like an oversight that 904b3d1fceee5827076758ed2a81f80cb73493ca "Up- cast conversion constructor for css::uno::Reference" added it also for external code. Making it LIBO_INTERNAL_ONLY allows to remove workarounds for old MSVC, and may allow to simplify the code further in the future. (Though using std::is_base_of, as suggested in the comment, is not easily possible, as it would cause errors like > include/c++/v1/type_traits:1726:59: error: incomplete type 'com::sun::star::lang::XMultiServiceFactory' used in type trait expression > : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {}; > ^ > include/c++/v1/type_traits:1731:7: note: in instantiation of template class 'std::__1::is_base_of<com::sun::star::beans::XPropertySet, com::sun::star::lang::XMultiServiceFactory>' requested here > = is_base_of<_Bp, _Dp>::value; > ^ > include/com/sun/star/uno/Reference.h:277:18: note: in instantiation of variable template specialization 'std::__1::is_base_of_v<com::sun::star::beans::XPropertySet, com::sun::star::lang::XMultiServiceFactory>' requested here > std::is_base_of_v<interface_type, derived_type> > ^ > ucbhelper/source/provider/getcomponentcontext.cxx:34:9: note: while substituting deduced template arguments into function template 'Reference' [with derived_type = com::sun::star::lang::XMultiServiceFactory] > css::uno::Reference< css::beans::XPropertySet >( > ^ > include/ucbhelper/getcomponentcontext.hxx:29:28: note: forward declaration of 'com::sun::star::lang::XMultiServiceFactory' > namespace lang { class XMultiServiceFactory; } > ^ with incomplete types.) Change-Id: I6da3395df904797cec83c1f6ab24b386527d4cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92802 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-06loplugin:nullptrStephan Bergmann
...in non-dependent templated code that Clang trunk now apparently processes more aggressively, presumably since <https://github.com/llvm/llvm-project/ commit/878a24ee244a24c39d1c57e9af2e88c621f7cce9> "Reapply 'Fix crash on switch conditions of non-integer types in templates'" Change-Id: Ia3e4bc6cfe7cea9f816e9282563a8b38e40f0cec Reviewed-on: https://gerrit.libreoffice.org/84649 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-03Adapt to C++20 deleted ostream << for sal_Unicode (aka char16_t)Stephan Bergmann
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t backward compatibility remediation", as implemented now by <https://gcc.gnu.org/ git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++: P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads that would print an integer rather than a (presumably expected) character. But in these cases printing an integer is as expected, so add explicit casts. Change-Id: I7c2f1afaa2982b284aef8af183b71466c37142c2 Reviewed-on: https://gerrit.libreoffice.org/84339 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-30loplugin:noexceptmove in AnyNoel Grandin
but we needed to make moveAnyInternals noexcept, which is fine because uno_any_construct is already noexcept Change-Id: Iddbe7666d8649cde4e638099a17484193055f549 Reviewed-on: https://gerrit.libreoffice.org/78283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-30new loplugin:noexceptmoveNoel Grandin
idea from mike kaganski look for places where we can mark move operators as noexcept, which makes some STL operations more efficient Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f Reviewed-on: https://gerrit.libreoffice.org/78251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-26Introduce Sequence::size() instead of specialization of std::sizeMike Kaganski
Change-Id: Id0889a1b51449f3812ba875919595a241f4ec56f Reviewed-on: https://gerrit.libreoffice.org/78139 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-26Generalize comphelper::concatSequences to accept other container typesMike Kaganski
... as second and following arguments. Change-Id: I1c994ec234354805bc702632878fd67a54d271d6 Reviewed-on: https://gerrit.libreoffice.org/78092 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-25cid#1448292 coverity has difficulty with css::uno::SequenceCaolán McNamara
Change-Id: I227a88c566f981ace5e45d0e217a50abbc7f3023 Reviewed-on: https://gerrit.libreoffice.org/78072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-30Fix typoAndrea Gelmini
Change-Id: I4508cc601ac3351f54b0223b15a4705d8f339d7e Reviewed-on: https://gerrit.libreoffice.org/74904 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-30Fix typoAndrea Gelmini
Change-Id: I1b43e186bd6e9de7332513e60f3be1bbe9d8ff82 Reviewed-on: https://gerrit.libreoffice.org/74901 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-30Fix typoAndrea Gelmini
Change-Id: I576da0e09f4a70361c0c5226ce80418680711f55 Reviewed-on: https://gerrit.libreoffice.org/74902 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-30Fix typoAndrea Gelmini
Change-Id: I99dba9443d703d56f0cbe38cb32c7d6963a669cf Reviewed-on: https://gerrit.libreoffice.org/74903 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-01Sequence: Fix typo in commentsMichael Weghorn
Change-Id: I8477be28693f55bea857531707286437ea13d034 Reviewed-on: https://gerrit.libreoffice.org/73296 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30implement std::hash for css::uno::Reference and rtl::ReferenceNoel Grandin
The declaration in BarChart.cxx is particularly suspicious, because it was using a < for the KeyEqual template parameter. Been there since: commit b2c3233e5f267b5d244d722a94424a3b224b3314 Date: Thu Dec 21 20:08:33 2017 +0900 chart2: suspend/resume setting rects dirty for 3D shapes comphelper::OInterfaceCompare is no longer necessary Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975 Reviewed-on: https://gerrit.libreoffice.org/71537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13fix Sequence ostream operator<< wrt. constMichael Stahl
Change-Id: I924f5d8505f2c2132c79304e19cf89a8ef466ae4 Reviewed-on: https://gerrit.libreoffice.org/67771 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-01-08add operator* to uno::ReferenceNoel Grandin
like the other smart pointer types Change-Id: I3ac1888c84fc1411cdfc3357b005afbb3b7d8bbe Reviewed-on: https://gerrit.libreoffice.org/65926 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Use constexpr ifStephan Bergmann
Change-Id: I7c34dfb5a83b14afc740772cffe407d4773b07e5 Reviewed-on: https://gerrit.libreoffice.org/64818 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where availableStephan Bergmann
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed. Also, Clang unfortunately is rather picky about the relative order of SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl). Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3 Reviewed-on: https://gerrit.libreoffice.org/60274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>