summaryrefslogtreecommitdiffstats
path: root/chart2
Commit message (Collapse)AuthorAgeFilesLines
* map->unordered_map in PropertyMapperNoel Grandin2021-12-061-3/+3
| | | | | | | | | a little bit faster Change-Id: I11e756e65a76fedeca2525edf37a04b34ac6aeda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cid#1494595,1494597: Silence UNCAUGHT_EXCEPTStephan Bergmann2021-12-061-0/+1
| | | | | | | | | | | | | | | | | | | ...after aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 "Stop swallowing exceptions in ~ScopeGuard" had dropped the catch blocks from ~ScopeGuard to make it usable in Library_salhelper in 0c1c300ed7ce168755ae945822eb7a1c610cfa25 "Rather use ScopeGuard to prevent catch and rethrow". But using the original suppress_fun_call_w_exception, which used css::uno::Exception, would have caused the same circular-dependency issue again that aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 had solved, so drop the use of css::uno::Exception (and SAL_WARN, which triggered a number of missing #include <sal/log.hxx>) also from suppress_fun_call_w_exception. After all, that was __COVERITY__-only code that wasn't meant to be actually run, so it shouldn't matter if we just catch everything and silently terminate. Change-Id: If28a214709e4636e1c23a49f2d95d87c91492f14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126404 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* speed up property access in chartsNoel Grandin2021-12-0562-124/+160
| | | | | | | | | | uno::Any copy and assign is fairly hot, so try and do those operations in one step Change-Id: I110566ba98788d5a658d229433de291c8cdf146c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use more OInterfaceContainerHelper3 in chart2Noel Grandin2021-11-2710-20/+20
| | | | | | | Change-Id: Icff667a11f1798e29c732c13b5739a4f7b581999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* O[U]String::replaceAt overloads that take string_viewNoel Grandin2021-11-232-2/+2
| | | | | | | | | | which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Use less DegreeN::get()Mike Kaganski2021-11-222-7/+2
| | | | | | | Change-Id: I97b8d6282c72307cc29a913af221d283523f2fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125653 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversionsMike Kaganski2021-11-192-3/+3
| | | | | | | Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
* Use M_PI* instead of F_PI*Mike Kaganski2021-11-197-97/+97
| | | | | | | Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* remove some unused definesNoel Grandin2021-11-181-3/+0
| | | | | | | Change-Id: I4424329c1b803ccdd901f1428d332a6c56652100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125479 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:stringliteraldefine in chart2Noel Grandin2021-11-186-185/+199
| | | | | | | | | | and drop namespace declarations that were surrounding the #define - namespace decls have no affect on #defines Change-Id: Ic66ba7837ba3a5c48a0cf414af30985c480d73af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* chart2: disambiguate ShiftedCategoryPositionMiklos Vajna2021-11-166-15/+15
| | | | | | | | | | | There are two of these: one sal_Bool in a .idl file and a bool in a .hxx file. They need to be printed differently with SAL_DEBUG(), so rename the C++ one to avoid confusion. Change-Id: I0f79908a7b74742410813166370cb8ba3017e727 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125256 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Resolves: tdf#145663 nL is the index of the light to set to the modelCaolán McNamara2021-11-151-4/+4
| | | | | | | | | | don't reuse the variable in another loop before its finally set to the model Change-Id: I336d8c0f3ce612448dd639e939e65fb434da1513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125208 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* add a rule to enforce always-show-image of True if an image is usedCaolán McNamara2021-11-154-0/+7
| | | | | | | | | | | If not set, then gtk3 will show the image if there is no text, but only the text if there's an image. For simplicity sake just enforce it as true if an image is referenced. Change-Id: Id4bb9140ba83e7e07e0d8ec5e3c29aece49b9087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125200 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* Use more o3tl::convert in scMike Kaganski2021-11-123-6/+6
| | | | | | | Change-Id: I624b6c570eff8b6cdc83ffcb2d0dbadf848715b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120330 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#136111 fix scaling problem on chart driven by a macroAndras Timar2021-11-103-2/+21
| | | | | | | | | | | Change-Id: I9a55bcfceb9259f0d5dc944c00a34b3e4a891e0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124940 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 0644f44daef7caa8a246221d762fbc0f6af3672c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124864 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
* rtl::Static to thread-safe staticNoel Grandin2021-11-093-74/+36
| | | | | | | Change-Id: I35e2a252708228bdbeaee557ef35763c64608653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use more OUStringLiteral in MediaDescriptorNoel Grandin2021-11-081-3/+3
| | | | | | | Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* forward decls go after #includeNoel Grandin2021-11-072-8/+4
| | | | | | | Change-Id: I54c33508639044092356eed5144720261b4f65db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* libstdc++ bug 103022 is fixed in GCC 12Stephan Bergmann2021-11-041-0/+2
| | | | | | | | | | | | (<https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html> states that _GLIBCXX_RELEASE "first appeared in the GCC 7.1 release and is not defined for GCC 6.x or older releases", leaving it a bit unclear what the status is for our GCC 7.0.0 baseline, so play it safe and assume it can be undefined) Change-Id: Iae10060bdab88e2e6df3954c2b6806534a761b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124675 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Introduce 'scale' to Point/Size/Rectangle, to simplify anisotropic scalingMike Kaganski2021-11-031-7/+3
| | | | | | | Change-Id: I12c25838e8eec8d05e43b593790847c626edde31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124638 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#114441 Convert use of sal_uLong to sal_uInt32, intNatalia Gavrilova2021-11-032-5/+5
| | | | | | | | | | * Changed moduldlg.hxx, moduldl2.cxx * Changed res_DataLabel.hxx, res_DataLabel.cxx Change-Id: I845c9fb7b60b5a8f898aaac433c0b5e520c58678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123360 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
* Drop TWIPS_PER_PIXEL and use o3tl::convertMike Kaganski2021-11-031-16/+25
| | | | | | | Change-Id: I8ee3fddaccf6809c95319db1da9a1d2897d00c25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124626 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* add a comment referencing gcc#103022Caolán McNamara2021-11-011-0/+1
| | | | | | | Change-Id: Iccb7d5dccdd77563244e2262834274a548b369bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124544 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* crashtesting: assert on conversion of fdo67521-1.odg to pdfCaolán McNamara2021-10-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | #4 0x00007fffcb03c5d9 in std::__replacement_assert(char const*, int, char const*, char const*) (__file=0x7fffcb4fbb03 "/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/valarray", __line=586, __function=0x7fffcb4fbd8c "const _Tp &std::valarray<double>::operator[](std::size_t) const [_Tp = double]", __condition=0x7fffcb4fbb95 "__i < this->size()") at /usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux/bits/c++config.h:2660 #5 0x00007fffcb3b4b54 in std::valarray<double>::operator[](unsigned long) const (this=0x7ffffffefea8, __i=0) at /usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/valarray:586 #6 0x00007fffcb3b4a79 in std::begin<double>(std::valarray<double> const&) (__va=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/valarray:1225 #7 0x00007fffcb3b49ac in comphelper::containerToSequence<double, std::valarray<double> >(std::valarray<double> const&) (i_Container=...) at include/comphelper/sequence.hxx:192 #8 0x00007fffcb3b4963 in comphelper::containerToSequence<std::valarray<double> >(std::valarray<double> const&) (i_Container=...) at include/comphelper/sequence.hxx:200 #9 0x00007fffcb3aaa83 in chart::(anonymous namespace)::lcl_ValarrayToSequence<double>(std::valarray<double> const&) (rValarray=...) at chart2/source/tools/InternalData.cxx:72 where begin() is implemented with return std::__addressof(__va[0]) and that operator[] (for arg __i) then has __glibcxx_requires_subscript(__i) which asserts if there is no index __i which is the case for 0 when the valarray is empty Change-Id: Idc2c185cbfb3806764c3071ecee302dc823b4660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124529 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* uniformly allow focus into GtkToolbarCaolán McNamara2021-10-311-1/+1
| | | | | | | Change-Id: I110daf882d9196cf7552e43a157ba4ae73fd670b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* gtk[3 vs 4]: remove can-focus from GtkToolButtonCaolán McNamara2021-10-311-9/+0
| | | | | | | | | | | | so tab-cycling inside sidebar panel toolbars works as wanted It needs to be false for gtk3 and true for gtk4, leaving it unspecified gets a desired working default. Change-Id: I34869d5dcffc814f62ec2b717108f90c395a067b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* Prepare for removal of non-const operator[] from Sequence in chart2Mike Kaganski2021-10-295-53/+51
| | | | | | | | | | | The bits missing from 5b0ae3b59cd2cccfb72d991657366eb2a69bff49, where explicit use of sal_Bool* was needed instead of 'auto', to workaround loplugin:implicitboolconversion warnings. Change-Id: I32ef417d46ceea38fbcebae053e288222179818c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124428 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Prepare for removal of non-const operator[] from Sequence in chart2Mike Kaganski2021-10-2973-546/+555
| | | | | | | Change-Id: I71e0b458c4dd2a85e36a485e3efa72b1077b0e54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124346 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#141908: CppUnittests: replace usage of sal_Int32 with colors4k5h1t2021-10-271-4/+4
| | | | | | | Change-Id: Ic87c8e57a6b530a742a6bf3916c7a944e1bed2b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121306 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Drop ContainerHelper::vectorToSequence and use comphelper::containerToSequenceMike Kaganski2021-10-261-1/+3
| | | | | | | Change-Id: I987c56feab147cdbeb4ad58bd5ebb23dce6dbbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124215 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Simplify vector initialization in chart2Julien Nabet2021-10-151-2/+2
| | | | | | | Change-Id: I26dd2e0480bb60719f4f1b6dcc30cb28bb35ee09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123660 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Remove non-const Sequence::begin()/end() in internal codeMike Kaganski2021-10-155-8/+8
| | | | | | | | | | | | | | | | | | ... 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>
* Avoid COW overhead using css::uno::SequenceMike Kaganski2021-10-1410-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann2021-10-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:moveparam in chart2Noel Grandin2021-10-1126-79/+79
| | | | | | | Change-Id: I6a47abf80f0f45bbb55bc9e0fe817f3c3650aff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123351 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use SfxItemSetFixed in swNoel Grandin2021-10-102-8/+5
| | | | | | | Change-Id: I69e188d7599b7fc439f613cec0a0967ccb748b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Typo: *adress* -> *address* (except from not translated German parts)Julien Nabet2021-10-091-18/+18
| | | | | | | Change-Id: I62e12aed5bc67119433c39ff333f69b79944dca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123318 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* sidebar: update chart panel on checkbox changeSzymon Kłos2021-10-061-0/+2
| | | | | | | | | | | This fixes not working checkboxes for "title" and "subtitle" on mobile Change-Id: I126bb020f669c8c4a34687f750a538513cd06eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122876 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123132 Tested-by: Jenkins
* A more lightweight O[U]StringConcatenationStephan Bergmann2021-10-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | | ...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:constparams improve handling of pointer paramsNoel Grandin2021-09-302-2/+2
| | | | | | | Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* gives names to all the Idles and TasksNoel Grandin2021-09-285-3/+6
| | | | | | | | | enforce it by making the constructor parameter non-default. Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* vcl: rename OutDevState to StackChris Sherlock2021-09-282-6/+24
| | | | | | | | | | | | | I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* Typo: *Transparanc*->*Transparenc*Julien Nabet2021-09-261-3/+3
| | | | | | | Change-Id: Ia9325a397b89c09dac4b6c76e4a0521bbdbf5db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122655 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* no need to allocate this SfxItemSet on the heapNoel Grandin2021-09-243-10/+10
| | | | | | | Change-Id: I4bca43340ab530b8d12b91968a7e7184b894776d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:stringviewparamStephan Bergmann2021-09-231-3/+4
| | | | | | | Change-Id: I3fc029e2691026bcd315a807e90290d763146648 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122526 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák2021-09-201-1/+1
| | | | | | | | | | | | | Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
* loplugin:constvarsNoel Grandin2021-09-152-3/+3
| | | | | | | Change-Id: I9b35d6333afa6b305bf73fc55a7e60c8365674e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5Mike Kaganski2021-09-151-5/+3
| | | | | | | | | | | | | | | | | - Revise uses of getSomething to use getFromUnoTunnel Where that is impossible, use getSomething_cast to unify casting, and minimize number of places doing low-level transformations. The change keeps the existing tunnel references that last for the duration of the pointers' life, because sometimes destroying such reference may destroy the pointed object, and result in use after free. Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski2021-09-151-6/+1
| | | | | | | | | | | | | | | | | | - Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski2021-09-1513-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>