summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)AuthorFilesLines
2024-04-04Introduce ResettableMutexGuardScopedReleaserMike Kaganski1-8/+1
And use it to guarantee reretting a guard, without having to do that explicitly in exception handlers. Change-Id: I4727cb5b7f37b25e203396957797d24a093e0797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165775 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-04tdf#159790 temporarily release mutex for child packagesPatrick Luby1-1/+16
This code is normally run on a separate thread so if a child package tries to acquire the solar mutex, a deadlock can occur if the main thread calls isRegistered() on this package or any of its parents. So, temporarily release this package's mutex while registering the child package. Change-Id: I45b534c44d5946637a5441927ed01a68aad4c448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-03desktop: fix build with enable-online-updateXisco Fauli1-0/+4
Regression from 75706c003c3e224047e2f5b079aebde4e3d40d74 "tdf#146619 Remove unused #includes from C/C++ files" See https://ci.libreoffice.org/job/lo_daily_tb_win/1718/console Change-Id: I32f406aa44dfe37c472cf4de7805141daf37ab66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165738 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
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#159790 eliminate deadlock on main threadPatrick Luby1-2/+6
A separate thread may have already acquired m_aMutex and that thread will then try to acquire the solar mutex. However, when the main thread calls this method, the main thread has already acquired the solar mutex. So, drop the desktop mutex before calling out. Change-Id: Ic87063266ac5101b866df9f24067a403e1417745 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165682 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-02tdf#146619 Remove unused #includes from C/C++ filesRafał Dobrakowski18-36/+8
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 Meeks2-1/+4
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-04-01tdf#146619 Drop unused 'using namespace' in: desktop/Gabor Kelemen3-4/+0
Change-Id: I120471364834dfd0702b6ce15f79a8327cac26b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165534 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-28lok: add isForkedChild method.Michael Meeks2-1/+10
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-27Resolves tdf#159573 and tdf#137931 - WhatsNew or Welcome dialogHeiko Tietze1-1/+1
To test the new dialog, change org.openoffice.Setup > Product > ooSetupLastVersion to some lesser value for the WhatsNew dialog or clear the entry for the Welcome version. Change-Id: Iec6de50edba0e5430e82f1db85e61d1e4501771d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163739 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
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-21Drop C/C++ DEBUG macroStephan Bergmann1-2/+2
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with OSL_DEBUG_LEVEL directly Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
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ır2-1/+17
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ır2-11/+22
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ır2-22/+1
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-28Init Embind-ings manually, once UNO is set upStephan Bergmann2-0/+13
Upcoming code that changes the Embind'ing of UNO sequences will require availability of the UNO type manager during that Embind init code, so only call that after UNO has been bootstrapped (rather than as part of the initialization of global static data, which is what EMSCRIPTEN_BINDINGS does). Change-Id: Iba19851ffb82c055dcab10a28a8c1fafa9d2a414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164065 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-27use getCommandValues instead of adding a getViewRenderStateCaolán McNamara2-16/+6
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-26Fix typoAndrea Gelmini1-1/+1
Change-Id: Iff521a8cbd52b1d7c37d20c5ba5f93838a549e1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163935 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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 McNamara2-2/+16
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-26Define a name for the extended path buffer size, instead of a literalMike Kaganski3-3/+7
Change-Id: If6d40c818e021b3241d6b6b33aceca07c6393511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163926 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26Use filesystem::path to avoid MAX_PATH limitationMike Kaganski1-14/+7
And use a buffer of 32767 characters, which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I7ee3283a98ebc72e7d79aacc65b01fdb7eeccd83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163919 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26Replace an instance of MAX_PATH with 32767Mike Kaganski1-1/+1
... which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I3e663088c07454d2488445c02c79f87c8f26be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163920 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26Replace an instance of MAX_PATH with 32767Mike Kaganski1-18/+13
... which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I08b7a14ac2933f6bee57fe1f2df34d2efbe7f3c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163921 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-25Avoid MAX_PATH limitation in launcherMike Kaganski2-127/+85
... and drop some manual memory management. Change-Id: I4c60ce559ff185d4685a6b9799a97651438115b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162502 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-25Avoid UTF-16->UTF-8->UTF-16 conversionMike Kaganski1-8/+3
Change-Id: I82e45643b3543d924fda025aa47ef2fabb7f914e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163897 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-22Fix UBSan build's RTTI needsStephan Bergmann1-1/+1
...after 3ba92b5f1eaf7d4447a0943ea260db515ca799dc "hide more symbols" had caused CppunitTest_desktop_lib to fail with > DynamicLibraryManagerException: "Failed to load dynamic library: workdir/LinkTarget/CppunitTest/libtest_desktop_lib.so > workdir/LinkTarget/CppunitTest/libtest_desktop_lib.so: undefined symbol: _ZTIN7desktop20CallbackFlushHandlerE" Change-Id: I051e1a233757a6ccb7cf9ea564ab6b510d6df571 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163742 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-22Framework for some UNOIDL to test the Embind UNO binding withStephan Bergmann1-0/+13
It is only built for --enable-dbgutil builds. Load instdir/program/qt_soffice.html in a browser and see "Running embindtest" in its console. For now, it only contains a Test singleton with an empty XTest interface, which is meant to grow additional methods over time. (The code needs to reside in the unotest rather than in the static module, or else the wasm build would run into cyclic dependencies.) Change-Id: I6f65f0c904648a4fd96fc6215c8d59a1544f48a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-19hide more symbolsNoel Grandin1-5/+5
using the bin/find-can-be-private-symbols.py script to find classes with large numbers of exported symbols that can hidden. before exported = 58104 imported = 30810 unused_exports = 35433 after exported = 55094 imported = 31073 unused_exports = 32423 Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-18Revert "tdf#152524 Add a __objc_fork_ok data section for Mac Intel executable"Patrick Luby2-23/+0
This reverts commit c6652e280b0690497abf27380dd064898f91db32. Reason for revert: patch may no longer be needed after commit b0656e6ca668a0719fbcb71b6d46c68093dda470. Change-Id: I20da2d0ff576f82272efbb193148e77c44a73d5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163540 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-02-15Revert "merge sdui library into sd"Noel Grandin2-0/+2
This reverts commit 2cf7c26293462406d91ee050c6677930065e660b. Reason for revert: <_rene_> noelgrandin: sdui->sd... and what about people not needing that ui? <_rene_> (e.g. --disable-gui and libreoffice-draw-nogui and impress-nogui) <_rene_> i.e. the use case of --convert-to for ppt(x) etc Change-Id: I6755c209e63f34b3fc9f9fdc4af7001b18579e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163348 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-14lok: implement a joinThreads function - to wind down thread pools.Michael Meeks2-1/+25
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-14merge sdui library into sdNoel Grandin2-2/+0
which eliminates another dynamic-symbol lookup and another complication which was making it harder to do better with --enable-mergedlibs sd is relatively small, so even the combined library is not as big as one of the sw and sc libraries Change-Id: Ibef8077d70a5abc7361c95f5dbb8c43447610188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-13Fall back to old bootstrap.ini [Win32] section, for backwards compatibilityStephan Bergmann1-0/+33
Change-Id: I629b2a16bc889f16595cd1718d2ee4535f31aed7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162602 Tested-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit fe459b9595c851d00a861d595c8dd50b35c90be3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163255 Tested-by: Jenkins
2024-02-12Search for load-time variables in fundamental.override.iniStephan Bergmann1-4/+4
...instead of arbitrarily cramming them into bootstrap.ini. (And don't force those ini-files to have an additional [Win32] section, when include/rtl/bootstrap.h demands that "An ini-file is only allowed to have one section, which must be named `[Bootstrap]` with the square brackets.") Change-Id: I732bf9d771ea309eccd35b6db0f565a0c56a3c3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162188 Tested-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 50b14f26de63d22b9ad05ca51d9edc53e024e75e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163252 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-02-03First-class Embind JS support for OUStringStephan Bergmann1-1/+1
Change-Id: Ic178737da802e17f87d0b5b09004a847b0fe91be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162956 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-29Experimental support for latest Emscripten (and Qt6)Stephan Bergmann1-0/+8
What I'm after in the context of our Embind-related code is the claim at <https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management>: "JavaScript only gained support for finalizers in ECMAScript 2021, or ECMA-262 Edition 12. The new API is called FinalizationRegistry and it still does not offer any guarantees that the provided finalization callback will be called. Embind uses this for cleanup if available, but only for smart pointers, and only as a last resort." However, with the recommended emsdk 2.0.31 my tests did not show any use of that finalization support. So I wanted to try with the latest emsdk 3.1.51 instead. But then, linking vcldemo failed with > wasm-ld: error: ~/allotropia-qt5/lib/libQt5Core.a(qlogging.o): undefined symbol: std::__2::__vector_base_common<true>::__throw_length_error() const etc., so I gave it a try to rather build against latest Qt6.7, with > --with-distro=LibreOfficeWASM32 > --disable-qt5 > --enable-qt6 > QT6DIR=... TODO: The result is highly experimental, and it uses ENABLE_QT5 (i.e., the recommended setup with emsdk 2.0.31 and the <https://github.com/allotropia/qt5.git> v5.15.2+wasm branch) vs. ENABLE_QT6 (i.e., my experimental setup with emsdk 3.1.51 and the <https://github.com/qt/qt5.git> 6.7 branch) not only to distinguish between Qt5- vs. Qt6-specific behavior, but also to distinguish between old- vs. new-Emscripten-specific behavior. Of note: * The startup code appears to have changed substantially (and required setting -s MODULARIZE=1 and -s EXPORT_NAME=soffice_entry now, and telling emcc to build just soffice.js and not the wrapper soffice.html. TODO: This also required hacking into qt_soffice.html: (1) The command-line arguments (--norestore, --nologo, --writer, and the exammple.odt; all of which we should eventually get rid of, anyway). (2) Saving the generated instance as window.Module (and adapting the embindmaker-generated code, cf. the changes to static/README.wasm.md). * There were some symbol clashes between external/argon2 and libQt6Core.a(qcryptographichash.cpp.o, so renamed the problematic symbols in external/argon2. Change-Id: I5420ab566d560b11954ac6613249bfc53d8acb31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162695 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-28add sparc64, riscv64 and loongarch64 test extensionsRene Engelhard3-0/+0
forgotten in 3cb45765f2accfa749cc56a087059600ec467f28 and bc9487f745befde6534fd46058e119256952323d and d3625d968901eb93a9680db8d1165f70de3fd64e Probably academic since none of those archs will have something in LO doing online-update anyway, but... Change-Id: I10bcc909df42ee7f51f2135b60fbb33c135f2554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
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 Kaganski6-21/+21
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-26tdf#152524 Add a __objc_fork_ok data section for Mac Intel executablePatrick Luby2-0/+23
This attempts to fix a particularly difficult to debug crash due to memory corruption when gpgme tries to fork and exec a gpg command. For more background, see the following bug comment: https://bugs.documentfoundation.org/show_bug.cgi?id=152524#c39 This data section is only added in Mac Intel builds as it is a controversial approach and I have not seen any reports of this bug on Mac Silicon yet. So limit the fix only to Mac Intel in the hope that this controversial approach will automatically phase itself out when Apple eventually stops releasing new versions of macOS for Mac Intel. Note: the Objective C runtime doesn't appear to check the value of this data section, but set it to 1 in case that changes in the future. Change-Id: Ifac7893589a9183e092724297aff93eb3d58ab70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162634 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
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>