summaryrefslogtreecommitdiff
path: root/basic/source/inc
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 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-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-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-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-04Clarify MsgBox buttons handling codeMike Kaganski
Change-Id: I0095b4b5312c851f1f64ec013c64f26e1b24ce09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171454 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-03Refactor basic methods representing constantsMike Kaganski
Makes them more comprehensible; uses semantic names instead of magic numbers. Added comments to the constants that are unclear. Change-Id: Ifcb8a0d93ce057b8af08859b87ad3af8c67479e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171443 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-20tdf#161469 - Basic: align implementation now with the now function in calcAndreas Heinisch
Align the implementation of the now function in basic with the now function in calc to include the also nanoseconds. The precision is limited to milliseconds to avoid comparision inaccuracies. Change-Id: Ia85b653898f5849f67a171749725faab976b2a8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168706 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-29convert NameContainer to comphelper::WeakImplHelperNoel Grandin
Change-Id: If89ee5bf200affc04704b7f075f25cbf599c1e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-03-07no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: I86611e14a32dda3ae2226bbfa775ad0234513888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-02flatten some classes in basicNoel Grandin
no need to allocate separately where the contained class is only one pointer big Change-Id: If5fac0b0e20f80bffebc8611791d07888cbec1e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-24BaseMutex->std::mutex in SfxLibraryNoel Grandin
Change-Id: If059f38bb394844ba72156854eed84de51bbbfac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-27tdf#153235: Optimize Application::Reschedule calls in SbiRuntime::StepMike Kaganski
Setup the "last reschedule time" counter at the first pass, to avoid useless immediate reschedule. Update the counter when running "when blocked" reschedules. This seems to avoid the problem with the bugdoc. Change-Id: Ib5958a1a2b048f5ec654c69ee9e977e8a26de6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146215 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-26Simplify SbiRuntime ctorMike Kaganski
Change-Id: I18309ed4ed8ebb31b3bf9ffc676a2d501e2593b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146214 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-19Base SfxLibrary on WeakComponentImplHelperStephan Bergmann
...rather than on the deprecated OComponentHelper. The two classes SfxDialogLibrary and SfxScriptLibrary, both deriving from SfxLibrary, had been found to implement their respective queryInterface in a way that is incompatible with the XAggregation protocol inherited via OComponentHelper. It looks like no code actually made use of the XAggregation offered by these Sfx*Library classes, so the easiest fix for those queryInterface implementations appears to switch from OComponentHelper to WeakComponentImplHelper (thereby dropping XAggregation, and thus rendering the existing queryInterface implementations OK). Ideally, SfxLibrary would derive from WeakComponentImplHelper<XInitialization, XStorageBasedLibraryContainer, XLibraryContainerPassword, ...> covering all the UNO interface classes from which it currently derives manually. But changing that manual implementation across SfxLibrary and its SfxDialogLibrary and SfxScriptLibrary derived classes looks tricky, so merely introduce an "empty" WeakComponentImplHelper<> for now and keep all the manual stuff, and leave proper clean up for later. Change-Id: I12dc5bad2c017b8d76ce28ac189e95cf2e3810e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145792 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-14loplugin:unocast (basic::SfxScriptLibraryContainer)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I962b2a11a6407a543fb8b4ad972128d59f62a8a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-10-25Address a constexpr template point of instantiation issueStephan Bergmann
...that hits at least when building with Clang and --with-latest-c++ against recent libc++ or MSVC standard library (where C++20 and esp. C++23 made more and more class template member functions constexpr). My understanding is that there is some leeway at what point a compiler should instantiate such function specializations, and Clang decides to instantiate constexpr ones early (cf. <https://github.com/llvm/llvm-project/commit/242ad89a15d5466d166d47978bfff983d40ab511> "C++11 half of r147023: In C++11, additionally eagerly instantiate:" and its "Do not defer instantiations of constexpr functions" comment, and the discussion at <https://discourse.llvm.org/t/point-of-instantiation-of-constexpr-function-template/65129>). > In file included from basic/source/comp/codegen.cxx:21: > In file included from include/basic/sberrors.hxx:23: > In file included from include/vcl/errcode.hxx:23: > In file included from include/rtl/ustring.hxx:34: > In file included from ~/llvm/inst/bin/../include/c++/v1/ostream:168: > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:47:19: error: invalid application of 'sizeof' to an incomplete type 'SbiExprList' > static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type"); > ^~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:281:7: note: in instantiation of member function 'std::default_delete<SbiExprList>::operator()' requested here > __ptr_.second()(__tmp); > ^ > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:247:75: note: in instantiation of member function 'std::unique_ptr<SbiExprList>::reset' requested here > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); } > ^ > basic/source/inc/expr.hxx:118:66: note: in instantiation of member function 'std::unique_ptr<SbiExprList>::~unique_ptr' requested here > SbiExprNode( const SbiSymDef&, SbxDataType, SbiExprListPtr = nullptr ); > ^ > basic/source/inc/expr.hxx:30:7: note: forward declaration of 'SbiExprList' > class SbiExprList; > ^ Change-Id: I3bde85164ae6b829b7c24d9645fd412ed3fd815d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141810 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-06-22crashtesting: assert seen with forum-mso-de-125088Caolán McNamara
where at restoring the SaveIndex the underlying aLine string had been replaced, so the index is for a different string. Save and restore the aLine too. Not entirely sure this is what we want, but it does seem to be what this restoring code expects. Change-Id: I25bd02fad72d9b0729b9504fe04416340d0e070a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136286 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-06tdf#149402 - BASIC: Don't extend comment if line ends in a whitespaceAndreas Heinisch
Change-Id: I8adf530e77a0e65329fa59ac2873b99f48befac4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135336 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-06-01Use more appropriate type for SbiImage::GetString nId paramStephan Bergmann
Change-Id: I4207830e3923ce9b4f7c0f59cf5880dfcf89979b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135243 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31Use more appropriate type for SbiImage::nStringIdxStephan Bergmann
Change-Id: I1448739b373c6f7b9f5e6ee5a725fa0a129a4fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-30cid#1504574 Resource leakCaolán McNamara
make an owner for the PropertyMapEntries Change-Id: Ie915a8a312f2b24488566814ad67fdeef89b5941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135123 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25elide some OUString allocationNoel Grandin
Change-Id: Ia21421731dadc1d0e65da182471eb2b8d799782b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134918 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-25tdf#75263 - Export VBA-Project using detected charset on importAndreas Heinisch
Change-Id: Ia1f1bb31e077dcb4293c1106ac324a25a975a656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133064 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-04-21tdf#148651: implement VBA.FormatPercentJulien Nabet
I started from a copy/paste of FormatNumber. Then I deduplicated the code (it saved about 99% of it). Change-Id: Ibcb9ffbf8cebf45d5ffac4713e3d220b8499ba11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133133 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-02-02SbRtl_Spc is exactly the same as SbRtl_SpaceMike Kaganski
Change-Id: I0ccbffef348fc23ef5ca090ec2112abfe333e8e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129332 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-25tdf#90341 Clean Up Excessive const_cast'ingVaibhavMalik4187
Change-Id: Ib4cab4a4e476b469378b0b86d0819d4642f38893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128907 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-22Related tdf#146909: add missing IDIGNORE in BasicJulien Nabet
Change-Id: Idbbceb2f5375d47c942bab70ce81f7be79b17478 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128780 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-09Make the tdf#97983 changes to BASIC optionalTor Lillqvist
If you want to keep the string to floating point conversion semantics in BASIC as they were in LibreOffice 6, you can either set the LIBREOFFICE6FLOATINGPOINTMODE environment variable to some non-empty value, or set the org.openoffice.Office.Scripting/Basic/Compatibility/ UseLibreOffice6FloatingPointConversion flag in the Expert Configuration. (Or use a registry modification file with that effect.) Adapt the relevant unit test accordingly. Thanks to Mike Kaganski for showing how to access the setting in the LibreOffice registry from Basic. Change-Id: I13d6d5d834e1bb81ef8df489db2b1da79f01dfc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125756 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-04Fix --disable-(avmedia|scripting)TheRock Builder
So it's not a good idea to change the patch without testing it again. I'm still hoping for a better usable MediaItem then the previous dummy. The ODF stores a preview image and it should allow to export the media. The scripting fix feels like a workaround. somehow the final class specifier triggers something that makes the linker fail with missing destructors for all std::unique_ptr objects derivated from SbxFactory. Implementing these as virtual overrides didn't help, neither as {} or = default. So this removes them in the !"#if HAVE_FEATURE_SCRIPTING" case. Change-Id: I9f6751f44e0247ed31c27be0ee816239795e9372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126330 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-03replace comphelper::OListenerContainer with OInterfaceContainerHelper3Noel Grandin
OInterfaceContainerHelper3 is in wide use and can do the same thing with less ceremony Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-02Bin pointless commentTor Lillqvist
Change-Id: I173dbfc93fabbacacc1a68189b7a50cd993f1caa
2021-11-27use more OInterfaceContainerHelper3 in ModifiableHelperNoel Grandin
Change-Id: I8d959e365f995d48a6105fac3ed0f84c7cc1d86b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125920 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>