summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
AgeCommit message (Collapse)Author
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-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>
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-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-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-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-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-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-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-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>
2020-10-28Use UCB instead of cURL to download https filesStephan Bergmann
Since 7dc6fc32eb618da6defb8a9f330978fa019677b8 "uitest: Check the more icons dialog opens" started to test the AdditionsDialog code, some ASan builds started to report use-after-poison from within SearchAndParseThread::execute -> curlGet -> curl_easy_perform -> ... -> https_connecting -> ... -> secmod_ModuleInit -> pemC_Initialize -> ..., see the comments starting at <https://gerrit.libreoffice.org/c/core/+/98226/ 10#message-2a55980ab2477e41dc7515e4aeabc7234afc2053> "tdf#133026: Tight integration of extensions - Adding thread structure". The exact cause for that ASan use-after-poison is not quite clear to me. First, I thought it was due to liberal use of curl_easy_init (without a central curl_global_init) in a multi-threaded process; see <https://curl.haxx.se/libcurl/c/curl_easy_init.html> for this being considered "lethal". But then, another issue could be that most of the nss libraries like instdir/program/libnss3.so (implementing the "... -> secmod_ModuleInit" part) come from LO's bundled --without-system-nss while /lib64/libnsspem.so (implementing the "pemC_Initialize -> ..." part) comes from the system, and there could be some mismatch when mixing these (esp. if the former are built with ASan). So whatever the actual cause, the right fix should be to use LO's UCB instead of directly calling into cURL anyway. That required a version of utl::UcbStreamHelper::CreateStream that uses a given XInteractionHandler (which may be null to indicate no interaction handling, instead reporting all interaction requests as exceptions) instead of internally creating an XInteractionHandler using the GUI, and which would cause deadlock in 7dc6fc32eb618da6defb8a9f330978fa019677b8's UITest_sw_options. (And introducing that additional utl::UcbStreamHelper::CreateStream overload required css::awt::XWindow to be a complete type now in vcl/source/graphic/GraphicLoader.cxx, for > include/com/sun/star/uno/Reference.h:277:18: note: in instantiation of variable template specialization 'std::is_base_of_v<com::sun::star::task::XInteractionHandler, com::sun::star::awt::XWindow>' requested here > std::is_base_of_v<interface_type, derived_type> > ^ ) (The removed code in cui/source/dialogs/AdditionsDialog.cxx should have been the last remaining use of curl in Library_cui. Apparently, e1e9e2aa16f08a8fd9e38db706d63e8eceeda8d1 "Kill Mozilla personas" had forgotten to remove it from cui/Library_cui.mk the last time Library_cui had become curl-free, before the introduction of the AdditionsDialog code.) (I did not remove the #undef ABSOLUTE FIXME from cui/source/dialogs/AdditionsDialog.cxx. c4bee547b02fbe3d07b1e9ee203c73e48f86e6bf "tdf#133026: Additions: Better Search Function" does not tell whether it had been added to mitigate a macro definition from the (now removed) #include <curl/curl.h>.) Change-Id: I1fec7488d36df81c3543d12d97da1291f77712fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28Extend loplugin:elidestringvar to OStringStephan Bergmann
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar] > aXmlWriter.content(sPdfConformance); > ^~~~~~~~~~~~~~~ > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar] > OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B"; > ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-27Teach loplugin:toolslong about curl_easy_getinfoStephan Bergmann
...see a9266c39cc71c6f23bfcad4ff6d33ccac53b5e52 "loplugin:toolslong (--enable-online-update)" arguing that "the third argument to curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...) must be a pointer to long". Change-Id: I7c542595219d2387cf869953fe40faef2b41b44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104857 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-26Fixes to TipOfTheDayHeiko Tietze
Callback removed Change-Id: I09eb95004151cf2ca068a0c23c02267d89b0ba20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104800 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-24Show animated GIFs in TotDHeiko Tietze
marchingants.gif added as an example Change-Id: I555aebc4a4e191b8afb4be06dfc1e5f3e6d1a911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104718 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-22Resolves tdf#137607 and tdf#137500 - Improvements to TotDHeiko Tietze
Shows tooltip for UNO commands Check if the UNO command is available in the current module Don't show the menu entry on the start center Change-Id: I5c67ec3f8543b5442a6e2c2a478bfeb4ec0e1f3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104558 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-21Fix typosAndrea Gelmini
Change-Id: Ia66e31a0ad71dde1a6c1caa911d6083e1fb9eb61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104538 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-10-21use tools::Long in comphelper..cuiNoel
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20Beautification of code and fix for on-/offline helpHeiko Tietze
Change-Id: I0c731f2c472ceb435f529956011a7fd5a00a27ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104358 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-18tdf#137460: Additions: Fix crash on error 404Muhammet Kara
Change-Id: Id1eb6d43add5d5d9c9f6c09a1e5a4137462f596e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104473 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-10-15This field only holds a compile-time constantMike Kaganski
Change-Id: I9796f97af5d45211b67070fc020547e2b63ef411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104348 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-14tdf#137294 don't change subset sensitivity after setting search modeCaolán McNamara
Change-Id: Iaa76e2bc8029ac8f8a52b0c45f74b57395090088 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104312 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-14Fixes to TipOfTheDay dialogHeiko Tietze
* Reverts 231a4e024b85aa0ad06a5632d3f514152babea30 and sets initial value to -1 to start from zero * Improves translatability of string Change-Id: Ib541a72fa3f6eecdf5bbdf17ce2a4e56ff90c397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104276 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-10-14Resolves tdf#137429 - Ensure first tip is shown firstHeiko Tietze
Starting in safe mode (or the first time) shows now array[0] instead of [1] Change-Id: I50643c4443705a5137080c6dbdb1ad329151b308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104230 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-13Resolves tdf#137424 - UI Picker missing 'Contextual single'Heiko Tietze
Exclusion by experimental on/off updated Change-Id: I714b8ffc5a148d09607ab20763b6d35de2a9e2be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104231 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-13static_cast after dynamic_castNoel
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-12Resolves tdf#135270 - Make the tight extensions dialog shinyHeiko Tietze
Information rearranged, empty icons instead of hidden, background and scaling of thumbnail Change-Id: Iae095134a717cb50670bf5d1786774c6424d283e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104079 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-12Resolves tdf#137408 - Bad positioning of first items in extension dialogHeiko Tietze
Change-Id: Ic54ac8377bbfbd2c5b5b995ef8615bf0961bd100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104051 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-12Resolves tdf#137189 - Fixes crash at CheckInstalledExtensions()Heiko Tietze
SolarMutex added Change-Id: I18c6683e7a26892ce7f1d019cb1ee59ce03981ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104198 Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Jenkins
2020-10-07Resolves tdf#117463 - Dialog to show UI optionsHeiko Tietze
* New dialog to pick and apply one of the UI variants * Tip-of-the-Day enhanced to execute UNO commands in order to advertise the UI chooser on first start Change-Id: I5e5c4a8e0fb11d11bafc99cc37b7ec244a993781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99957 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06move set_user_managed_scrolling to an initial weld argumentCaolán McNamara
gtk is creating a11y objects on widgets changing parents so manage when that can happen to avoid premature creation of custom widget a11y objects Change-Id: I4879a93a897b2e4084cf6af0c9c0b0f0c1062254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104025 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-03use more TOOLS_WARN_EXCEPTIONNoel
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02loplugin:reducevarscope in cuiNoel
Change-Id: Iedfda307d149fe2a5a196c83d3ea02b618e7dd23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-28rename for disentangling AA and B2D use in VCL drawingLuboš Luňák
This renames AntialiasingFlags::EnableB2dDraw to just Enable, and the AntiAliasB2DDraw names to just AntiAlias. This is in preparation for a second commit that will actually separate the AA and B2D functionality of these flags. Change-Id: I9cc215c5752dfabce41e00e19d9074fc8dc3d4de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103416 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28adressbook->addressbookCaolán McNamara
Change-Id: Ic72f00a704b7cbb5d1f5639c1cf726cf4693b470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103536 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-23fix disable qrcodegen optionCaolán McNamara
Change-Id: Ic554f01125653022987c70d03c8c9d86fe3f547a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103271 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22tdf#132970 SMP bullets mangledCaolán McNamara
working: a) bullet preview b) writer rendering c) save to odt a) load from odt Change-Id: I2f85576389fe4f0437f81799c14dfd98c8c40b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103129 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-21add an explicit --disable-qrcodegen configure optionCaolán McNamara
Change-Id: If8e965fa955aecdb9e7011bdddc690de9cad0c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>