summaryrefslogtreecommitdiff
path: root/framework/source/uielement
AgeCommit message (Collapse)AuthorFilesLines
9 daysNew Expert Configuration setting to not offer Safe Mode in the UIStephan Bergmann1-0/+5
/org.openoffice.Office/Common/Misc/OfferSafeMode (default: true), controlling: * "Help - Restart in Safe Mode..." menu entry * "Restart LibreOffice to enter safe mode" checkbox in the "Crash Report" dialog * "To start temporarily with a fresh user profile,..." tip of the day (It does not control the --safe-mode command line argument, though.) Change-Id: I66084448a1ba9427aaafef630187b4bf25219a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-01tdf#146619 Drop unused 'using namespace' in: framework/Gabor Kelemen22-47/+0
Change-Id: I03d2d3d07d0d71800df624510b5e20bd5e0588e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165531 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-22improve loplugin:staticmethodsNoel Grandin7-2/+9
Some of the exclusions were too aggressive. Restrict them to only the important classes, which exposes some more places this plugin applies. Change-Id: I1b2d1fb24391adc71ed0984f94168f61a149479f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-21framework: MenuBarManager: fix WNT crash if queryDispatch() throwsMichael Stahl1-1/+10
a Java extension throws RuntimeException from queryDispatch(), which is translated to a C++ exception and thrown by the mscx_uno bridge, and this is apparently not handled anywhere (Visual Studio says "Unhandled Exception"), and what happens then apparently is the exception goes poof and vanishes, and normal return from the mscx_uno bridge code happens, but the out parameter used for the return value is never initialised, and then the uno::Reference move assignment operator crashes. Change-Id: I21535fcf0ab4ec30a712d01b5039b7e2fb7b09d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165081 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski10-10/+10
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#127856: fix setting "None" in cell format languageHenry Castro1-1/+4
Change-Id: I94dc0b1e7f0a52e8fb6da1f9b80456cec696a727 Signed-off-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-26tdf#34142: update status language after the cell format language changeHenry Castro1-4/+1
Change-Id: Ieb97515cee469a54c5b28ac4477c9d0d78e2974c Signed-off-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162243 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12cid#1546235 aArgs is never setCaolán McNamara1-3/+1
Change-Id: I5cdf0cc5031e3636bad4d9fdaa16d724f10c2b75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161965 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-05tdf#127856: fix cell selection languageHenry Castro1-1/+1
Clicking the language in the popup Calc's status bar, it will change the cell range selection language property. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I1cc218da44eff0a4d3acee7b089e54aaad474379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161371 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-26Simplify aPropVector construction in framework/statusbarmanagerJulien Nabet1-30/+12
Change-Id: I14dfe9f156109c9c098e27fcf88ca9a273e7722c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161308 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-23cid#1546006 COPY_INSTEAD_OF_MOVECaolán McNamara1-4/+5
and cid#1545999 COPY_INSTEAD_OF_MOVE cid#1545995 COPY_INSTEAD_OF_MOVE cid#1545994 COPY_INSTEAD_OF_MOVE cid#1545989 COPY_INSTEAD_OF_MOVE cid#1545982 COPY_INSTEAD_OF_MOVE cid#1545977 COPY_INSTEAD_OF_MOVE cid#1545970 COPY_INSTEAD_OF_MOVE cid#1545856 COPY_INSTEAD_OF_MOVE cid#1545845 COPY_INSTEAD_OF_MOVE cid#1545838 COPY_INSTEAD_OF_MOVE cid#1545776 COPY_INSTEAD_OF_MOVE cid#1545774 COPY_INSTEAD_OF_MOVE cid#1545744 COPY_INSTEAD_OF_MOVE cid#1545719 COPY_INSTEAD_OF_MOVE cid#1545716 COPY_INSTEAD_OF_MOVE cid#1545687 COPY_INSTEAD_OF_MOVE cid#1545648 COPY_INSTEAD_OF_MOVE cid#1545643 COPY_INSTEAD_OF_MOVE cid#1545641 COPY_INSTEAD_OF_MOVE cid#1545604 COPY_INSTEAD_OF_MOVE cid#1545531 COPY_INSTEAD_OF_MOVE cid#1545530 COPY_INSTEAD_OF_MOVE cid#1545524 COPY_INSTEAD_OF_MOVE cid#1545516 COPY_INSTEAD_OF_MOVE cid#1545501 COPY_INSTEAD_OF_MOVE cid#1545486 COPY_INSTEAD_OF_MOVE Change-Id: Idcf3e27bb9e81b6a77d5ef75c9376eb1d6aff8c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21tdf#114441 - Convert use of sal_uLong to better integer typest-aswath3-3/+6
Change-Id: Ia226ea485700a6864c9d5ca154267c5080555a82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160450 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-20cid#1545835 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545830 COPY_INSTEAD_OF_MOVE cid#1545798 COPY_INSTEAD_OF_MOVE cid#1545784 COPY_INSTEAD_OF_MOVE cid#1545753 COPY_INSTEAD_OF_MOVE cid#1545752 COPY_INSTEAD_OF_MOVE cid#1545672 COPY_INSTEAD_OF_MOVE Change-Id: Iaf2f77cb27ae0ea1585416a0c500f7c50d04e3fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19cid#1557601 COPY_INSTEAD_OF_MOVECaolán McNamara1-4/+3
and cid#1546498 COPY_INSTEAD_OF_MOVE cid#1546384 COPY_INSTEAD_OF_MOVE cid#1546376 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546373 COPY_INSTEAD_OF_MOVE cid#1546368 COPY_INSTEAD_OF_MOVE cid#1546365 COPY_INSTEAD_OF_MOVE cid#1546356 COPY_INSTEAD_OF_MOVE cid#1546340 COPY_INSTEAD_OF_MOVE cid#1546266 COPY_INSTEAD_OF_MOVE cid#1546236 COPY_INSTEAD_OF_MOVE cid#1546188 COPY_INSTEAD_OF_MOVE cid#1546178 COPY_INSTEAD_OF_MOVE cid#1546166 COPY_INSTEAD_OF_MOVE cid#1546156 COPY_INSTEAD_OF_MOVE cid#1546144 COPY_INSTEAD_OF_MOVE cid#1546143 COPY_INSTEAD_OF_MOVE cid#1546100 COPY_INSTEAD_OF_MOVE cid#1546078 COPY_INSTEAD_OF_MOVE cid#1546041 COPY_INSTEAD_OF_MOVE cid#1546036 COPY_INSTEAD_OF_MOVE cid#1546033 COPY_INSTEAD_OF_MOVE Change-Id: Ib3586d93198992e206baf5c2de5a663d5574aa3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19tdf#123864 a11y: Evaluate checkable/toggle flag for more toolbar itemsMichael Weghorn1-5/+5
commit 4342408a8359e590f57b016baaf7d8dcfdebdbd4 Author: Carsten Driesner <cd@openoffice.org> Date: Thu May 6 18:15:21 2010 +0200 fwk142: #i104293 Use Commands.xcu files to mark commands which support a toggle state introduced a `UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON` state to mark commands that can be toggled, see `framework/inc/properties.h`. Despite that one being set for the `.uno:Underline` command in `officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu`, the underline button in Writer's formatting toolbar would not expose the CHECKABLE a11y state even after commit 78241a40628e5721aa50cb0fa13a63333343f766 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Dec 18 08:48:12 2023 +0100 tdf#123864 a11y: Handle new CHECKABLE state in misc places because the state set in the .xcu file was only applied in `ToolBarManager::CreateControllers` in the code path where no controller is set. There seems to be no particular reason for that, so move this out of that block so this gets run for other items, too. With this in place, the underline button in Writer's formatting toolbar now has the checkable AT-SPI state when using the gtk3 VCL plugin. (Orca still doesn't announce the button as checked when it is, despite the checked state also being set then, but that's another aspect that will be addressed in a separate commit.) Change-Id: Ib9200077a95feea3ce7c0380b9b8f31c96632223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160903 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-16cid#1545970 COPY_INSTEAD_OF_MOVECaolán McNamara1-6/+3
and cid#1545957 COPY_INSTEAD_OF_MOVE cid#1545944 COPY_INSTEAD_OF_MOVE cid#1545939 COPY_INSTEAD_OF_MOVE cid#1545931 COPY_INSTEAD_OF_MOVE cid#1545926 COPY_INSTEAD_OF_MOVE cid#1545909 COPY_INSTEAD_OF_MOVE cid#1545899 COPY_INSTEAD_OF_MOVE cid#1545896 COPY_INSTEAD_OF_MOVE cid#1545894 COPY_INSTEAD_OF_MOVE cid#1545858 COPY_INSTEAD_OF_MOVE cid#1545823 COPY_INSTEAD_OF_MOVE cid#1545820 COPY_INSTEAD_OF_MOVE cid#1545819 COPY_INSTEAD_OF_MOVE cid#1545772 COPY_INSTEAD_OF_MOVE cid#1545749 COPY_INSTEAD_OF_MOVE cid#1545743 COPY_INSTEAD_OF_MOVE cid#1545739 COPY_INSTEAD_OF_MOVE cid#1545635 COPY_INSTEAD_OF_MOVE cid#1545603 COPY_INSTEAD_OF_MOVE cid#1545602 COPY_INSTEAD_OF_MOVE cid#1545592 COPY_INSTEAD_OF_MOVE cid#1545544 COPY_INSTEAD_OF_MOVE cid#1545532 COPY_INSTEAD_OF_MOVE cid#1545520 COPY_INSTEAD_OF_MOVE cid#1545512 COPY_INSTEAD_OF_MOVE cid#1545490 COPY_INSTEAD_OF_MOVE cid#1545483 COPY_INSTEAD_OF_MOVE cid#1545467 COPY_INSTEAD_OF_MOVE cid#1545461 COPY_INSTEAD_OF_MOVE cid#1545458 COPY_INSTEAD_OF_MOVE cid#1545428 COPY_INSTEAD_OF_MOVE cid#1545394 COPY_INSTEAD_OF_MOVE cid#1545385 COPY_INSTEAD_OF_MOVE cid#1545383 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545357 COPY_INSTEAD_OF_MOVE Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-16cid#1546456 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546450 COPY_INSTEAD_OF_MOVE cid#1546430 COPY_INSTEAD_OF_MOVE cid#1546401 COPY_INSTEAD_OF_MOVE cid#1546313 COPY_INSTEAD_OF_MOVE cid#1546302 COPY_INSTEAD_OF_MOVE cid#1546301 COPY_INSTEAD_OF_MOVE cid#1546299 COPY_INSTEAD_OF_MOVE cid#1546280 COPY_INSTEAD_OF_MOVE cid#1546233 COPY_INSTEAD_OF_MOVE cid#1546217 COPY_INSTEAD_OF_MOVE cid#1546215 COPY_INSTEAD_OF_MOVE cid#1546204 COPY_INSTEAD_OF_MOVE Change-Id: Iaab419509ad4a0bea9cae3665723af0e99c60ee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-10loplugin:fieldcast in framework::AddonsToolBarWrapperNoel Grandin1-14/+6
Change-Id: I1fc692581acc805d6c84156d6df57093cf9dff93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159281 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::MenuBarManager::MenuItemHandlerNoel Grandin1-16/+9
Change-Id: I5a98f1bc5783bbd78ba6596ced9bb77cd3037f95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::MenuBarWrapperNoel Grandin1-11/+6
Change-Id: I7e44ad4db77db5fe4de543f47ffc4b8127e0ebea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159255 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::StatusBarWrapperNoel Grandin1-11/+5
Change-Id: I10198364323ed1886f6f356c964fc68bab8627e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::ToolBarWrapperNoel Grandin1-22/+11
Change-Id: I4158b4c0b5ce57cca5a2a0978ac951274202c159 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159253 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: frameworkStephan Bergmann8-22/+22
Change-Id: I0f17c569eddcdc30bfca4cdcd25cb05cf783ec23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158200 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18Clean up the remaining uses of OUStringConstExpr, and drop itStephan Bergmann1-2/+2
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann1-1/+1
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-09-25tdf#155698 - Start Center: Retain pinned items when clearing the listAndreas Heinisch1-1/+1
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-04tdf#147021 use std::size instead of SAL_N_ELEMENTSAdam Seskunas1-1/+1
Change-Id: Ibc6c83f950890ac9b7a754cc49973736fa81dcb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156364 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-19loplugin: new global analysis locking2Noel Grandin1-2/+0
look for methods where we don't need to guard access to the field, because the field is never modified Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-28tdf#104382 - Menus should be disabled when they have no enabled submenusBalazs Varga1-3/+28
Disable menu elements if they only have disabled submenu elemets. TODO: GTK3 Change-Id: I83cdc58846afd61719ceeba9f993df894ce6fd01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154938 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-07-26tdf#149318 Set HID for menus that have sub menusRafael Lima1-0/+2
This patch fixes the following issue when pressing F1 while hovering on a menu entry that has submenus: 1) Place the mouse over a menu entry that has submenus (f.i. in Draw go to Format - Table) 2) A submenu will appear, however leave the mouse over "Table" 3) Press F1... the help ID used will be "slot:0" because LO is trying to find the help ID of the selected entry in the submenu, but since none is selected, then the generic "slot:0" value is used. To fix this problem, this patch assigns a Help ID for the submenu (not for its entries) so that when no entry is focused, then the submenu HID is used. IMPORTANT: note that pressing F1 on menus only work with gen and win. Due to bug 156376 pressing F1 on menus does not work with kf5 and gtk3 (yet). Change-Id: I717e7669faac47a12c929129c0de98dee7f44439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154862 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-06-26new loplugin:constexprliteralNoel Grandin8-11/+11
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-15tdf#155699 - MRU: show pinned documents at the beginning of the listAndreas Heinisch1-13/+34
Change-Id: Id08678708ee74a4a278baa1e67930044f25e5d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152690 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-06-06use more officecfg for SvtMiscOptionsNoel Grandin4-21/+17
Change-Id: I6c87025fc0997b5edbc085fc88333fe9e150eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06SvtCommandOptions only supports CMDOPTION_DISABLEDNoel Grandin3-13/+9
CMDOPTION_NONE is just ignored, so remove this parameter Change-Id: If9de22a6b0522620a267cbc92b118f79e200d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin2-2/+2
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-15Simplify initialized checkMike Kaganski1-11/+4
The previous complexity did nothing useful; it allowed to have a single unguarded boolean value check, for the cost of releasing and acquiring the mutex again. Change-Id: I426304e9ef6f27ca371544951bf3cc029887019e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150437 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Use of O(U)StringNumber for float/double is actually a pessimisationMike Kaganski1-8/+8
They use rtl_(u)str_valueOf(Float|Double), to fill the buffer, and the latter use doubleToString, which creates an rtl_(u)String, copies to the buffer, and releases the rtl_(u)String. So instead just use the rtl_(u)String from rtl_math_doubleTo(U)String directly. Even when the end result is not needed as O(U)String, this would avoid an extra copy step. Also, this avoids separate LIBO_INTERNAL_ONLY implementations. Change-Id: Ib1d9ecebd7876dfff7dc758f89ee4c1536647a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150150 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski5-40/+34
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-25loplugin:stringadd in editeng..frameworkNoel Grandin3-10/+7
after my patch to merge the bufferadd loplugin into stringadd Change-Id: Ieac16a01fde6467a2f6fe47864069304a3c44e47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21sc drawstyles: Handle style commands and undoMaxim Monastirsky1-1/+2
Change-Id: Ibd81f7aba9ef2efca89556c31cd9b09867419d0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149203 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-03-14elide some temporary OStringsNoel Grandin1-1/+1
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28tdf#153857 Writer hangs right-clicking on form fieldNoel Grandin1-0/+2
regression from commit 5032262fccd0ef7f274323ae481b3230ffd42d3a Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Feb 21 15:05:37 2023 +0200 BaseMutex->std::mutex in PopupMenuControllerBase Change-Id: I01bdab09ac0ce1d9b35ed45ad36d1c5179702c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147920 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22BaseMutex->std::mutex in PopupMenuControllerBaseNoel Grandin12-73/+67
Change-Id: I26877ac7b6e5e39f511418d978199189c62cca6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-14osl::Mutex->std::mutex in ConfigurationAccess_UICommandNoel Grandin1-8/+8
Change-Id: Id92161815cd1f336c030aa4491e67a84aaddeb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-03tdf#56696 - Sort recent document list according to current LibO moduleAndreas Heinisch1-3/+50
Change-Id: I246dc9538e011b8981bea04963995559d2b43cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146456 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-01-14XUnoTunnel->dynamic_cast in VCLXMenuNoel Grandin1-2/+2
Change-Id: Iee992e2e09647a7678fd05321e601a4c5bf0c430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-14use more VCLXPopupMenu instead of XPopupMenuNoel Grandin14-24/+25
which avoids a bunch of casting and makes the dependency explicit instead of implicit Change-Id: I754da72916fbbc51e7edc3c806155da34d347bd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann2-13/+2
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-20loplugin:unocast (weld::TransportAsXWindow)Stephan Bergmann1-1/+2
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) On macOS, where we implicitly use -fvisibility-inlines-hidden-static-local-var since <https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f> "Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin", the static id local var in weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function implicitly hidden via -fvisibility-inlines-hidden. Explicitly marking the function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 2487 ("member of a dll interface class may not be declared with dll interface"). So just make the function non-inline in a new vcl/source/window/weldutils.cxx (which would arguably be the best approach for the whole class, anyway). Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-14loplugin:implinheritancehelper in frameworkNoel Grandin1-63/+1
use more ImplInheritanceHelper to reduce boilerplate Change-Id: I47eefb8edc2041fa89e64f930b1997566562d51a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144162 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>