summaryrefslogtreecommitdiff
path: root/include/sfx2
AgeCommit message (Collapse)Author
2024-06-20tdf#159835 sfx2: Keep sidebar menu up to dateMichael Weghorn
No longer update the menu for the menu button in the sidebar in the handler that gets called when the button gets clicked, but continually keep the menu up to date instead. This ensures that the menu is up-to-date when it gets shown. Updating the menu in the button handler is too late since commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Aug 22 10:26:32 2023 +0200 tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close , as the handler is now no more called before the menu gets shown. Do the update in method `TabBar::UpdateMenus` instead and call that one whenever items change or the sidebar gets docked/undocked, as menu entries are shown for the items and for (un)docking. This makes the menu show all entries again when opened the first time after starting Writer, which was no longer the case after the above-mentioned commmit. Change-Id: I9a7e341e88d2de5f34e8f85ebada3ff2ebf6b47d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169196 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-20tdf#159835 sfx2 Connect SidebarController menu handlers earlierMichael Weghorn
Instead of connecting the SidebarController handlers for handling activation of `TabBar` menu items every time in `TabBar::OnToolboxClicked` (which is the handler that gets called when clicking the menu button), do so once in the `TabBar` ctor. This also ensures that the handlers are connected before the menu shows for the first time, which is no longer true for the previous approach since commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Aug 22 10:26:32 2023 +0200 tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close Now, clicking on the sidebar menu and selecting the "Undock" entry works to undock the first time, not only when opening the menu for the second time. Populating all menu entries before the menu gets opened for the first time still needs to be implemented separately. Change-Id: I7e5d5e511c2ce2c7304e8f88676970d76e6319df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169193 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-18tdf#159835 sfx2: Simplify TabBar::OnToolboxClickedMichael Weghorn
Now that the logic from `SidebarController::PopulatePopupMenus` has been moved here in Change-Id: I8236f2467239e6a2f485d468656e961478eeb09c Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Jun 17 13:35:12 2024 +0200 tdf#159835 sfx2: Move logic to populate sidebar menus to TabBar as well, simplify `TabBar::OnToolboxClicked`: No longer use one loop to build a vector of entries and another to process these, but use a single loop for that instead. Drop the now unused `DeckMenuData` class. Change-Id: I884f3b70bb4d85b9a52421e9de6042cda80cfa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169006 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-06-18tdf#159835 sfx2: Move logic to populate sidebar menus to TabBarMichael Weghorn
Move the logic to populate the menus from `SidebarController::PopulatePopupMenus` (called by `SidebarController::ShowPopupMenu`) to `TabBar::OnToolboxClicked`. The latter called `SidebarController::ShowPopupMenu`. (In a first step, take over the existing implementation but leave further changes for following commits.) `TabBar::OnToolboxClicked` already collects all the deck data relevant for the menus and the menus are members of that class, so it seems more straighforward to populate the menus there right away. The only information needed from `SidebarController` is whether the sidebar is docked or not, so add a new method `SidebarController::IsDocked` to retrieve that information. Rename `SidebarController::ShowPopupMenu` to `SidebarController::ConnectMenuActivateHandlers` as it only connects the signals now, and rename `PopupMenuProvider` to `PopupMenuSignalConnectFunction` accordingly. This commit does some refactoring in preparation of fixing tdf#159835, no change in behavior intended (yet). Change-Id: I8236f2467239e6a2f485d468656e961478eeb09c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169005 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-06-18tdf#159835 sfx2: Use reference instead of pointerMichael Weghorn
This e.g. makes it clear that this is never null. Also use an `m` prefix for the class member. Change-Id: Ia66245f17e7f0ca9e57750e8606c8ccc1387eb97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169004 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-06-18Add SfxItemType to SfxPoolItemOliver Specht
The SfxPoolItem has a new member SfxItemType m_eItemType to compare types based on enums instead of typeinfo() which consumes a lot of time e.g. while AutoFormat is running Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-06-13Let LinkManager::UpdateAllLinks honor isUntrustedRefererStephan Bergmann
Change-Id: I3714061376afaf1186e4f7cfe5b28bfb54aa7a99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168789 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-06-12remove ability to trust not validated macro signatures in high securitySarper Akdemir
Giving the user the option to determine if they should trust an invalid signature in HIGH macro security doesn't make sense. CommonName of the signature is the most prominent feature presented and the CommonName of a certificate can be easily forged for an invalid signature, tricking the user into accepting an invalid signature. in the HIGH macro security setting only show the pop-up to enable/disable signed macro if the certificate signature can be validated. Additionally present a ViewSignatures button in the Macro Disabled infobar, so that the user can inspect what are the invalid signatures and why (wihtout the ability of enabling macros). Change-Id: Ia766fb701660160ee5dc9f6e077f4012a44ce721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168667 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-06the remaining Help::GetHelpText calls don't want their parent as fallbackCaolán McNamara
so we can drop the hierarchical search these probably do nothing in the absence of the classic help. fpicker case might benefit from moving some a11y translations out of help into core. Change-Id: I01b8d0c7cc1a1b3697d3332e330c6b4654e76af1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168507 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-04sfx2: use SAL_RET_MAYBENULL in GetDispatcher() and GetFrame()Xisco Fauli
Change-Id: Ic9876dbdd0dc0ce887a6eb135bd411f8e3dc9e12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168288 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-29Resolves tdf#160937 - Improve dialog size for document propertiesHeiko Tietze
linefragment.ui and documentinfopage.ui modified to keep the usual dialog dimension Change-Id: I1777e4094e584d676a48855717827aaed413e251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168139 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-05-27sfx2: use SAL_RET_MAYBENULL in GetFrameWeld()Xisco Fauli
Change-Id: I78c4d190f8fcb96abaad267b19ab6cb3732a1807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168112 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-23sfx2: use SAL_RET_MAYBENULL in GetBindings() and GetShell()Xisco Fauli
after 9eb083ab732512c3ab64007c3be1c54be97172f6 "check GetShell" Change-Id: I0dcef57019fde7639ddbb981cbd41c13f857b4af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167905 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-05-22tdf#161209 - Reverts WhatsNew/Welcome dialogHeiko Tietze
dd889b290304b73f96a9a8e6e0f144d3aa2ba7e1 Change-Id: Idf0594c546e4d9ca263272ed1534b27948e8e930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167956 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-05-22sfx2: bGlobalOnly is always falseXisco Fauli
Change-Id: Iaba1a77ae0ac7537f1dbf05fa097b3235b36f64d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167921 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-18lok: dump more SfxViewShell state, and LOK notifier state on Windows.Michael Meeks
This should help to associate the right view-ids, with the right windows, and help to catch any stray / lingering windows from closed sessions - hopefully. Change-Id: I197a3280d5d2aeddd356ee037c51e4887f43278b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167765 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 8d979fae0c435b820302c76fcfdc2642b4820360) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167684 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-17introduce SAL_RET_MAYBENULLCaolán McNamara
which for debug builds and MSVC uses _Ret_maybenull_ and -analyze to enforce null checking Change-Id: Id7f0ad854be7841819fdbdcd56c862d1a2df86c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166734 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-05-10loplugin:ostr in sfx2Noel Grandin
Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-08tdf#69192: add StartingSlide to SID_PRESENTATION and cmdline show=Justin Luth
Allow the user to start the presentation at a specific slide using command-line parameters. This patch depends on the previous variable renaming patch. Change-Id: I87797cbccb463904e5d2fe9b078e3921be27c91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167066 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-05-02make the slot data constinitNoel Grandin
because it takes a surprising amount of time to initialise it at runtime during startup (*) have to convert the std::function in SfxType to a function pointer, because the std::function constructor is not constinit compatible. (*) the SfxType0..SfxTypeN types need some reinterpret_cast to work around the lack of zero-sized trailing arrays in c++ (*) Sadly MSVC does not support taking the address of symbols in constinit structures, so we cannot make the SfxSlot array constinit. Change-Id: I300ee770cc115d30bc25c819f2ad34b29633876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-01use more OUString in sfx slotsNoel Grandin
Change-Id: I900d9f1d35bc1e620822eedd5722a502704d6de0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166959 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-01Use a for loop for setting view properties.Gökay Şatır
Since there may be no view with the given id, checking the list first is safer. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I4c305e0a0f6ce7cccdfea9889c414a6054ed3a88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166531 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 4d8c4a60105488be84ea80775dc04a24582752fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166720 Tested-by: Jenkins
2024-04-29reduce symbol visibilityNoel Grandin
Change-Id: Ibc850eb12c38f2985015f06e330585b02d6bf15f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166822 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-29rearrange to clarify that ThumbnailViewItem* was never nullCaolán McNamara
Change-Id: Ie10ed0193fbaeae2fb711caa9059906513c42e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166730 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-04-28reduce symbol visibilityNoel Grandin
Change-Id: Iad2d114d257244f456d5579636e5c25ce070a08a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-25Move ObjectInspectorWidgets code into cxx fileNoel Grandin
having this much code in a header file is not a good idea Change-Id: Ic21eca651335bb282ebbf9434811ae591b7e0b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-22loplugin:constantparamNoel Grandin
Change-Id: I0e91da1e48326495f841b53f999a0d31ecd1a36e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-22loplugin:constantparamNoel Grandin
Change-Id: I8ae27f060e46548aa364db8c6b82d77e6c8f3d3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-17sw lok: .uno:SetDocumentProperties: add file size parameterPranam Lashkari
problem: in LOK/online to support async save, files in jails may have different extensions (ie: .upload, .uploading) this caused problem to detect files as original file name may not exist. As result property like file size were always set to 0 Change-Id: I552aef203297470d01032659a266210970129e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165769 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit aa4e10efc6e9ac92b0c652f238526aacbe2096c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166171 Tested-by: Jenkins
2024-04-15null-deref in SfxViewShell::isBlockedCommandCaolán McNamara
Change-Id: I43db7fabcc32971f951cc72dc9b1d22eba8df357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166094 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-11tdf#132599 cui offapi sw xmloff: add hyphenation-keep-typeLászló Németh
Support XSL attribute "column" and CSS 4 attribute "spread", stored in loext:hyphenation-keep-type, to give better control over hyphenation-keep. E.g. spread: both parts of a hyphenated word shall lie within a single spread, i.e. when the next page is not visible at the same time (e.g. the next page is not a right page of a book). – css::style::ParaHyphenationKeep is a boolean property now, importing hyphenation-keep = "page" as true. – type of ParaHyphenationKeep, including the new non-ODF types is stored in the new ParagraphProperties::ParaHyphenationKeepType. – default value of ParaHyphenationKeepType is COLUMN for interoperability. – Add checkboxes to Text Flow -> Hyphenation Across in paragraph dialog: * Column (previously: Hyphenate across column and page) * Page * Spread – enabling/disabling them follows XSL/CSS 4/loext, i.e. possible combinations: * No Hyphenation across (hyphenation-keep = "page" and loext:hyphenation-keep-type = "column") * Hyphenation across [x] Column (hyphenation-keep = "page" and loext:hyphenation-keep-type = "page") * Hyphenation across [x] Column [x] Page (hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread") * Hyphenation across [x] Column [x] Page [x] Spread (hyphenation-keep = "auto") – Add ODF import/export – Update DOCX import – Add ODF unit tests Note: recent implementation depends on widow settings: disabling widow handling allows hyphenation across columns and pages not only in table cells. Note: RTF import-only, but not used bPageEnd has been renamed to bKeep. Depending on the RTF test results, likely it will need to disable the layout change, e.g. GetKeepType()=ParagraphHyphenationKeepType::AUTO, if PageEnd uses obsolete hyphenation rule, i.e. shifting only the hyphenated word to the next page, not the full line. More information: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Follow-up to commit 9574a62add8e4901405e12117e75c86c2d2c2f21 "tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 "tdf160518 DOCX: import hyphenation-keep to fix layout". Change-Id: I3ac6d9e86d0ed1646f105de8607c0e8ebc534eaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165954 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2024-04-06Enable allowing comment editing in readOnly view mode.Gökay Şatır
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I536448da395568cd43af6f4d1d36ef09f3c6a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165349 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> (cherry picked from commit 226e2263468da403d1f9db504115830f5a030229) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165834 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-06tdf#152336 Detect charset and separators for csv filesGabriel Masei
Change-Id: Ie8451b3d30e390d363d8f9e5ec8bdf47350ca3a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164936 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-27Resolves tdf#159573 and tdf#137931 - WhatsNew or Welcome dialogHeiko Tietze
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-21Moving parts of readonly checks from model to view.Gökay Şatır
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 Vajna
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ır
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-19ITEM: Move TotalCount to WhichRangesContainerArmin Le Grand (allotropia)
Change-Id: I2ab1cd2d0be81b15b4701581093b696aaac2846c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164979 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-13reduce symbol visibility in --enable-mergelibs=more modeNoel Grandin
Change-Id: If811c9ec336543227db73c990248b9113846cf2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-11Disallow closing document during generation of previewMike Kaganski
Using an external (Java) script that opens a document, and then quickly closes it, it may happen that the idle that generates a preview is still active, when the control thread calls XCloseable::close, which destroys still used document. This leads to use-after-free. This uses the close listener in SfxObjectShell, to veto closing document that is still in use by the preview generation code. After completion, when the caller of close() transferred ownership, then the call to close is repeated. Change-Id: I39691f61ad5141d7e8ee54723d5aef87f0bc01dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164632 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-11Use weak reference to SfxObjectShell in SfxEventHint to avoid use-after-freeMike Kaganski
The events may be processed after the shell has been destroyed. This is happening reliably after commit e2bfc34d146806a8f96be0cd2323d716f12cba4e (Reimplement OleComponentNative_Impl to use IGlobalInterfaceTable, 2024-03-11) when controlling LibreOffice from external Java scripts; but obviously, it could happen before as well. Now SotObject inherits from cppu::OWeakObject, instead of SvRefBase. Change-Id: I73a3531499a3068c801c98f40de39bdf8ad90b2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164458 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-11Remove redundant function indirection in SfxHintPosterHassan Sajjad
SfxHintPoster::mLink always pointed to SfxDispatcher::PostMsgHandler and except in ~SfxDispatcher, it was reinitialized to empty i.e. cleared. This extra indirection is now removed. SfxHintPoster was using SvRefBase to persist even after SfxDispatcher was deleted and then deleted itself after SfxHintPoster::Post call was completed. This extra indirection was adding 4-5 frames while debugging. Change-Id: Ibfd6d3aea10ddf45732adc1a9d63a25717a771fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162700 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07Collaborative editing with readonly and edit views.Gökay Şatır
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-01tdf#159837 Drop unneeded TabBar EventNotify KEYINPUT handling codeJim Raykowski
to make qt and windows VCL backends respond to shortcuts when the keyboard focus is on a TabBar tab. commit 51f8e04eaaea50b779e3882e87628a6e625e0fd8 done to make the Shift+Ctrl+F10 short cut, used to dock/undock the sidebar, work from the sidebar tabbar appears no longer necessary. Simply passing the KEYINPUT event on to InterimItemWindow::EventNotify seems to be enough. Change-Id: Idfa8be4260d31e686acf1b49e89549deb9463a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164051 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-02-24move this header inside the moduleNoel Grandin
it is not used anywhere else Change-Id: I46cc42397cf56237818e6e58268a856e826a9985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19hide more symbolsNoel Grandin
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-18ITEM: Rename for more control over SlotID usagesArmin Le Grand (allotropia)
Change-Id: I51585f1c15984a066262023184f668662853d20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-15Improve wording for security warning infobarSamuel Mehrbrodt
Change-Id: I385ec268f4848f02d8fe49d24e32b0b9729acded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163444 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-12use more UNLESS_MERGELIBSNoel Grandin
Change-Id: I351a9127fb26369d8f598b6d6519d7e490fa476b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>