summaryrefslogtreecommitdiff
path: root/include/sfx2
AgeCommit message (Collapse)Author
2023-12-24tdf#146619 Recheck include/ with find-unneeded-includes --noexcludeGabor Kelemen
to see if some exclusions became obsolete Change-Id: Id88351f5448511b35994c58c6cb749784da3b45e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156993 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-12-21tdf#153690 Prevent invisible dialogs in Calc Full ScreenMatt K
This change just adds the flag "SfxChildWindowFlags::NEVERHIDE" to the info passed around so that the dialogs are not treated as invisible when executing SfxWorkWindow::ShowChildren_Impl. Change-Id: I35f0be94132cee438b3be9f4b4217208617a1e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160660 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)
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-20cool#7865 sfx2 lok: fix bad view id on async command dispatchMiklos Vajna
If you try hard enough, it's possible to request an "add conditional format" dialog in one view and have the dialog pop up in an other view. This is related to cool#7853 but it focuses on the wider problem. What happens is that sometimes we do want to execute an uno command in an async way, e.g. one dialog opening an other dialog in its response handler: making sure the dialog is not manually / synchronously spinning the main loop while it's running is wanted. Also fixing each & every async command dispatch manually would be a lot of work. Fix the problem by remembering the current view in SfxHintPoster::Post() as it posts events to the main loop and restoring that view if necessary in SfxHintPoster::DoEvent_Impl(). Other comments: - An alternative would be to just dispatch all these UNO commands synchronously, but see above, there are cases where we want to stay async, a nested main loop would be worse. - An even more general fix would be to handle all calls to Application::PostUserEvent(), but vcl doesn't know what is the current view and would have trouble switching to that view (only sfx2 and higher up knows that), so do this only at a SfxHintPoster::Post() level, this is already meant to fix all async uno commands. - There was a single case in sd/ where we tried to dispatch an async event while switching views, so switch to a sync command dispatch there to avoid the problem. CppunitTest_sd_tiledrendering would hang without this and would emit a warning in SfxHintPoster::Post(). - Restore the sc/ code to do its async dispatch as it used to, so now CppunitTest_sc_tiledrendering's testOpenURL is a test case that covers this change. Change-Id: I765e618f55caad791aa1fe7569a32bcc31622525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161071 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-12-19cid#1545222 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545241 COPY_INSTEAD_OF_MOVE cid#1545303 COPY_INSTEAD_OF_MOVE cid#1545315 COPY_INSTEAD_OF_MOVE cid#1545319 COPY_INSTEAD_OF_MOVE cid#1545322 COPY_INSTEAD_OF_MOVE Change-Id: I284ba6e395f72abd7939667a8367ac99ab64194d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-18tdf#158686 sw floattable: fix print preview crashMiklos Vajna
Regression from commit b8521d969ab5be4fc947e467d4afe969f9d3b563 (tdf#157263 sw floattable: prefer join over split after moving fwd, 2023-09-25), enabling Options -> Writer -> Formatting Aids -> Hidden Characters, then opening the bugdoc, finally Toggle Print Preview on the toolbar resulted in a crash. We have a memory corruption here: ==11968==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f0000734e0 at pc 0x7f473822d2ee bp 0x7fffdadd3660 sp 0x7fffdadd3658 READ of size 8 at 0x60f0000734e0 thread T0 #0 0x7f473822d2ed in rtl::Reference<FmXFormShell>::operator->() const /include/rtl/ref.hxx:216:9 #1 0x7f473821feeb in FmFormShell::IsActiveControl() const /svx/source/form/fmshell.cxx:1227:12 #2 0x7f46dad4d52a in SwView::SelectShell() /sw/source/uibase/uiview/view.cxx:296:40 #3 0x7f46dad496a6 in SwView::AttrChangedNotify(LinkParamNone*) /sw/source/uibase/uiview/view.cxx:572:13 ... #32 0x7f4748944cda in SfxViewFrame::SwitchToViewShell_Impl(unsigned short, bool) /sfx2/source/view/viewfrm.cxx:2552:32 #33 0x7f47488f4e3b in SfxViewFrame::ExecView_Impl(SfxRequest&) /sfx2/source/view/viewfrm.cxx:2637:29 freed by thread T0 here: #0 0x5568ff2f9a7b in operator delete(void*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/asan_new_delete.cpp:164:3 #1 0x7f4738214346 in FmFormShell::~FmFormShell() /svx/source/form/fmshell.cxx:181:1 #2 0x7f4746b04b9d in SfxDispatcher::FlushImpl() /sfx2/source/control/dispatch.cxx:1412:13 #3 0x7f4746aff767 in SfxDispatcher::Flush() /sfx2/source/control/dispatch.cxx:157:26 #4 0x7f47489100dc in SfxViewFrame::PopShellAndSubShells_Impl(SfxViewShell&) /sfx2/source/view/viewfrm.cxx:1100:24 #5 0x7f47489441a3 in SfxViewFrame::SwitchToViewShell_Impl(unsigned short, bool) /sfx2/source/view/viewfrm.cxx:2538:13 #6 0x7f47488f4e3b in SfxViewFrame::ExecView_Impl(SfxRequest&) /sfx2/source/view/viewfrm.cxx:2637:29 I.e. a new SwPagePreview replaces the old SwView, but the order is that SfxViewFrame::SwitchToViewShell_Impl() starts with deleting the SfxShells of the old SwView in PopShellAndSubShells_Impl(), then it creates the new shell, finally deletes the old shell. Given that the new shell hides hidden characters and the old shell did not, this triggers a size notification for the half-deleted old shell and we crash. Seeing that SwView::AttrChangedNotify() already had code to delay the selection of an SfxShell in the old SwView, fix the problem by introducing a new flag that allows not selecting an SfxShell at all if the old view is known to be deleted in the near future anyway. An alternative would be to make sure that all relevant pointers are maintained using an SfxBroadcaster / SfxListener protocol, but after fixing some 4 of them and that's still not enough, probably it's better to handle this at a higher level. It's also a bit unclear how this "worked" in the past; looks like the old view didn't get the size change notification by accident. Change-Id: I423ff946f8235848cc3a870bc52fcf88a721fd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160925 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-12-14cid#1545734 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545723 COPY_INSTEAD_OF_MOVE cid#1545708 COPY_INSTEAD_OF_MOVE cid#1545705 COPY_INSTEAD_OF_MOVE cid#1545684 COPY_INSTEAD_OF_MOVE cid#1545674 COPY_INSTEAD_OF_MOVE cid#1545673 COPY_INSTEAD_OF_MOVE cid#1545667 COPY_INSTEAD_OF_MOVE cid#1545661 COPY_INSTEAD_OF_MOVE cid#1545660 COPY_INSTEAD_OF_MOVE cid#1545657 COPY_INSTEAD_OF_MOVE cid#1545653 COPY_INSTEAD_OF_MOVE cid#1545636 COPY_INSTEAD_OF_MOVE cid#1545624 COPY_INSTEAD_OF_MOVE cid#1546124 COPY_INSTEAD_OF_MOVE Change-Id: I7d50594e046a022147d9ddf077b8b2d8027f9bca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07tdf#105844 package,sfx2: wholesome ODF package wrapping encryptionMichael Stahl
Redo the ODF encryption by storing an ODF package and wrapping it as a stream "encrypted-package" in another ODF package, such that there is only one encrypted stream - this requires only one KDF computation. * This is only enabled in Experimental mode for now. * Avoid storing unencrypted data in the pTempFile of SfxMedium, as it is usually created in the same directory as the target file, which may be on a network share or similar less trusted location. * SfxMedium::SetEncryptionDataToStorage_Impl() should just set an error status if it fails (how can it fail anyway) * when loading a document, SfxDocPasswordVerifier extracts an encrypted inner package (by calling SfxMedium::TryEncryptedInnerPackage()) * SfxMedium::GetStorage() automatically decrypts an encrypted inner storage and sets it as the SfxMedium's xStorage * when storing a document, SfxObjectShell::SaveTo_Impl() creates the wrapped storages * One challenge is to keep the macro/scripting signature working; this can only be put in the inner storage, whereas the document signature should continue to be on the outer storage; also it must use a Zip storage, to see the "META-INF" directory. This needs a new SfxMedium::GetScriptingStorageToSign_Impl() and changes in SfxMedium::SignContents_Impl(). Change-Id: Ibfee36ce3a9cd030f2aa2ce1484b6d001cba2389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160401 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-04tdf#158404 Start Center: remove ability to do multiselectionsIlmari Lauhakangas
in Recent Documents and Templates views using Shift+arrow keys as no actions can be executed for multiple selected files. Multiselection still works as normal in Manage Templates dialog. Change-Id: I03b9e54abb7772881139763a0c97f36637d01f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160003 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-11-29Related: tdf#104718 Use package repair request and behaviorMike Kaganski
Same as in other places handling that: * SfxBaseModel::load (sfx2/source/doc/sfxbasemodel.cxx); * StorageFilterDetect::detect (filter/source/storagefilterdetect/filterdetect.cxx); * TypeDetection::impl_detectTypeFlatAndDeep (filter/source/config/cache/typedetection.cxx) In these cases, the same handler is used (RequestPackageReparation); when the user approves an attempt to repair the package, the media descriptor gets "RepairPackage" property set to true (this produces a "(repaired document)" appended to the document title); also, the document is opened in template mode (so saving it doesn't simply overwrite the original broken document, but asks for a new name). Re-using this logic, and checking if the "RepairPackage" is already set, allows to unify the behavior, and to avoid duplicate warnings when the user already approved repair of a broken package. The request won't contain the details of the XML problem; but it will be shown if rejected anyway, so OK for the diagnostics. Change-Id: Ic997f89272212227479d14236f5e7788298a904a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160001 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-19Extended loplugin:ostr: sfx2Stephan Bergmann
Change-Id: I7b2988ed246a0b1b0af0721521ba738ba3de2f27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159677 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-16tdf#146386 deprecate, remove usage of Inet::Settings::ooInetFTPProxyNameMichael Stahl
* officecfg: deprecate Inet::Settings::ooInetFTPProxyName/Port * ucbhelper: stop handling these settings * sfx2: remove SID_INET_FTP_PROXY_NAME and SID_INET_FTP_PROXY_PORT and usage from SfxApplication::GetOptions() * shell: remove proxy config code from backends * stoc: the JavaVM would have its "ftp.proxyHost" properties set based on officecfg values; remove that * sysui,vcl: remove protocol from KDE desktop files and file picker Change-Id: Iba02676cf6e519e2fa60ba925209436d38e75f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159500 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-16reorg calc hyperlink check to reuse elsewhereCaolán McNamara
Change-Id: I20ae3c5df15502c3a0a366fb4a2924c06ffac3d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-15tdf#157518: enforce password policy on sfx2/ui/password.uiSarper Akdemir
Change-Id: I115b5b05ed82f2f900bcd70ec4f52c7f749544e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159443 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15tdf#157518: add password strength bar to sfx2/ui/password.uiSarper Akdemir
Change-Id: I181b71c6072a61651b33835f76e8deebb5f8d58a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159371 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-14Resolves tdf#158084 - Start Center hover colorHeiko Tietze
Selected colors removed since hovering leads to selection (or execution) and does not need a special color Transparency for reccent documents and templates in start center increased to make the difference to selected more clear Change-Id: Iab52150cd5a93e2f6ff716921b2aa7d093018b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159407 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-11-11lok: a11y: implemented support for notifying core log to clientMarco Cecchetti
In this way core log can be printed to the browser console. This may help in understanding if some core event occurs earlier or later wrt a client event. Change-Id: I720ef9b149e98ddbc252aa069649019e79ef6cb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158780 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> (cherry picked from commit d8dc138be7e69750d1a346b3b49cecc1201e8d46) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159331 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-09default to ignoring libreoffice special-purpose protocols in calc hyperlinkCaolán McNamara
Change-Id: Ib9f62be3acc05f24ca234dec0fec21e24579e9de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158911 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-08tdf#43784 tdf#158114 sw accessibility: check missing linked graphicLászló Németh
Show missing linked graphics and their abbreviated paths, (and as tooltips, full paths) in the accessibility checker. Change-Id: Ia378f4ea3260251d1b2530fadc48aea6e0323a08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159150 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-11-07Pass XInteractionHandler to hasTrustedScriptingSignature instead of a boolMike Kaganski
This allows to use the same interaction handler there, as used in DocumentMacroMode::adjustMacroMode. hasTrustedScriptingSignature used to find its own interaction handler; and that would conflict with e.g. ODatabaseModelImpl::adjustMacroMode_AutoReject, which passes nullptr to adjustMacroMode, with intention to not show any UI; but with signed macros (see tdf#97694), the UI would still appear. Change-Id: Ia209f96bef67dccfe1da23c4d172ac47497f8eb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-06lok: notebookbar: handle multiple sessionsSzymon Kłos
This fixes regression from commit db5a78c8ab1eae30e442151f07b0dc4dcd017550 lok: notebookbar: don't recreate toolbars too often When we had 2 sessions with notebookbar and one of them switched to compact mode - other session's notebookbar didn't work. Before previous change we recreated notebookbar and its welded wrapper on every StateMethod call for LOK case. So when it become destroyed we made it working again. But now we need to introduce better management and not rely on single instence we get from SystemWindow. Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK case as when other view will turn notebookbar off, but QueryState will be trigerred in our session - we will think that it should be destroyed (it reads config state which is shared between views). So trust only "true" value (it happens after calling SID_TOOLBAR_MODE), but destroy notebookbar only after explicit call of SfxNotebookBar::CloseMethod. It seems to have good result when tested with multiple views in Online. Maybe we can track Notebookbar state per view later to make things simpler in LOK case. Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-10-24tdf#157838 - UI: Part 4 - Unify lockdown behavior of Options dialogBalazs Varga
for Print Page. Change-Id: I724dcbaf8e3ed479aaf053965d2d0e64381e53fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158269 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18tdf#156114 UNO commands / menu entries to enable PS/CS spotlightJim Raykowski
Change-Id: I2796b595ef961c477dea85c337ad343599aea7cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158055 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-10-16tdf#157482 UI: Turn Security Warnings popup windows into infobarsBalazs Varga
In case of all the 4 security warnings we will have a new infobar warning dialog message with an infobar button which can open the security windows option settings and we can set which security issues should warn us, and also which security infos we want to remove. (etc after saving) TODO: If the directly the file dialog window pop up the Infobar message will only update after closing the file dialog window. That should be fixed later. Change-Id: Idf0f728fd40089d3691f8f044d3718a4e0d99cad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157797 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-10-16Revert "Make sure views get new themes on .uno:ChangeTheme"Paris Oplopoios
Seems to cause more issues than it solves, reverting for now This reverts commit 884fd220d0025a92510d3ff4710c8c517c8f271e. Change-Id: If32a9d3bd922afe5611e5258987eec9ec685bc8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157951 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11FocusManager::IsPanelTitleVisible is deadNoel Grandin
ever since commit df2c41859287282501c8ebd7b3c67465455a457c Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sat Sep 23 21:01:50 2023 +0200 MoveFocusInsideDeckTitle is dead Change-Id: I641622453b35526c7654c84d25d9d7c873249b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157817 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-08SfxRequest doesn't need to inherit from SfxHintCaolán McNamara
or anything Change-Id: Ibfedb7dce6503b5593111380c53fc0ef6c7e93af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157680 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-06Related: cool#7373 add an SfxHintId::ThisIsAnSfxEventHintCaolán McNamara
to avoid cost of dynamic_cast of SdrHint to SfxEventHint Change-Id: Ie0366b7d7ba828d8ffabeed4d65d7c7b275a3ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157633 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-06use more ErrCodeMsgNoel Grandin
instead of a sideband mechanism to convey extra error message around Change-Id: Ibd1fc8629c5b10bc6f9e6cbd30e8a20156ac13b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157630 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-02tdf#146619 Recheck include/s* with IWYUGabor Kelemen
Change-Id: Ia0a6330278b044f448c9928362308aadc8fc9a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156989 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-09-29rename SfxMedium::GetError -> GetErrorIgnoreWarningNoel Grandin
to distinguish it from the very similar GetErrorCode() Change-Id: I937e3dcfd6ce116046ac7b1c98cf79479b322f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-24MoveFocusInsideDeckTitle is deadNoel Grandin
after commit 9ca60dc90958001c078ed6331bd432c36961a425 Author: Rafael Lima <rafael.palma.lima@gmail.com> Date: Wed Jul 26 02:00:40 2023 +0200 tdf#156156 Add Help button to sidebar decks Change-Id: I71893e5f0b35ffec3eb718b0dfb556a3405b5c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-19rename SfxObjectShell::GetError -> GetErrorIgnoreWarningNoel Grandin
to distinguish it from the very similar GetErrorCode() Change-Id: Ic863742a7546e2835826d12181bf073ccbbbfb83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-13lok: fix notebookbar not initialized when switched from classic modeSzymon Kłos
This is revert of "tdf#155720 remove old skip notebookbar init workaround" This reverts commit f95b5d12c59e612ee4643b385389fc791e31f76d. Mentioned change introduced regression in loading notebookbar. Steps to reproduce bug: 1. be sure cool is in classic/compact mode 2. restart the app so it will load in classic mode 3. switch to tabbed mode Result: notebookbar is not initialized and style previews and font selector are not present Change-Id: I35d6682cdd6c028437b373a748ed9ec36418ac17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156836 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit c0234520ba9afda5a8b32f7a04c2155cbfbe30ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156875 Tested-by: Jenkins
2023-09-06tdf#156959 - Remove pinned icons from thumbnail view itemAndreas Heinisch
Remove pinned icons from thumbnail view item and pushed it down to the recent documents view item. This avoids that the pinned icon will be shown in a simple thumbnail view, e.g., in the thumbnail view of the side pane in base. In addition, fixed an error with the number of elements in the thumbnail view in the start center when items are pinned, i.e., removed a spurious new line. Change-Id: I76026bfa9239f709aa60ff12efabe28cb09f0d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156625 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-09-04tdf#138792: PDF export: add batch of dublin core attributesSarper Akdemir
Adds support for exporting, editing in the UI and storage in ODF for the dublin core attributes listed below. Contributor (http://purl.org/dc/elements/1.1/contributor) Coverage (http://purl.org/dc/elements/1.1/coverage) Identifier (http://purl.org/dc/elements/1.1/identifier) Publisher (http://purl.org/dc/elements/1.1/publisher) Relation (http://purl.org/dc/elements/1.1/relation) Rights (http://purl.org/dc/elements/1.1/rights) Source (http://purl.org/dc/elements/1.1/source) Type (http://purl.org/dc/elements/1.1/type) Introduces XDocumentProperties2 to extend XDocumentProperties interface. Change-Id: Ie2e0b1fbbbd00b66aef477ba1bf4e4f61c03a3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156330 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-08-31use concrete type for ThumbnailView::mxAccessibleNoel Grandin
avoid some unnecessary casting Change-Id: Id3c4d8b91ec04beb1fed61050066e2b79d01d2df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-30use concrete type for ThumbnailViewItem::mxAccNoel Grandin
avoid some unnecessary casting Change-Id: I86d48cb463f4e9a1661025fa6e1f4f8c03d61eaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-30Related tdf#156116 - A11Y - show only one warning/textframesBalazs Varga
Only give one warninig message (Anchor Frames/Text boxes “As Character“.) per floating textframes. Change-Id: I6cff4022a30de9734d6afc592f52c7ad4297c18a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156200 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-29tdf#49895: Add search functionality to Options dialogBayram Çiçek
- Search field added. - Dialog names of all treeview nodes with their parent names were included in searching. - Strings of labels, check buttons, radio buttons, toggle buttons, link buttons and buttons were included in searching. Change-Id: Idf67c160519402ee390d94b1b3135b56324f3990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152519 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-08-24Template: tdf#86483: Add Japanese template to the Localization categoryJun Nogata
As Kevin Suo noted in tdf#86483, CJK and CTL use different formatting than the US and Europe. Japanese is no exception, and must be formatted according to Japanese typesetting rules[1][2] before the document is created. However, many Japanese language users use LibreOffice without knowing this, resulting in strange Japanese documents. This template sets up the necessary Japanese formatting to reduce this. Originally, the template was supposed to be provided by the language pack. However, since a localization category was created, we thought it would be a good idea to provide the template first, as we did with Chinese, so we added it. This template has the following settings And the template is inspired by the OpenOffice.org Japanese Environment Improvement Extension Template[3] and Kevin Suo's Chinese template, which we have previously attempted to do the same. * Western and Asian languages are in the same font. * Paragraphs have been set to be justified. * Japanese paragraphs are originally indented by one character. However, since some documents do not use it, it is not set. Instead, the original Japanese paragraphs are set to First line indent style. * Italics has been removed from the style. Japanese does not use italics. [1] Requirements for Japanese Text Layout: <https://www.w3.org/TR/jlreq/> [2] Japanese Industrial Standards - JIS X 4051:2004(Japanese): <https://kikakurui.com/x4/X4051-2004-02.html> [3] OpenOffice.org Japanese Environment Improvement Extension: <https://ja.osdn.net/projects/openoffice-docj/releases/40804#note> Change-Id: Ieaf57c8e018d479e7922fbd9d616b9a6c271b1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155764 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-23tdf#156611 SC: hyperlink option for MS behaviourAttila Szűcs
Added an options that can limit Calc to behave like MS excel in case of inserting hyperlinks, when MS format document is used. Tools -> Options -> LibreOfficeDev Calc -> Compatibility -> Hyperlinks In MS excel, only cells can have a hyperlink, and only 1. In Calc even textfields in a cell can have hyperlinks, so it can have multiple links in a cell, but once saved as MS format, and reloaded, textfield links will become cell links, if there was 1 link in the cell. If there was more links in the cell, then all will be lost. So, when MS excel format document is edited in calc, the ability to make text field links is useless can be missleading, and confuse users. If this option is set, and an MS file format is opened, then insering a hyperlink will work like if we selected the whole cell to insert the hyperlink. Change-Id: I7174216d10cf250d48f23f71ae681c46f7610bbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-18add a SfxLokHelper::notifyInvalidation which can take a 'part'Caolán McNamara
no change in behaviour intended Change-Id: I6040eafb03bcf39724761d7708540e9b25edd8f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155813 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-17tdf#156699 sfx2: Extract helper method to get char value + nameMichael Weghorn
It will be reused in an upcoming commit to set the a11y name for the `SvxCharView`. Change-Id: Ib5938e5363571e547ee00cac8432f919b60cd97a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155756 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-16tdf#156591 - A11Y - add fix button for "Style has no language set."Balazs Varga
Open style language character settings if the language is set to 'None'. Add EditStyleFont uno command for editing directly Font of paragraph styles. Change-Id: I8b7d7880cc77f7352edac089ee95b4a6d0744575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155494 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>