summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2022-08-11lok: Simplify context change notificationMike Kaganski
Change-Id: I3ead4deb5bdfe638bc49e05bfba0d8c630687958 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138141 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-11make dtor order as reverse ctor orderCaolán McNamara
Change-Id: Ia5bff2361006d3dcb1032adef584ceb9910e56fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-11gtk4: get the menu in sidebar menubutton workingCaolán McNamara
this is an edge case where for gtk3 there has to be a GtkWindow present to support the accelerators, and for gtk4 the final window the menubutton is in must be the same one present when the actions were created. Change-Id: I08911daf8e7752b6eb589a162bb07edda76b6f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138091 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-10mnemonic-widget of showlocationCaolán McNamara
Change-Id: Ie0955c2c8efcec5d1f43c86fe12b3a2b964c4c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-10loplugin:passstuffbyrefNoel Grandin
Change-Id: Ib2b2650da7abc9260897f9b5aad619a0ea6ae941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138052 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-09sfx2: check saved last tab page name exists before restoring itCaolán McNamara
since GetPage might return nullptr on a nonexisting page See https://crashreport.libreoffice.org/stats/signature/SfxHelpIndexWindow_Impl::ActivatePageHdl(rtl::OString%20const%20&) Change-Id: I26e21f783645e8a87d56cbe76c0126de8947bf3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137990 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-09tdf#150278 sfx2: use provided aInfo, not factoryJustin Luth
This continues the revolution from tdf#81293 that was done for the MOD section of this function in 7.4. It looks like the same thing needs to be done for APP. Prior to this commit, opening up the same form control property dialog always opened up to the same initial tab, regardless of the last-used-tab. ONLY of document reload would the last-used-tab come into play. Now it always opens up immediately tot he last-used-tab. This is full fix for SAL_USE_VCLPLUGIN=gen. gtk3 needs an additional fix so it doesn't follow the second-last-used-tab instead. Change-Id: Ie7c13cfb48de87c4ab595460680f4306e8feaac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-01Add 'JobName' to PrintOptionsSamuel Mehrbrodt
Allow users to specify a job name which is sent to the printer (by default this is the current document name). Usage: Sub PrintWithCustomJobname Dim mPOpts(1) As New com.sun.star.beans.PropertyValue mPOpts(0).Name = "JobName" mPOpts(0).Value = "My Job Name" ThisComponent.Print(mPOpts()) End Sub Change-Id: Id7c1c0da7f581b1c050bb3e6d61dd01b7e8205f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137562 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-07-30tdf#117967 Fixes Save confirmation dialog for user cancelMatt K
The "Confirm save" dialog is launched from SfxMedium::CheckFileDate via "xHandler->handle( xInteractionRequestImpl );" and if the user canceled it the error is saved in the SfxMedium via "SetError(ERRCODE_ABORT);". Then, control is returned to the calling function SfxObjectShell::SaveTo_Impl which currently doesn't handle the cancel error condition, so this change just adds a check to detect it and return instead of doing more "save" processing. This return then goes to the calling function SfxObjectShell::DoSave_Impl which also does some save processing after cancel, in particular it updates the timestamps of the current SfxMedium (which are checked in SfxMedium::CheckFileDate from above and determines whether the "Confirm save" dialog will be launched), so this change prevents the updates to the timestamps by exiting early (i.e. before "DoSaveCompleted();" is called) if the abort error condition is seen so as to avoid a timestamp comparison result of equality which would prevent the "Confirm save" dialog from showing on every subsequent save action from the user. Now the behavior is for the timestamp comparison to fail equality (as would be expected if the file changed underneath the user) so as to ensure the "Confirm save" dialog continues to show for every subsequent save action by the user. Change-Id: I9c4aefc163a06029c80a8a28cdf4a09dff0031a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137540 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-07-30tdf#150045 Set secondary/explanatory labels apartAdolfo Jayme Barrientos
Rationale in commit 0ebbe1f0080f474fd583e5912c9605e6fb2e13d5, of which this is a follow-up. Change-Id: If75aa32bf02aeb8761f5b7f4ddbbeaa3bdcaab3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137618 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-07-29Resolves: tdf#147782 restore focus to launching frame asynchronouslyCaolán McNamara
Change-Id: I7ebde70e4e1aae861f6ac7d70a91741596cb2cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-28lok: add dumpState feature for better in-field diagnostics.Michael Meeks
Always suspicious that some un-expected dialog / state can cause strange behavior in a client. An initial cut at an API to make it easier to unwind such problems by exposing the toolkit state. Change-Id: If8f17943fa4837df4f9ca659a111dcdce5c23244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137504 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-07-28lok: Properly update sidebar context in MathMike Kaganski
Change-Id: I830c0d9bdeaa6340283eafc3e91251d02602d7aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137247 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-28lok: Enable sidebar in MathMike Kaganski
Change-Id: I1554a924eef0bfcaffa893057a37ef45321a0cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137246 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-27sw content controls, plain text: send state changes to LOKMiklos Vajna
This is similar to commit 373f655acbdad88ff5d76324f32650fe3a005e2e (Send state changes of content control UNO commands to LOK, 2022-07-22), but plain text was not a type at that point. Change-Id: Ia317c60411280c07e1e063ee4b23f12e0d9f6dd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137502 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-26Resolves: tdf#149127 explain the infobar asking to refresh master passwordCaolán McNamara
Change-Id: Ia8439dd6f5dca91f008150ed759eef92fcc4b9a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-25Send state changes of content control UNO commands to LOKAron Budea
Change-Id: Id6b3f9a35c129078b564f7906e03f6aa9306a5f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137415 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-07-25loplugin:moveitNoel Grandin
make the plugin more conservative, so we see less false+ (although we also miss some possibilities in the process) Change-Id: I91b1806271e7f802d7459834ab7bcc569047da3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25use more o3tl::spanNoel Grandin
which means we can reserve precisely the right number of entries when building maps Change-Id: I580414699289369de4730caae09829bbd8759e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21tdf#150044 sc import: fix editing password in shared modeBalazs Varga
Set the readonly state back after we create the tempfile for shared files. It is necessary for later, when we checking the file is readonly or not and we need to give the editing password. TODO: filesave IO error is another bug Change-Id: Iafc4dc6e7ce825fc3b7fe18abaee65c014c49a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137281 Tested-by: Jenkins Reviewed-by: Tünde Tóth <toth.tunde@nisz.hu> Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Tested-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2022-07-21tdf#141294 Use DPI scale factor for sidebar width limit in configAron Budea
And don't lock up if the calculated minimum exceeds the maximum (sidebar remains unresizable in that case, however). Change-Id: Ibe96a43ad5d6a3fe4132a9fb64fe244ab022668d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137267 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-07-20move wintypes.hxx from tools to vclChris Sherlock
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-19tdf#148913 sw: fix crash with pending infobars on WindowsLászló Németh
Usage of VclPtr<SfxInfoBarWindow> wasn't thread-safe on Windows, resulting random crashing during loading big documents. Regression from commit d89786054715b44aa983d0752484216825c74ae2 "tdf#125909 tdf#141298 sw: show (Hidden) Track Changes infobar". Change-Id: Ic6a6ad43a8cf7ea650ef6d1c0aa5c76c48763ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137230 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-07-19tdf#149170 sfx2: fix regression about spurious dialogMichael Stahl
Open a document that is locked, choose Read-Only, then click "Edit" on infobar: it is still locked, so a dialog pops up. Click "Cancel". Now a *second* dialog pops up that *again* asks if you want to open a copy of the document - this appears pointless so let's remove it. Change-Id: Id96a1211caea63e7559c67b08a6581d1a0ce9add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137234 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-07-19Replace old png writer in sfxpicklist.cxxofftkp
Change-Id: I8dd9925ea07fa16cea6918eef0e6d468d7b743c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137123 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-17No need for SfxWeldToolBoxControllerFactoryMaxim Monastirsky
sfx2::sidebar::ControllerFactory::CreateToolBoxController only supports creating controllers using the uno factory, or GenericToolbarController as a fallback. Given that we already handle the uno factory case in ToolBarManager::CreateControllers, all this complexity is really just for creating GenericToolbarController with a different ctor, which we can do locally as well. Change-Id: I3a5a3cda95a6c5db97615286e93630214f76cbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137149 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-14clang-tidy modernize-pass-by-value in sfx2Noel Grandin
Change-Id: I7984f0b52809091511dc01005fdbfeafd521b4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-10tdf#143148 Use pragma once instead of include guardsnazanin yadi
Change-Id: Ibbcfa123032cfbe141e6f33ff1f65054f129d3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136682 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-08rhbz#2104545: Only call utl::IsYounger when its result is actually usedStephan Bergmann
...as it may be expensive, or even throw (uncaught) exceptions (as apparently happened at rhbz#2104545, throwing some css::uno::RuntimeException while aMedObj was an sftp URL). The two branches in the if statement's condition that will now potentially call physObjIsOlder are disjoint (one for aMedObj being a file URL, the other for aMedObj being any WebDAV-related URL), so there is no chance that this change accidentally causes utl::IsYounger to be called more often than it used to be called. Change-Id: I29a5f18a12a8b83ec603366db26451175b5622c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-05sfx2: fix null derefs of SfxViewFrame::Current()Xisco Fauli
See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::lcl_tryLoadBibliography Change-Id: I80d764c4bbcf0c5affa3386fbb11f5a79e98b699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136828 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-05sfx2: prefix m_ private memberHenry Castro
SfxFrameWindow_Impl class Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I8171d04b65b24b111048a6a13e8db6af9120edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136814 Tested-by: Jenkins
2022-07-04sfx2: replace pWindow m_pWindowHenry Castro
SfxFrame class members Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I1fd272a113763f6330f15ee34095e9e34ce5dd34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136753 Tested-by: Jenkins
2022-07-01tdf#149603 macOS: fix workaround to use web help if Safari is the default ↵Christian Lohmaier
browser Safari won't access the local helpfiles from LO's app folder unless you enable Safari's webdeveloper menu. The workaround broke since f31f0038f5fd9254584a06665066faf9715d1cd8 switched from window to widget references and hence using a different codepath, skipping the workaround added in 44893662d510c4173e55ba27af02d0258a697a5d Change-Id: I0c59066fe1cef1514c6595e0439d31d3e60e02f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136685 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-06-30sfx2: replace pImpl -> m_pImplHenry Castro
Class SfxFrame Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Iad58908e76f3d9891816a9c8dad3d37aa6630722 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136684 Tested-by: Jenkins
2022-06-30tdf#149785 Read Error importing documentNoel Grandin
after commit 04073c5fedd33654f242fecb7e39afb07cf0e273 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Jun 21 13:17:09 2022 +0200 replace oox::OptValue with std::optional and add a SAL_WARN to make this easier to diagnose in the future Change-Id: Ia5be0b82e3a5df34f50bc8a2decb1de98e0c5556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136665 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-29lok: sidebar: notebookbar: don't change view mode for other viewsSzymon Kłos
We should change view mode (notebookbar/toolbars) only for current view. This prevents the closed sidebar from showing when other view joins the session. Change-Id: Iaeec1bee0afab7552e223f17dd7afac27d288db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134690 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 08891ae798b1e59719684d1b0343767c9d136a11) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135001 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136592 Tested-by: Jenkins
2022-06-17tdf#149431 Fix the sidebar's widthxuenhua
When click the wider sidebar and then go back to the narrow one in Writer, the narrow one becomes the same width as wider one, it's not suitable and doesn't look good. Fix the width to smallest width unless you drag the splitter. Take the maximum width from the smallest width and mnWidthOnSplitterButtonDown. Change-Id: I60aaab84593d59ac28b96c2d3c3bd62a4bbddbbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135220 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-16loplugin:moveitNoel Grandin
Change-Id: Ic593974a44d9e327e0385c7ffaaa6d42576ae01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13tdf#125040 Make single mode toolbar context awareMaxim Monastirsky
This patch modifies the "Standard (Single Mode)" toolbar to have an optional context-aware section, given that a corresponding singlemode-<context-name>.xml files exist. This is a lot like the "Contextual Single" NB, except that it's implemented with regular toolbars, so docking/ customization/extensions/uno api etc. are all working. In addition, the "Single Toolbar" mode was modified to not show any other contextual toolbar. (But of course the single mode toolbar itself is perfectly usable outside of this mode.) Change-Id: Id746d9df59340a81962a8689b132941deea54b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135591 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-13LOK: send state of Protect, UnsetCellsReadOnlyPranam Lashkari
Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I92675ed0033088233fb442138b39a3c8d663c614 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135454 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> (cherry picked from commit b8626e85a799fd0807749cab9e712652240f13cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135389 Tested-by: Jenkins
2022-06-12Fix context menu on image which doesnt displayJulien Nabet
- Launch Writer - Insert any image in it - Right click on it => Nothing displays + console shows: warn:legacy.osl:67182:67182:vcl/source/window/menu.cxx:2750: PopupMenu::Execute: need a non-NULL window! Regression from f71606c920a3f78294da745cd9ef1eacde010224 new loplugin:moveit Change-Id: I89f5bfe2a3cd6a935b419d55c2f3e884c7eed2c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135681 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-12Related: tdf#125040 NB: rework print preview contextMaxim Monastirsky
Current implementation broadcasts the context change before the new controller was set on the frame (via XFrame::setComponent). This isn't going to work for anything LayoutManager based, as it responds to frame events by recreating all toolbars, so the newly created toolbar won't see the context sent for the old controller. Solve that by delaying the context change to SfxShell::Activate, like anywhere else in the codebase. And make NB listen to frame events, so it could also switch listening to the new controller. Also fixed a crash when switching to print preview in Writer with the navigator in the sidebar being active. Ideally we shouldn't even try to create sidebar panels in print preview, as the sidebar as a whole is disabled. But left that for a future investigation. Change-Id: I07759c676d2a2eb6f752fe778b559b15d2d759ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135492 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-06-10loplugin:constantparamNoel Grandin
Change-Id: I8134744b6c1279c497d4763eddf614bb840f7f3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135602 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10add missing 'xComponent->dispose()' to a testLuboš Luňák
Change-Id: I0ae2847e81eb2f1fba16e65d89ca1db1e55ac4b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135577 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-09can pass by const& hereNoel Grandin
no need to copy Change-Id: I1fcc5d645a8f5278e2122a168b00c846d75bc091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-09tdf#140886: Make "Do you really want to open it?" more reliableStephan Bergmann
70009098fd70df021048c540d1796c928554b494 "tdf#128969: Let the user explicitly decide to execute an external program" had shoehorned that new warning dialog into the existing XSystemShellExecute::execute IllegalArgumentException return path, which caused some issues: For example, it caused the warning dialog to reappear after you acknowledged it on macOS (see comment at <https://bugs.documentfoundation.org/show_bug.cgi?id=140886#c10> "Allow hyperlink opening on file with execute bit set ref. CVE-2019-9847"), and it caused the warning dialog to erroneously appear for a non-existing file on Windows (see comment at <https://gerrit.libreoffice.org/c/core/+/124422/2#message-ac76b728fedc53e7d0a04c99f00364068b51a8ea> "tdf#128969: Let the user explicitly decide to execute an external program"). So rather than reusing IllegalArgumentException for this case, use a different kind of exception to trigger that warning dialog. The existing AccessControlException (which is also a RuntimeException) happened to fit more or less well. Change-Id: I3f743c21be48d54f10951006ef3d7172e23e9076 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135524 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>