summaryrefslogtreecommitdiff
path: root/cui/source
AgeCommit message (Collapse)Author
2021-09-14Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-upEike Rathke
... (and other backends?) Change-Id: If45b83080aa2df50ef27ad282eb6fa1d4a022703 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122037 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 37e2e99f7a3018dce0337b582b139d41e1e81a9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122060 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-13Resolves: tdf#144457 Use weld::set_text() instead of replace_selection()Eike Rathke
... to replace entire field with modified text, instead of inserting the text at the cursor position without selection, thus effectively duplicating it (modulo modification). Fallout from commit 08101a1ab3b5d7c41488e93a2af518462286844f CommitDate: Tue Jul 30 14:04:17 2019 +0200 weld OfaLanguagesTabPage that did if (bModified) - { - // Do not use SetText(...,GetSelection()) because internally the - // reference's pointer of the selection is obtained resulting in the - // entire text being selected at the end. - Selection aSelection( rEd.GetSelection()); - rEd.SetText( aBuf.makeStringAndClear(), aSelection); - } + rEd.replace_selection(aBuf.makeStringAndClear()); replacing the workaround needed for the old toolkit with something similar from the new toolkit but behaving differently.. Change-Id: I9ff325eecd747bbecb36eb2a1150ae4472e475e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122000 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit db90a6cedbc261ad711ff13c4f69db65946486da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121979 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-08-18Resolves: tdf#143785 save/restore SdrModel::IsChangedCaolán McNamara
Change-Id: I253915c359cf72f80b21e21ff34e0ee406e5b3a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120550 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 6dc23567639bebf18ceb8d9a3721228bffe14202) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120578 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-31tdf#136292: Fix crash on invalid JSON from the extensions APIMuhammet Kara
Change-Id: I91ed555f93173dee10e87025b231560693be50b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116390 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> (cherry picked from commit e98b0891d6e0f1d6be4e4a4761bd1ab16bfab85c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116168 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-29tdf#135997: make sure that the two lists are same lengthMike Kaganski
This fixes the strange assumption that when searching the two lists (character names and font names) independently, the two found positions will necessarily correspond to each other. Instead, the positions of the match must be the same, which is implemented now. Also the input from configuration is sanitized. Change-Id: I920de7414387e181e11183b8a22776a72b6be419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114722 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit b6ab5914d8b2fc7041430796890f086f8e3e6369) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114852 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-28tdf#137470 use a more proper URL for the extensionsChristian Lohmaier
also hide the download-count, since those numbers are completely made up by the script Change-Id: I15b53a8a023c34ecc6a544b88ad35800891e4327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114740 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 452fcbe0792aa10042bb8cd2cfd6cd29ca754be5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114774 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-01-19tdf#139332 reduce height of expert config dialogCaolán McNamara
to about the height of help, options Change-Id: Icf2bebb2f2cc5aabea3e1f702d7095de8c31d726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109527 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-14Resolves tdf#139343 and tdf#139335 - Community/Enterprise flavorHeiko Tietze
* Switch CE/EE per --disable-community-flavor internally use HAVE_FEATURE_COMMUNITY_FLAVOR * Version info in about dialog shows text depending on this flavor * Start center also shows the brand image now * TDF builds use a brand image with TDF tagline in the about dialog * Brand images with just "Community" (no Edition) Change-Id: I363dd2b39df9aad951c9d79addf9bdedfc4a3495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108980 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 2d69acfde50cb0e06a9a057939078fd102d371a3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109274 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-01-14tdf#83618 Make line spacing values agree crash fixJim Raykowski
The intent of this patch is to fix the crash reported at https:// bugzilla.redhat.com/show_bug.cgi?id=1913828 by reverting changes made to cui/source/tabpages/paragraph.cxx in commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1 and changing the change made to svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx to use the already available pointer to the current SfxViewFrame instead of calling the SfxViewFrame::Current function again. Change-Id: I0c440c576c2afe4fb98ed54d51d91ea16a7f902a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-04tdf#138654 Number format preview uses dark background and fontprincesinghtomar
Change-Id: I5f2ad87f017159191e39a4a1ce665c01d3223e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108400 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit 2aff7b2622b3fcc3115037d48e033fe1b7ab627a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108588 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-27tdf#127401 Fix release notes URL for simplified Chinese (zh-CN) UIMing Hua
Use getBcp47() instead of getLanguage() to construct release notes URL for About dialog, just like what commit 787647b488d02be2acbbad4fa7873508dcb926c2 did for WhatsNew infobar. Should also affect other locales using ll-CC style wiki notation with both language and country codes, like pt-BR. Change-Id: Ic4698946f500b5901eb0c519f1fd4e3a4b8456cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108147 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit ce614dcc6d099ce14acae22b48dacf299ef470fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108179 Reviewed-by: Ming Hua <plateauwolf@qq.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-18tdf#138865 don't set ColumnToggleType::CheckJan-Marek Glogowski
We don't want any hidden, magic checkbox for this table, as the user explicitly has to toggle the desired replacement modes, which isn't in any way related to a row selection. Change-Id: I3f9a73d41cc8727aa6380172221ea07068ef74c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107920 Reviewed-by: Attila Szűcs <szucs.attila3@nisz.hu> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 4cabfc30bf2db873930cef4f7f1b0243ae2fde28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107908 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-17tdf#129961 cui: start UI for table shadow as direct formatMiklos Vajna
It reads from the doc model and shows it, but doesn't write it back yet. (cherry picked from commit 74ba28fe238b7f15d1fb7d119e4cef3a7b544e0b) Change-Id: I6611229e71d0a49f09576ca452b901958c33db58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107863 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-14tdf#138874 restore sort on first column of paths treeviewCaolán McNamara
Change-Id: I7cd831de30523a61631be5cc2f1f3b8a001d9e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-13tdf#138857 fix font replacement table GUIJan-Marek Glogowski
- fix the get_text calls missed in tdf#136534, so combo box entry and table selection are synced again - unselect the table row, if the combo box entry doesn't match anymore the selected table row. - empty the combo box entries on multiple selection (allowd for mass delete only) - move the "apply replacement table" checkbox before the table - also change the comboboxes's sensitivity when toggling the "apply replacement table" checkbox. Change-Id: Ib509e46e3a468ece6ab20e6be41c04caec3265ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107642 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 579cf9548615e8535a0569a8eb4cdf325fbbbac7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107621 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-02tdf#138596 don't destroy SfxItemSet that are still in useCaolán McNamara
update the existing ones instead Change-Id: I67fd6c4ecb5d4294efae0262d558281e6840b5dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107031 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-01drop the needless and broken SkiaConfig abstraction (tdf#137935)Luboš Luňák
I originally copy&pasted this from the OpenGL setting, but this appears to be just an unnecessary complication. Both the option and writing is in fact simple, and trying to make it abstract and complicated doesn't provide much, and it causes the options not saved if only 'Apply' is used in the config dialog. Change-Id: Ibd55052467988b54429358567d70cbfbb0a34653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106900 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 414930465e86e898a2493f61e4832f9a841ebe00) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106940
2020-11-25clean up enabling/disabling GUI options related to SkiaLuboš Luňák
This should properly enable/disable 'force Skia software rendering' and 'use hardware acceleration' checkboxes when Skia is enabled or disabled. Technically the two options are duplicates, since 'use hardware acceleration' is the exact opposite of 'force Skia software rendering'. But the implementation of the hw accel option is so tied to the implementation of the canvas module that it's simpler to ignore it for Skia. Change-Id: Ia7c54140aec72d6ef75b7ba53ce83037311f0caf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106491 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit feafba7cc94247f45a82ee4f82f1b0a5f2f61656) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106525
2020-11-24tdf#138430 scrolled windows need to have auto scrolling disabledCaolán McNamara
Change-Id: I8a622f00238d3d20d21d2439d6fc4fb13358f0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-24tdf#138430 toolbar bullet dropdown should have a scrolledwindowCaolán McNamara
as should the matching dialog pages Change-Id: Ib327d3c02d1bc5ae11a6a76d52c9e17803f05534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106435 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-19SvxNumberFormatTabPage::nInitFormat should presumably be sal_uInt32Stephan Bergmann
all the entities it interacts with (SfxUInt32Item::GetValue, SvxNumberFormatShell::Create, nCurKey) consistently use sal_uInt32 Change-Id: I1d929342819eddc615d18145a5815a13f326a648 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106174 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17tdf#137930 Apply button changes values to previous onesCaolán McNamara
Change-Id: I374b4f448715db9563f6073c433b82caf3482874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-16tdf#138049 different parents for restart dialog depending on ok vs applyCaolán McNamara
and in ok case hide the to-be-dismissed dialog before putting up the next dialog Change-Id: Ie9c0dfc1a7c10f8fd1d7a70749e07db123de2bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105951 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-16tdf#137403 ignore GetCurCommand if its emptyCaolán McNamara
Change-Id: I63cc33c33d36d53d882aae72b8f480ea9842e1b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-16remove unused param in SvxHpLinkDlgNoel
ever since commit d32b3a714fe55892bdead03502c5a9b0e77fa61d Author: Mathias Bauer <mba@openoffice.org> Date: Sat Oct 31 00:36:06 2009 +0100 #i106421#: move svx/source/cui to cui Change-Id: I1c331cda3f756cc87344eac6c56cfaa8466286ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105914 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16replace std::max(std::min()) with std::clampNoel
Change-Id: I890d19f5e2177294dc1175c90c98b964347f9e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13tdf#123936 Formatting files in module cui with clang-formatPhilipp Hofer
Change-Id: I473e2950bb9bd53043feeae31a27ae0c2fc7801d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105659 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-13tdf#138156 diagonal borders always set even if in don't care modeCaolán McNamara
Change-Id: If55ac230c2f591e79a6c90df07870233a46eca5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-13Make Split Table Cell dialog asyncSzymon Kłos
Change-Id: I4efbb24f721aa50cc4dbbe78ae1e7e6087f8c876 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103670 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105594 Tested-by: Jenkins
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12Revert "remove Fraction::operator tools::Long()"Noel Grandin
This reverts commit 48b667a7e7d25f835f95df89162a7849d6972531. Reason for revert: some discussion required Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12remove Fraction::operator tools::Long()Noel
which was added in commit 331e2e5ed3bf4e0b2c1fab3b7bca836170317827 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Sep 14 08:49:52 2017 +0200 long->sal_Int32 in Fraction presumably to make the change impact less code. Instead, update the call sites to reflect the actual bitwidth of the data we will be receiving. Change-Id: If2a678b1cf534f39cb8cb249757462be53658309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11convert more long -> tools::LongNoel
found by grepping and changed by hand. Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-070xffffffff is COL_TRANSPARENT/COL_AUTOCaolán McNamara
Change-Id: I17d4a3d3a05913f4f0fc11508f2196b30661b88a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06Related: tdf#138030 make 'except' page act like 'replace'Caolán McNamara
wrt pressing return to activate the entries Change-Id: If691caef70fb12f96e24441929ab325780304962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06Related: tdf#138030 'activate' shouldn't add to the list...Caolán McNamara
if the matching button is disabled Change-Id: Ia6e66c1f3e2e08086ae7ce968d61cb230becc639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105418 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06loplugin:unusedmethodsNoel
Change-Id: Ia6c0361cd793bb62905b0690f7e2ca554019e935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-04negative returnsCaolán McNamara
Change-Id: I6f710f1aecc2e242b6006a3360e31bf2a9438fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105286 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03Resolves tdf#137059 - Use application colors for font previewHeiko Tietze
Background is set to document's application color now (options > application colors > document) to provide a true WYSIWYG experience (except for modifications to the page background color). Change-Id: Ifd78e667f3eeff3573ff09bcb4d2a9634dd49c99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105011 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03ucbGet needs a non-null interaction handler after allStephan Bergmann
In db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to download https files", I had not further investigated why using the (GUI) interaction handler within utl::UcbStreamHelper::CreateStream would lead to deadlock during UITest_sw_options (UITEST_TEST_NAME=optionsDialog.optionsDialog.test_moreIconsDialog). Instead, I had passed a null XInteractionHandler into utl::UcbStreamHelper::CreateStream, assuming that would solve whatever the issue was (and it did make the UITest pass). However, that caused the AdditionsDialog to not be populated at all, with > warn:cui.dialogs:26878:26950:cui/source/dialogs/AdditionsDialog.cxx:95: Reading <https://yusufketen.com/api/Templates.json> failed with 0x20d(Error Area:Io Class:General Code:13) (see comment at <https://bugs.documentfoundation.org/show_bug.cgi?id=137922#c1> "Extensions button in Template choose does not show anything"), because interaction requests like com.sun.star.ucb.CertificateValidationRequest were not handled properly. As it turns out, the real reason for the deadlock was that the UITest quickly closes the dialog, causing the main thread to block at m_pSearchThread->join(); in ~AdditionsDialog waiting for the SearchAndParseThread to finish, while SearchAndParseThread::execute encountered a CertificateValidationRequest that needs to be handled and thus blocks in UUIInteractionHelper::handleRequest (uui/source/iahndl.cxx) waiting for the main thread to process the PostUserEvent. In an ideal world, the UCB would allow to cancel the download request issued from ucbGet while that download is waiting for the CertificateValidationRequest to be handled, and the AdditionsDialog CloseButtonHdl would initiate such cancellation. Lacking that, just keep the Close button disabled until the SearchAndParseThread has finished downloading. (Pressing the Close button earlier, ~AdditionsDialog would have blocked the main thread anyway until SearchAndParseThread had finished downloading, so this should not actually worsen the user experience. And the UITest now blocks waiting for the Close button to become enabled before pressing it; there would already be UITest.wait_until_property_is_updated available, but it has a hard-coded timeout which might or might not be relevant in existing uses of that function, so leave it alone and repeat the relevant code without an unhelpful timeout here.) This means that the additional utl::UcbStreamHelper::CreateStream overload introduced in db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to download https files" is not necessary after all, so remove it again. Two further items that should be looked into: * Should ucbGet pass the AdditionsDialog into utl::UcbStreamHelper::CreateStream as css::uno::Reference<css::awt::XWindow> xParentWin argument (which defaults to null)? * There might be similar deadlock issues involving ucbDownload, which can also be called (indirectly) from SearchAndParseThread::execute. Change-Id: I8d549066940fa4f259a814a31ec7c62960e0db8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105169 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-03Drop the #undef ABSOLUTE FIXMEStephan Bergmann
c4bee547b02fbe3d07b1e9ee203c73e48f86e6bf "tdf#133026: Additions: Better Search Function" does not tell which #include had brought in the macro definition. It might have been the #include <curl/curl.h> that has meanwhile been dropped with db6c7a486395304f38e9ea52951f576f34749cbc "Use UCB instead of cURL to download https files". Change-Id: Ib9cf761ca11e5cb7496b21dc04faee3491ef9dcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105073 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-02use officecfg or MacroRecorderModeNoel Grandin
Change-Id: I2a8d4f401ddfd4368a7b50b4c3c8a72724f9afa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for UseSystemFileDialogNoel Grandin
Change-Id: I1419af229a67d6ebb1cf2c63757656beb3f512db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105142 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for UseSystemPrintDialogNoel Grandin
Change-Id: I0e0bdc925f106884cbcede6405cc6ef7152ad405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01use officecfg for Experimental flagNoel Grandin
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>