summaryrefslogtreecommitdiff
path: root/comphelper/source
AgeCommit message (Collapse)Author
4 dayscid#1638656 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1638657 COPY_INSTEAD_OF_MOVE Change-Id: I866cb3f7550260c0dd14e14beb94144348665226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180134 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
7 daystdf#42982 Improve Error Messages with RuntimeException in UNO APIMohamed_Ali
Change-Id: Ib1b84374ae87d2565bf4557cc4bc6153c12978cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177150 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
8 dayscool#10782 vcl lok: avoid changing the current view during YieldMiklos Vajna
Commit 520cc546e2940bdfbc45eab1e569bb06bab17a9c (cool#10782 sfx2 lok: fix bad view id on PDF export, 2024-12-20) provided a specific fix for one case where spinning the main loop can result in callbacks being emitted on the wrong view. Hunting down all the SfxViewShell::Current() calls and auditing them if they are problematic in practice is a large task, so it's desirable to handle this problem in a more generic way. Fix the problem by pushing/popping the current LOK view in Application::Reschedule(), which is what e.g. the framework/ status bar code uses during PDF export. This keeps the original problem fixed but is more generic. This requires storing function pointers in comphelper/, since normally vcl/ code can't call SfxLokHelper, since sfx2/ already depends on vcl/. The fix can be tested by reverting the original fix: git show 520cc546e2940bdfbc45eab1e569bb06bab17a9c -- sfx2|git apply -R and then running the testcase: make -C sw -sr CppunitTest_sw_tiledrendering CPPUNIT_TEST_NAME=testPDFExportViewSwitch which now passes even if the sfx2-level fix is not there. Keep that specific fix, though: the less time we assume SfxViewShell::Current() returns the correct view, the better. Change-Id: Ic1811ff1e67f73fa5066af775d31589136b8502a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179993 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
9 daysSimplify a bitMike Kaganski
WinLaunchChild takes the same kind of argv as execv, terminated by a null pointer; so no need to pass argc. Change-Id: I280c8da0c613a7d0d1a208831a87f0e4648719f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179952 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
9 daysSimplify using designated initializersMike Kaganski
Change-Id: I73d666a0aa4a41e8e73cb701161be1da6fd59d0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179942 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-12-12a11y: Move OCommonAccessibleComponent::m_aCreator to subclassMichael Weghorn
Move this member holding a weak reference to the XAccessible that created the context to the OAccessibleControlContext subclass, which is the only one making use of it now after previous commit Change-Id: I29fb7cd42512a02fc1cc56835bb83f847e9ec0fd Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Dec 12 11:08:54 2024 +0100 tdf#164294 a11y: Don't rely on "creator" to determine child index This also removes the need to call OCommonAccessibleComponent::lateInit in those subclasses that did so previously. Change-Id: I3edd14810feb6c884b4e67db1f76b40ae003dffa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178355 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-12tdf#164294 a11y: Don't rely on "creator" to determine child indexMichael Weghorn
In OCommonAccessibleComponent::getAccessibleIndexInParent, no longer rely on OCommonAccessibleComponent::m_aCreator to have been set to the "creator" (i.e. the XAccessible whose XAccessible::getAccessibleContext() created this object) in order to determine the index of the object in its parent. Instead, call XAccessible::getAccessibleContext on the parent's child XAccessible objects and compare that to `this`. At least for SvxPixelCtlAccessible (and most likely other child classes), OCommonAccessibleComponent::m_aCreator isn't set (by a call to OCommonAccessibleComponent::lateInit), so the logic would fail, and an incorrect index of -1 was returned. Simplify the logic and no longer depend on OCommonAccessibleComponent::m_aCreator in that method. This also prepares for further decoupling VCLXAccessibleComponent from the VCLXWindow toolkit/UNO class. (The VCLXAccessibleComponent ctor currently calls OCommonAccessibleComponent::lateInit with its VCLXWindow, but overrides VCLXAccessibleComponent::getAccessibleIndexInParent without making use of the "creator" there.) Comments suggest that the previous logic was there to avoid calling XAccessible::getAccessibleContext for performance reasons. If that's a concern for a particular subclass, overriding OCommonAccessibleComponent::getAccessibleIndexInParent in that subclass (and making use of whatever internal details help to efficiently implement the method) seems like a better and more reliable solution to me. Change-Id: I29fb7cd42512a02fc1cc56835bb83f847e9ec0fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178354 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-12a11y: Simplify OCommonAccessibleComponent::getAccessibleIndexInParentMichael Weghorn
Just return the child index right away instead of assigning to a local variable first if the currently inspected child is the one. Change-Id: Ie5620498c34644fcf5523ce3eec6c71cb7486d71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178325 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-12a11y: Flatten OCommonAccessibleComponent::getAccessibleIndexInParentMichael Weghorn
Return early if `xParentContext` or `xCreator` are empty. Change-Id: I4b0aa1679658cf6dfb47c1c0bc21ca7a0d2e9c24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178324 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-08Drop some OTypeCollection usesMike Kaganski
Change-Id: Ia1467c44998961f5e0820fb4d0621a4189d49d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178095 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-07Simplify OPropertyContainer::getBaseTypesMike Kaganski
Change-Id: I438d510e05329163dabdc8ed42d3a97d49e19ef9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178055 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-07Use std::initializer_list, C-style array instead of more expensive SequenceMike Kaganski
Change-Id: Ibb268268926cc91f595f19026f6cee4b5a74a8bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178038 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-30cid#1607542 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1606986 COPY_INSTEAD_OF_MOVE cid#1557969 COPY_INSTEAD_OF_MOVE cid#1557837 COPY_INSTEAD_OF_MOVE cid#1557772 COPY_INSTEAD_OF_MOVE cid#1557735 COPY_INSTEAD_OF_MOVE cid#1557672 COPY_INSTEAD_OF_MOVE cid#1557664 COPY_INSTEAD_OF_MOVE cid#1557650 COPY_INSTEAD_OF_MOVE cid#1557642 COPY_INSTEAD_OF_MOVE cid#1557639 COPY_INSTEAD_OF_MOVE cid#1557628 COPY_INSTEAD_OF_MOVE cid#1557623 COPY_INSTEAD_OF_MOVE cid#1557581 COPY_INSTEAD_OF_MOVE cid#1557489 COPY_INSTEAD_OF_MOVE cid#1557473 COPY_INSTEAD_OF_MOVE cid#1557317 COPY_INSTEAD_OF_MOVE cid#1557261 COPY_INSTEAD_OF_MOVE cid#1557146 COPY_INSTEAD_OF_MOVE cid#1557135 COPY_INSTEAD_OF_MOVE cid#1557134 COPY_INSTEAD_OF_MOVE cid#1557079 COPY_INSTEAD_OF_MOVE cid#1557063 COPY_INSTEAD_OF_MOVE cid#1557052 COPY_INSTEAD_OF_MOVE cid#1556982 COPY_INSTEAD_OF_MOVE cid#1556977 COPY_INSTEAD_OF_MOVE cid#1556950 COPY_INSTEAD_OF_MOVE cid#1556943 COPY_INSTEAD_OF_MOVE cid#1556804 COPY_INSTEAD_OF_MOVE cid#1556736 COPY_INSTEAD_OF_MOVE cid#1556658 COPY_INSTEAD_OF_MOVE cid#1556621 COPY_INSTEAD_OF_MOVE cid#1556590 COPY_INSTEAD_OF_MOVE cid#1556579 COPY_INSTEAD_OF_MOVE cid#1556534 COPY_INSTEAD_OF_MOVE cid#1556524 COPY_INSTEAD_OF_MOVE cid#1556478 COPY_INSTEAD_OF_MOVE cid#1556467 COPY_INSTEAD_OF_MOVE cid#1556422 COPY_INSTEAD_OF_MOVE cid#1556314 COPY_INSTEAD_OF_MOVE cid#1556309 COPY_INSTEAD_OF_MOVE cid#1556258 COPY_INSTEAD_OF_MOVE cid#1556143 COPY_INSTEAD_OF_MOVE cid#1556119 COPY_INSTEAD_OF_MOVE cid#1556101 COPY_INSTEAD_OF_MOVE cid#1556097 COPY_INSTEAD_OF_MOVE cid#1556039 COPY_INSTEAD_OF_MOVE cid#1555966 COPY_INSTEAD_OF_MOVE cid#1555948 COPY_INSTEAD_OF_MOVE cid#1555915 COPY_INSTEAD_OF_MOVE cid#1555836 COPY_INSTEAD_OF_MOVE cid#1555748 COPY_INSTEAD_OF_MOVE cid#1555644 COPY_INSTEAD_OF_MOVE cid#1555582 COPY_INSTEAD_OF_MOVE cid#1555478 COPY_INSTEAD_OF_MOVE cid#1555475 COPY_INSTEAD_OF_MOVE cid#1555409 COPY_INSTEAD_OF_MOVE cid#1555372 COPY_INSTEAD_OF_MOVE cid#1555334 COPY_INSTEAD_OF_MOVE cid#1555330 COPY_INSTEAD_OF_MOVE cid#1555310 COPY_INSTEAD_OF_MOVE cid#1555257 COPY_INSTEAD_OF_MOVE cid#1555247 COPY_INSTEAD_OF_MOVE cid#1555147 COPY_INSTEAD_OF_MOVE cid#1555120 COPY_INSTEAD_OF_MOVE cid#1555059 COPY_INSTEAD_OF_MOVE cid#1555016 COPY_INSTEAD_OF_MOVE cid#1554880 COPY_INSTEAD_OF_MOVE cid#1554824 COPY_INSTEAD_OF_MOVE cid#1554808 COPY_INSTEAD_OF_MOVE cid#1546189 COPY_INSTEAD_OF_MOVE Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-28comphelper: put each Crypto impl. in own file - minimize ifdefsTomaž Vajngerl
This puts NSS and OpenSSL implementations into own classes and adds an interface to make this possible. The implementation is now determined in Library_comphelper. Change-Id: I4918f19bca0adfd2f9180fb418d1bd57bb83982d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177383 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-26comphelper: add support for AES256_ECB encryptionTomaž Vajngerl
Change-Id: I5e8ab2a2be6ea9cd5d1ed93b70780f1f6153f3fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176892 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-19improve loplugin passparamsbyrefNoel Grandin
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-14Give DocumentEventHolder (aka EventHolder<DocumentEvent>) a key functionStephan Bergmann
...that is not inline, so that RTTI and vtable are not emitted for each dynamic library individually. (Where they would be internal on macOS, which could break optimized uses of dynamic_cast for that final class just checking vtable pointer identity, as could happen for the dynamic_cast at dbaccess/source/core/dataaccess/documenteventnotifier.cxx:232:51, > 232 | const DocumentEventHolder& rEventHolder = dynamic_cast< const DocumentEventHolder& >( _rEvent ); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And with the extern explicit template instantiation, EventHolder needs to be SAL_DLLPUBLIC_TEMPLATE instead of just SAL_DLLPUBLIC_RTTI now, so that Library_comphelper will export the DocumentEventHolder ctors and DocumentEventHolder::getEventObject.) (This would ideally have been caught by an upcoming improvement of loplugin:dyncastvisibility, but might be complicated to check there for template instantiations.) Change-Id: I1e6280b185535968a870fbfadaff6238d38858e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176547 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-11-10com::sun::star -> cssMike Kaganski
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08loplugin:reftotemp in codemaker..connectivityNoel Grandin
Change-Id: I9da2976410f7c4da8ab0d85150fc87f2b3df9e0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-08no need to take a copy of the getProcessComponentContext return valueNoel Grandin
we can just take a "const &". (found by running clang-tidy with the performance-unnecessary-copy-initialization warning) Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-11-08Simplify a bitMike Kaganski
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-06tdf#163486: PVS: Redundant code.Bogdan Buzea
V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 212, 216. Change-Id: Id596419cc3134355904b4ca93a44c017ffa6635c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06cid#1556442 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1607753 COPY_INSTEAD_OF_MOVE cid#1554790 COPY_INSTEAD_OF_MOVE cid#1556463 COPY_INSTEAD_OF_MOVE cid#1554838 COPY_INSTEAD_OF_MOVE cid#1556231 COPY_INSTEAD_OF_MOVE cid#1556878 COPY_INSTEAD_OF_MOVE cid#1554913 COPY_INSTEAD_OF_MOVE cid#1558064 COPY_INSTEAD_OF_MOVE cid#1557043 COPY_INSTEAD_OF_MOVE cid#1556985 COPY_INSTEAD_OF_MOVE cid#1556766 COPY_INSTEAD_OF_MOVE cid#1557351 COPY_INSTEAD_OF_MOVE cid#1554863 COPY_INSTEAD_OF_MOVE cid#1556764 COPY_INSTEAD_OF_MOVE cid#1556279 COPY_INSTEAD_OF_MOVE cid#1555970 COPY_INSTEAD_OF_MOVE cid#1556942 COPY_INSTEAD_OF_MOVE cid#1557964 COPY_INSTEAD_OF_MOVE cid#1555166 COPY_INSTEAD_OF_MOVE cid#1556496 COPY_INSTEAD_OF_MOVE cid#1557175 COPY_INSTEAD_OF_MOVE cid#1558054 COPY_INSTEAD_OF_MOVE cid#1557392 COPY_INSTEAD_OF_MOVE cid#1557850 COPY_INSTEAD_OF_MOVE cid#1555118 COPY_INSTEAD_OF_MOVE cid#1557131 COPY_INSTEAD_OF_MOVE cid#1556614 COPY_INSTEAD_OF_MOVE cid#1609650 COPY_INSTEAD_OF_MOVE cid#1555114 COPY_INSTEAD_OF_MOVE cid#1555241 COPY_INSTEAD_OF_MOVE cid#1555442 COPY_INSTEAD_OF_MOVE cid#1556473 COPY_INSTEAD_OF_MOVE cid#1557654 COPY_INSTEAD_OF_MOVE cid#1554689 COPY_INSTEAD_OF_MOVE cid#1556316 COPY_INSTEAD_OF_MOVE cid#1557929 COPY_INSTEAD_OF_MOVE cid#1554807 COPY_INSTEAD_OF_MOVE cid#1554858 COPY_INSTEAD_OF_MOVE cid#1555103 COPY_INSTEAD_OF_MOVE cid#1555517 COPY_INSTEAD_OF_MOVE cid#1556424 COPY_INSTEAD_OF_MOVE cid#1557252 COPY_INSTEAD_OF_MOVE cid#1557566 COPY_INSTEAD_OF_MOVE cid#1608020 COPY_INSTEAD_OF_MOVE cid#1557742 COPY_INSTEAD_OF_MOVE cid#1555884 COPY_INSTEAD_OF_MOVE cid#1554809 COPY_INSTEAD_OF_MOVE cid#1555336 COPY_INSTEAD_OF_MOVE cid#1555173 COPY_INSTEAD_OF_MOVE cid#1556067 COPY_INSTEAD_OF_MOVE cid#1557040 COPY_INSTEAD_OF_MOVE cid#1556235 COPY_INSTEAD_OF_MOVE cid#1557366 COPY_INSTEAD_OF_MOVE cid#1555910 COPY_INSTEAD_OF_MOVE cid#1556716 COPY_INSTEAD_OF_MOVE cid#1558022 COPY_INSTEAD_OF_MOVE cid#1555769 COPY_INSTEAD_OF_MOVE cid#1555940 COPY_INSTEAD_OF_MOVE cid#1557077 COPY_INSTEAD_OF_MOVE cid#1555270 COPY_INSTEAD_OF_MOVE cid#1555660 COPY_INSTEAD_OF_MOVE cid#1556302 COPY_INSTEAD_OF_MOVE cid#1555678 COPY_INSTEAD_OF_MOVE cid#1556538 COPY_INSTEAD_OF_MOVE cid#1557689 COPY_INSTEAD_OF_MOVE cid#1555009 COPY_INSTEAD_OF_MOVE cid#1555433 COPY_INSTEAD_OF_MOVE cid#1555671 COPY_INSTEAD_OF_MOVE cid#1555255 COPY_INSTEAD_OF_MOVE cid#1557681 COPY_INSTEAD_OF_MOVE cid#1557512 COPY_INSTEAD_OF_MOVE cid#1554958 COPY_INSTEAD_OF_MOVE cid#1555758 COPY_INSTEAD_OF_MOVE cid#1555597 COPY_INSTEAD_OF_MOVE cid#1558040 COPY_INSTEAD_OF_MOVE cid#1556476 COPY_INSTEAD_OF_MOVE cid#1557646 COPY_INSTEAD_OF_MOVE cid#1557950 COPY_INSTEAD_OF_MOVE cid#1557019 COPY_INSTEAD_OF_MOVE cid#1557885 COPY_INSTEAD_OF_MOVE cid#1556402 COPY_INSTEAD_OF_MOVE cid#1557906 COPY_INSTEAD_OF_MOVE cid#1556619 COPY_INSTEAD_OF_MOVE cid#1554683 COPY_INSTEAD_OF_MOVE cid#1556549 COPY_INSTEAD_OF_MOVE cid#1554747 COPY_INSTEAD_OF_MOVE cid#1554929 COPY_INSTEAD_OF_MOVE cid#1555362 COPY_INSTEAD_OF_MOVE cid#1557053 COPY_INSTEAD_OF_MOVE cid#1557891 COPY_INSTEAD_OF_MOVE cid#1555043 COPY_INSTEAD_OF_MOVE cid#1555107 COPY_INSTEAD_OF_MOVE cid#1557203 COPY_INSTEAD_OF_MOVE cid#1556728 COPY_INSTEAD_OF_MOVE cid#1557773 COPY_INSTEAD_OF_MOVE cid#1556845 COPY_INSTEAD_OF_MOVE Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-11-06loplugin:passstuffbyref in comphelperNoel Grandin
Change-Id: I2c94b6e0bbdce4f4236815df8c4841327a33939e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176053 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-05Fix USE_TLS_OPENSSL buildsStephan Bergmann
...after c8cba8ae30baef6feca3b0613366d28df4a5e568 "move CryptTools from oox to comphelper so we can reuse it" Change-Id: Id899c9fac9f18833afd64f18d81a7ad50916872e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176041 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-11-04move CryptTools from oox to comphelper so we can reuse itTomaž Vajngerl
Also move the relevant tests and clean-up the names a bit to make it mroe consistent. Change-Id: I929ef9c13b954fd6a506471231d1bc41e4ef9980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176027 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04comphelper: move tostring to hash.hxx so it can be reusedTomaž Vajngerl
tostring to convert a vector of bytes into a hex string is useful in other tests and implementation, so move it into common hash.hxx Change-Id: Iebc71919c6209222eb01b78c307420afddc8caca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176020 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04feat(json): Allow serializing anySkyler Grey
Previously, as far as I can tell, there was no way to send a Size in a .uno command (as would be needed in, say, '.uno:InsertAVMedia'). We do, however, already have a way to send an `[]any`, and we can use a similar method to allow sending arbitrary types with `any` rather than `[]any`. To use this, the type you really want to send has to be wrapped in any, so for example... { type: "any", value: { type: "com.sun.star.awt.Size", value: { Width: { type: "long", value: 0, }, Height: { type: "long", value: 0, } } } } Change-Id: Ic33594dee955d475d81733adb21950c0458435e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit cccbf8608f3b76651993bc8576c672367c228fa2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175982 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-11-02No need to use SAL_THROW_EXTERN_C macro in CXXMike Kaganski
Change-Id: I6eb9f0431a9402479a2d90d5b6f68b611d52a9f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-26cid#1556875 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1556891 COPY_INSTEAD_OF_MOVE cid#1556903 COPY_INSTEAD_OF_MOVE cid#1556917 COPY_INSTEAD_OF_MOVE cid#1556925 COPY_INSTEAD_OF_MOVE cid#1557021 COPY_INSTEAD_OF_MOVE cid#1557092 COPY_INSTEAD_OF_MOVE cid#1557119 COPY_INSTEAD_OF_MOVE cid#1557218 COPY_INSTEAD_OF_MOVE cid#1557342 COPY_INSTEAD_OF_MOVE cid#1557727 COPY_INSTEAD_OF_MOVE cid#1557800 COPY_INSTEAD_OF_MOVE cid#1557821 COPY_INSTEAD_OF_MOVE cid#1557830 COPY_INSTEAD_OF_MOVE cid#1557677 COPY_INSTEAD_OF_MOVE cid#1557674 COPY_INSTEAD_OF_MOVE Change-Id: I20dab0c49a17c28b4feaf97440a36d4962310b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175686 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-24assert on invalid param in OPropertyContainerHelper::getFastPropertyValueNoel Grandin
which flushes out a bug in OPropertySetHelper::getPropertyValueImp Change-Id: I5d3928e55eb9f019629896ad6478011520318fd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22tdf#163486: PVS: Identical blocksBogdan Buzea
V760 Two identical blocks of text were found. The second block begins from line 325. Change-Id: I5854337d4d1c0d946b096804b536433c48f0696f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175381 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-22cid#1555259 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555264 COPY_INSTEAD_OF_MOVE cid#1555280 COPY_INSTEAD_OF_MOVE cid#1555303 COPY_INSTEAD_OF_MOVE cid#1555313 COPY_INSTEAD_OF_MOVE cid#1555314 COPY_INSTEAD_OF_MOVE cid#1555323 COPY_INSTEAD_OF_MOVE cid#1555333 COPY_INSTEAD_OF_MOVE cid#1555338 COPY_INSTEAD_OF_MOVE cid#1555349 COPY_INSTEAD_OF_MOVE cid#1555364 COPY_INSTEAD_OF_MOVE cid#1555379 COPY_INSTEAD_OF_MOVE cid#1555398 COPY_INSTEAD_OF_MOVE cid#1555410 COPY_INSTEAD_OF_MOVE cid#1555411 COPY_INSTEAD_OF_MOVE cid#1555416 COPY_INSTEAD_OF_MOVE cid#1555429 COPY_INSTEAD_OF_MOVE cid#1555434 COPY_INSTEAD_OF_MOVE cid#1555441 COPY_INSTEAD_OF_MOVE cid#1555446 COPY_INSTEAD_OF_MOVE cid#1555480 COPY_INSTEAD_OF_MOVE cid#1555490 COPY_INSTEAD_OF_MOVE cid#1555524 COPY_INSTEAD_OF_MOVE cid#1555527 COPY_INSTEAD_OF_MOVE cid#1555531 COPY_INSTEAD_OF_MOVE cid#1555578 COPY_INSTEAD_OF_MOVE cid#1555581 COPY_INSTEAD_OF_MOVE cid#1555591 COPY_INSTEAD_OF_MOVE cid#1555614 COPY_INSTEAD_OF_MOVE cid#1555619 COPY_INSTEAD_OF_MOVE cid#1555633 COPY_INSTEAD_OF_MOVE cid#1555654 COPY_INSTEAD_OF_MOVE cid#1555707 COPY_INSTEAD_OF_MOVE cid#1555712 COPY_INSTEAD_OF_MOVE cid#1555746 COPY_INSTEAD_OF_MOVE cid#1555763 COPY_INSTEAD_OF_MOVE Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-21Optimize JsonToPropertyValues a bitMike Kaganski
1. Make it take string view: helps to avoid extra string allocation e.g. in desktop::jsonToPropertyValuesVector, and will help more, when C++26 stringstream ctor taking string view is available. 2. Factor out a function taking boost::property_tree::ptree, making implementation simpler for [][]com.sun.star.beans.PropertyValue and []com.sun.star.beans.PropertyValue, without writing a child node to a JSON string, and parsing it again. Change-Id: I16ac2641633ea67a7c9c054c9df09a790500e6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175361 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-18tdf#158237 comphelper: Use C++20 contains() instead of find() and end()Sakura286
Change-Id: I3fc233ffc4c57b02e605306cb9bf3903a88401a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-18tdf#163486: PVS: recurring checkXisco Fauli
V571: Recurring check. The 'if (m_pListener)' condition was already verified in line 104. After 4d07ee9a54e0b929ab116b08227e20f4a9c330e9 "loplugin:virtualdead" Change-Id: I12e90376211f3625cdda482909a96d43fe55cc3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175096 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-01Fix typoAndrea Gelmini
Change-Id: Ie611105ff1e487657b6aacec6c0c22af095e2c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174355 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-01create method for doing the "dispose-on-destruct"Noel Grandin
which is (a) a little tricky and (b) needs to be on the base class to get the locking just right Change-Id: I425d4747e7e0ca0741fded9a6a70f6fa9995e102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01loplugin:unusedmethodsNoel Grandin
Change-Id: I3897ccb3349874672b778835b9c15642cb1a14f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-18cid#1555574 drop unused copy ctorCaolán McNamara
Change-Id: Ibaad87cc2f481f3bc7f726ecde0c466a563a96a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173588 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-12use more concrete UNO classes in comphelperNoel Grandin
Change-Id: I1a81d2264a450c23a5196f980e91a686f69edca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-10use more concrete UNO type in comphelperNoel Grandin
Change-Id: I290b3ca15d9fc50e5c272c8e6a6634811a595d20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173134 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-09tsan:lock-order-inversion in formsNoel Grandin
================== WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=14614) Cycle in lock order graph: M0 (0x720c004ac190) => M1 (0x720c004a8200) => M0 Mutex M1 acquired here while holding mutex M0 in thread T43: 2 osl::Mutex::acquire() /home/noel/libo-tsan/include/osl/mutex.hxx:63 (libuno_cppuhelpergcc3.so.3+0x8fdd9) 3 osl::Guard<osl::Mutex>::Guard(osl::Mutex&) /home/noel/libo-tsan/include/osl/mutex.hxx:144 (libuno_cppuhelpergcc3.so.3+0x8fdd9) 4 cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper, com::sun::star::uno::Type>::addListener(com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) /home/noel/libo-tsan/include/cppuhelper/interfacecontainer.h:468 (libuno_cppuhelpergcc3.so.3+0x8fdd9) 5 cppu::OPropertySetHelper::addPropertiesChangeListener(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertiesChangeListener> const&) /home/noel/libo-tsan/cppuhelper/source/propshlp.cxx:912 (libuno_cppuhelpergcc3.so.3+0x8fdd9) 6 comphelper::OPropertySetAggregationHelper::addPropertiesChangeListener(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertiesChangeListener> const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:495 (libcomphelper.so+0x1a1865) 7 comphelper::OPropertySetAggregationHelper::startListening() /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:466 (libcomphelper.so+0x1a1416) ^^^ Mutex M0 previously acquired by the same thread here: 8 comphelper::OPropertySetAggregationHelper::addPropertyChangeListener(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener> const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:488 (libcomphelper.so+0x1a181a) 9 non-virtual thunk to comphelper::OPropertySetAggregationHelper::addPropertyChangeListener(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener> const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:? (libcomphelper.so+0x1a181a) 10 frm::OInterfaceContainer::implInsert(int, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, bool, frm::ElementDescription*, bool) /home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:787 (libfrmlo.so+0x23e03c) 11 frm::OInterfaceContainer::insertByIndex(int, com::sun::star::uno::Any const&) /home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:904 (libfrmlo.so+0x240644) 12 non-virtual thunk to frm::OInterfaceContainer::insertByIndex(int, com::sun::star::uno::Any const&) /home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:? (libfrmlo.so+0x240716) 13 FmXUndoEnvironment::Inserted(FmFormObj*) /home/noel/libo-tsan/svx/source/form/fmundo.cxx:424 (libsvxcorelo.so+0x41b2a4) 14 FmXUndoEnvironment::Inserted(SdrObject*) /home/noel/libo-tsan/svx/source/form/fmundo.cxx:336 (libsvxcorelo.so+0x41a982) 15 FmXUndoEnvironment::Notify(SfxBroadcaster&, SfxHint const&) /home/noel/libo-tsan/svx/source/form/fmundo.cxx:292 (libsvxcorelo.so+0x41a8a0) 16 non-virtual thunk to FmXUndoEnvironment::Notify(SfxBroadcaster&, SfxHint const&) /home/noel/libo-tsan/svx/source/form/fmundo.cxx:? (libsvxcorelo.so+0x41acd2) 17 SfxBroadcaster::Broadcast(SfxHint const&) /home/noel/libo-tsan/svl/source/notify/SfxBroadcaster.cxx:40 (libsvllo.so+0xe7c3d) 18 SdrObjList::InsertObject(SdrObject*, unsigned long) /home/noel/libo-tsan/svx/source/svdraw/svdpage.cxx:351 (libsvxcorelo.so+0x6fdf3a) 19 FmFormPage::InsertObject(SdrObject*, unsigned long) /home/noel/libo-tsan/svx/source/form/fmpage.cxx:79 (libsvxcorelo.so+0x3c1e05) 20 SvxDrawPage::add(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) /home/noel/libo-tsan/svx/source/unodraw/unopage.cxx:191 (libsvxcorelo.so+0x850c7b) 21 SwFmDrawPage::add(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) /home/noel/libo-tsan/sw/source/core/unocore/unodraw.cxx:649 (libswlo.so+0xc30712) 22 non-virtual thunk to SwFmDrawPage::add(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) /home/noel/libo-tsan/sw/source/core/unocore/unodraw.cxx:? (libswlo.so+0xc31732) 23 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) /home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87 (libgcc3_uno.so+0xd92a) 24 cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) /home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229 (libgcc3_uno.so+0xcc3c) 25 unoInterfaceProxyDispatch /home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409 (libgcc3_uno.so+0xc1f6) Mutex M0 acquired here while holding mutex M1 in thread T44: 3 osl::Guard<osl::Mutex>::Guard(osl::Mutex&) /home/noel/libo-tsan/include/osl/mutex.hxx:144 (libcomphelper.so+0x1bde34) 4 comphelper::OPropertyChangeListener::setAdapter(comphelper::OPropertyChangeMultiplexer*) /home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:58 (libcomphelper.so+0x1bde34) 5 comphelper::OPropertyChangeMultiplexer::disposing(com::sun::star::lang::EventObject const&) /home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:120 (libcomphelper.so+0x1bde34) 6 non-virtual thunk to comphelper::OPropertyChangeMultiplexer::disposing(com::sun::star::lang::EventObject const&) /home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:? (libcomphelper.so+0x1bdf12) 7 cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const&) /home/noel/libo-tsan/cppuhelper/source/interfacecontainer.cxx:272 (libuno_cppuhelpergcc3.so.3+0x66524) 8 cppu::OMultiTypeInterfaceContainerHelperInt32::disposeAndClear(com::sun::star::lang::EventObject const&) /home/noel/libo-tsan/cppuhelper/source/interfacecontainer.cxx:577 (libuno_cppuhelpergcc3.so.3+0x68af0) 9 cppu::OPropertySetHelper::disposing() /home/noel/libo-tsan/cppuhelper/source/propshlp.cxx:246 (libuno_cppuhelpergcc3.so.3+0x8be45) 10 comphelper::OPropertySetAggregationHelper::disposing() /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:366 (libcomphelper.so+0x1a0321) ^^^ Mutex M1 previously acquired by the same thread here: 11 frm::OControlModel::disposing() /home/noel/libo-tsan/forms/source/component/FormComponent.cxx:705 (libfrmlo.so+0x19eecc) 12 frm::ORichTextModel::disposing() /home/noel/libo-tsan/forms/source/richtext/richtextmodel.cxx:295 (libfrmlo.so+0x267bdb) 13 cppu::OComponentHelper::dispose() /home/noel/libo-tsan/cppuhelper/source/component.cxx:159 (libuno_cppuhelpergcc3.so.3+0x4504f) 14 non-virtual thunk to cppu::OComponentHelper::dispose() /home/noel/libo-tsan/cppuhelper/source/component.cxx:? (libuno_cppuhelpergcc3.so.3+0x45379) 15 frm::OControlModel::disposing() /home/noel/libo-tsan/forms/source/component/FormComponent.cxx:708 (libfrmlo.so+0x19ef13) 16 frm::OBoundControlModel::disposing() /home/noel/libo-tsan/forms/source/component/FormComponent.cxx:1340 (libfrmlo.so+0x1a507f) 17 frm::OEditModel::disposing() /home/noel/libo-tsan/forms/source/component/Edit.cxx:301 (libfrmlo.so+0x161208) 18 cppu::OComponentHelper::dispose() /home/noel/libo-tsan/cppuhelper/source/component.cxx:159 (libuno_cppuhelpergcc3.so.3+0x4504f) 19 non-virtual thunk to cppu::OComponentHelper::dispose() /home/noel/libo-tsan/cppuhelper/source/component.cxx:? (libuno_cppuhelpergcc3.so.3+0x45379) 20 SdrUnoObj::~SdrUnoObj() /home/noel/libo-tsan/svx/source/svdraw/svdouno.cxx:214 (libsvxcorelo.so+0x6f471b) 21 FmFormObj::~FmFormObj() /home/noel/libo-tsan/svx/source/form/fmobj.cxx:119 (libsvxcorelo.so+0x3bd8cf) 22 FmFormObj::~FmFormObj() /home/noel/libo-tsan/svx/source/form/fmobj.cxx:112 (libsvxcorelo.so+0x3bd985) 23 SdrObject::release() /home/noel/libo-tsan/svx/source/svdraw/svdobj.cxx:486 (libsvxcorelo.so+0x6634df) 24 rtl::Reference<SdrObject>::~Reference() /home/noel/libo-tsan/include/rtl/ref.hxx:126 (libsvxcorelo.so+0x61610d) 25 void std::destroy_at<rtl::Reference<SdrObject> >(rtl::Reference<SdrObject>*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88 (libsvxcorelo.so+0x61610d) 26 void std::_Destroy<rtl::Reference<SdrObject> >(rtl::Reference<SdrObject>*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149 (libsvxcorelo.so+0x61610d) 27 void std::_Destroy_aux<false>::__destroy<rtl::Reference<SdrObject>*>(rtl::Reference<SdrObject>*, rtl::Reference<SdrObject>*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:163 (libsvxcorelo.so+0x61610d) 28 void std::_Destroy<rtl::Reference<SdrObject>*>(rtl::Reference<SdrObject>*, rtl::Reference<SdrObject>*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:195 (libsvxcorelo.so+0x61610d) 29 void std::_Destroy<rtl::Reference<SdrObject>*, rtl::Reference<SdrObject> >(rtl::Reference<SdrObject>*, rtl::Reference<SdrObject>*, std::allocator<rtl::Reference<SdrObject> >&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:948 (libsvxcorelo.so+0x61610d) 30 std::vector<rtl::Reference<SdrObject>, std::allocator<rtl::Reference<SdrObject> > >::~vector() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:735 (libsvxcorelo.so+0x61610d) 31 SdrModel::ClearModel(bool) /home/noel/libo-tsan/svx/source/svdraw/svdmodel.cxx:623 (libsvxcorelo.so+0x61610d) 32 SwDrawModel::~SwDrawModel() /home/noel/libo-tsan/sw/source/core/draw/drawdoc.cxx:108 (libswlo.so+0x714650) 33 std::default_delete<SwDrawModel>::operator()(SwDrawModel*) const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99 (libswlo.so+0x5a3082) 34 std::__uniq_ptr_impl<SwDrawModel, std::default_delete<SwDrawModel> >::reset(SwDrawModel*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:211 (libswlo.so+0x5a3082) 35 std::unique_ptr<SwDrawModel, std::default_delete<SwDrawModel> >::reset(SwDrawModel*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:509 (libswlo.so+0x5a3082) 36 sw::DocumentDrawModelManager::ReleaseDrawModel() /home/noel/libo-tsan/sw/source/core/doc/DocumentDrawModelManager.cxx:162 (libswlo.so+0x5a3082) 37 SwDoc::~SwDoc() /home/noel/libo-tsan/sw/source/core/doc/docnew.cxx:585 (libswlo.so+0x5457c8) 38 SwDoc::release() /home/noel/libo-tsan/sw/source/core/doc/doc.cxx:129 (libswlo.so+0x4b8993) 39 rtl::Reference<SwDoc>::clear() /home/noel/libo-tsan/include/rtl/ref.hxx:193 (libswlo.so+0x104c301) 40 SwDocShell::RemoveLink() /home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:444 (libswlo.so+0x104c301) 41 SwDocShell::~SwDocShell() /home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:372 (libswlo.so+0x104bf36) 42 SwDocShell::~SwDocShell() /home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:362 (libswlo.so+0x104c469) 43 non-virtual thunk to SwDocShell::~SwDocShell() /home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:? (libswlo.so+0x104c469) 44 cppu::OWeakObject::release() /home/noel/libo-tsan/cppuhelper/source/weak.cxx:230 (libuno_cppuhelpergcc3.so.3+0x105ae7) 45 rtl::Reference<SfxObjectShell>::~Reference() /home/noel/libo-tsan/include/rtl/ref.hxx:126 (libsfxlo.so+0x5209e5) 46 IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() /home/noel/libo-tsan/sfx2/source/doc/sfxbasemodel.cxx:265 (libsfxlo.so+0x5209e5) 47 void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88 (libsfxlo.so+0x51f4e6) 48 void std::_Destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149 (libsfxlo.so+0x51f4e6) 49 void std::allocator_traits<std::allocator<void> >::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<void>&, IMPL_SfxBaseModel_DataContainer*) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:675 (libsfxlo.so+0x51f4e6) 50 std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:613 (libsfxlo.so+0x51f4e6) 51 SfxBaseModel::dispose() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:175 (libsfxlo.so+0x4e7c7c) 52 SwXTextDocument::dispose() /home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:562 (libswlo.so+0x13896e1) 53 SfxBaseModel::close(unsigned char) /home/noel/libo-tsan/sfx2/source/doc/sfxbasemodel.cxx:1526 (libsfxlo.so+0x4eed16) 54 SwXTextDocument::close(unsigned char) /home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:575 (libswlo.so+0x138999c) 55 non-virtual thunk to SwXTextDocument::close(unsigned char) /home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:? (libswlo.so+0x1389ad3) 56 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) /home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87 (libgcc3_uno.so+0xd92a) Change-Id: Ie16fc0ff7462632a591a46025a38344006d43c30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-05tdf#162772 Crash in "Target in Document" in Hyperlink dialogNoel Grandin
regression from commit a6ad198d097fb4a503c8d5831d484ff46721134b Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sat Aug 17 13:19:54 2024 +0200 tdf#158556 use more comphelper::ByteReader Change-Id: I7343159d5e3ec7619ba95a98417fd3b4e25dbf6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-27tdf#158556 use more comphelper::ByteReaderNoel Grandin
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-23make joinThreadsIfIdle return false if it cannot joinCaolán McNamara
Change-Id: I52e22bf5e68809d6787d2d135b6a35384cf79391 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168785 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit c7ff8768db58aaee5ce0acbabe97faeaf450f017) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172329 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-21use less exception throwing for flow controlNoel Grandin
Change-Id: Iaf273c1f54977d4b422a327ffbc1086da991cc4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-19cid#1557694 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557162 COPY_INSTEAD_OF_MOVE cid#1556896 COPY_INSTEAD_OF_MOVE cid#1556893 COPY_INSTEAD_OF_MOVE cid#1556873 COPY_INSTEAD_OF_MOVE cid#1556872 COPY_INSTEAD_OF_MOVE cid#1556789 COPY_INSTEAD_OF_MOVE cid#1556570 COPY_INSTEAD_OF_MOVE cid#1556519 COPY_INSTEAD_OF_MOVE cid#1556516 COPY_INSTEAD_OF_MOVE cid#1556451 COPY_INSTEAD_OF_MOVE cid#1556396 COPY_INSTEAD_OF_MOVE cid#1556237 COPY_INSTEAD_OF_MOVE cid#1556113 COPY_INSTEAD_OF_MOVE cid#1556094 COPY_INSTEAD_OF_MOVE cid#1555991 COPY_INSTEAD_OF_MOVE cid#1555982 COPY_INSTEAD_OF_MOVE cid#1555885 COPY_INSTEAD_OF_MOVE cid#1555702 COPY_INSTEAD_OF_MOVE cid#1555610 COPY_INSTEAD_OF_MOVE cid#1555450 COPY_INSTEAD_OF_MOVE cid#1555327 COPY_INSTEAD_OF_MOVE cid#1555145 COPY_INSTEAD_OF_MOVE Change-Id: I38cc1a38e8cb2c33f33e0fc3afd34a0fb39e5ec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172028 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16sfx2: fix crash in SfxObjectShell::IsHelpDocument()Miklos Vajna
Seen while running the online.git unit-quarantine testcase: #0 std::__uniq_ptr_impl<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::_M_ptr() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:191 #1 0x00007f2f25fa398a in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::get() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:462 #2 0x00007f2f25f9fae2 in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::operator->() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:455 #3 0x00007f2f25f8bbd2 in SfxMedium::GetFilter() const (this=0x0) at sfx2/source/doc/docfile.cxx:3272 #4 0x00007f2f260067ce in SfxObjectShell::IsHelpDocument() const (this=0x5c6adc0) at sfx2/source/doc/objcont.cxx:589 #5 0x00007f2f0f6991c1 in SwLayIdle::isJobEnabled(IdleJobType, SwViewShell const*) (eJob=IdleJobType::SMART_TAGS, pViewShell=0x5a573f0) at sw/source/core/layout/layact.cxx:2218 #6 0x00007f2f0f69926d in SwLayIdle::DoIdleJob(IdleJobType, IdleJobArea) (this=0x7ffc9daf4180, eJob=IdleJobType::SMART_TAGS, eJobArea=IdleJobArea::VISIBLE) at sw/source/core/layout/layact.cxx:2234 #7 0x00007f2f0f699d81 in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (this=0x7ffc9daf4180, pRt=0x5a8fad0, pI=0x5a58860) at sw/source/core/layout/layact.cxx:2355 #8 0x00007f2f0fdccf21 in SwViewShell::LayoutIdle() (this=0x5a573f0) at sw/source/core/view/viewsh.cxx:826 Assume that in case the object shell has no underlying medium, then that's not a help document. Also fix the higher level problem that the LOK AnyInput callback should not be invoked while doing a LOK background save, as the object shell in the forked process has no underlying medium. That fixes the failure seen while running the online.git unit-save-torture test. Change-Id: Idcdd62cc177ac4b7edfbcef8906da2e42610ee98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171950 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-16cid#1557618 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557535 COPY_INSTEAD_OF_MOVE cid#1557520 COPY_INSTEAD_OF_MOVE cid#1557513 COPY_INSTEAD_OF_MOVE cid#1557503 COPY_INSTEAD_OF_MOVE cid#1557487 COPY_INSTEAD_OF_MOVE cid#1557483 COPY_INSTEAD_OF_MOVE cid#1557479 COPY_INSTEAD_OF_MOVE cid#1557474 COPY_INSTEAD_OF_MOVE cid#1557461 COPY_INSTEAD_OF_MOVE cid#1557446 COPY_INSTEAD_OF_MOVE cid#1557445 COPY_INSTEAD_OF_MOVE cid#1557441 COPY_INSTEAD_OF_MOVE cid#1557435 COPY_INSTEAD_OF_MOVE cid#1557433 COPY_INSTEAD_OF_MOVE cid#1557429 COPY_INSTEAD_OF_MOVE cid#1557375 COPY_INSTEAD_OF_MOVE cid#1557372 COPY_INSTEAD_OF_MOVE cid#1557356 COPY_INSTEAD_OF_MOVE cid#1557350 COPY_INSTEAD_OF_MOVE cid#1557344 COPY_INSTEAD_OF_MOVE cid#1557339 COPY_INSTEAD_OF_MOVE cid#1557332 COPY_INSTEAD_OF_MOVE cid#1557330 COPY_INSTEAD_OF_MOVE cid#1557328 COPY_INSTEAD_OF_MOVE cid#1557323 COPY_INSTEAD_OF_MOVE cid#1557315 COPY_INSTEAD_OF_MOVE cid#1557313 COPY_INSTEAD_OF_MOVE cid#1557304 COPY_INSTEAD_OF_MOVE cid#1557297 COPY_INSTEAD_OF_MOVE cid#1557291 COPY_INSTEAD_OF_MOVE cid#1557290 COPY_INSTEAD_OF_MOVE cid#1557271 COPY_INSTEAD_OF_MOVE cid#1557266 COPY_INSTEAD_OF_MOVE cid#1557262 COPY_INSTEAD_OF_MOVE cid#1557259 COPY_INSTEAD_OF_MOVE cid#1557246 COPY_INSTEAD_OF_MOVE cid#1557242 COPY_INSTEAD_OF_MOVE cid#1557241 COPY_INSTEAD_OF_MOVE cid#1557236 COPY_INSTEAD_OF_MOVE cid#1557228 COPY_INSTEAD_OF_MOVE cid#1557225 COPY_INSTEAD_OF_MOVE cid#1557221 COPY_INSTEAD_OF_MOVE cid#1557217 COPY_INSTEAD_OF_MOVE cid#1557213 COPY_INSTEAD_OF_MOVE cid#1557211 COPY_INSTEAD_OF_MOVE cid#1557209 COPY_INSTEAD_OF_MOVE cid#1557205 COPY_INSTEAD_OF_MOVE cid#1557204 COPY_INSTEAD_OF_MOVE cid#1557193 COPY_INSTEAD_OF_MOVE cid#1556082 COPY_INSTEAD_OF_MOVE Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>