summaryrefslogtreecommitdiff
path: root/basic/source
AgeCommit message (Collapse)Author
2023-05-25merge some stringaddsNoel Grandin
found with a lightly tweaked version of the loplugin:stringadd and some hand-holding. Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09tdf#153543 - Add vba shell constantsAndreas Heinisch
Change-Id: Ifa73050f6892ce8ce95d16dedc166e68d1809491 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151567 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-04-10Drop SvStream::WriteCharPtrMike Kaganski
WriteOString is a better replacement Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-29Add an assertMike Kaganski
Change-Id: Iee190f27323202d5bb673aaba3116071f294a85b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149695 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-24loplugin:stringadd in b*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: Ieb9b4f5154173738e26b429b55c7a3ea38733553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22tdf#147132: Simplify usage of StarBASIC::Error()adityasingh22
Change-Id: Iedb499fa58798d40e7193c80c31dc9337a3a356b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148519 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-03-22Refactor and fix VBA StrConvMike Kaganski
This properly handles null bytes that are expected when converting between byte strings and Unicode. It properly handles TransliterationFlags, which are not a bitset. In vbProperCase, it uses the correct method to lowercase the string, working not only with ASCII. Change-Id: I04e8cdca66ef9863a6516b15205a2a543ed97680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149224 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-17tdf#151741 - BASIC Organizer: fill various URLs for librariesAndreas Heinisch
Otherwise, libraries cannot be renamed in the BASIC organizer. Change-Id: I6c78cdee12f8d6128acf68e889fca463ed782477 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148483 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-17tdf#152690: Refactor fixBaole Fang
Change-Id: I170eba4968743afbab3cc6aa943706612b3e1a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149035 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-16tdf#152690: Fix "!" behavior when it is not the first in a groupBaole Fang
Fix "!" behavior when it is not the first in a group. Add testcases for "!" and Like. Change-Id: Ia76fa26722b6546d08dd8842d83f55bb0c0ea5ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148720 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-14elide some temporary OStringsNoel Grandin
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-03lok: macro: VBA message dialogs was causing assertion failureMarco Cecchetti
Get VBA MsgBox and VBA Runtime Script Error dialogs to be displayed correctly without causing an assertion failure. Provided a solution that allows VBA MsgBox to be executed in a not-async way so that the VBA script is paused until the message box is closed. Change-Id: Ica7d0d343a0ea4b6a163c1c43572f18a5779a0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147243 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147321 Tested-by: Jenkins
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-26tdf#141474 tdf#151901 BASIC functions argument names do not match that of VBAAlain Romedenne
Basic function argument names can be used either by position either by name, keyword arguments ae called 'named arguments' in VBA - VBA doc: https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/understanding-named-arguments-and-optional-arguments - libO Basic function signatures: https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03090401.html?DbPAR=BASIC#bm_id3154422 This patch attempts to correct - all in one - malformed keyword names in BASIC function signatures. It reflects keyword arguments usage inside QA BASIC unit tests. In the end Online help pages may incorporate such practice. Change-Id: Iab0c92b2c152d2564662e51e68f1f736b8deefd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145720 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
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-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-19tdf#153724: make sure to retrieve the variable value before checking the typeMike Kaganski
Commit 5760c94b8847164f9a7a181f031c7c86643944af tried to avoid all cases which could set an error in SbiRuntime::PushForEach. To do that, it checked the type of xObjVar before trying to get an object from it, which otherwise could set an error. But the type of the contained value can be not known until it is retrieved (which can happen inside SbxValue::Get in a call to SbxValue::Broadcast with SfxHintId::BasicDataWanted). This happens e.g. when the container passed to 'for each' is a call to some special function, like VBA's 'Selection'. Then SbxValue::GetFullType would return SbxEMPTY prior to SbxValue::Get. Let's make sure to call SbxValue::Get first (asking for a Variant, to avoid errors on type mismatch), and only then, check the actual result data type. Change-Id: Iaa697f38285505e50504ae09f9307fbd29e09a53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147273 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-29no need to lock SolarMutex over the whole method hereNoel Grandin
Change-Id: Ifcac67c0f4e149fe7e1d923d7efede9552b034a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-29UNO fn FormObjEventListenerImpl::documentEventOccured must lock SolarMutexStephan Bergmann
When trying to address a deadlock issue involving NotifySingleListenerIgnoreRE (sfx2/source/doc/sfxbasemodel.cxx), I hit the DBG_TESTSOLARMUTEX at > DbgTestSolarMutex > SfxBroadcaster::RemoveListener > SfxListener::EndListening > CheckParentsOnDelete > SbxObject::~SbxObject > SbUnoObject::~SbUnoObject > SvRefBase::ReleaseRef > tools::SvRef<SbxObject>::operator= > SbUserFormModule::ResetApiObj > FormObjEventListenerImpl::documentEventOccured > (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator > comphelper::OInterfaceContainerHelper2::forEach<com::sun::star::document::XDocumentEventListener, (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>> > SfxBaseModel::postEvent_Impl > SfxBaseModel::Notify > ScModelObj::Notify > SfxBroadcaster::Broadcast > SfxApplication::NotifyEvent > SfxBaseController::dispose > (anonymous namespace)::XFrameImpl::setComponent > (anonymous namespace)::XFrameImpl::close > SfxFrame::DoClose > SfxViewFrame::Notify > SfxBroadcaster::Broadcast > (anonymous namespace)::SfxModelListener_Impl::notifyClosing > SfxBaseModel::close > SfxBaseModel::dispose > UnoApiTest::load > UnoApiTest::loadFromURL > VBAMacroTest::testVba during CppunitTest_sc_vba_macro_test, which this commit fixes. (I commit this independently of any commit addressing that deadlock, as that involves some SolarMutexReleaser hackery and might eventually get reverted, while this change here looks correct and worthwhile even on its own.) Change-Id: I4217098c33114653cd69f4bef61c9f8089ce8b24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146302 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-26Simplify a bitMike Kaganski
Change-Id: I970feb9897018c69173b899392484a2818c184f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146193 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-26Simplify a bitMike Kaganski
Change-Id: Ib3507d5083116fc621def9c8168c95267a914bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-20tdf#147132 Flatten Basic function implementationsRadhey Parekh
Change-Id: Icd7610a3b7415838f632579deb2cd2cc505b44a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139001 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
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-07Resolves: tdf#152917 Add ConvertFromUrl() put result back, tdf#147132 follow-upEike Rathke
Regression from commit 6b3e66cd7a355061bf1dec76bbc4f389b6b60f2d CommitDate: Mon Sep 5 16:04:25 2022 +0200 tdf147132 basic : flaten some functions Change-Id: I20e6b00ed613b98a5e58623a010d894b1bcb4c6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145172 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
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-25Fixed a copy paste error in a commentAndreas Heinisch
Change-Id: Ibcd4c2f0cccb233647f3b079f02d01f156d30138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144818 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-12-25Simplify a bitMike Kaganski
Change-Id: I2c4df04cc7c57649077f61bfd0bc9fb0e9b42a4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144795 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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-11-05-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): basicStephan Bergmann
Change-Id: If70c3bf8d7d6c855baf23b02cccb3f3b5ccb9f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142321 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-10-18basic: s/helt/held/ and some cleanup.Michael Meeks
Change-Id: Idebd2eef29230056caa605c79028e46d34891c44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141485 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-10-18basic: correct reference to method that doesn't exist.Michael Meeks
Apparently not there in basic from prior to its open-sourcing. Change-Id: I9b2da35abfc9971ee380c68f33e239fe63b381c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141483 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-10-14tdf#151503 - Do not evaluate a missing optional variable to a booleanAndreas Heinisch
Change-Id: I671f857344f91de63612eabcbbdb2cab9b94cc0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141296 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-09-27use more string_view in accessibility..configmgrNoel Grandin
Change-Id: Ie16d36faac7d06e275348ed68e6c6b2518534fd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140636 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-25tdf#151012 - Initialize optional parameters with their default valuesAndreas Heinisch
Change-Id: I3ed3eb904b50892e5946abe684e801819ba296e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140128 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-09-15This comment is obsoleteMike Kaganski
A leftover from commit f6e0527033be682dbf6b60bd9b060fdd853ffe33 Date Mon Mar 21 12:55:40 2011 +0100 Remove most of dead code inlibs-core (basic) which dropped the related commented out code for "not implemented" stub, being there since c25ec0608a167bcf1d891043f02273761c351701 "initial import". Change-Id: Ic09a0c63921f1c5daa277fe7bb6dfc194895b673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139978 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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-09-05tdf147132 basic : flaten some functionsArnaud VERSINI
Change-Id: I462cbac4183f304e9f4b296a6361a05a4615c7eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05BASIC : missing parameter check in SbRtl_CreateObjectArnaud VERSINI
Change-Id: I44e8c17274e20eb080494b2eaf25f74d33a35b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31cid#1509223 Inefficient vector resizing with reserve.Noel Grandin
Change-Id: I12f215d60a7420676523c7cec85bfa5149683841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139083 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-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>