Commit Graph

4524 Commits

Author SHA1 Message Date
Arnaud Versini
08a2de2023 basic : remove useless allocation in BasicDLLImpl
Change-Id: I8e2628da08cb621087915dcfb4d55ddacfeaabc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157048
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-20 08:07:30 +02:00
Noel Grandin
e23d2be0ce using decls should come after #include
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10 20:43:05 +02:00
Noel Grandin
87db52ab1e Revert "use more Reference::query instead of UNO_QUERY_THROW"
This reverts commit 7fc6063914.

sberg noticed that there is a difference now:

there's a subtle difference now, in that if  y  was null originally, it would have thrown a (caught) exception, whereas now it will crash in the  y.query<X>()  call.

Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-25 14:15:56 +02:00
Noel Grandin
7fc6063914 use more Reference::query instead of UNO_QUERY_THROW
since querying with exceptions is consideably more expensive

Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18 11:03:02 +02:00
sahil
a00cf4bc77 tdf#147132 Flatten Basic function implementations
Change-Id: I0ba6e7c1e128f3216eb3b77246c659a728df1324
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155011
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-09 09:58:21 +02:00
Andreas Heinisch
17154ceafe tdf#92620 - Adjust error message about exceeding legacy module size
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-07-24 13:55:28 +02:00
Caolán McNamara
d28ba797df nDigitPos no longer appears in expression
so presumably we no longer need this suppression since:

commit d969715fa4
Date:   Wed Jul 19 22:29:35 2023 +0200

    Simplify a bit by removing a redundant condition

    line 627 already contains: if( nMaxDigit > nDigitPos )

Change-Id: If6ff93f91f5bd20a9a03ed828d6f4e598ff4f3da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154804
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-23 15:04:29 +02:00
Julien Nabet
d969715fa4 Simplify a bit by removing a redundant condition
line 627 already contains: if( nMaxDigit > nDigitPos )

so here we know that nMaxDigit >= nDigitPos

Change-Id: Ia7ed69e19a6567a5947edaa57f687bf97476a616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154661
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-20 09:10:06 +02:00
Noel Grandin
0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00
Mike Kaganski
8da305acc9 Use getXWeak in basic
Change-Id: I0915360548ccc02d731eb915b5d32508cedd1461
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150835
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-18 09:34:24 +02:00
Noel Grandin
e810bd2b99 merge some stringadds
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-25 18:43:52 +02:00
Andreas Heinisch
fa0a1f6462 tdf#153543 - Add vba shell constants
Change-Id: Ifa73050f6892ce8ce95d16dedc166e68d1809491
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151567
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-05-09 14:12:54 +02:00
Noel Grandin
bc2101646b loplugin:stringviewparam improvements
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-14 07:54:28 +02:00
Mike Kaganski
5fe96b6dce Drop SvStream::WriteCharPtr
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-04-10 23:13:32 +02:00
Mike Kaganski
167b864fb1 Add an assert
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-29 11:20:09 +00:00
Andreas Heinisch
d622972dce tdf#142391 - Store method using 0x13 format only when actually needed
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-28 07:36:48 +00:00
Noel Grandin
c76fb95d45 loplugin:stringadd in b*
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-24 09:50:49 +00:00
Noel Grandin
e7dbef922a rtl::Static to thread-safe-static
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-23 19:49:25 +00:00
adityasingh22
a49019618b tdf#147132: Simplify usage of StarBASIC::Error()
Change-Id: Iedb499fa58798d40e7193c80c31dc9337a3a356b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148519
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-03-22 10:02:29 +00:00
Mike Kaganski
458f2b8f69 Refactor and fix VBA StrConv
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-22 04:31:07 +00:00
Andreas Heinisch
928957ee04 tdf#151741 - BASIC Organizer: fill various URLs for libraries
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-17 14:22:44 +00:00
Baole Fang
d34a3c92eb tdf#152690: Refactor fix
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-17 04:46:46 +00:00
Baole Fang
e12fff12b6 tdf#152690: Fix "!" behavior when it is not the first in a group
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-16 21:14:20 +00:00
Noel Grandin
899dfbca17 elide some temporary OStrings
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-14 17:50:11 +00:00
Noel Grandin
c596fd59dc no need to allocate these separately
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-07 19:15:55 +00:00
Marco Cecchetti
00ac4d3759 lok: macro: VBA message dialogs was causing assertion failure
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-03 17:30:52 +00:00
Noel Grandin
1f5797e0c0 flatten some classes in basic
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-03-02 12:23:37 +00:00
Alain Romedenne
fd19bc83cf tdf#141474 tdf#151901 BASIC functions argument names do not match that of VBA
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-26 16:14:47 +00:00
Noel Grandin
ce472616b9 BaseMutex->std::mutex in SfxLibrary
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-24 19:40:10 +00:00
Mike Kaganski
527741d528 Related: tdf#153752 Use virtual method to avoid dynamic casts
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-21 05:52:59 +00:00
Mike Kaganski
ccd0ef98f7 tdf#153752: SbxObject::Execute: extra characters in Option Compatible mode
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-21 04:30:34 +00:00
Mike Kaganski
fd6a0cf1eb tdf#153724: make sure to retrieve the variable value before checking the type
Commit 5760c94b88 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-02-19 13:37:42 +00:00
Noel Grandin
ec4babad02 no need to lock SolarMutex over the whole method here
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-29 18:03:48 +00:00
Stephan Bergmann
e3e259d551 UNO fn FormObjEventListenerImpl::documentEventOccured must lock SolarMutex
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::document::XDocumentEventListener, com::sun::document::DocumentEvent>::operator
> comphelper::OInterfaceContainerHelper2::forEach<com::sun::document::XDocumentEventListener, (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::document::XDocumentEventListener, com::sun::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-29 12:09:07 +00:00
Mike Kaganski
0b1d6220c6 tdf#153235: Optimize Application::Reschedule calls in SbiRuntime::Step
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-27 08:27:06 +00:00
Mike Kaganski
7c3ea0abef Simplify SbiRuntime ctor
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-26 22:15:34 +00:00
Mike Kaganski
6128d8379a Simplify a bit
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-26 22:15:25 +00:00
Mike Kaganski
e6120153b7 Simplify a bit
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-26 22:15:12 +00:00
Radhey Parekh
d0700f45c5 tdf#147132 Flatten Basic function implementations
Change-Id: Icd7610a3b7415838f632579deb2cd2cc505b44a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139001
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-20 16:56:26 +00:00
Stephan Bergmann
41f659b492 Base SfxLibrary on WeakComponentImplHelper
...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-19 16:07:12 +00:00
Eike Rathke
e06198e154 Resolves: tdf#152917 Add ConvertFromUrl() put result back, tdf#147132 follow-up
Regression from

    commit 6b3e66cd7a
    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-07 20:28:55 +00:00
Stephan Bergmann
19691c3b68 Revert all the recent loplugin:unocast changes
...as obsoleted by ef53355355 "Rudimentary support
for dynamic_cast on UNO proxy objects".

This reverts all of:
4cfcc9ac37 "loplugin:unocast (framework::Desktop)"
03efbf72f4 "loplugin:unocast
 (vclcanvas::TextLayout)"
80099fdd51 "loplugin:unocast (SalGtkXWindow)"
cc147f576d "loplugin:unocast
 (sdext::presenter::CachablePresenterView)"
40db42be1d "loplugin:unocast
 (vclcanvas::CanvasFont)"
2d1e7995ea "loplugin:unocast (CairoColorSpace)"
4c0bbe4bd9 "loplugin:unocast
 (canvas::ParametricPolyPolygon)"
8980366662 "loplugin:unocast
 (vclcanas::CanvasBitmap)"
d5e0c2c8db "loplugin:unocast
 (sfx2::DigitalSignatures)"
c0c4519e0d "loplugin:unocast
 (VCLXAccessibleComponent)"
feb8b833a6 "loplugin:unocast (VCLXDialog)"
1fa58cc6cc "loplugin:unocast (VCLXMultiPage)"
f481f036de "loplugin:unocast
 (DocumentSettingsSerializer)"
73df933f5f "loplugin:unocast
 (css::embed::EmbeddedUpdate)"
420165ab0e "loplugin:unocast
 (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)"
9abe8ee067 "loplugin:unocast (MutableTreeNode)"
9f3022ceb0 "loplugin:unocast (VCLXTabPage)"
1be70dda02 "loplugin:unocast
 (vcl::unotools::VclCanvasBitmap)"
d6a70bb641 "loplugin:unocast
 (basegfx::unotools::UnoPolyPolygon)"
5a14f009e6 "loplugin:unocast
 (xmlsecurity::Certificate)"
99009c9535 "loplugin:unocast (sd::Annotation)"
0c7585c5fa "loplugin:unocast (sd::TextApiObject)"
24e14afd1b "loplugin:unocast
 (SignatureVerifierImpl)"
1a7ad0c10d "loplugin:unocast
 (pcr::PropertyEventTranslation)"
a97e2d2702 "loplugin:unocast (RangePageBreaks)"
19dfdf86ad "iloplugin:unocast
 (pcr::OFormattedNumericControl)"
f9785ea595 "loplugin:unocast
 (frm::OInterfaceContainer)"
5e5f40a4a9 "loplugin:unocast (ScVbaShapes)"
27b35b2c21 "loplugin:unocast (ScVbaShapeRange)"
cb3108f860 "cid#1517812 Dereference null return
 value"
feba0ddb15 "loplugin:unocast
 (weld::TransportAsXWindow)"
4d6c232165 "loplugin:unocast
 (oox::ForumlaImExportBase)"
4844c096a8 "loplugin:unocast
 (cairocanvas::SurfaceProvider)"
9a0b523e0a "loplugin:unocast
 (cairocanvas::CanvasBitmap)"
8a5648d8e5 "loplugin:unocast
 (cairocanvas::TextLayout)"
28c27a0623 "loplugin:unocast
 (cairocanvas::CanvasFont)"
53bc223cb3 "loplugin:unocast
 (cairocanvas::RepaintTarget)"
5f70b0b9f6 "loplugin:unocast (SvXMLImport)"
068187a898 "loplugin:unocast (VCLXWindow)"
88b4f96620 "loplugin:unocast
 (sfx2::sidebar::SidebarController)"
f1b7a69b28 "loplugin:unocast
 (SvxLineStyleToolBoxControl)"
ba76f0ba7e "loplugin:unocast
 (i18npool::Calendar_gregorian)"
840154daf9 "loplugin:unocast
 (framework::AddonsToolBarWrapper)"
b0e9c4c5f0 "loplugin:unocast
 (GrammarCheckingIterator)"
8ee6cfc965 "loplugin:unocast
 (ucb::ucp::ext::Content)"
5b8cd77c11 "loplugin:unocast
 (basic::SfxScriptLibraryContainer)"
9e73ff9fce "loplugin:unocast
 (sdext::presenter::PresenterNotesView)"
a98acca8fb "loplugin:unocast
 (SelectionChangeHandler)"
c0b59ad6e3 "Consistently use
 comphelper::getSomethingImpl<I>(aIdentifier, this)"
276e3ccbdd "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>
2023-01-05 11:45:51 +00:00
Andreas Heinisch
e431417aa6 Fixed a copy paste error in a comment
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-25 19:41:05 +00:00
Mike Kaganski
5bd5dd4c3e Simplify a bit
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-25 11:50:06 +00:00
Stephan Bergmann
5b8cd77c11 loplugin:unocast (basic::SfxScriptLibraryContainer)
(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-12-14 09:16:36 +00:00
Stephan Bergmann
a534361141 Fold OldBasicPassword into basic::SfxScriptLibraryContainer
Change-Id: Iaeaf30f63760185a2b1dd72feb980b94d9931d55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143253
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-25 10:12:38 +01:00
Stephan Bergmann
e88cb2d41f -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): basic
Change-Id: If70c3bf8d7d6c855baf23b02cccb3f3b5ccb9f64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142321
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-05 17:17:54 +01:00
Stephan Bergmann
16045087e6 Address a constexpr template point of instantiation issue
...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.
<242ad89a15>
"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-25 15:55:06 +02:00
Michael Meeks
da6a1a05b2 basic: s/helt/held/ and some cleanup.
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-18 01:05:59 +02:00
Michael Meeks
c0ce606701 basic: correct reference to method that doesn't exist.
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-18 00:55:50 +02:00