summaryrefslogtreecommitdiff
path: root/include/basic
AgeCommit message (Collapse)Author
2024-10-18tdf#143148: Use pragma once instead of include guardsMelvinYG
Change-Id: Id648d25e47034e209b291bf73ac4878226b4e755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175105 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-16tdf#143148 Use pragma once instead of include guardsAbrar Emad
Change-Id: I9df35198804cca98cd71c19fa4ef74fb6f47fd5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175013 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-13tdf#143148 Use pragma once instead of include guardsAbraham Samuel Adekunle
Change-Id: I70338b85b9c0205a7dd2349d10c621ceddacb176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174849 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
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-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>
2024-08-27cid#1554789 Different smart pointers managing same raw pointerCaolán McNamara
lets just use a shared_ptr here Change-Id: I31ec113da2c060e8b89ea4e438d182f0f22e810f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-02WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-04-28reduce symbol visibilityNoel Grandin
Change-Id: Iad2d114d257244f456d5579636e5c25ce070a08a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-17tdf#143148: Use pragma once instead of include guardsOmkar Santosh Nikam
Change-Id: I2beda26661abb57ffa7b7d6e404eb5f5a26ca5b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166162 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-17tdf#143148: Use pragma once instead of include guardsOmkar Santosh Nikam
Change-Id: I84080f2b647ccdd91fa44401b4edae4bf31a92a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166167 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-10tdf#143148 Use pragma once instead of include guardsOmkar Santosh Nikam
Use pragma once Change-Id: Iedf25f6034f285e9bdcab515ec6d9e20b230d969 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165955 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-04loplugin:unusedenumconstantsNoel Grandin
Change-Id: I889b4f63e098fecf22ffd4fb98937d62dbdd70b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-13reduce symbol visibility in --enable-mergelibs=more modeNoel Grandin
Change-Id: If811c9ec336543227db73c990248b9113846cf2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-13loplugin:unusedfieldsNoel Grandin
The sPassword field in SvtHistoryOptions became redundant after commit c0fffdc36df687fe8e4eff49e5a00d3a3c1eb370 Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Date: Mon Oct 2 12:35:21 2023 +0200 [API CHANGE] Remove deprecated Password config item Change-Id: Ie0c4597da5cd510f405400c215110c1e357cb497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in ModuleSizeExceededNoel Grandin
Change-Id: I1903967d94fcd738b9e2ed8de9a19d42614a749e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in SbModuleNoel Grandin
Change-Id: I92084a1cf31832404aca43f0c8e2137a33978976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-24tdf#92620 - Adjust error message about exceeding legacy module sizeAndreas Heinisch
Adjusted the error message about exceeding legacy module size and removed the code for saving image version 11. Modules using image version 11 still can be loaded. Saving modules always result in an image version higher than image version 11 depending on the size of the module. In addition, some minor performance issues (construction of the error message and the correct list of modules) were fixed. Change-Id: I3bde9fcc1596b63446193c836fa7b5cb06eb7d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149687 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28tdf#142391 - Store method using 0x13 format only when actually neededAndreas Heinisch
Change-Id: I907d234b20be5e3c7bee0d44407f1bf4c4b49f05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149175 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-02-21Related: tdf#153752 Use virtual method to avoid dynamic castsMike Kaganski
Change-Id: I97c09d82699621d5a43a525b5f2cf75ff5d131c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147353 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-21tdf#153752: SbxObject::Execute: extra characters in Option Compatible modeMike Kaganski
Change-Id: Ib3e4bd9eb9a249123a686f2434ded7b529fb050f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147345 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-19Fix error compiler error with VS2019 C2487Andras Timar
e.g. 'GetLibCount': member of dll interface class may not be declared with dll interface Change-Id: I4856d0848447ca04747015015af4147b28c2f188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147278 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-02-16set visibility of classes in mergelib+asan caseAndras Timar
Change-Id: I2eb80d0b3002f174deea0d8657cb0cdbdec5be8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147144 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-02-13tdf#143148 Use pragma once instead of include guardbuldi
Change-Id: I6fa77335ced02442eec69b0dbb088505eb4b1aa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146818 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-25Fold OldBasicPassword into basic::SfxScriptLibraryContainerStephan Bergmann
Change-Id: Iaeaf30f63760185a2b1dd72feb980b94d9931d55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143253 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-22tdf#150139 - Add a concrete name to the error messageAndreas Heinisch
Add a concrete name to the "Property or method not found: $(ARG1)" error message when creating a listener. Change-Id: I76c904793a96082c49f8aa2d45c76c50a453d892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138061 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-08-22cid#1500544 Uninitialized scalar variableCaolán McNamara
Change-Id: Ibe55cef41b6e6fd2ea10a9f4684e5f3e7926983a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-20tdf#149622: also clear return value before calling method from SbxObject::CallMike Kaganski
Moves the custom cleanup logic to overridden SbxMethod::Clear, to simplify the cleanup code and make sure it restores empty Variant correctly. Change-Id: I01fa0529acd9ac787ffcda60fd6836ade4afdcb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136108 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-31clang-tidy modernize-pass-by-value in basicNoel Grandin
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11in SetGlobalUNOConstant, only retrieve old value if we need itNoel Grandin
removes some unnecessary Find() work Change-Id: I6af9c4d9a043d4361fcca1a034b2025fe7c10c28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-05Fix typosAndrea Gelmini
Change-Id: Iaf248ec769b82bdb22ac0620a1dc31ea90823d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132535 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-05Move creation of case-insensitive variable name to a central placeMike Kaganski
SbxVariable::NameToCaseInsensitiveName might then be used wherever such names may be needed (see e.g. tdf#148358). Change-Id: I7749a12a05225398848cbf72700c6f0bc119bc22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132561 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-04Related: tdf#144245 Optimize case-insensitive handlingMike Kaganski
1. Make BasicCollection::implGetIndexForName take OUString again, after commit f7de7de1189ae4e63f73468076da47b37fe61ede made it take std::u16string_view. All call sites pass OUStrings, and commit ef32c3b4f9b80918d6018e14297fa41245afd381 made it create OUString from the argument. 2. Have SbxVariable cache a case-insensitive variant of the name. It is currently only used in the Collection implementation, but may be used in other places; Tthe names are case-insensitive in Basic, and VBA allows non-ASCII characters in names, so this caching might be useful elsewhere. 3. Skip non-ASCII characters when calculating name hash, to allow non-ASCII-containing strings still have some hash variance, when at least some of the first 6 characters are ASCII. Change-Id: If90ccea2c4b44c34967e6b764b6fab45b2976c40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132493 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-18Improve a mis-translated commentStephan Bergmann
...which was the German // Falls wir ein Schweinezeichen haben, abbrechen!! until 3d361dbc2d69484657c42852dcfa426c00bc3175 "Translation of Comments to English" Change-Id: I655514ec38596d16b15d22a02f38d0cf60b80302 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131726 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-03Use default argumentMike Kaganski
Change-Id: I44e9c2e5de2c041f2839b14a057e1b88fd6ea01f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129337 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-01improve the script for reducing symbol exportsNoel Grandin
And apply some of the results Change-Id: If555476fdd951cbc1d01fb3ef3ab1cbca2b64960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30fix clang-cl build with -Zc:dllexportInlines-Luboš Luňák
This hack causes undefined references to those dllimport symbols, and it doesn't seem to be necessary for clang-cl (I've checked both normal and mergelibs build with -Zc:dllexportInlines-). Change-Id: Iaa336989507344442b59cec2e6c5078f91a42980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126149 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann
...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>
2021-10-11fix MSVC mergelibs buildLuboš Luňák
Linker complains about duplicate symbols for the template, seems to be a case of https://codesynthesis.com/~boris/blog/2010/01/18/dll-export-cxx-templates/ Change-Id: Iaffa3ba55edf4e54c62757c64d6b340b55a514cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123362 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-29basic : remove BasicManagerImplArnaud Versini
Change-Id: Ia2b2c5fdf7d61e0853f181a38840c5ae263f5c9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-19loplugin:finalclassesNoel Grandin
improve the plugin to detect more cases. I only apply the new final changes to classes in /include here. Which reveals that RoadmapWizard::getPageController( TabPage* _pCurrentPage ) will always return nullptr Also needed to sprinkle some SAL_DLLPUBLIC_TEMPLATE around to workaround Visual Studio linking problems. Change-Id: Iadb7d46a9e0e73dabce562375ca013c0fea6690c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10fix some leaks in basicNoel Grandin
Change-Id: I52c10cdbe9661974c908ee052336c779a40de402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115323 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-05loplugin:constmethodNoel Grandin
Change-Id: I7913fd8144d521b8293ac43036d0fad82e457cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>