summaryrefslogtreecommitdiff
path: root/desktop/source/lib
AgeCommit message (Collapse)AuthorFilesLines
3 daysthesauri list can be empty at preloadCaolán McNamara1-4/+7
if none of the dictionaries are installed, seen in a bare bones docker image, giving a backtrace of: /usr/bin/coolforkit(_ZN7SigUtil13dumpBacktraceEv+0x73)[0x632d83] /usr/bin/coolforkit[0x6331a5] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f48788b4980] /opt/collaboraoffice/program/libuno_sal.so.3(rtl_uString_assign+0xc)[0x7f487070582c] /opt/collaboraoffice/program/libmergedlo.so(+0x20f9478)[0x7f4873cbc478] /opt/collaboraoffice/program/libmergedlo.so(+0x20fa3c4)[0x7f4873cbd3c4] /opt/collaboraoffice/program/libmergedlo.so(+0x27e6d82)[0x7f48743a9d82] /opt/collaboraoffice/program/libmergedlo.so(+0x27e8eac)[0x7f48743abeac] /opt/collaboraoffice/program/libmergedlo.so(lok_preinit_2+0x1c)[0x7f48743ad31c] /usr/bin/coolforkit(_Z13globalPreinitRKSs+0x1e8)[0x5dfdd8] /usr/bin/coolforkit(_Z11forkit_mainiPPc+0x1582)[0x5aa482] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f48784d2c87] /usr/bin/coolforkit[0x56c392] Change-Id: Ib3a8ada7c22611e04e9db8dfa7cb0e227ece0f84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 dayspreload BreakIterator for LOKNoel Grandin1-0/+8
Change-Id: I22bea46d224f4020bb18d2826f23985fc2d8e492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166129 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 dayslok: provide global random symbol to find random device.Michael Meeks1-1/+21
This is vital for lok when used in a jail with no random device, but with an inherited file-handle to /dev/urandom. Use 'dup' to avoid changing code that wants to 'close' the handle after use. Change-Id: I15f40fb251f180a2394af030f56e47f2bf9651d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166113 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-03LOK: set creation date when online creates file from templatePranam Lashkari1-9/+26
problem: when online created file using WOPI clients, creation dates were never set. in online files are created using templates, even empty files are created using an empty template Change-Id: I3f022427745de7204faac9418620e2a87f9cf684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165711 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-02tdf#146619 Remove unused #includes from C/C++ filesRafał Dobrakowski1-10/+0
the 'desktop' module was cleaned Change-Id: Ia7dcb77a42ca7f9be67e30d10cd54697bf93b6d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165663 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-01lok preinit: don't re-synchronize extensions on each child start.Michael Meeks1-0/+3
We should sort out our extensions, if at all, at pre-init time. This should save ~4% of CPU in a week-long profile of a COOL server. From Desktop::Main's SynchronizeExtensionRepositories. Change-Id: I2760de26635723492dfa5a52005ee90623337bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-28lok: add isForkedChild method.Michael Meeks1-0/+8
This can be used to tag short-lived transient 'save' processes to encourage them not to mutate eg. filesystem state that is shared with the parent process. Change-Id: I027d18cbe4ce519b31c4fc1d3ac46b916d1efc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165407 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 9dab5edb90d14ad6f71cc2ac96cc504c1e8c290b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165427 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-03-26Allow enabling saving when comment edit is allowed in readonly.Gökay Şatır1-0/+3
Change-Id: I88d535a5b23fb6d5de8e72eec61bdf3550bc757d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165334 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-21Moving parts of readonly checks from model to view.Gökay Şatır1-0/+28
Summary for what's done with this commit: init.cxx * Add guards for modify commands. viewsh: * Add "IsCurrentLokViewReadOnly" for ease of use. unocitm: * Add guard for modify comamnds dispatch.cxx * Implement readonlyview. objmisc: * Modify IsReadOnlyUI check for LokReadOnly view. svx.sdi: * Disable TableChangeCurrentBorderPosition command for readOnly views. sw-editwin: * Treat mouse moves as readonly when the view is LokReadOnly. gridwin: * For autofilter. impedit2, inputhdl: * For text input. svdedtc: * For sdr object dragging. Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165093 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-21cool#8278 sfx2 lok: fix unexpected non-json sidebar status updateMiklos Vajna1-45/+9
Open an Impress document via LOK, open the slide layout sidebar, click the toggle icon so it gets closed: the toggle icon will signal that the sidebar is open, when it's closed already. This is a regression from commit aaf6ce108e91b1504befe19afcee471e3316ae7a (cool#7492 sfx2 lok: set language/locale on async sidebar update, 2024-01-11), previously we always emitted LOK_CALLBACK_STATE_CHANGED callbacks with plain text payloads for the sidebar, where the locale with implicit (with all its issues), but the above scenario worked fine. Fix the problem by making SidebarController::disposeDecks() consistent with SwitchToDeck(), so now we always emit JSON payloads for the sidebar deck changes. An alternative would be to improve the code around extractUnoCommand() in online.git to handle a mix of plain text and JSON payloads, but the plain text payload is tricky to extend, so using more JSON payloads sounds like a better fix. Change-Id: I5b75c2987c230c6720181a1e95ae579727943235 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165055 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-19Allow enabling comment editing in readonly view mode.Gökay Şatır1-0/+15
Online side can set this property to allow comment editing. This is the infra. Implementation will be in another commit. Change-Id: I3a6f1ad6818c2c6587d98896c3d6d913d51a2295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164988 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-12lok: Send Accept / RejectTrackedChangedToNext state changeAron Budea1-0/+2
Change-Id: I194c0c3260fe90273f5b5f50c18a63e48ae85449 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164699 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 9358d70f57ffd2ea40a3ae71db14b26307fce92e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164685 Tested-by: Jenkins
2024-03-08LOK: send inner text boundry information of shapes/textbox on changePranam Lashkari1-0/+1
instroduced new callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXT now if innert text is changed LOK is instantly updated about new textarea Change-Id: I0a88e1dd77556e47f14359ce0a98701a327aceda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164497 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07Collaborative editing with readonly and edit views.Gökay Şatır1-0/+15
We can have both readOnly and editor views at the same time while collaboratively editing a document. Our current solution is to disable any command if the user's view is readonly. We want to have a closer behaviour to desktop app with readonly views. For this purpose, we are allowing more interactions from online server to core side. We also need to filter out the events like the core side readonly view do (next commit). This commit initiates the readonly view infrastructure. The patches previous commit reverts were an example of how we disable things in readonly mode. We needed to open a window for getting hyperlink information. With this patch, we try to separate the edit and readonly view modes on core side. More notes: We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an endless loop with this patch. When we disable editing on a browser, almost all user actions are disabled. (cherry picked from commit 81dae2ca5187bd24aea0befb099a5b53535b5d03) Change-Id: Ia25368dd8065206ec6b4b83eb2f685531110cc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164527 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-07Revert hyperlinkInfoAtPositon changes.Gökay Şatır1-18/+0
Revert "Implement hyperlinkInfoAtPosition for Impress." This reverts commit 876543305c78cb596720da087454a5c54e5feb06. Revert "Readonly Hyperlink Info - normalize the clicked coordinates." This reverts commit 322669725b771f5fa2b3c10c5fb73238ca3713f6. Revert "Implement hyperlinkInfoAtPosition function for Calc." This reverts commit be01dd78c47b51b19603a6259504e29b11979b0b. Revert "Implement hyperlinkInfoAtPosition for Writer." This reverts commit 6773c8929690f557d29bc282dd8f5c4381da3484. Revert "In readonly mode, we restrict many events like click." This reverts commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd. (cherry picked from commit c3f1d63178d6aaa0888085c7b641eb6d49a18276) Conflicts: sc/source/ui/unoobj/docuno.cxx sd/source/ui/unoidl/unomodel.cxx sw/source/uibase/uno/unotxdoc.cxx Change-Id: Ie821a4bca6e6b4649cea17748c44af105cd45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-27use getCommandValues instead of adding a getViewRenderStateCaolán McNamara1-13/+4
Change-Id: Ib6db5dd8ef1db2745cb3c616bb81b1ac2baf6504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-27Fix typoAndrea Gelmini1-1/+1
Change-Id: I48f1487f11ba35b61327b148d51f8ecb4f36b78e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163992 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-27Fix typoAndrea Gelmini1-1/+1
Change-Id: Id1e21804fb2bc93887892192e38b655c8654ed7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163991 Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp> Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-27Remove duplicated includeAndrea Gelmini1-1/+0
Change-Id: Id0e2c58678499fdda5d7bc61800d9586f06bb411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163990 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-26return early without error if no shape it selected on generating previewCaolán McNamara1-0/+36
of current selection. Which can arise in calc on repeatedly double-clicking on a shape and pressing esc. Eventually there will be a case where the shape isn't selected by the time the preview generation is attempted. Change-Id: Ic92149b5e12f35fe69265b6c8df289819313a899 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-26add getViewRenderState to LibreOfficeKitDocumentCaolán McNamara1-0/+13
so we can get the initial render state as it is when created Change-Id: I1202cbbf478bc4f62f4d587e1f2766c61f172cb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163666 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit effe8f6e5cc5389b234a6e57540f935de4a6f201) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163843 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-14lok: implement a joinThreads function - to wind down thread pools.Michael Meeks1-0/+23
Necessary to do this before forking on Unix systems; use a dynamic_cast interface since this is all for internal use. Change-Id: I8a911322acd4ec5654eb0d14804c09d513a0bd4b Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163335 Tested-by: Jenkins
2024-02-09preload: open and close empty documents of main types in preinit.Michael Meeks1-0/+17
Some quick testing suggest this saves ~800k for writer, ~3Mb for impress each loading an ~empty hello-world document. Change-Id: I9a7bc25d38d82b5556dfb04a99d5c145dd71ffec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162939 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit d85cb3832286ae1fdcf4a8494abb8212f21e4e9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163148 Tested-by: Jenkins
2024-01-28Simplify massively over-engineered compatibility optionsMike Kaganski1-2/+0
They seem to be designed with multi-dimensional flexibility in mind; it is stored as an array of lists, each having a name and a module. The name may mean a filter. It may have a special name "_user" with unclear meaning. But it only ever used a single item in the array, named "_default", in a single module (swriter). Everything else was only read into a hidden listbox in Compatibility dialog, and never shown nor used. Make ir much simpler. Just use the "_default" item. It is possible to expand it later, if needed; but the previous complexity was bad for maintenance and adding new options. Translatable descriptions of the options were moved from UI file to sw/inc/strings.hrc, and used in a structure that clearly maps them to respective identifiers, to avoid fragile hidden dependency on order of different lists. Change-Id: I78ac5add8a872613e1fb388e4b8cc4fbf4362adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162651 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski1-5/+5
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-25preload sal_textencCaolán McNamara1-0/+6
use RTL_TEXTENCODING_MS_1250 to trigger Impl_getTextEncodingData to dlopen sal_textenclo early Change-Id: Ie96b81615cbd4b479d731916518835b2f72adf6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162477 Reviewed-by: Neil Guertin <neil.guertin@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 4f404f2b18692276d157c4de9bfbb1f6370ad58d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162541 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-24SfxViewShell::GetFirst lambda is never passed a null pShellCaolán McNamara1-3/+3
it's null checked before the lambda gets called so make this a reference Change-Id: Ib8804a2003cbdc6b7b62d8a38fa514d0ce08128c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162495 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-19lok: remove non-filter options from filter optionsGabriel Masei1-3/+1
Filter options should be what remains after extracting any other options from the original list of options. Change-Id: Iad787b34aba58c3910118e94df66a102b44034c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162316 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2024-01-09lok: external data source listSzymon Kłos1-0/+8
Make possible to filter allowed data sources. It is used for WebDAV curl, WEBSERVICE function, cell external references. Change-Id: Ifc82af31ff1123b5656a21e6a27624fb1616db39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160196 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161772 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-01-08calc: Add option to keep edit mode on enter/tabSkyler Grey1-0/+1
This change makes it so that, rather than leaving edit mode, enter and tab keep editing the new cell when they have moved. This is important on devices with an onscreen keyboard (e.g. iPads, Android tablets, Convertible Laptops, etc.), particularly in Collabora Online, as exiting edit mode hides the onscreen keyboard. It is not desirable to enable this by default, as arrow keys cannot move around the document when we are in edit mode (they move within the cell). Therefore, this commit also adds an .uno command so that we can activate or deactivate the option. In LibreOfficeKit we want to make sure not to share this setting among different users, so we also add this option in the view shell and switch which one we care about based on whether Kit is active. Change-Id: I5e6c93c64af0d201a8ec045fea5546e189baca74 Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160313 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161696 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-07Drop SvtFilterOptions and use officecfg insteadMike Kaganski1-2/+0
Change-Id: I6aa9a21d1422b8b3b6fe5dde9869dffa88be5535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161744 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-04Send tooltip text to LOKMike Kaganski1-14/+14
Call vcl::Window::RequestHelp from LOKPostAsyncEvent for mouse movement. Introduce LOK_CALLBACK_TOOLTIP callback type, and send it from SwEditWin::RequestHelp. Intention is, that the tooltip is shown by client at the current mouse pointer position, which is hopefully not far away from the point that generated the mouse event. On the next movement, the client starts a timer to hide the tooltip. If the next tooltip message arrives, the tooltip would be updated in the new place. Alternatively, the payload could contain the coordinates from the HelpEvent. Change-Id: I8e96eb6e6983ad8d13b4c5d7be4d51ff3fd11893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161302 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-03Drop now unused SvtSlideSorterBarOptions classGabor Kelemen1-2/+0
Change-Id: I9db309b15e490c9bd03e767c192ba364a4ffe214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-02lok: import Work path from LOK_WORKDIRSzymon Kłos1-0/+8
Change-Id: If0c9727f53c1c4dfb78d1ccbd6b3ff602268bbf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160156 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161059 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-01-01Replace "size() != 0 with !empty()" (desktop)Julien Nabet1-1/+1
Change-Id: I164e29ed02fc4abf7a5b03ca0c391fb46b60e4f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161483 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-30SvtAccessibilityOptions no longer loads settingsGabor Kelemen1-2/+0
Change-Id: Ia7404122029b6b7c6fe7ff879bb1143b3419fc32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161239 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-28In readonly mode, we restrict many events like click.Gökay Şatır1-0/+18
In readonly mode, Online users need to be able to click on a hyperlink and get the related info. For this purpose, this PR adds a new function template that sends the hyperlink info if there is any at the clicked position. I will send the implementation with the next commit. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I886ea22a7097aac73ade0da78a88ddfc95ad819c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160022 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161372 Tested-by: Jenkins
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)1-10/+7
There are some CrashReports in 7.6 which have DeleteItemOnIdle on the stack, but there is nothing reproducable. So I took a look... I first thought it's a MCGR regression, due to classes on the stack. But the Item involved is just random, can happen with any Item. Then I thought it may have to do with ITEM refactorings, but it happens with DeleteItemOnIdle involved, so also not the case. I already saw DeleteItemOnIdle when doing these and qualified as 'hack' in the way. already It is only on Windows and DeleteItemOnIdle is involved. This again (took a deeper look now) is an old hack to keep an SfxPoolItem 'alive' for some 'time'. For that, it triggers an async reschedule which then deletes the Item when being called. If the Item will be used after that is pure coincidence - seems to work in most cases. It seems as if for Windows the timing slightly changed for some scenarios, so a reschedule is too early. This can happen with this hack anytime. DeleteItemOnIdle is used in scenarios where SfxPoolItem* is e.g. returned, but is *not* anchored, so e.g. not member of an SfxItemSet. Or in short: Lifetime is not safe. DeleteItemOnIdle exists since 1st import, but was changed to AsyncEvent ca. 4 months ago (see 57145acf9ec47c23e307b7a5c0029d21d937cc35), so that may have caused it. It is possible that these errors happen on Windows since then. Before something more complicated was used to delete it late, but surely also not really safe. Due to ITEM refactor I have the knowledge/tooling to solve this. It will not be a 1-5 lines fix, but it is a hack and in the way for further ITEM refactor anyways. What we have nowadays is a SfxPoolItemHolder -> it's like an SfxItemSet for a single Item. It safely holds/ controls the lifetime of an SfxPoolItem. It is already used in quite some places. It helps to solve many hacks, also the ones putting Items directly to the Pool - due to there never was an alternative for that. In principle the ItemPool/ItemSet/Item paradigm was never complete without SfxPoolItemHolder. Thus I started to fix that (and remove that hack for good, sooo many changes over the years, sigh), but as said is not straightforward. Will have to change retvals of involved stuff to SfxPoolItemHolder - it's just two pointers and designed to be copied (one is a Pool, needed to cleanup when destructing). CopyConstruct/destroy just counts the RefCnt up/down, so cheap. 1st version compiling, let's check on gerrit... Corrected one error in QueryState for securitypage, also added some security features/asserts. Change-Id: Ida49fd35ca88ead84b11d93e18b978cb9e395090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161083 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-12-19cid#1557601 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+2
and cid#1546498 COPY_INSTEAD_OF_MOVE cid#1546384 COPY_INSTEAD_OF_MOVE cid#1546376 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546373 COPY_INSTEAD_OF_MOVE cid#1546368 COPY_INSTEAD_OF_MOVE cid#1546365 COPY_INSTEAD_OF_MOVE cid#1546356 COPY_INSTEAD_OF_MOVE cid#1546340 COPY_INSTEAD_OF_MOVE cid#1546266 COPY_INSTEAD_OF_MOVE cid#1546236 COPY_INSTEAD_OF_MOVE cid#1546188 COPY_INSTEAD_OF_MOVE cid#1546178 COPY_INSTEAD_OF_MOVE cid#1546166 COPY_INSTEAD_OF_MOVE cid#1546156 COPY_INSTEAD_OF_MOVE cid#1546144 COPY_INSTEAD_OF_MOVE cid#1546143 COPY_INSTEAD_OF_MOVE cid#1546100 COPY_INSTEAD_OF_MOVE cid#1546078 COPY_INSTEAD_OF_MOVE cid#1546041 COPY_INSTEAD_OF_MOVE cid#1546036 COPY_INSTEAD_OF_MOVE cid#1546033 COPY_INSTEAD_OF_MOVE Change-Id: Ib3586d93198992e206baf5c2de5a663d5574aa3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin1-2/+2
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-06make AlphaMask separate from BitmapNoel Grandin1-1/+1
Having it subclass Bitmap encourages confusion in passing it around, and I need the extra type-safety for my work on merged-alpha Change-Id: I35819f9b8ee609cbdaf865563c78531e397b529b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160235 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-18c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 3)Julien Nabet2-13/+9
Change-Id: I1ea95e0bfeaed88b9484403e6796574f1d06f133 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159612 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-17cool#6893 pre-init dictionary listNoel Grandin1-0/+2
so the forked processes don't need to Change-Id: Id37688ac88c14679e216cca744563ee75c7c4736 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-13Re-introduce build config to version info reported by LOKMike Kaganski1-2/+6
... as an opt-in --with-buildconfig-recorded configure option. This allows to have the data in the admin console, as implemented in commit cbfac11330882c7d0a817b6c37a08b2ace2b66f4 (Send build config (configure options) in LOKit version info JSON, 2022-11-07), when reprobuilds are not required. The default is no build config, which is compatible with reprobuilds. This reverts commit 389def871853c885289627452f40b3ae0a8dabc8. Change-Id: I7f0be489a1c82268d0ca38cb761843c9d432a14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159344 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-05reprobuild: don't include build machine setup in binariesThorsten Behrens1-3/+1
The configure line can leak data from the building machine (path names, level of parallelism etc), which leads to non-reproducible build results. Change-Id: I042afc3d7bad19e8e274147be2a9eb0abcf5436e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158871 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-04External data must be checked when parsedMike Kaganski1-10/+14
Change-Id: I8bc5afb29fe22a4b06462a7c61b689c88c41003f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158938 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-04LOK: Simplify a bit, and use more compile-time knowledgeMike Kaganski1-583/+548
Bring some C++20 goodness to LOK code: avoid lots of small memory allocations when constructing OUString from ASCII char arrays; use string lengths known at compile and run time; use safer and cleaner syntax. Change-Id: Ia59ed3c8d8ce521880bb8d70b69a64b2d3e73c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158927 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-03tdf#114441 Convert sal_uLong to better data typesAnkit_Jaipuriar1-2/+2
The function getLength() returns a value as sal_Int32, which is then assigned to the variable nLinks. Change-Id: I44d626e2a26e3d9eb15b0884500f0dfddff12e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157755 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-31lok a11y: calc: make possible to enable accessibility for spreadsheetsMarco Cecchetti1-1/+1
Change-Id: I462b2d386b58a895bd4c45d4bd61a049404d3848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158512 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit e5481fdaf33a3921ef0624e8a62e28e2f68086da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-27lok: a11y: impress: help screen reader to report shape selectionMarco Cecchetti1-0/+2
Refactored LOKDocumentFocusListener::notifyEvent. Implemented 2 new callbacks: - LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: it says the client if editing in a shape or cell is active or it isn't. - LOK_CALLBACK_A11Y_SELECTION_CHANGED: it says if a shape has been selected/unselected, the name of the shape and text content are sent too for being reported by a screen reader. (cherry picked from commit 76899152ec3d1924cc72d2b869e197a1e34a0a1a) Conflicts: sfx2/source/view/viewsh.cxx Change-Id: I644bcc7daeb8772805688a9bccdabd0631ce0a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158562 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>