summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)AuthorFilesLines
4 daysremove OutDevSupportType::TransparentRectNoel Grandin1-15/+1
all our backends support transparency, and have some time, XRender support became mandatory a couple of years ago. Change-Id: Ie2db7e4665068fe88a926e9791d74a82c2e75834 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176852 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
4 daysResolves tdf#163856 - Disentangle boundaries optionsHeiko Tietze1-5/+3
* Boundary toggles removed from app colors * Object boundaries completely removed (color replaced with DOCBOUNDARIES; Impress placeholder on/off now an expert option) * Toggle options added under formatting aids * Individual UNO commands marked deprecated * New command added to show all boundaries * Frames follow sections now in state and color * Kind of wrapping doesn't matter anmymore Change-Id: I7bbec20831dcb95abef6523884d84b05a1a7df0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176242 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
6 daysimprove loplugin passparamsbyrefNoel Grandin1-1/+1
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
6 daysRelated: tdf#163903 Add French (Republic of Guinea) {fr-GN} [0x940C]Eike Rathke1-1/+2
Change-Id: I2ebea83a757533088fc49a3c849e6b7890277d1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176734 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
6 dayscid#1606638 silence Overflowed integer argumentCaolán McNamara1-0/+1
and cid#1608572 Overflowed integer argument cid#1607772 Overflowed integer argument cid#1607196 Overflowed integer argument cid#1606568 Overflowed return value cid#1607573 Overflowed return value Change-Id: I9a701b19026572127399712c3b660094f2a0bd40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176740 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
12 daystdf#163486: PVS: Expression can be simplifiedXisco Fauli1-1/+1
Since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860 Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Mon Sep 18 16:07:07 2000 +0000 initial import V1065 Expression can be simplified, check 'nRowCount' and similar operands. Change-Id: Icd9cdd82cb083e2b40498a21de44a814169977ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176524 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
12 daystdf#145614 Convert #define to enum classOromidayo Owolabi1-1/+2
Converted #define to enum class Change-Id: I16195a439643bcf0111c591a829272b5bf70179d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175027 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
13 daysclang-tidy: performance-unnecessary-copy-initialization in svxNoel Grandin1-1/+1
Change-Id: I80bdcae1db64f7693600178d86c122c5875369b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-10com::sun::star -> cssMike Kaganski1-1/+1
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08no need to take a copy of the getProcessComponentContext return valueNoel Grandin6-8/+8
we can just take a "const &". (found by running clang-tidy with the performance-unnecessary-copy-initialization warning) Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-11-08Revert commit 2fe53b2e436cb236b2dc121ceec4f22de49a13a8Patrick Luby1-1/+1
Commit 709b1f3ddb87303a2dec6155dbe0106369c151ed fixes the root cause of the crash during a dynamic_cast so revert commit 709b1f3ddb87303a2dec6155dbe0106369c151ed as it was merely a workaround and is no longer needed. Change-Id: Ia052913eba7fd4d979054ea6a644f4ff9791277c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07loplugin:passstuffbyref in svtoolsNoel Grandin7-17/+17
Change-Id: I4e3d7d5fb6be857efc8327eb5113f874169bf778 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06Libreoffice Theme Part 1.0: Make registry colors accessible from VCLSahil Gautam3-2/+144
Enable UI color customization via an extension. This patch doesn't include any UI changes as that needs to be discussed with the community first (ticket: https://bugs.documentfoundation.org/show_bug.cgi?id=163620) Part 1.0 (this change) is responsible for loading all the ThemeColors from the registry into a `static ThemeColors` object, which then is accessed in various VCL_PLUGINS as a source for the application colors. The user now has to go to the registry (expert configuration), and enable the theme by setting "LibreofficeTheme" to "true". It can also be enabled via an extension (demonstrated in the Theme Template). `testGetViewRenderState` changes to "Dark" scheme which is not present. Changes in this patch don't allow that and use 'Automatic' as the fallback. This caused the unit test to fail. So the test was changed to have "Dark" scheme before changing to it. Theme Template: https://github.com/printfdebugging/libreoffice-theme-template Project Report: https://printfdebugging.in/libreoffice/01-themes-gsoc-2024/ Change-Id: I5193d4d34fcd2f4c5d6f124a871bd5c7f14e95a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168016 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-11-06cid#1556442 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1607753 COPY_INSTEAD_OF_MOVE cid#1554790 COPY_INSTEAD_OF_MOVE cid#1556463 COPY_INSTEAD_OF_MOVE cid#1554838 COPY_INSTEAD_OF_MOVE cid#1556231 COPY_INSTEAD_OF_MOVE cid#1556878 COPY_INSTEAD_OF_MOVE cid#1554913 COPY_INSTEAD_OF_MOVE cid#1558064 COPY_INSTEAD_OF_MOVE cid#1557043 COPY_INSTEAD_OF_MOVE cid#1556985 COPY_INSTEAD_OF_MOVE cid#1556766 COPY_INSTEAD_OF_MOVE cid#1557351 COPY_INSTEAD_OF_MOVE cid#1554863 COPY_INSTEAD_OF_MOVE cid#1556764 COPY_INSTEAD_OF_MOVE cid#1556279 COPY_INSTEAD_OF_MOVE cid#1555970 COPY_INSTEAD_OF_MOVE cid#1556942 COPY_INSTEAD_OF_MOVE cid#1557964 COPY_INSTEAD_OF_MOVE cid#1555166 COPY_INSTEAD_OF_MOVE cid#1556496 COPY_INSTEAD_OF_MOVE cid#1557175 COPY_INSTEAD_OF_MOVE cid#1558054 COPY_INSTEAD_OF_MOVE cid#1557392 COPY_INSTEAD_OF_MOVE cid#1557850 COPY_INSTEAD_OF_MOVE cid#1555118 COPY_INSTEAD_OF_MOVE cid#1557131 COPY_INSTEAD_OF_MOVE cid#1556614 COPY_INSTEAD_OF_MOVE cid#1609650 COPY_INSTEAD_OF_MOVE cid#1555114 COPY_INSTEAD_OF_MOVE cid#1555241 COPY_INSTEAD_OF_MOVE cid#1555442 COPY_INSTEAD_OF_MOVE cid#1556473 COPY_INSTEAD_OF_MOVE cid#1557654 COPY_INSTEAD_OF_MOVE cid#1554689 COPY_INSTEAD_OF_MOVE cid#1556316 COPY_INSTEAD_OF_MOVE cid#1557929 COPY_INSTEAD_OF_MOVE cid#1554807 COPY_INSTEAD_OF_MOVE cid#1554858 COPY_INSTEAD_OF_MOVE cid#1555103 COPY_INSTEAD_OF_MOVE cid#1555517 COPY_INSTEAD_OF_MOVE cid#1556424 COPY_INSTEAD_OF_MOVE cid#1557252 COPY_INSTEAD_OF_MOVE cid#1557566 COPY_INSTEAD_OF_MOVE cid#1608020 COPY_INSTEAD_OF_MOVE cid#1557742 COPY_INSTEAD_OF_MOVE cid#1555884 COPY_INSTEAD_OF_MOVE cid#1554809 COPY_INSTEAD_OF_MOVE cid#1555336 COPY_INSTEAD_OF_MOVE cid#1555173 COPY_INSTEAD_OF_MOVE cid#1556067 COPY_INSTEAD_OF_MOVE cid#1557040 COPY_INSTEAD_OF_MOVE cid#1556235 COPY_INSTEAD_OF_MOVE cid#1557366 COPY_INSTEAD_OF_MOVE cid#1555910 COPY_INSTEAD_OF_MOVE cid#1556716 COPY_INSTEAD_OF_MOVE cid#1558022 COPY_INSTEAD_OF_MOVE cid#1555769 COPY_INSTEAD_OF_MOVE cid#1555940 COPY_INSTEAD_OF_MOVE cid#1557077 COPY_INSTEAD_OF_MOVE cid#1555270 COPY_INSTEAD_OF_MOVE cid#1555660 COPY_INSTEAD_OF_MOVE cid#1556302 COPY_INSTEAD_OF_MOVE cid#1555678 COPY_INSTEAD_OF_MOVE cid#1556538 COPY_INSTEAD_OF_MOVE cid#1557689 COPY_INSTEAD_OF_MOVE cid#1555009 COPY_INSTEAD_OF_MOVE cid#1555433 COPY_INSTEAD_OF_MOVE cid#1555671 COPY_INSTEAD_OF_MOVE cid#1555255 COPY_INSTEAD_OF_MOVE cid#1557681 COPY_INSTEAD_OF_MOVE cid#1557512 COPY_INSTEAD_OF_MOVE cid#1554958 COPY_INSTEAD_OF_MOVE cid#1555758 COPY_INSTEAD_OF_MOVE cid#1555597 COPY_INSTEAD_OF_MOVE cid#1558040 COPY_INSTEAD_OF_MOVE cid#1556476 COPY_INSTEAD_OF_MOVE cid#1557646 COPY_INSTEAD_OF_MOVE cid#1557950 COPY_INSTEAD_OF_MOVE cid#1557019 COPY_INSTEAD_OF_MOVE cid#1557885 COPY_INSTEAD_OF_MOVE cid#1556402 COPY_INSTEAD_OF_MOVE cid#1557906 COPY_INSTEAD_OF_MOVE cid#1556619 COPY_INSTEAD_OF_MOVE cid#1554683 COPY_INSTEAD_OF_MOVE cid#1556549 COPY_INSTEAD_OF_MOVE cid#1554747 COPY_INSTEAD_OF_MOVE cid#1554929 COPY_INSTEAD_OF_MOVE cid#1555362 COPY_INSTEAD_OF_MOVE cid#1557053 COPY_INSTEAD_OF_MOVE cid#1557891 COPY_INSTEAD_OF_MOVE cid#1555043 COPY_INSTEAD_OF_MOVE cid#1555107 COPY_INSTEAD_OF_MOVE cid#1557203 COPY_INSTEAD_OF_MOVE cid#1556728 COPY_INSTEAD_OF_MOVE cid#1557773 COPY_INSTEAD_OF_MOVE cid#1556845 COPY_INSTEAD_OF_MOVE Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-11-05Fix crash due to unexpected dynamic_cast failures in optimized buildPatrick Luby1-1/+1
When an optimized build of this branch is compiled on Silicon Mac, a dynamic_cast from com.sun.star.awt.XPopupMenu to VCLXPopupMenu will fail. The pointer being casted has not been deleted and is an undeleted instance yet dynamic_cast fails. However, a dynamic_cast to VCLXPopupMenu's superclass VCLXMenu succeeds so cast to that class instead. Change-Id: Ie9ab79df109eece46351545a71325d1e37bde94d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175992 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-11-01Drop GraphicFilter's bUseConfigMike Kaganski1-1/+1
It controlled how the FilterConfigCache initialized, and also how the unused aFilterPath was initialized. The FilterConfigCache is reused, when there are other instances of GraphicFilter - so that means, that the "bUseConfig" flag doesn't necessarily mean that the initialization will happen as intended: the existing instance could have been initialized using the other value. Avoid this indeterministic behavior, and always use the config, except in fuzzing. The VCL tests, that could possibly once depend on that, now use config, so this is not an issue - and that means testing the same thing as used in the working code, not something different. Change-Id: I6555dc47328b362e020138cf454f5ede7f39d063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-31cid#1606874 silence Data race conditionCaolán McNamara1-2/+4
Change-Id: I6703ee228ac0717b04f58e14eedd02ab0722edf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175861 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-27Simplify a bitMike Kaganski1-8/+7
Change-Id: I92f7d39e449610609f8740c83e221e28eb018d4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175697 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-26cid#1555767 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1555770 COPY_INSTEAD_OF_MOVE cid#1555788 COPY_INSTEAD_OF_MOVE cid#1555789 COPY_INSTEAD_OF_MOVE cid#1555798 COPY_INSTEAD_OF_MOVE cid#1555816 COPY_INSTEAD_OF_MOVE cid#1555822 COPY_INSTEAD_OF_MOVE cid#1555835 COPY_INSTEAD_OF_MOVE cid#1555845 COPY_INSTEAD_OF_MOVE cid#1555859 COPY_INSTEAD_OF_MOVE cid#1555864 COPY_INSTEAD_OF_MOVE cid#1555868 COPY_INSTEAD_OF_MOVE cid#1555892 COPY_INSTEAD_OF_MOVE cid#1555896 COPY_INSTEAD_OF_MOVE cid#1555921 COPY_INSTEAD_OF_MOVE cid#1555932 COPY_INSTEAD_OF_MOVE cid#1555935 COPY_INSTEAD_OF_MOVE cid#1555944 COPY_INSTEAD_OF_MOVE cid#1555952 COPY_INSTEAD_OF_MOVE cid#1555985 COPY_INSTEAD_OF_MOVE cid#1556024 COPY_INSTEAD_OF_MOVE cid#1556038 COPY_INSTEAD_OF_MOVE cid#1556042 COPY_INSTEAD_OF_MOVE cid#1556044 COPY_INSTEAD_OF_MOVE cid#1556060 COPY_INSTEAD_OF_MOVE cid#1556083 COPY_INSTEAD_OF_MOVE cid#1556085 COPY_INSTEAD_OF_MOVE cid#1556090 COPY_INSTEAD_OF_MOVE cid#1556136 COPY_INSTEAD_OF_MOVE cid#1556157 COPY_INSTEAD_OF_MOVE cid#1556159 COPY_INSTEAD_OF_MOVE cid#1556172 COPY_INSTEAD_OF_MOVE cid#1556179 COPY_INSTEAD_OF_MOVE cid#1556187 COPY_INSTEAD_OF_MOVE cid#1556255 COPY_INSTEAD_OF_MOVE cid#1556256 COPY_INSTEAD_OF_MOVE cid#1556266 COPY_INSTEAD_OF_MOVE cid#1556275 COPY_INSTEAD_OF_MOVE cid#1556290 COPY_INSTEAD_OF_MOVE cid#1556294 COPY_INSTEAD_OF_MOVE cid#1556301 COPY_INSTEAD_OF_MOVE cid#1556311 COPY_INSTEAD_OF_MOVE cid#1556318 COPY_INSTEAD_OF_MOVE cid#1556326 COPY_INSTEAD_OF_MOVE cid#1556369 COPY_INSTEAD_OF_MOVE cid#1556374 COPY_INSTEAD_OF_MOVE cid#1556387 COPY_INSTEAD_OF_MOVE cid#1556388 COPY_INSTEAD_OF_MOVE cid#1556417 COPY_INSTEAD_OF_MOVE cid#1556425 COPY_INSTEAD_OF_MOVE cid#1556435 COPY_INSTEAD_OF_MOVE cid#1556495 COPY_INSTEAD_OF_MOVE cid#1556497 COPY_INSTEAD_OF_MOVE cid#1556501 COPY_INSTEAD_OF_MOVE cid#1556503 COPY_INSTEAD_OF_MOVE cid#1556520 COPY_INSTEAD_OF_MOVE cid#1556523 COPY_INSTEAD_OF_MOVE cid#1556562 COPY_INSTEAD_OF_MOVE cid#1556573 COPY_INSTEAD_OF_MOVE cid#1556576 COPY_INSTEAD_OF_MOVE cid#1556598 COPY_INSTEAD_OF_MOVE cid#1556615 COPY_INSTEAD_OF_MOVE cid#1556626 COPY_INSTEAD_OF_MOVE cid#1556671 COPY_INSTEAD_OF_MOVE cid#1556689 COPY_INSTEAD_OF_MOVE cid#1556701 COPY_INSTEAD_OF_MOVE cid#1556713 COPY_INSTEAD_OF_MOVE cid#1556758 COPY_INSTEAD_OF_MOVE cid#1556759 COPY_INSTEAD_OF_MOVE cid#1556788 COPY_INSTEAD_OF_MOVE cid#1556811 COPY_INSTEAD_OF_MOVE cid#1556821 COPY_INSTEAD_OF_MOVE cid#1556824 COPY_INSTEAD_OF_MOVE cid#1556825 COPY_INSTEAD_OF_MOVE cid#1556862 COPY_INSTEAD_OF_MOVE Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-25speedup saving large XLS file with lots of query formula(2)Noel Grandin1-2/+1
reduce cost of OUString construction by avoiding initialising a temporary and then overwriting it. 12s to 10s Change-Id: I889152ba71947004ca7d5c96f073182c94d95ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175539 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-24tdf#130857 printersetupdialog.ui: Define focusable widgets in orderMichael Weghorn1-33/+33
Align the order in which the focusable widgets (combobox, "Properties" button) are defined in the .ui (XML) file with the order in which they should receive focus. While the position in the GtkGrid is defined by the "left-attach" and "top-attach" packing properties and QtBuilder evaluates those, the tab order in Qt by default matches the order in which widgets are created (s. e.g. [1]). Without this commit in place the "properties" button was constructed before the "name" combobox (because it was further up in the .ui file, i.e. the XML parser processed it earlier), resulting in an unexpected order when using the Tab key to navigate through the "Tools" -> "Printer Settings" dialog: From the "Options" button in the button box, focus would jump to the "Properties" button, and only then to the combobox, and from there, it would jump to the "Help" button in the button box. Now, it jumps from the "Options" button to the combobox, and after selecting the printer there, pressing Tab another time moves focus to the "Properties" button as expected, which can be used to open another dialog that allows to change properties of the previously selected printer. A potential alternative to adjusting the .ui file could be to explicitly set the tab order using QWidget::setTabOrder [2] in QtBuilder. [1] https://doc.qt.io/qt-6/designer-tab-order.html [2] https://doc.qt.io/qt-6/qwidget.html#setTabOrder Change-Id: If3aa014e20b97fe8bb772ef212741af1433b0244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175523 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-22cid#1555259 COPY_INSTEAD_OF_MOVECaolán McNamara2-4/+4
and cid#1555264 COPY_INSTEAD_OF_MOVE cid#1555280 COPY_INSTEAD_OF_MOVE cid#1555303 COPY_INSTEAD_OF_MOVE cid#1555313 COPY_INSTEAD_OF_MOVE cid#1555314 COPY_INSTEAD_OF_MOVE cid#1555323 COPY_INSTEAD_OF_MOVE cid#1555333 COPY_INSTEAD_OF_MOVE cid#1555338 COPY_INSTEAD_OF_MOVE cid#1555349 COPY_INSTEAD_OF_MOVE cid#1555364 COPY_INSTEAD_OF_MOVE cid#1555379 COPY_INSTEAD_OF_MOVE cid#1555398 COPY_INSTEAD_OF_MOVE cid#1555410 COPY_INSTEAD_OF_MOVE cid#1555411 COPY_INSTEAD_OF_MOVE cid#1555416 COPY_INSTEAD_OF_MOVE cid#1555429 COPY_INSTEAD_OF_MOVE cid#1555434 COPY_INSTEAD_OF_MOVE cid#1555441 COPY_INSTEAD_OF_MOVE cid#1555446 COPY_INSTEAD_OF_MOVE cid#1555480 COPY_INSTEAD_OF_MOVE cid#1555490 COPY_INSTEAD_OF_MOVE cid#1555524 COPY_INSTEAD_OF_MOVE cid#1555527 COPY_INSTEAD_OF_MOVE cid#1555531 COPY_INSTEAD_OF_MOVE cid#1555578 COPY_INSTEAD_OF_MOVE cid#1555581 COPY_INSTEAD_OF_MOVE cid#1555591 COPY_INSTEAD_OF_MOVE cid#1555614 COPY_INSTEAD_OF_MOVE cid#1555619 COPY_INSTEAD_OF_MOVE cid#1555633 COPY_INSTEAD_OF_MOVE cid#1555654 COPY_INSTEAD_OF_MOVE cid#1555707 COPY_INSTEAD_OF_MOVE cid#1555712 COPY_INSTEAD_OF_MOVE cid#1555746 COPY_INSTEAD_OF_MOVE cid#1555763 COPY_INSTEAD_OF_MOVE Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-21Make tools::Time ctor taking sal_Int64 privateMike Kaganski1-1/+1
This ctor is meant to set the value of nTime directly; and that value is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK. But in some places, this ctor was misused for setting of nanoseconds, which would only accidentally work for values less than one second. All places that initialized tools::Time with 0, now use EMPTY. This makes the ctor private; and for the very few cases where really the encoded value of nTime is stored / restored, fromEncodedTime is introduced. Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-19tdf#156505 sw: reset view options after export as graphicJustin Luth1-0/+1
When creating an export graphic, the view options are changed to hide hidden stuff, not show the formatting marks etc. However, the user's view settings were not being restored after the export was done. Change-Id: I3e236e5ef47eddca487621c92ec639f7bac073de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175185 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-10-18svtools a11y: Set underline/mnemonic char for "Restart" dialogMichael Weghorn1-2/+4
Set the "use-underline" property for the buttons in the "Restart %PRODUCTNAME" dialog and specify the accelerators. This way, the dialog can easily be closed using Alt+[accelerator] with the gtk3 and qt5/qt6 VCL plugin as well. Use those characters that the VCL logic was using as well. (The VCL implementation seems to have some way to auto-generate mnemonic characters if none is set automatically.) This dialog is e.g. seen when toggling experimental mode in "Tools" -> "Options" and closing the options dialog with the "OK" button. Change-Id: I50c3402fb89d5fbfc0e610c0e41f5f035cf0b0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175137 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-17cid#1555697 Data race conditionCaolán McNamara1-2/+8
Change-Id: Ib022e1fbccf456e89f16a26efb50e6c8d98372ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175065 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-16loplugin:unusedmethodsNoel Grandin2-24/+0
Change-Id: I6ba4b4046190b701d4a15c6fa90b6009ecf4ab1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-14Add Santali, Ol Chiki {sat-Olck-IN} [0x06B3] to language listEike Rathke1-2/+3
Change-Id: I3924672759bc12f1ee8a022e8b35c862aefff06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174901 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2024-10-14tdf#114441 change the sal_uLong to tools::Long and sal_Int32 in svtoolsDeepanshu Sharma2-16/+16
Change-Id: I1f5e2233b34e115723f3c1b49b7f0f982e16cfcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174264 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-10-03use more concrete UNO class in ValueSetAccNoel Grandin3-23/+12
Change-Id: I9d6c31ccda4ff05f33d437ab064a2a55d84627b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174411 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01a11y: Only send active-desc-changed event when ValueSet has focusMichael Weghorn1-16/+21
When the selected item in a ValueSet changes, only send an AccessibleEventId::ACTIVE_DESCENDANT_CHANGED event for the newly selected item if the ValueSet itself has focus, as the active descendant is the currently active child of the current focus object. This prevents incorrect events that e.g. broke Orca's focus tracking and thus announcement of the current slide in Impress when moving between slides in the "Slides" panel: 1) start Impress 2) select the "Beehive" presentation template 3) move focus to "Slides" panel 4) use up and down key to navigate between slides Instead of saying "Slide 1" and "Slide 2" respectively, Orca sometimes announced "Layout, list with 16 items", as the 2 slides use a different layout, and thus switching between slides implicitly leads to the selection of the corresponding item in the "Layout" deck in the sidebar, which resulted in a corresponding ACTIVE_DESCENDANT_CHANGED event being sent prior to this commit, making Orca think that that item received keyboard focus. With this commit in place, Orca now announces "Slide 1" and "Slide 2" according to the newly selected slide in the "Slides" view. Change-Id: I543a4c94bae75dede7274a8b35f183ccd2ac0515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174342 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-01cid#1607958 Data race conditionNoel Grandin1-4/+5
Change-Id: I1d5d0c9eae073f69e4308163dcc62371c31e0d78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174292 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-21Make replacement graphic management more atomicMike Kaganski1-49/+14
Commit 8872f7121b4ae4dd0b51820366d3510a88f7aac2 (crashtesting: crash on exporting kde274105-6.docx to .rtf, 2024-03-27) added some safety code in EmbeddedObjectRef::GetReplacement. It mentioned, that there are likely some bugs in the management of the graphic. This tries to fix this management, avoiding the intermediate states, and only changing the graphic when all the data is ready. This also reverts the changes of the mentioned commit, obsoleted now; and of commit 8780fa41dcd164af244742461f4e57a4bcf4c7a4 (svtools: fix lost replacement grpahic when updating it via OLE fails, 2018-10-30); but keeps commit 24231f2a336c50eac5e6a1621c57e60ebe1e1cf4 (svtools: fix lost replacement non-rendered graphic when updating it fails, 2022-02-17). This has revealed that the second part of unit test for tdf#143222 ("Check export of embedded worksheet in slide"), introduced in commit 92a407b7f90a98704a238c5ffa3a3491eaf3263a (tdf143222 Handle alternate content of graphicData element., 2021-07-08), has never really worked: the "pGraphic != nullptr" check would never fail; in fact, that used to always return an empty graphic. The problem was filed as tdf#163064, and the test was modified accordingly. Commit 5d997c029e53c31a3651a08f5012645097cec48f (sw XHTML export: improve dummy OLE object handling, 2018-08-30) made ReqIF export handle missing replacement graphic. However, it had assumed that SwOLENode::GetGraphic always returns a valid pointer even for the missing data. That is fixed here in OutHTML_FrameFormatOLENodeGrf. Other places, where the pointer was dereferenced unconditionally, were fixed (keeping current behavior). Change-Id: Ica97a691ecc11b856bdb003f89467ea3392684bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173716 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-20Make sure to have a graphic hereMike Kaganski1-0/+4
Commit 8872f7121b4ae4dd0b51820366d3510a88f7aac2 (crashtesting: crash on exporting kde274105-6.docx to .rtf, 2024-03-27) made sure to provide a graphic in all cases, to avoid crashes revealed by crashtesting. In commit f317746f55044927a180657f81e21d662102b0c5, I removed that. This reinstates the safety measure for cases when there's no graphic yet. Change-Id: Ida3eecd5c7ccff087c2ca8b6076ca01b8a145adc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173697 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-20use more concrete UNO types in variousNoel Grandin1-2/+2
Change-Id: Ia28cffdeae8ced2e19dcf695ee5c3417d4f97d64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-20Avoid wrong "no replacement graphic" state when updating OLE graphicMike Kaganski1-3/+6
Connecting from an external Java process on Windows, and running a code similar to this: XComponent xComponent = xComponentLoader.loadComponentFromURL(url, "_default", FrameSearchFlag.ALL, args); XTextEmbeddedObjectsSupplier textEmbeddedObjectSupplier = cast(XTextEmbeddedObjectsSupplier.class, xComponent); XIndexAccess embeddedObjectsAccess = cast(XIndexAccess.class, textEmbeddedObjectSupplier.getEmbeddedObjects()); XEmbeddedObjectSupplier2 embeddedObjectSupplier = cast(XEmbeddedObjectSupplier2.class, embeddedObjectsAccess.getByIndex(0)); for (int i = 0; i < 100; i++) { XGraphic replacementGraphic = embeddedObjectSupplier.getReplacementGraphic(); String graphicStatus = replacementGraphic == null ? "missing" : "present"; System.out.println("The replacement graphic is: " + graphicStatus); } (when 'url' points to a file with OLE) could produce output like this: The replacement graphic is: present The replacement graphic is: present The replacement graphic is: missing ... 94 more copies of "missing" The replacement graphic is: missing The replacement graphic is: present The replacement graphic is: present i.e., the replacement graphic suddenly disappears, and then re-appears. This happens when some idle needs to update the replacement graphic, e.g. when generating a thumbnail. This happened because the code in EmbeddedObjectRef::GetReplacement cleared the graphic prior to calls to OLE object's async methods to get the graphic stream. The code does not depend on the current content of mpImpl->oGraphic, so this change takes care to avoid this transient "no graphic" state. Change-Id: Ia825185a6e9b749697209443ee5db187b5ddbd16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173690 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-19Resolves: tdf#141577 explicitly set current frame as active frameCaolán McNamara1-0/+10
of the current frame window. Creating the popup will grab focus into the dropdown, making the embedded frame lose focus, so it considers itself inactive (like right clicking in main frame area makes the embedded frame lose focus), so for this embedded object in another frame case make the original frame the active child of its parent after the popup has been created. Change-Id: Id6e12babcf4ebce05c297888b7b04756f2a12ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173624 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-09Resolves: tdf#162113 prefer restoring explicit font style selectionCaolán McNamara1-7/+28
so when scrolling through fonts that might not have the original or explicitly picked style, then on moving to the next font that does have that style, then the original bold/italic/etc gets picked again. Change-Id: If818a116ed4ab248cb67f60845acad2cd4eeb8ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173071 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-29cid#1607370 Check of thread-shared field evades lock acquisitionCaolán McNamara1-1/+4
apparently since: commit 8228227168a7eb3ebf14629bec87f01536c23970 CommitDate: Thu Dec 8 17:27:05 2016 +0000 convert OSL_ENSURE to assert in AccessibleEventNotifier Change-Id: If4ad0459e39e44a9417dd074560538f2a87586b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172615 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-28fix(invert): Avoid spurious LOK invalidationsSkyler Grey1-9/+42
Using the same mechanism as with theme changes, we can avoid LOK getting invalidations if we have an invert-background change that doesn't apply. The trouble is that this method of inverting the background causes *lots of* properties to change, so there's no single "If we inverted the background" to check... To get there, I've checked if all of the following are true - We didn't change the color scheme - We didn't have any new colors after this change - All of the properties we were changing should have been within this color scheme While they don't necessarily mean "there was a background inversion", they do mean "something changed in your theme but no action is needed from you" - which should only be a background inversion - and if we added anything else that could fit in that category, it should also avoid LOK invalidations Change-Id: Idb680d5241db7879d9be834268ab616848c1f165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172505 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-08-20Resolves tdf#143848 - Adjust boundary color for dark modeHeiko Tietze1-2/+2
TABLEBOUNDARIES and WRITERSECTIONBOUNDARIES now visible on dark backgrounds Change-Id: I25bad39e503665cef486f197bbeaa34374f22c5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172096 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-08-14Resolves tdf#80054 - Customization for non-printable character colorHeiko Tietze1-0/+2
Change-Id: I82783a49d3a1c2096dcfa7c97a3fce14c555c988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171814 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-08-13Resolves tdf#162435 - TC author colors inherit anchor colorsHeiko Tietze1-9/+9
Fix to regression from I773793de8cfbdc0d23124db790604b93030375c2 * base color is now anchor, light/dark calculated as luminance * default colors adjusted respectively Change-Id: I9872a959d51714c736cd2adb216d76a0846aeec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171753 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-08-11Resolves tdf#61242 - Customization of comment background colorHeiko Tietze1-0/+18
* COL_AUTHOR<1..>_DARK/LIGHT/NORMAL removed Author1..9 added * dark variants calculated from light with 50% brightness * light does In/DecreaseLuminance(30) and dark (sd) resp. anchor (sw) In/DecreaseLuminance(80) depending on GetUseDarkMode() * sw: font color depends on outline background, which now picks up DOCCOLOR; this does not work for dark colors in light mode, for example * sd does not update on changes and requires a restart Change-Id: I773793de8cfbdc0d23124db790604b93030375c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171523 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-08-08ONLINE: Add Invert document background color command.Gülşah Köse1-11/+19
Change-Id: Ia8868a80e4eba9a9a1c0b31077d9eca0c5b00466 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-23tdf#162139: make 2 buttons in the date form control translatableJulien Nabet1-2/+2
Context modified because the same strings are in svtools/uiconfig/ui/calendar.ui Don't know at all if these could be merged. Change-Id: I72e37b54b53e4717f513dd313757af7318bbc4f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170898 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-07-17Use IsRunningUnitTest / IsRunningUITest consistentlyMike Kaganski1-6/+2
The functions are moved to o3tl as inline functions. Change-Id: Ief7d7e292ef15e055ad04ab5707e5e6a2a05b916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170636 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-17Simplify checking for "running under unit/ui test"Noel Grandin1-1/+4
In various places, the code checks if we are running as a unit test or a UI test. This code grew organically, and is most re-using environment variables that were designed for narrower purposes. Rather than being clever, just add two new explicit and simple environment variables in the natural place (the command that runs them), and check for those variables in the code. Change-Id: Icce0997914fa0be30a5ac1f29bd870bdb5893a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170618 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-07-14tdf#114441 replace sal_uLong with tools::LongHakimOttey1-1/+1
Make variable nHScrX have tools::Long data type as it is expected to be tools::Long when used in SetPostSizePixel Change-Id: If7e0c1ee1a9832b215c766cbf8bf916c731edfd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167804 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-07-11Unify/Port to use VCLUnoHelper for AWT <-> VCL conversionsMichael Weghorn1-7/+8
Following Change-Id: Id48f81deb05aee2026509037f7d14575735e5be0 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Jul 10 14:49:03 2024 +0200 VCLUnoHelper: Align AWT <-> VCL helpers with convert.hxx impl , port all uses of the helper functions defined in `include/toolkit/helper/convert.hxx` to use the `VCLUnoHelper` equivalents instead, to unify usage and avoid duplication. Drop `include/toolkit/helper/convert.hxx` now that it's unused. Change-Id: I22695a93e40e47bb2b14d191a2e0a4eb7c856895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170317 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>