summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2023-10-26cool#6893 improve listeners in SfxBaseModelNoel Grandin
reduces CPU spent in UNO query'ing, and adds type-safety, which exposed a bug in SfxBaseModel::disposing Change-Id: I4b973f7dc38f491ce7a6281ad378e439b5450add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158500 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-24suppress more IndexHint accessibility warningNoel Grandin
Change-Id: I45bc0bf74f4ebeeb4155006e67309cd476ebc3c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-22lok: a11y: impress: screen reader support for text shape editingMarco Cecchetti
Now accessibility support can be enabled in Impress. Fixed an issue that prevented to receive accessibility event when a shape text content was edited. Some rectangles overlapping check is performed for excluding not visible shapes from the a11y tree Anyway client and core visible area can differ some shape was wrongly pruned from the a11y tree. The problem has been fixed by not performing the overlapping test in the LOK case: we already do the same for shape area invalidation. In order to avoid the screen reader to report no more focused paragraph we send an empty paragraph to clear the editable area when shape selection state changes. When shape ediding becomes active the text content of the shape is sent to the client. Change-Id: Ia9ee08d060162891725d26efd2aa36e47b38ed50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157525 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158329 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-22lok: a11y: send list item prefix length to clientMarco Cecchetti
Implemented getListPrefixSize function which relies on UNO_NAME_NUMBERING_LEVEL, UNO_NAME_NUMBERING character attributes. The former provides the list item level, the latter is a boolean that says if a prefix (bullet/number) is present or not for the list item. It has been needed to modify SwAccessibleParagraph::_getSupplementalAttributesImpl so that it returns such properties for list item only and not for simple paragraph too. In fact for a simple paragraph the default value for the level property was returned which is 0 exactly the same value for top list item. Change-Id: Ia651af4d4b2372eed42c90b0752e16fd47a4fdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> (cherry picked from commit 038903d2e066de9525a3baffdd232484ef44ff51) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157780 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sfx2Stephan Bergmann
Change-Id: Ied8f0aff05ffd2f9e187fcb690789baf5fcf0c30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158220 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19tdf#157484 UI: Add UI controls for personal information to be keptBalazs Varga
or removed upon save. With the new options button we can keep the security infos upon save such as (even if we set the remove personal infos): - RedLine Info - Document User Info - Author and date of notes - Document version infos Also on the infobar, if we have a warning, clicking on the infobar button the security option dialog will open where we can set/modify these options. follow-up of: 1f440348eb0892fd2c9597806d87b5fe9d60d49a (tdf#157482 UI: Turn Security Warnings popup windows into infobars) Change-Id: I8d5d944d76dbdd31653401246113de097ca6d57b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158112 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-10-18LOK: send state of protected cellsPranam Lashkari
Change-Id: I432a3af50b6089faa80a28804d95d816af6cd278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154936 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> (cherry picked from commit 5f13751cefd725cb2a38e66c9484046e6141c6c2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158150 Tested-by: Jenkins
2023-10-18Clean up the remaining uses of OUStringConstExpr, and drop itStephan Bergmann
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 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-17tdf#148725: Reset must clear respective items from m_pOutSetMike Kaganski
After Reset, the tabbed dialog's output set should restore to the same state (concerning the current tab page) as immediately after creation. This state means that pressing OK immediately afer Reset would not try to set or remove any items in the target. SfxTabDialogController::Ok has this code: if (m_pOutSet && m_pOutSet->Count() > 0) bModified = true; meaning that m_pOutSet is expected to be empty in case of completely unmodified dialog; and Reset must make sure this for a given page. Instead, commit 28fc0962b10519ab84654d189d2ad0cca8f84f95 (weld SwLabDlg, 2018-04-27) made Reset handler to populate the output item set with all the items from the input set, that belong to the page's which ranges. This made all the settings set in parents (which therefore appeared in the input set) to be set directly in the target upon application. Change-Id: Iacfffb5670cc3ade950ac412b818acb482845255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158067 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14Keep some information when switching between exceptions and ErrCodeMsgMike Kaganski
This simplifies debugging. Change-Id: I21ba175a039bed9a1f13d510b2c80eb6356417ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157908 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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-11drop empty accessibility descriptionCaolán McNamara
Change-Id: Ib2e4524ba668ce59ba1c5fad3e3180df396254a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.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-11disable add-ons for NotebookBar in LOKit - perf. issuesTomaž Vajngerl
Searching for add-ons to use in NotebookBar causes perf. issues, so disable them for now. This was discovered during a editing session and the flame-graph showed up the NotebookbarAddonValues method. See COOL GitHub ticket [1] for more details. [1] https://github.com/CollaboraOnline/online/issues/6896 Change-Id: I4b2ced2be966de1cd1282f801a4410bc1625f0f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154513 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 0cda4c31c6c7881ea7b5089b04ad5147b28117af) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157815 Tested-by: Jenkins
2023-10-11drop can-focus of False in GtkToolButtonsCaolán McNamara
Change-Id: I12add968fdb5cb4d29087c24aa885cde23488fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157794 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-09tdf#157650 Unhelpful error when XML in content.xml is malformedNoel Grandin
regression from commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2 replace ErrorInfo with simpler mechanism we need to tunnel the necessary information through the uui stuff, so add a new Exception class to do that. Change-Id: Ie1fde486e8637b802340795348a5e5aad6a54e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-09sfx2: invoke handler "LoadReadOnlyRequest"Henry Castro
It will ask the user if open the Excel documents "read only" Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I909fb39709198e02496f8c522f477c077fb875e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156624 Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157730 Tested-by: Jenkins
2023-10-09tdf#142524 Search Commands: use ▸ to indicate sequenceIlmari Lauhakangas
Change-Id: I2a3a7c4db03dbfe53f2b71de7ee9b3df42a22866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157689 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
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-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
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-06tdf#150639 Fix sidebar width too narrowMihai Vasiliu
The mnWidthOnSplitterButtonDown is initialized to 0 at program start. This makes every call to take the else case until the user manually changes the width, but some decks such as Master Slides have the mnMinimalWidth too low which makes them too narrow for the content they should display to the user. Change-Id: I8fc4924f777770dedbdc8d162ceceb620ff80e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157596 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> 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-03sfx2: fix gcc dbgutil -Werror=unused-variableMiklos Vajna
/home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx: In member function ‘void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16, bool)’: /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx:1861:27: error: unused variable ‘pCW’ [-Werror=unused-variable] 1861 | if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) | ^~~ /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx: In member function ‘void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16, bool, bool)’: /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx:1990:27: error: unused variable ‘pCW’ [-Werror=unused-variable] 1990 | if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) | ^~~ Change-Id: Iecc60032459ca8a6543f3836f17b76b25939cda9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157516 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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-02Deduplicate and simplify some SfxWorkWindow methodsMike Kaganski
Change-Id: Ibd7153454f1efd1d311ac99b9c2529958f4ca3e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157500 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-10-02lok: add broken package interaction handlerSzymon Kłos
in case of repair don't use template flag to not make file readonly so we can overwrite it and upload to storage updated version Conflicts: desktop/source/lib/lokinteractionhandler.cxx desktop/source/lib/lokinteractionhandler.hxx sfx2/source/doc/sfxbasemodel.cxx Change-Id: Ia460009fc3b77582dde06dd6f94a85aef3aee11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157493 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-29cid#1546831 Dereference after null checkCaolán McNamara
Change-Id: I8c51dd1b312f02534f138b4fe6752ad26f5ac96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157399 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
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-28Improve OleRun error reportingMike Kaganski
1. Pass its error message up the call stack as the exception's message. 2. In case of REGDB_E_CLASSNOTREG, also obtain the object's class name and append it to the message. 3. Show this information in the message displayed for OLE activation error. This introduces a new SetExtendedMessage method in SfxErrorContext to store extra information for specific errors. Change-Id: Id3863276266d992ae407fbfa5568acf5c57aa96f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-25tdf#155698 - Start Center: Retain pinned items when clearing the listAndreas Heinisch
Change-Id: Ife54845e020977cdb80a7fcc1fa63333afc17b32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157169 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-09-25tdf#49895: search in Options: check if label exists (related to tdf#157266)Bayram Çiçek
- since ids in ui files can be changed or removed, we have to check if they are exits or not, to prevent any crash or misbehavior. - Proper solution will be iterating over the widget ids and collecting their strings without based on a list of identifiers. Change-Id: I2088af6842ad0acd00838a37295dc2e6140096f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157103 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-09-24Resolves tdf#136216 - Hide uno:AdditionsDialog from customizationHeiko Tietze
Change-Id: I0948a85cf222a44534473ee465087213734536b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157185 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
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-18fix emscripten buildSarper Akdemir
Change-Id: I15df992e410f741a22d1f140b85e57a97195a5f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157020 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-18lok: don't convert save request to save asSzymon Kłos
Don't force save as in LOK but report that file cannot be written. Without that we go through save as process which is used for export functionality and client's browser downloads the file in the end instead of uploading to the storage. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I2784bfc25055934363c304b5f5a87ae4da620a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156819 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157021 Tested-by: Jenkins
2023-09-13loplugin:unusedmethodsNoel Grandin
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 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-11ITEM: Diverse further changes/cleanups/preparationArmin Le Grand (allotropia)
Added a counter for SfxItemSet usages, similar to the already added one for SfxPoolItems to allow quick info about evtl. problems/drawbacks of changes. Replaced enum SfxItemKind in favour of settable boolean flags directly at SfxPoolItem. These are organized as bitfield, do not need more space as the enum and allow to be set separately and multiple ones at the same time. Flags for PoolDefault/StaticDefault/DeleteOnIdle use this now and are quickly accessible booleans. It is not a problem that theoretically the flags for PoolDefault/StaticDefault could now both be set - this is internal to SfxItem stuff and not accessible from normal code, so can be managed. Added for debug build a bitfield boolean m_bDeleted that will be set in the SfxPoolItem destructor. Of course it's usability will depend on the freed space not yet being re-used, but will hopefully help in the debugger to detect reasons for failure (would have helped at least me before). Added for replacement of virtual method IsVoidItem() another bitfield bool m_bIsVoidItem that is set in the constructors of SfxVoidItem. Also had to add some constructors to do that which were defaulted before. This is mainly because the base class SfxPoolItem does *not* have a copy-constructor that copies the members (flags/RefCnt/WhichID) and we should keep that 'indirect reset' when Cloning. isVoidItem() is now a simple boolean member access - the bitfield does the needed masking. This spares one entry in the virtual function table of SfxPoolItem which is derived more than 500 times. Used the results of the experiment at https://gerrit.libreoffice.org/c/core/+/156774 to change some accesses to IsVoidItem() to use SfxItemState instead. This is for preparation of splitting up the two usages of SfxVoidItems, see commit text in the experiment. If this shows problems in the future those six places documented there may have to be changed back to use the new isVoidItem(), but should also check the ptr this time to be non-zero. Removed SFX_ITEMS_SPECIAL that is no more used anywhere. Change-Id: Ib687ca2362d72a4651c75aee0c67029088f68947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156805 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>