summaryrefslogtreecommitdiff
path: root/basctl
AgeCommit message (Collapse)Author
2023-11-18c++20: use std::erase instead of std::removed followed by erase (part 1)Julien Nabet
Change-Id: I8d038fc37a4de25bdeff2e2cc55775e3981240b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159610 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-08loplugin:stringstatic, lopluign:ostr (clang-cl)Stephan Bergmann
Change-Id: I7a928a2385286f6d1ab3887c8d315af3f47c052d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: basctlStephan Bergmann
Change-Id: I771d90376e3497cd28abeda2c8c794c049a80d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158143 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19use more SdrObjList::begin/end in variousNoel Grandin
Change-Id: If054626a10d3cbd3b168dd4e66ec7f08344d2c2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158131 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-18Remove obsolete comments in basctlHossein
First comment was last updated with USHORT -> sal_uInt16 in a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit 68ec95b3f80408ae50897b043eed69a07d084df9 there is no remaining sal_uInt16 left, and thus the comment is no longer relevant. Second comment was added in 1fac87f84723a3d6e7e13c091e39b09e0dea1aa5, but with changes in 444c242c51e6b049598359ea6cf98e34f611838b it is no longer relevant. Third comment was also last updated with USHORT -> sal_uInt16 in a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit 444c242c51e6b049598359ea6cf98e34f611838b it is no longer relevant. Change-Id: I9ed383f15a5b403740c0b8bcdd153d04bb1a2b0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158111 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 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-09-29rename SfxMedium::GetError -> GetErrorIgnoreWarningNoel Grandin
to distinguish it from the very similar GetErrorCode() Change-Id: I937e3dcfd6ce116046ac7b1c98cf79479b322f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-30use concrete type for ChildDescriptor::mxAccessibleNoel Grandin
avoid some unnecessary casting Change-Id: I23e0257d1831c1c43d2d646d4ff8e1d654c0b528 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156289 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-21tdf#156721 Crash if cursor in Basic IDE is in a macro from a document..Noel Grandin
.. and that document is closed regression from commit f3e127217d8daa443b8eda52ac4810e375cc7d63 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue May 9 15:21:20 2023 +0200 use comphelper::WeakComponentImplHelper in DocumentEventNotifier::Impl Change-Id: I5c8e68cd222ee1d66dc832700c4a39fd74223643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-15ComplexColor various clean-up and (trivial) refactoringsTomaž Vajngerl
Don't allow access to member variables of ComplexColor and makes them private. Needs a lot of changes. Change "scheme" to "theme" to be more consistent. In LO we usually call the "theme color" what is usually refered to as "scheme color" in OOXML, where it is sometimes refered to as "scheme" and other times as theme color. Remove ThemeColor class which was replaced with CmplexColor some time ago. Remove un-needed includes and un-needed components. Use isValidThemeColor in many places where we check that the ComplexColor is of "Theme" type and that ThemeColorType is set to a valid value. Change-Id: I325595fa65b8e56a4707e9d22acc6330aac28961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155359 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-23vcl: Drop now unneeded DevicePoint typedefKhaled Hosny
It has been always typedef'd to basegfx::B2DPoint since: commit 5e218b5c51f7d9cd10bd9db832879efca41b9c75 Date: Wed Jan 12 21:19:32 2022 +0000 always use B2DPoint for DevicePoint Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-05-24Remove triplicated includeAndrea Gelmini
Change-Id: I345a6e87ebf27188e9bdfe82ee364c2363b48efd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152197 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-05-24Related tdf#146518 Add Watch/Stack window commands to toolbarRafael Lima
This patch adds the new commands WatchWindow and StackWindow to the Basic toolbar, together with the related ObjectCatalog command. Change-Id: Ia50d4a695271c6fae6446c18548930a3e9063489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151787 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-05-15MCGR: consolidations/cleanups for changes so farArmin Le Grand (allotropia)
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-05-13use more optional for SdrObjListIterNoel Grandin
Change-Id: Iffd99d820889a1a5be514d46191ffaa2a6fa6910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-13tdf#145538: traditional for loops to range-based for loopsSupriyo Paul
changes traditional for to ranged based for in localizationmgr.cxx goal: better readability for programmers Change-Id: Ifde48037b27a794a9cdc3b1183f825651896cafb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148127 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-05-10use comphelper::WeakComponentImplHelper in DocumentEventNotifier::ImplNoel Grandin
Change-Id: Ife4222b3f485969351565145554a51e4bed199df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-02tdf#114441 Convert sal_uLong to better integer typesAman Jha
* Use tools::Long for nY as it stores calculations with result values that can be sometimes negative * Cast nLine to sal_uInt16 as rModulWindow.ToggleBreakPoint() takes parameter of type sal_uInt16 Change-Id: Ibfdee40f37714406ee0f089c9a87f8b9a650e492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145210 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-04-29These are not applicable to FILEOPEN_SIMPLEMike Kaganski
Change-Id: Id2668a6b30f7062e42ec60b3664b9a7490feccd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151128 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-29Simplify a bitMike Kaganski
Change-Id: I5b39a16479a69c0683d8e04497ad24421112751c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151126 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-29Simplify a bitMike Kaganski
Change-Id: Id768a3e10eb593af84bdea423ddfd090df33eef2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151182 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-29tdf#155077: use the selected URL when writing languagesMike Kaganski
Regression after commit 9a55b97e980bbf2a0ce12841f6168f1f7545ac96 (tdf#40068 Remember last directory for basic/dialog import/export, 2021-07-14). Change-Id: I6ddb88cbe8a08128c451169de7e9ed4597dc4356 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151181 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-28tdf#145538 Use range based for loopsRadhey Parekh
Change-Id: I6a393526d96fc5c7bee88fc03fc254dbdbe975cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138157 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-19Resolves: tdf#104011 add a default CellRange argument in dialog editorCaolán McNamara
so the form combo box can be added without exception, likely either a problem from: commit 9cff030fa15f89fa1009fbb3827ab11c43c20b04 Date: Mon Dec 5 09:56:17 2011 +0000 add some form control support for basic dialogs or: commit c0d6bc75b223e9e477ef3669f7dc4abec703ecf6 Date: Fri Jun 5 14:52:44 2015 +0100 Resolves: tdf#90361 CellValueBinding/CellRangeListSource need WithArguments Change-Id: I80e670840195a6725a9fdedc024f9763ad12ffe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150599 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-19basctl: fix crash in EditorWindow::CommandXisco Fauli
GetWheelData returns nullptr if mnCommand != CommandEventId::Wheel Change-Id: I57b30cc137b2f56e4295d49d0163ad95323201ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150598 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-04-12loplugin:stringview and stringviewparam, whitelist equalsAsciiLNoel Grandin
since we have a o3tl::equalsAscii that can handle that Change-Id: I0ae3b81cd5b4d97a0aef92cb6586cf365ee042b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-07tdf#154014 Improve Import Dialog sentence in BasicBogdan B
Change-Id: I3a3a2737d944f7360052284de1ff09efc493f571 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149702 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-01use more XVclWindowPeerNoel Grandin
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere. Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-18Fix typoAndrea Gelmini
Change-Id: Ibaed9abff12438789841e3560416198d52d7647f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149075 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-11tdf#145538 Refactor to use range-based for-loopsgokulakrishnan-shankar
Replaced an existing for-loop (that used indexes to iterate over an array) with a range-based for-loop for better readability Change-Id: I0cb112e6a41d38158deb99fb27f2b8b7f8852339 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147145 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-02tdf#152073 tdf#153895 basicide: Set bg color for border winMichael Weghorn
As described in the original commit to address tdf#152073 ("Glitch rendering line numbers in Basic IDE editor (kf5 only)"), the fact that the KDE Breeze style's frame border is partly transparent was causing artifacts in the Basic IDE: commit 6f4b8b7cfe2907b7da46eec6951a0e09b836a6de Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jan 31 16:08:53 2023 +0100 tdf#152073 qt: Draw background when drawing frame For native drawing of a frame (border), use the window background color as default color. As mentioned in commit f39f21d92ec83c3a5062f29dd26214fc83012c06 ("tdf#138010 (IV) VclScrolledWindow: Use actual border width"), the Qt/KDE Breeze style uses a frame width of 2, with the actual 1 pixel border being surrounded by a 1 pixel padding/margin. Transparent background did not ensure that the 1 pixel padding/margin is repainted and could thus result in artifacts from what was painted to that location previously (s. the Basic IDE editor example from tdf#152073). [...] However, there are cases when a transparent background is actually wanted, like in the print dialog (tdf#153895). Therefore, revert the original commit mentioned above and explicitly set a background color for the border windows of the involved windows in the Basic IDE instead, which is in line with the alternative already mentioned in the above commit ("An alternative might be to explicitly draw the background further up the call stack, [...]."), but enables transparency in the qt5/qt6/kf5-specific drawing for the frame again. Change-Id: Ifb4deb80c6ae245ec630a4fdc23f675e5587836c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148117 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-02-28flatten basctl::docs::DocumentEnumerationNoel Grandin
no need to use pimpl pattern here Change-Id: I289f545ff237b9770f3a193460a943e91b86fadb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147955 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28tdf#153798 - Basic IDE: align line numbers to the rightAndreas Heinisch
Change-Id: I6a8335b51aa7d4b50577aeefb188e3d81ddfee03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-23tdf#146518 Implement commands to toggle Watch/Stack windowsRafael Lima
This patch implements the new .uno:WatchWindow and .uno:StackWindow commands in the Basic IDE to allow the user to toggle the Watch/Stack windows. Change-Id: I0778b9fe8efcafbbf57da3cc437e6b156306021d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147305 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-02-22tdf#153572 Implement .uno:ZoomPlus and .uno:ZoomMinus in the Basic IDERafael Lima
This patch implements the commands .uno:ZoomPlus and .uno:ZoomMinus in the Basic IDE to allow the user to zoom in/out of the code editor. With these commands it is possible to create a keyboard shortcut for zooming in/out. Notice that this patch only implements the commands, but it does not create a default shortcut, since defining which shortcut should be used needs to be discussed first. Change-Id: I02866b9e731bf23181d0ecfc32f978ec110e33f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146841 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-02-16SfxViewShell::GetViewFrame never returns null, change to a referenceCaolán McNamara
various null checks can be seen to be redundant and removed Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-16SfxViewShell never takes a null SfxViewFrame*Caolán McNamara
Change-Id: I36f3a5c77a7fb2d3cf267184e403e6cd24dbd70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-15Drop 'using namespace ::std' in dirs b* c*Gabor Kelemen
Change-Id: I59392ee7aa71c219e475a09da67a868cfdd14b41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2023-02-14tdf#150045 A few more supplemental labelsAdolfo Jayme Barrientos
Change-Id: Ifc0afe5c04145378b5fe32b12791c774d96f8a9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146903 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-13Use startsWithIgnoreAsciiCase with last argument to simplifyMike Kaganski
Change-Id: Ifa1261ed76ec078a60fcdbd4ce806abe23e4c056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146850 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-08Adapt to macOS Resources vs. share namingStephan Bergmann
On macOS, "Tools - Macros - Organize Macros - Basic... - Macro From:" erroneously listed all the per-application modules ("Access2Base", "Depot", "Euro", ...) under "My Macros" instead of "Application Macros". Change-Id: Ic997ab30d9205d8402136ea381745c08ce555623 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146673 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08tdf#147488 BASIC: Create empty module when an empty library is selectedRafael Lima
If the Standard library is empty (has no modules), when the Basic IDE is opened it shows only a black screen with nothing. This patch makes it so that when the Standard library has no modules, a generic module is created and shown. Change-Id: I26dbe41b4244492a21649ab08c5fc2df24ca12a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145309 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2023-02-08Avoid SolarMutexReleaserStephan Bergmann
UITest_writer_macro_tests occasionally failed with > ==3730889==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d00057d080 at pc 0x7f75353d933c bp 0x7ffcedf8de90 sp 0x7ffcedf8de88 > READ of size 8 at 0x60d00057d080 thread T0 > #0 in basctl::ModulWindow::GetState(SfxItemSet&) at basctl/source/basicide/baside2.cxx:1088:22 > #1 in basctl::Shell::GetState(SfxItemSet&) at basctl/source/basicide/basides1.cxx:1160:18 > #2 in SfxStubbasctl_ShellGetState(SfxShell*, SfxItemSet&) at workdir/SdiTarget/basctl/sdi/basslots.hxx:164:1 > #3 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*) at sfx2/source/control/dispatch.cxx:1658:9 > #4 in SfxBindings::Update_Impl(SfxStateCache&) at sfx2/source/control/bindings.cxx:260:22 > #5 in SfxBindings::NextJob_Impl(Timer const*) at sfx2/source/control/bindings.cxx:1275:17 > #6 in SfxBindings::NextJob(Timer*) at sfx2/source/control/bindings.cxx:1220:5 > #7 in SfxBindings::LinkStubNextJob(void*, Timer*) at sfx2/source/control/bindings.cxx:1218:1 > #8 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #9 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #10 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #11 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #12 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #13 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #14 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #15 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #16 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #17 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #18 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 > #19 in ImplSVMain() at vcl/source/app/svmain.cxx:203:35 > #20 in SVMain() at vcl/source/app/svmain.cxx:235:12 > #21 in soffice_main at desktop/source/app/sofficemain.cxx:94:12 > #22 in sal_main at desktop/source/app/main.c:51:15 > #23 in main at desktop/source/app/main.c:49:1 > > 0x60d00057d080 is located 0 bytes inside of 144-byte region [0x60d00057d080,0x60d00057d110) > freed by thread T20 here: > #0 in operator delete(void*, unsigned long) at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3 > #1 in basctl::ModulWindow::~ModulWindow() at basctl/source/basicide/baside2.cxx:235:1 > #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13 > #3 in rtl::Reference<basctl::BaseWindow>::~Reference() at include/rtl/ref.hxx:129:22 > #4 in VclPtr<basctl::BaseWindow>::disposeAndClear() at include/vcl/vclptr.hxx:209:5 > #5 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:246:23 > #6 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:228:1 > #7 in SfxViewFrame::ReleaseObjectShell_Impl() at sfx2/source/view/viewfrm.cxx:1114:9 > #8 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:1905:5 > #9 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1166:5 > #10 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37 > #11 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:931:28 > #12 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1493:33 > #13 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1704:12 > #14 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29 > #15 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1703:28 > #16 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24 > #17 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:145:12 > #18 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1487:76 > #19 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:725:13 > #20 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #21 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #22 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #23 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #24 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #25 in request at binaryurp/source/reader.cxx:86:9 > #26 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #27 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > #28 in threadFunc at include/osl/thread.hxx:189:15 > #29 in osl_thread_start_Impl(void*) at sal/osl/unx/thread.cxx:265:9 where the ModulWindow apparently happens to get deleted by the UNO worker thread in the window of time when ModuleWindow::IsPasteAllowed temporarily dropped the SolarMutex on the main thread. Temporarily dropping the SolarMutex around the xClipboard->getContents() call had been there ever since the code got introduced in c29c7a86c8cb18d0e0602cddb3f24373e2424098 "#92173# Reimplement Basic password protection UI in Basic IDE", and at least theoretically it is of course the right thing to do to not call that UNO API with the SolarMutex locked. But it is of course also not a good idea to use SolarMutexReleaser, and that xClipboard->getContents() call doesn't look like it leads to deadlock. Change-Id: I3660065508d37801125f675440071d61e41906d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08tdf#153434 crash on "new" macro with no cursorCaolán McNamara
probably good in trunk since: commit 6e2bd11251afbe64f9889ede36b28b00f47aaff5 Date: Sun Aug 7 12:49:11 2022 +0100 tdf#150291 Revert "Fix crash when no valid EntryDescriptor found" but still visible in 7-4 Change-Id: I63898ed3e33f73f8a93528872449539c5df6574f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146645 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>