summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2024-12-07SfxLibraryContainer: use std::mutex, and pass it to NameContainerMike Kaganski
... to avoid own mutexes in own name container implementation. Change-Id: I29ff6ef987154359c35d0628d529b0606ef08c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177637 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01NameContainer need not be an UNO object itselfMike Kaganski
Change-Id: I56f07a62ed3d2388eede16a85e673027cfed8158 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177616 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01Optimize SfxLibrary / SfxLibraryContainer memory layout a bitMike Kaganski
Change-Id: I63ba583ef990dd2bbfb7f44af613fce1d8d1b411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177608 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01Simplify SfxLibrary hierarchyMike Kaganski
For some reason, SfxLibrary's own interfaces were used outside of WeakComponentImplHelper; and derived classes didn't use inheritance helper. Change-Id: Ib0b6cf5cfa559fe5eedc4d05247655aca1bfc4b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177607 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-01Simplify a bitMike Kaganski
Change-Id: Ia48a24d1696aaf2ee7e49f5e8c9f9dcc0ae9e8e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177606 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01Simplify NameContainerMike Kaganski
Having a map, two vectors, and a counter for what is a job for a single map is a bit too much. Change-Id: I50d29f03a2463e6f63ed8e645c36b4c77aa1413a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177604 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01Drop unneeded indirection and unused argumentMike Kaganski
The extra complexity was introduced for #i94994# in commit 326696598621c5883d7c28f491ca8192e8cfb21c (CWS-TOOLING: integrate CWS ab61, 2009-02-11). Change-Id: If5a69984e3c2c963d4eea2824373fbf1e8a47fef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177603 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-14tdf#108189 inspection of object hangs LONoel Grandin
There is no general solution to this that I am aware of, so just implement a rather specific solution that will need periodic extending to check for other dangerous properties Change-Id: Ie09d89416fea5b7cdf782319ed9921657faa5a5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176593 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-14Improve loplugin:dyncastvisibility to check for non-inline key functionsStephan Bergmann
This would have caught the issue discussed in 709b1f3ddb87303a2dec6155dbe0106369c151ed "Make sure VCLXPopupMenu has unique RTTI". (The commit message talks about RTTI there, while what Clang actually compared for an optimized implementation of a dynamic_cast to a final class is vtable pointers, but the overall picture remains the same. Both RTTI and vtables are emitted along the key function, and if that is missing or inline, they are emitted for each dynamic library individually, and as internal symbols on macOS.) This commit also addresses all the issues found by the improved loplugin:dyncastvisibility on Linux. See the newly added TODO in compilerplugins/clang/dyncastvisibility.cxx and 86b86ac87ea0cc90249f156494c98c3c93e4f3fc "Give DocumentEventHolder (aka EventHolder<DocumentEvent>) a key function" for an issue with key functions for class template instantiations. Change-Id: Ia19155efb1d23692c92b9c97ff17f18ae7a1f3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176576 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-11-12tdf#163486: PVS: Identical branchesBogdan Buzea
Change-Id: Ic54a8e009f68ab992831ba849ae1349a6235bedd V1037: Two or more case-branches perform the same actions. Check lines: 1276 and 1408, 1434 and 1510 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175149 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-11-11clang-tidy: performance-unnecessary-copy-initialization in basicNoel Grandin
Change-Id: I38bc2711bdec2bdaf998401083ff9b62a5595616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176389 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-08loplugin:reftotemp in basicNoel Grandin
Change-Id: I41385d279cc81de9b5b2e9ff55b0b5c2f40aba66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-06loplugin:passstuffbyref in basicNoel Grandin
Change-Id: I1aee08f0ff2a3dabcedc49a31e7ff4de9428007e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04new loplugin:staticconstexprNoel Grandin
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-02Simplify a bitMike Kaganski
Change-Id: I2e4635c660a57abefa57b046e3f0da411939cf1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175953 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-01no need to heap allocate theseNoel Grandin
Change-Id: I28127f5943a80aca1689d5982cd1f6e6e11eb2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31tdf#163680: fix fixed-length strings assignmentMike Kaganski
Change-Id: I4aa8144df5dfb836ad0689c7855301b8b04da485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175878 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-31No need to heap-allocate itMike Kaganski
Change-Id: Ia6bbf6d3f5b9af2a5b52b8c6baec85bdcb579275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-26cid#1555767 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555770 COPY_INSTEAD_OF_MOVE cid#1555788 COPY_INSTEAD_OF_MOVE cid#1555789 COPY_INSTEAD_OF_MOVE cid#1555798 COPY_INSTEAD_OF_MOVE cid#1555816 COPY_INSTEAD_OF_MOVE cid#1555822 COPY_INSTEAD_OF_MOVE cid#1555835 COPY_INSTEAD_OF_MOVE cid#1555845 COPY_INSTEAD_OF_MOVE cid#1555859 COPY_INSTEAD_OF_MOVE cid#1555864 COPY_INSTEAD_OF_MOVE cid#1555868 COPY_INSTEAD_OF_MOVE cid#1555892 COPY_INSTEAD_OF_MOVE cid#1555896 COPY_INSTEAD_OF_MOVE cid#1555921 COPY_INSTEAD_OF_MOVE cid#1555932 COPY_INSTEAD_OF_MOVE cid#1555935 COPY_INSTEAD_OF_MOVE cid#1555944 COPY_INSTEAD_OF_MOVE cid#1555952 COPY_INSTEAD_OF_MOVE cid#1555985 COPY_INSTEAD_OF_MOVE cid#1556024 COPY_INSTEAD_OF_MOVE cid#1556038 COPY_INSTEAD_OF_MOVE cid#1556042 COPY_INSTEAD_OF_MOVE cid#1556044 COPY_INSTEAD_OF_MOVE cid#1556060 COPY_INSTEAD_OF_MOVE cid#1556083 COPY_INSTEAD_OF_MOVE cid#1556085 COPY_INSTEAD_OF_MOVE cid#1556090 COPY_INSTEAD_OF_MOVE cid#1556136 COPY_INSTEAD_OF_MOVE cid#1556157 COPY_INSTEAD_OF_MOVE cid#1556159 COPY_INSTEAD_OF_MOVE cid#1556172 COPY_INSTEAD_OF_MOVE cid#1556179 COPY_INSTEAD_OF_MOVE cid#1556187 COPY_INSTEAD_OF_MOVE cid#1556255 COPY_INSTEAD_OF_MOVE cid#1556256 COPY_INSTEAD_OF_MOVE cid#1556266 COPY_INSTEAD_OF_MOVE cid#1556275 COPY_INSTEAD_OF_MOVE cid#1556290 COPY_INSTEAD_OF_MOVE cid#1556294 COPY_INSTEAD_OF_MOVE cid#1556301 COPY_INSTEAD_OF_MOVE cid#1556311 COPY_INSTEAD_OF_MOVE cid#1556318 COPY_INSTEAD_OF_MOVE cid#1556326 COPY_INSTEAD_OF_MOVE cid#1556369 COPY_INSTEAD_OF_MOVE cid#1556374 COPY_INSTEAD_OF_MOVE cid#1556387 COPY_INSTEAD_OF_MOVE cid#1556388 COPY_INSTEAD_OF_MOVE cid#1556417 COPY_INSTEAD_OF_MOVE cid#1556425 COPY_INSTEAD_OF_MOVE cid#1556435 COPY_INSTEAD_OF_MOVE cid#1556495 COPY_INSTEAD_OF_MOVE cid#1556497 COPY_INSTEAD_OF_MOVE cid#1556501 COPY_INSTEAD_OF_MOVE cid#1556503 COPY_INSTEAD_OF_MOVE cid#1556520 COPY_INSTEAD_OF_MOVE cid#1556523 COPY_INSTEAD_OF_MOVE cid#1556562 COPY_INSTEAD_OF_MOVE cid#1556573 COPY_INSTEAD_OF_MOVE cid#1556576 COPY_INSTEAD_OF_MOVE cid#1556598 COPY_INSTEAD_OF_MOVE cid#1556615 COPY_INSTEAD_OF_MOVE cid#1556626 COPY_INSTEAD_OF_MOVE cid#1556671 COPY_INSTEAD_OF_MOVE cid#1556689 COPY_INSTEAD_OF_MOVE cid#1556701 COPY_INSTEAD_OF_MOVE cid#1556713 COPY_INSTEAD_OF_MOVE cid#1556758 COPY_INSTEAD_OF_MOVE cid#1556759 COPY_INSTEAD_OF_MOVE cid#1556788 COPY_INSTEAD_OF_MOVE cid#1556811 COPY_INSTEAD_OF_MOVE cid#1556821 COPY_INSTEAD_OF_MOVE cid#1556824 COPY_INSTEAD_OF_MOVE cid#1556825 COPY_INSTEAD_OF_MOVE cid#1556862 COPY_INSTEAD_OF_MOVE Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-25cid#1633347 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1633346 COPY_INSTEAD_OF_MOVE cid#1633344 COPY_INSTEAD_OF_MOVE cid#1633343 COPY_INSTEAD_OF_MOVE cid#1633340 COPY_INSTEAD_OF_MOVE cid#1608137 COPY_INSTEAD_OF_MOVE cid#1608131 COPY_INSTEAD_OF_MOVE cid#1607860 COPY_INSTEAD_OF_MOVE cid#1607432 COPY_INSTEAD_OF_MOVE cid#1607394 COPY_INSTEAD_OF_MOVE cid#1607310 COPY_INSTEAD_OF_MOVE cid#1607156 COPY_INSTEAD_OF_MOVE cid#1607093 COPY_INSTEAD_OF_MOVE cid#1607090 COPY_INSTEAD_OF_MOVE cid#1607039 COPY_INSTEAD_OF_MOVE cid#1606709 COPY_INSTEAD_OF_MOVE cid#1558053 COPY_INSTEAD_OF_MOVE cid#1558052 COPY_INSTEAD_OF_MOVE cid#1558042 COPY_INSTEAD_OF_MOVE cid#1558038 COPY_INSTEAD_OF_MOVE cid#1558037 COPY_INSTEAD_OF_MOVE cid#1558034 COPY_INSTEAD_OF_MOVE cid#1558031 COPY_INSTEAD_OF_MOVE cid#1558027 COPY_INSTEAD_OF_MOVE cid#1557994 COPY_INSTEAD_OF_MOVE cid#1557977 COPY_INSTEAD_OF_MOVE cid#1557970 COPY_INSTEAD_OF_MOVE cid#1557966 COPY_INSTEAD_OF_MOVE cid#1557957 COPY_INSTEAD_OF_MOVE cid#1557954 COPY_INSTEAD_OF_MOVE cid#1557941 COPY_INSTEAD_OF_MOVE cid#1557933 COPY_INSTEAD_OF_MOVE cid#1557918 COPY_INSTEAD_OF_MOVE cid#1557907 COPY_INSTEAD_OF_MOVE cid#1557890 COPY_INSTEAD_OF_MOVE cid#1557883 COPY_INSTEAD_OF_MOVE cid#1557881 COPY_INSTEAD_OF_MOVE cid#1557861 COPY_INSTEAD_OF_MOVE cid#1557842 COPY_INSTEAD_OF_MOVE cid#1557840 COPY_INSTEAD_OF_MOVE cid#1557830 COPY_INSTEAD_OF_MOVE cid#1557830 COPY_INSTEAD_OF_MOVE Change-Id: If5ee3396eafdb8b338d9e6cf0705be6e2b431fd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175577 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
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-22cid#1545605 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545841 COPY_INSTEAD_OF_MOVE cid#1554682 COPY_INSTEAD_OF_MOVE cid#1554686 COPY_INSTEAD_OF_MOVE cid#1554715 COPY_INSTEAD_OF_MOVE cid#1554750 COPY_INSTEAD_OF_MOVE cid#1554759 COPY_INSTEAD_OF_MOVE cid#1554770 COPY_INSTEAD_OF_MOVE cid#1554779 COPY_INSTEAD_OF_MOVE cid#1554794 COPY_INSTEAD_OF_MOVE cid#1554800 COPY_INSTEAD_OF_MOVE cid#1554826 COPY_INSTEAD_OF_MOVE cid#1554836 COPY_INSTEAD_OF_MOVE cid#1554862 COPY_INSTEAD_OF_MOVE cid#1554865 COPY_INSTEAD_OF_MOVE cid#1554872 COPY_INSTEAD_OF_MOVE cid#1554883 COPY_INSTEAD_OF_MOVE cid#1554906 COPY_INSTEAD_OF_MOVE cid#1554921 COPY_INSTEAD_OF_MOVE cid#1554926 COPY_INSTEAD_OF_MOVE cid#1554946 COPY_INSTEAD_OF_MOVE cid#1554956 COPY_INSTEAD_OF_MOVE cid#1554970 COPY_INSTEAD_OF_MOVE cid#1554986 COPY_INSTEAD_OF_MOVE cid#1554991 COPY_INSTEAD_OF_MOVE cid#1555013 COPY_INSTEAD_OF_MOVE cid#1555037 COPY_INSTEAD_OF_MOVE cid#1555050 COPY_INSTEAD_OF_MOVE cid#1555057 COPY_INSTEAD_OF_MOVE cid#1555066 COPY_INSTEAD_OF_MOVE cid#1555067 COPY_INSTEAD_OF_MOVE cid#1555083 COPY_INSTEAD_OF_MOVE cid#1555097 COPY_INSTEAD_OF_MOVE cid#1555135 COPY_INSTEAD_OF_MOVE cid#1555140 COPY_INSTEAD_OF_MOVE cid#1555146 COPY_INSTEAD_OF_MOVE cid#1555148 COPY_INSTEAD_OF_MOVE cid#1555149 COPY_INSTEAD_OF_MOVE cid#1555155 COPY_INSTEAD_OF_MOVE cid#1555157 COPY_INSTEAD_OF_MOVE cid#1555168 COPY_INSTEAD_OF_MOVE cid#1555195 COPY_INSTEAD_OF_MOVE cid#1555196 COPY_INSTEAD_OF_MOVE cid#1555237 COPY_INSTEAD_OF_MOVE Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-21Resolves tdf#163515 - Basic Macro Organizer: After renaming aJim Raykowski
document macro library the original library also remains Change-Id: Ife89e1e164d288702d30e6b79f5e703ab9467e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175182 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2024-10-19tdf#163486: PVS: Identical branchesBogdan Buzea
Change-Id: I01aae9395213eb09c8bea990b2b6a811f7ab2ee2 V1037: Two or more case-branches perform the same actions. Check lines: 1249, 1277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175150 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-07tdf#163219: only create local With variable for function resultsMike Kaganski
The problem is, that having a local variable referring the same value as the original expression 'foo' is not the same as referencing 'foo' itself. After 'foo' is re-assigned, the local variable still refers to the original value, not the new one. It seems impossible to implement the reference using existing codegen primitives, to imitate the true reference to 'foo', not to its value. If we implement it by changing the runtime, the bytecode won't work identically in older versions; if we introduce a new bytecode, that would be an incompatible change. As a workaround, only create the local With variable, when the block variable is created using some function (as much as known by parser). I think that there would be cases when this would still not work as intended: an example is a property implemented using getter function; the parser would likely treat the property as a variable, and avoid creation of the local variable; and the getter would be called every time a dot access will happen (which was the essence of tdf#132064). However, this seems a better alternative to the bug fixed here. Change-Id: I50bf679762fd2e73f215a000fa0ab60fd6ae7453 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174564 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-06Simplify assignment of NothingMike Kaganski
In commits f3f46b5fe729876d128f63f7ab158954ab6657d7 (tdf#132064: make With statement only evaluate its argument once, 2024-04-18) and 40d0e6f4c4ca31f6525b4c84924f2330a166182c (tdf#162962: always create a local "Nothing" for the "WITH" variable, 2024-09-16), I used hacks to emulate the global Nothing. This change implements it properly, I think, It makes sure to use the RTL's Nothing; this saves compile-time checks, strings in pool, and makes code cleaner. Change-Id: I3d007c5aa187e9aa61c1c369511be969b8cf57f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174553 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-20no need to do UNO_QUERY hereNoel Grandin
Change-Id: I52d13a7e4806d8fc34c4ff6f4cc5ab1e785a8b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-20tdf#162431 - Check for missing parametersAndreas Heinisch
Don't silently convert missing parameters including their error code to the request target typen when the target type can't handle the conversion. Change-Id: I2300aa594ae3cc1045a6397c1195718b6662aa61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172593 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Jenkins
2024-09-18Avoid -Werror,-Wunused-functionStephan Bergmann
Change-Id: I95ca13db07a778fc260cbb78364916cc7400e378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173590 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-18use more concrete UNO in basicNoel Grandin
Change-Id: I6606008d9b45e00295cf441a7321a677d62317f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173581 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-17Fix formatting of datesMike Kaganski
Redression after commit 81e1e0a2a671f19950c1bd3c69f9aa24b0c562e7 (Refactor SbxValue::Format, 2024-09-13). Change-Id: Ie7eb50c32f3c1a3aec73fc882dc33cce42734747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173449 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-17Related: i#109051 There's no "Exit Let/Get/Set"Mike Kaganski
Before, these incorrect combinations were allowed, together with the correct "Exit Property", which had been implemented in commit 5ed103d2dd5f8ee2f13183263c0930f84437bdc7 (mib16: contributed bugfixes and various new symbols in VBA compatibility implementation, 2010-06-15). Change-Id: Ic132c0860bb04007766977975a6ce9c8887138dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173427 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-17i#109051: also handle Exit Property for Property SetMike Kaganski
An omission from commit 5ed103d2dd5f8ee2f13183263c0930f84437bdc7 (mib16: contributed bugfixes and various new symbols in VBA compatibility implementation, 2010-06-15) Change-Id: I1e08406eb1dcb64eeef5d925d22475f1b9f74de0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173426 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-16tdf#162962: always create a local "Nothing" for the "WITH" variableMike Kaganski
Other "WITH" blocks create the symbol that can be found by pPool->Find, but can be not accessible at the call site. Change-Id: I85ecc763a1bb3fd692c2c98e674047fdbde3f8f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173417 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-13tdf#162935: use PUTC for WITH variable assignment: it doesn't copy valueMike Kaganski
SbiRuntime::StepPUT, SbiRuntime::StepSET, SbiRuntime::StepVBASET call checkUnoStructCopy eventually, which copies the UNO struct by value. This is not what we need. On the other hand, SbiRuntime::StepPUTC only makes the by-ref assignment, and makes the reference const; but Basic code never assigns anything to the internal variable itself, only to its members. I hope that this time, I get it right. Change-Id: I2b4a51a2dca9e7106e14e03360ef0d5a50b60079 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173305 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-13Refactor SbxValue::FormatMike Kaganski
Change-Id: I1a55f2c6148246733699c1ff1086436af9d450b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173254 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-12Temporarily skip unit tests on native arm64 buildBalazs Varga
which indicating unit test fails. Change-Id: I2689b0dda888e15e52ca60cc18e1705a1aefe968 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173143 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Jenkins
2024-09-11Related: tdf#158092 add a comment to avoid symbols localizationMike Kaganski
The localizable string is to allow different position/precision of the components; but the localization of the symbols themselves (decimal and thousand separator, currency) happens in code. This comment is shown in Weblate UI. Change-Id: Ib2f62fc8edf12ad3b182b40e3a8981c43b7ed67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173104 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-09Improve run-time Currency type support in BasicMike Kaganski
Change-Id: I1e04c6022944034a30ef896b8cd24050ebe3bbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173042 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-05use less dynamic_cast when broadcasting SfxHintNoel Grandin
Change-Id: If4d33cbbf36a9ad495b80a7347b39d0f4bc0405e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-02Fix ImpCurrencyToString to handle SAL_MIN_INT64Mike Kaganski
It can't be negated; so avoid the negation, and skip the minus in the string result. Also, avoid needless creation of OUString. Change-Id: If867c189b2ffd2794a58f66fd2511004ed4fc25a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172733 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-01Refactor ImpCurrencyToString for simplicityMike Kaganski
Change-Id: Ie7acafb3c81348f03340f1aaa53b3849c8dae4a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172694 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-01tdf#162724: use localized decimal separator in ImpCurrencyToStringMike Kaganski
Same as in ImpCvtNum Change-Id: Icbaa237e944a39309b01fdb18e668d054ff61c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172693 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-31Move variables into their usage scopeMike Kaganski
Change-Id: I8d708ecdc94c19069d955b19daf1a5c5c4bc2f45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172584 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-30Simplify default ImpScan usageMike Kaganski
Drop LibreOffice6FloatingPointMode, and move the check introcuced in commit 47aabde053a1472dc32770da29d68c8de5bd7919 (Make the tdf#97983 changes to BASIC optional) into a simplified ImpScan overload. Change-Id: Ibef723878179113a5403d2a3c55ded9df9cb292d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172595 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-27SbClassModuleObject never take a non-null argCaolán McNamara
Change-Id: I1be4710a32355c104ba25005ec4f46c6f650b9c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172443 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-27use a shared_ptr for SbiBreakpoints pBreaks as wellCaolán McNamara
Change-Id: I3dec5ffe5fdf937d761c902970a94b73878a2cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172441 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>