summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2023-08-12Fix typoAndrea Gelmini
Change-Id: Id2c317c44e6bc4e2c9d0d0e7fd830b6b414e8c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155624 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-12tdf#137878 autorecovery: reduce "file not found" pop-upsJustin Luth
For a DOCX file, there were four of them during a recovery if the file was on a USB or renamed or whatever. Now there aren't any. Change-Id: I5cbad6e4ed1a1bc1d3b8e805a6b493f4ee61ec68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155567 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-11autorecovery: add some documentationJustin Luth
Change-Id: I9a037e263ecdc374df9450ee9a066468dc6ab5e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155426 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-08-10partial Revert "tdf#144512 autorecovery: always wait for user idle...Justin Luth
... with timed save" in order to restore useful comments This reverts 24.2 commit 75d7464e7eb94df1ad9904ad750b27d99d91abc5, where the ResettableMutexGuard's safety is cancelled by a g.clear() // } /* SAFE */ and re-instated with a g.reset() // /* SAFE */ { Thanks Mike for explaining the obvious to me. Change-Id: I98016a50221b734a38d14bce0a958c6af9e57944 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155514 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-09tdf#144512 autorecovery: always wait for user idle with timed saveJustin Luth
Only the "active" document was waiting for a user idle. But that doesn't make sense because the background apps still lock the foreground app during file save. So all timed backups should wait for a user idle period before starting their recovery / autosave. Once an idle loop is triggered, no autosave will ever run again until an idle timeout occurs! So a busy user who switches from one doc to another without ever pausing still wouldn't ever get a backup - even from the background docs! Without this patch, only the first modified documents (if backgrounded within 10 minutes) would ever get a recovery save. So in pretty much every case this patch makes sense AFAICS. Change-Id: I6e9e04aa2e50895e53826b427cb52c129da43701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155459 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-08-09tdf#144512 autorecovery: only wait once for user idleJustin Luth
If we currently are in a user idle state, then don't delay any recovery / autosave's until a future idle timeout. Change-Id: Ie3953bb7456370d046b76a4cad816498dbfc85e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155462 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-07tdf#57414 autorecovery: ignoreClosing during Emergency/SessionSaveJustin Luth
Unmodified documents were losing the enties from RecoveryList when implts_deregisterDocument was triggered, which prevented the Session recovery from being able to reload them. Change-Id: I991a9821105aca81ec596b28341ef4335b817439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155380 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-08-07tdf#57414 autorecovery: avoid unnecessary storeToRecoveryFileJustin Luth
With a successful UserAutoBackup, the document is fully saved, and the recoveryInfo entry is removed. So just avoid the recovery that would just be deleted anyway. Change-Id: I3cc9fe2730640df48f450f900f33afc2df7f020a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155273 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-07tdf#57414 autorecovery: don't store unmodified docs in RecoveryListJustin Luth
When a document is successfully saved (manually), it is removed from RecoveryList (implts_markDocumentAsSaved) and all of the temporary recovery files are removed from the user's backup folder. If the document is automatically saved (UserAutoSave) successfully, it doesn't need to remain in the RecoveryList either. storeToRecoveryFile can benefit from knowing if it will be removed, so determine whether to bRemoveIt just prior to that call. Change-Id: I2cb30b426e600cfe34987a091acaf8826316ede5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155272 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-07tdf#57414 autorecovery: not in RecoveryList? always delete tmp filesJustin Luth
In all but one case, the storeToRecoveryFiles were deleted when the entry was removed from the RecoveryList (and likely it should have been removed in that case as well, since the program could not open that file anyway). So, move that function into the flushConfig function to ensure that recovery files are not orphaned in the backup folder. If the URLs are not cleared, and the recovery tries to load the non-existing file, then LO will assert (or maybe crash). (For implts_markDocumentAsSaved, it does the deletefiles/flushCOnfig outside of the SAFE area, but updates m_lDocCache with *pIt = aInfo inside the SAFE area, so those deletefiles/clears cannot be cleaned up.) (implts_cleanUpWorkingEntry and implts_deregisterDocument both remove the m_lDocCache entry competely, so it was not necessary to clear the URLs in those two cases.) Change-Id: I765f3a815f28082495a7f286a8b28b977e0cad75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155118 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-08-07tdf#57414 autorecovery: don't always add every file to RecoveryListJustin Luth
There is no need to recover documents that are not modified, and certainly not if there is no storeToRecoveryFile. This specifically is nice for read-only files, new files, or e-mailed files that have just been opened for viewing. registerDocument: A just opened file has nothing to recover, so wait until it has storeToRecoveryFile'd. - Emergency and Session pre-register all documents via implts_persistAllActiveViewNames, so no problem here. resetHandleStates: shouldn't add, just update the existing states saveOneDoc: shouldn't add before storeToRecoveryFile, only after. Change-Id: I4a935ee325af6469b25c5bf3d2860c4065d9130d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154490 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-07related tdf#57414 autosave: try harder to know when !IsModifiedJustin Luth
The cache that holds document status did: -saveDocs: for each cached document status: -creates a copy of the cached status -call saveOneDoc: given the copy [-updateModifiedState should get called, updating the cache itself] -saveOneDoc: flushConfig writes copy to RecoveryList (as modified) -cache is updated with the results from saveOneDoc (*pIt = aInfo) Now, it is easily possible that saveOneDoc changed the status from modified, to not modified, wouldn't you think (if UserAutoSave)? But since the copy was never updated, it reported as modified still! storeToRecoveryFile can benefit from knowing the real modified status, so do the update just prior to that call. Change-Id: Iee1ddd0bf7bee25d5ba3e7abb1ac6713295906af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154683 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-08-03tdf#71550 autorecovery: use osl::File::Remove when isEmptyFileUrlJustin Luth
Mike K suggested I just use the simpler, faster function in this case. Change-Id: I0f7f6611f12f88cd1daa4104b58eb44365a44ae3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155271 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-02tdf#144512 autorecovery: don't delay autosave on shutdownJustin Luth
Change-Id: I98ee31369aa46c4e3aeb405ec11a1ef197c31fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155165 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-02tdf#65509 autorecovery: don't UserAutoSave during EmergencySaveJustin Luth
Saving overtop of the working document during a crash save does not sound like a safe thing to do. However, an ODF recovery export is attempted which will preserve unsaved modifications, so avoiding this save should not cause data loss. Change-Id: Ie993042b4c99d5dfb816727d4bfae5bca694d72f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155166 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-01tdf#57414 autorecovery: if no recovery doc, remove from RecoveryListJustin Luth
The document has just been saved (perhaps manually, perhaps automatically) and so the recovery ODF files are being removed. So remove from RecoveryList since there is nothing recoverable at this point. Sure the document is open, and perhaps there is even a modification already, but if there are no recovery files available, then why display it to the user? Change-Id: I309cd7df573c960f75c2240c8b5cf171fc1d95be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155059 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-28tdf#104382 - Menus should be disabled when they have no enabled submenusBalazs Varga
Disable menu elements if they only have disabled submenu elemets. TODO: GTK3 Change-Id: I83cdc58846afd61719ceeba9f993df894ce6fd01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154938 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-07-26tdf#149318 Set HID for menus that have sub menusRafael Lima
This patch fixes the following issue when pressing F1 while hovering on a menu entry that has submenus: 1) Place the mouse over a menu entry that has submenus (f.i. in Draw go to Format - Table) 2) A submenu will appear, however leave the mouse over "Table" 3) Press F1... the help ID used will be "slot:0" because LO is trying to find the help ID of the selected entry in the submenu, but since none is selected, then the generic "slot:0" value is used. To fix this problem, this patch assigns a Help ID for the submenu (not for its entries) so that when no entry is focused, then the submenu HID is used. IMPORTANT: note that pressing F1 on menus only work with gen and win. Due to bug 156376 pressing F1 on menus does not work with kf5 and gtk3 (yet). Change-Id: I717e7669faac47a12c929129c0de98dee7f44439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154862 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
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-07-20tdf#65509 autosave: apply UserAutoSave without restartingJustin Luth
Now that I know there is a config listener running in AutoRecovery, listen for the config change and apply it immediately instead of requesting the user to do a restart. Change-Id: I69912c0e95c04cc1a5e680d5e8c59b15e94efb05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154664 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-19Use correct configurationMike Kaganski
I introduced it in commit 79113484cacb630f93f87c483b6c5d97c47b8728 by mistake, when rebased on 3c41b32562d5ccdd306000484c5b16245b2b4a4f. Change-Id: Ia3ba91cda9e54d9434b6d79bf78afd13f2b20d5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154619 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-18[API CHANGE] tdf#144512: keep autosave interval separately for each documentMike Kaganski
Maybe this would make a better UX, as the request suggests ... or maybe not. css::document::XDocumentRecovery2 is introduced for this, allowing to query the document dirty state duration. Change-Id: I25997788bc5da261f7e4131616ab8d4a245de380 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154505 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-17tdf#156308: Restore use of /org.openoffice.Office.Recovery/AutoSaveMike Kaganski
... instead of respective values from /org.openoffice.Office.Common/Save/Document The history of the problem: d0f9685d2cfc3927add412b276c804dcc20cb6a5 (2004-11-26) made SvtSaveOptions use org.openoffice.Office.Recovery/AutoSave, *in addition* to org.openoffice.Office.Common/Save/Document/*, as "forward AutoSave/AutoSaveTime to new config location" part of i#27726; at this point, org.openoffice.Office.Recovery/AutoSave/* took precedence (they were read last). 8e6031e126782ced6d7527b19cf817395e9b63e4 (2004-11-26) implemented autorecovery.cxx, already reading org.openoffice.Office.Recovery/AutoSave/* d5b9283985633fdb423269cab961bba2acc3539e (2021-07-25) made SvxSaveTabPage and SfxApplication::SetOptions_Impl use officecfg::Office::Common::Save::Document::* instead of SvtSaveOptions. 134f40136a9bea265d8f2fedfdb41a1e65d81b49 (2021-07-25) dropped SvtSaveOptions_Impl::ImplCommit, and its saving of officecfg::Office::Recovery::AutoSave::* (which likely detached officecfg::Office::Recovery::AutoSave from officecfg::Office::Common::Save::Document, making UI edits not stored to the former). aeb8a0076cd5ec2836b3dfc1adffcced432f995f (2022-05-23) made AutoRecovery::implts_readAutoSaveConfig read officecfg::Office::Common::Save::Document::* instead of proper officecfg::Office::Recovery::AutoSave::*. This change restores the intended use, and deprecates corresponding values in /org.openoffice.Office.Common/Save/Document. Change-Id: I33d48e3945326c80d356bfc930ed8a7f042c982b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154500 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-17Small simplificationMike Kaganski
Change-Id: I36bbdb48f0fa0d81e7ba294e9ac01b0d187e4800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154462 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-14tdf#71550 autosave: remove empty, new file on failed autosaveJustin Luth
before throwing and losing any control. Change-Id: I2340c6f08bae116f3c1a390bccca2075c047a737 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154446 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-13tdf#65509 apply new AutoRecovery timeInterval without restartingJustin Luth
Another option would be to listen for config changes I guess. However, this alternative method of setting the timer interval (which I assume is related to Impress slideshows, but couldn't reproduce) is basically never used. At worst (in case this alternative method sets a non-zero time) it will be the same as before where a restart is needed to gain the new time. I'm not worried about having the user wait for the current timer to run out (in 10 minutes based on the default state) before their new time kicks in. Change-Id: Iaa2b9e3e0912918ae29aaf262b5d7f51924b8147 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154365 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-06-26new loplugin:constexprliteralNoel Grandin
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-15tdf#155699 - MRU: show pinned documents at the beginning of the listAndreas Heinisch
Change-Id: Id08678708ee74a4a278baa1e67930044f25e5d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152690 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-06-06use more officecfg for SvtMiscOptionsNoel Grandin
Change-Id: I6c87025fc0997b5edbc085fc88333fe9e150eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06SvtCommandOptions only supports CMDOPTION_DISABLEDNoel Grandin
CMDOPTION_NONE is just ignored, so remove this parameter Change-Id: If9de22a6b0522620a267cbc92b118f79e200d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-25[API CHANGE] remove XModuleUIConfigurationManager3 and XUIConfigurationManager3Miklos Vajna
The motivation was to not modify XModuleUIConfigurationManager / XUIConfigurationManager, but as pointed out at <https://gerrit.libreoffice.org/c/core/+/151798/10#message-31d00a775989b981a5f50639623cc773d6ea930d>, it may be fine to modify XModuleUIConfigurationManager2 and XUIConfigurationManager2 instead of adding XModuleUIConfigurationManager3 and XUIConfigurationManager3. Indeed, searching for usage in <https://github.com/libreoffice/wollmux>, only the published interfaces are used, so let's fold XModuleUIConfigurationManager3 into XModuleUIConfigurationManager2 and XUIConfigurationManager3 into XUIConfigurationManager2. This is a reasonable middle ground between 0 API change and breaking known users of the public API. Change-Id: I2dedee7e255f9dda9c9057961e6c829f83b2b709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152254 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-23[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.Gökay Şatır
We need to have different accelerator classes for differnt languages. This PR creates a new accelerator class for different languages. Since current code uses single instance for accelerators, i needed to add a create function. Also we now have an unordered map for different languages and modules. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680 Tested-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798 Tested-by: Jenkins
2023-05-13simplifyNoel Grandin
no need to use a map here, a set will do Change-Id: I8e8b35f390ffba5b7da6caa52eb3e33d3b50d354 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-07framework/taskcreator: declare ARGUMENT_HIDDENFORCONVERSION and use itJulien Nabet
Change-Id: Ie4e8c24bf776d0ba0e1b7f986fd506521816d2e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-07Simplify some initializations in framework/source/classes/taskcreator.cxxJulien Nabet
Change-Id: I56480780903a39534c3bab8e79e3864fcba10470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151473 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-07framework/inc/taskcreatordefs.hxx: these are bool and not sal_Bool (2)Julien Nabet
Thank you Mike for having spotted it! :-) Change-Id: I210edf2e05eb6ba02ac9cdd999c4f2233819cfa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151476 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-07framework/inc/taskcreatordefs.hxx: these are bool and not sal_Bool since 2014Julien Nabet
See a6287e21f1dab6ae382c24ceeb4c0212b7cad2d7 "framework: sal_Bool->bool" + /opt/lo/bin/clang-format -i framework/inc/taskcreatordefs.hxx as requested when submitting patch with logerrit Change-Id: Icb21563590a4104f3cb678db44fc4b5f1d884764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151475 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-07Typo: freature->featureJulien Nabet
Change-Id: Ia30740ce0422b2fe5a85e288f18de68a1dca9b33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151474 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-07improve some usage of OInterfaceIteratorHelper4Noel Grandin
we can drop the lock immediately after construction (since the iterator holds a thread-safe COW link to the underlying listener container) Change-Id: I08f8fa9ed7393747938572097f3c25f5f3f847fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-28survive exporting to pdf without config for fuzzingCaolán McNamara
Change-Id: I229f25a8a15b21257756ecfa008b9e99681003c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-28remove dodgy code in OReadToolBoxDocumentHandlerNoel Grandin
comparing hashcodes without doing an actual comparison is not safe. Code was like this since commit 6845330a228f7b516425e2dcb0aa5f2cdfaedc85 Author: Carsten Driesner <cd@openoffice.org> Date: Wed Oct 17 09:57:37 2001 +0000 #87255# support toolbar item style and help id Change-Id: Ie49647da257e6199d9502c916da2dd3d39d52377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20Run clang-tidy with misc-unused-using-decls on modules [d-o]*Gabor Kelemen
To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: Idd8aa3d3cfec456c4babb65e89af712051b4deb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150609 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-15Simplify initialized checkMike Kaganski
The previous complexity did nothing useful; it allowed to have a single unguarded boolean value check, for the cost of releasing and acquiring the mutex again. Change-Id: I426304e9ef6f27ca371544951bf3cc029887019e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150437 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-13try to fix CppunitTest_framework_dispatch on windowsNoel Grandin
I see occasional failures here, possibly they are a threading issue since we are touching these fields from multiple threads. Add a mutex to see if it helps. Change-Id: I7277e96d07d292a6bc1d333dabec7a82fc607465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150281 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12OUString::intern is a relicNoel Grandin
and a pessimisation. Remove usage thereof. Change-Id: I98f6197aa375349b909a7ef1403ec06ca37890d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>