summaryrefslogtreecommitdiff
path: root/uui/source
AgeCommit message (Collapse)Author
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-05lok: add global notifier to the "Macro Security Warning"Henry Castro
dialog. This message dialog is especial, because it is shown before loading the document so no way to get access to view shell notifier when the model/view/controller were not created. Change-Id: I5da3ca9d1009f174f2d96c1302770f4509a807cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108291 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-01-04lok: fix the "disable button" of the "Macro Security Warning"...Henry Castro
Dialog. The client side cannot disable macros and close the message dialog Change-Id: Id78060d3c2b3c9c8ac010d8b951e7640b02ca715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108489 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16tdf#123936 Formatting files in module uui with clang-formatPhilipp Hofer
Change-Id: I0de0afa5dca5e5193d25927e76e42cbf29682d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105726 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-03Make ImpSvNumberformatScan::GetColor constMike Kaganski
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-08-11loplugin:flattenNoel Grandin
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-20compact namespace declNoel Grandin
used git grep -lw namespace | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;' to do the initial replace, then compiled and fixed. Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-08uui: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: I8b7eec5e2cbe61a8dc3bb65f391245c1825fedc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98235 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-05Upcoming loplugin:elidestringvar: uuiStephan Bergmann
Change-Id: I68858a9f972dbe35a75e5862db040f186ba56146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95596 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-18officecfg,unotools,cui: add ODF 1.2 Extended / ODF 1.3 versionsMichael Stahl
... to configuration and UI. The new default is ODF 1.3 Extended, which is now ODFVER_LATEST and stored as value "3" in configuration. Adapt a few places related to DocumentDigitalSignatures etc. to new default. Change-Id: I420da4f7787cc864c6bd88470d61b146b9399aa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93177 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-10compact namespace in ucb..uuiNoel Grandin
Change-Id: I644d5e418028b4b4e66cf67b20a1155a689acab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-10Revert "use SolarMutexReleaser in UUIInteractionHelper"Noel Grandin
This reverts commit 3705a2904d50210e3515723ad24bbbb6a72eb37f. which breaks update of extensions. SolarMutexReleaser requires that we already hold the mutex which is not always true at this spot. Thanks to Julien Nabert for debugging this. Change-Id: I6d54d4db63e8694f3dfb9d15d84f47101ded1edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92007 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-19use SolarMutexReleaser in UUIInteractionHelperNoel Grandin
instead of hand-coding it Change-Id: I16cc72854a0d02422eaacf5794b97cfcd7689d83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16Some more places to check for AllowOverrideLocking optionSamuel Mehrbrodt
Change-Id: Id09f691ef7e3fbae03771a43af1c7b1d940365bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90554 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-03-16Add option to disallow opening files locked by other usersSamuel Mehrbrodt
Change-Id: I316b80a56b0d6dcb257fbc805fbac3afc93472ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90425 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-03-16Revert "loplugin:constfields in unotools..uui"Noel Grandin
This reverts commit d8ac55e3e53564aca4b0bade5a5b5cb01b4519b1. Change-Id: Ib7cf67d5d0b7780dfde9453cdddb8f11ca5d3a6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90542 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-09improve loplugin:unusedfieldsNoel Grandin
noticed something that wasn't being picked up, wrote some tests, and found an unhandled case in Plugin::getParentFunctionDecl Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-07clang-format toolkit, tools, uui with under 5-percent lines of changeMuhammet Kara
Files which could become clang-format conformant with under 5-percent lines of change relative to the total count of lines in the file are found by using bin/find-clang-format.py, and fixed with /opt/lo/bin/clang-format -i <path-of-the-file> There will be follow-up patches to fix all 'under-5-percent' files. Change-Id: I4952f350f4d22913ea94689b902ffa26c223ff96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90152 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-04tdf#42949 Fix IWYU warnings in uui/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic48d61a5f5d24742682b4d39096e468f224639df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87783 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-24sal_Char->char in vclNoel Grandin
Change-Id: I4359b7042f98586e2c9f5529d83d769cdf3d033c Reviewed-on: https://gerrit.libreoffice.org/85775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-17tdf#129311 don't allow temporary trusted certsJan-Marek Glogowski
This simply skips the DocumentMacroConfirmationRequest, if the macro security level (MSL) is *High* and the list of trusted authors is read-only. For the MSL *Medium*, the check box of the dialog is hidden with read-only trusted authors. Change-Id: If6c08e4fdbf200e778d181370cc73fd947cecff5 Reviewed-on: https://gerrit.libreoffice.org/84887 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-12-17Fix macro security UI usability problemsJan-Marek Glogowski
* Don't hide the option dialogs "Macro security" push button. I don't see any reason, why these settings should be hidden, if macros are disabled or settings locked. At least a user can now check, what is going on (still nothing shows disabled macros for a document in the UI AFAIK). * Don't scale the lock icons of the trusted list boxes. This just uses the same alignments, which the macro security level lock image uses, otherwise the image is scaled to fit the whole space of its layout cell. * Don't disable the trusted list boxes. If the setting is locked, it's sufficient to disable all the buttons, which allow modification (so View can stay enabled). This way you can still scroll the list. Correct button handling is already implemented and works for me. * Catch exceptions of broken certificate data. If your config contains certificates, which can't be correctly decoded, the NSS backend will throw an exception, which kills the dialog, but not the nested loop, resulting in a locked LO. Also show an error dialog with the broken base64-encoded data. Change-Id: I79002e0ce85cf9a9017caf858407f2f635a3a074 Reviewed-on: https://gerrit.libreoffice.org/85056 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-11-30Remove nonsense checkEike Rathke
bIsPasswordToModify was never modified there, so a check is moot. Change-Id: I96b4212452bf1ad4689c0d17d1ab41fecd8b447a Reviewed-on: https://gerrit.libreoffice.org/84098 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-11-30Resolves: tdf#97086 Allow "unlimited" password length for OOXML encryptionEike Rathke
Change-Id: I51175424e19ad02b81120c3fdea22732cd481a8d Reviewed-on: https://gerrit.libreoffice.org/84097 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-12Better throw RuntimeException than assert hereStephan Bergmann
(in case this functionality is ever discovered and called by external code) Change-Id: If127460f58e1d074a32f231385e2c54303e4f98c Reviewed-on: https://gerrit.libreoffice.org/82508 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-12getPropertySetInfo is allowed to return nullCaolán McNamara
so the original state, without the assert, would be ok css.beans.XPropertySet::getPropertySetInfo is documented as "@returns NULL if the implementation cannot or will not provide information about the properties" Change-Id: Ia0230add8f6c1b22a639cd71ca3cc310e0f1d126 Reviewed-on: https://gerrit.libreoffice.org/82499 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-11return an empty PropertySetInfo instead of assertCaolán McNamara
e.g. seen with APSO extension Change-Id: Ia2eb636a7d27ca87062e7962eded06756ff4e333 Reviewed-on: https://gerrit.libreoffice.org/82457 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-06loplugin:unusedvariablecheck tweak to find more stuffNoel Grandin
but leave the tweak commented out, since it generates false positives Change-Id: Iaf3f92414d2618f8780561f98765e33e282afe0c Reviewed-on: https://gerrit.libreoffice.org/82121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-28loplugin:constmethod in ucb..uuiNoel Grandin
Change-Id: I53db381de8e063b6a3aa07051351e655c6f040fa Reviewed-on: https://gerrit.libreoffice.org/79782 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26add property name when throwing css::uno::UnknownPropertyExceptionNoel Grandin
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-17move GetStandardText to stdtext.hxxCaolán McNamara
Change-Id: Iaf9b5107cf88390f62d5ca94bf985c77bcb8b7ad Reviewed-on: https://gerrit.libreoffice.org/79048 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-09enable route to get ParentWindow from an existing UUIInteractionHelperCaolán McNamara
Change-Id: I550f99fa4a5db41cdad0b4d60ca02866835d7ae2
2019-08-18tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in uui, xmlhelp Change-Id: I588ed4154e6b21e178f2466c58abc08562eddf80 Reviewed-on: https://gerrit.libreoffice.org/77663 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-15loplugin:sequenceloop in unoxml..vclNoel Grandin
Change-Id: Ic3c48ec4d86252b62d3dd25bbc198f7d7fb75e90 Reviewed-on: https://gerrit.libreoffice.org/77533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-09Fix typosAndrea Gelmini
Change-Id: Ie63c7b2d8bf9579b7b41d7bae515818c8d5706dc Reviewed-on: https://gerrit.libreoffice.org/77217 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): uuiStephan Bergmann
Change-Id: I847a44085d50a431d8b40ccd1cacbb1cfa712e68 Reviewed-on: https://gerrit.libreoffice.org/76629 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-21loplugin:referencecasting in unotools..uuiNoel Grandin
Change-Id: Ia2c991591e65deb00710ab7a5b73bc42ae6b1b46 Reviewed-on: https://gerrit.libreoffice.org/76031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25Simplify Sequence iterations in uuiArkadiy Illarionov
Use range-based loops or replace with STL functions Change-Id: I36ca6016d23360d121935d9f25e8cc8d2dad08c3 Reviewed-on: https://gerrit.libreoffice.org/74625 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-06-24tdf#39593 Replace copy-pasted functions with templateArkadiy Illarionov
Change-Id: Idcb6c3e13713a9c7cc545d1e287481fe6ccadba8 Reviewed-on: https://gerrit.libreoffice.org/74595 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-05-10an is used before a vowel soundCaolán McNamara
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-07tdf#125079 turn off GTK_WIN_POS_CENTER_ON_PARENT after a whileCaolán McNamara
Change-Id: Ib268a6b32257aee812e5bae27a6db94431d2abbb Reviewed-on: https://gerrit.libreoffice.org/71739 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>