summaryrefslogtreecommitdiff
path: root/svx/source/form
AgeCommit message (Collapse)Author
2020-10-28std::set->o3tl::sorted_vector in InterfaceBagNoel Grandin
Change-Id: I28ecffdcf6c97f9153e62974bf76b972452747eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104901 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-10-13static_cast after dynamic_castNoel
Change-Id: If93fa126f10393a250cc1ad64bee28e84c42a6b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-05use more TOOLS_WARN_EXCEPTIONMike Kaganski
Change-Id: I3e8bfdf717dd8896ab16e396f671651ca4f7f01c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103932 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-30loplugin:reducevarscope in svxNoel
Change-Id: I88fdaa74c4944f9ffc81db6df08a29283362375a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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>
2020-09-02Fix of an idAndrea Gelmini
Sorry, made a mistake here: https://gerrit.libreoffice.org/c/core/+/101801 Change-Id: I8000041891119b81c16ec38c5be243842c2ac37b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101885 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I8336c2a639a1d45c8370fd13204896f3f1494b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101801 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-31Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Iecaab4ab9f7d8e05930685aaf5a2eb2770abbd1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101601 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-31Fix typos in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I9ba795bf188a9fe11d83516d6895888f880747c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101706 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-20loplugin:constantparamNoel Grandin
Change-Id: I59a37e1d37fa749cba5159daa23fe663bcc55435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-08loplugin:unusedmethodsNoel Grandin
Change-Id: I58819edd0965ff52c3fc6c20d84bc5951a79bbe2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100381 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-06loplugin:flatten in svxNoel Grandin
Change-Id: I31f33a5f693d5fdb8282181c5bd7f31971efe784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-04loplugin:unusedmethodsNoel Grandin
Change-Id: I5fa2bbeff17a9933ff55afb0c3544d025d096a63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-31weld FilterNavigatorCaolán McNamara
Change-Id: Ic75f3cf3e7e1f3ec3964256642c1359a99f5cc77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99753 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-29update DbFilterField to use the new replacement controlsCaolán McNamara
Change-Id: I5b138a776ebbad9e5f7a50f3f44ab56fa283cba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99719 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-25move getUIRootDir to AllSettingsCaolán McNamara
Change-Id: I3b7774a043a2c99531e1c76b531df4358699bba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-24tdf#135093: fix wording error dialog on Add Submissions dialog by blank inputJulien Nabet
Don't replace the right string by application name It seems to come from: commit b5483af985ed8c49b0bb9ebcd096cc9530e35a38 Author: Thomas Arnhold <thomas@arnhold.org> Date: Fri Aug 15 21:28:56 2014 +0200 ErrorBoxes from datanavi to String Change-Id: Ifd5a49537d0574bc2fb6530e70d19c31a35da914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99371 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-23weld AbsolutePosCaolán McNamara
Change-Id: I273d01bb5d8bf1a1d2dc9066b0c9f099bf115e32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99311 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-23let record field shrink in widthCaolán McNamara
and expand to fill available space Change-Id: Idc12efb37ce1b3a6a51bb3469e2d886a52cc5047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99310 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22split SvxFmAbsRecWin up to make a reusable pieceCaolán McNamara
Change-Id: I3c9992d39f7dd45ac354b8e4087bacfd9715b234 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99246 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22let up/down increase/decrease record numberCaolán McNamara
Change-Id: I4d77cf71640922db5865586a0d053a46834f4b0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22weld form navigator label item windowsCaolán McNamara
Change-Id: I2e49ffda6dc29746819a61db2848b6bcfe5f4a23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94650 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22merge duplicate GetFocus implementationsCaolán McNamara
Change-Id: Ifc2e3fab6dacb3b0bca74c0584c16170b8b97de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99234 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-09cid#1465229 Unchecked return valueCaolán McNamara
Change-Id: I7e12612f1aa2570df8f5b0347f19dcb96532aa26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-09cid#1465234 Unchecked return valueCaolán McNamara
Change-Id: I56d59de5c65144283595b044142ff3f8988a02a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98409 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-09cid#1465233 Unchecked return valueCaolán McNamara
Change-Id: I078f20bd607110cd526ce40a6391affd238a14d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98410 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-06move headers inside modulesNoel Grandin
Change-Id: I002f42d83820c86737ddceab805aa53ccb388e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-06don't deactivate if focus hasn't moved to another windowCaolán McNamara
Change-Id: Ie019b8a0757578dec30c4834d095e75cd48ae957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: svxStephan Bergmann
Change-Id: I6f4b927f9c869925825cc83cc36f0494d06c8faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-25weld NavigatorTreeCaolán McNamara
Change-Id: I019021fa5a522b1238d74702c9222afdfd7540c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96961 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-25nActiveTerm is -1 in an empty filter navigatorCaolán McNamara
Change-Id: Ia6eed6291375f136abbe8e50abae51e6f796911f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-23weld DataNavigatorCaolán McNamara
Change-Id: I78241701de0756f5fe9bc9b793dadccd4ae119d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96750 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-05Upcoming loplugin:elidestringvar: svxStephan Bergmann
Change-Id: Ia7b4f69361b6cc29f6e5c0093b13cf0b48e25ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-04loplugin:simplifypointertobool improve (2)Noel Grandin
to look for the x.get() == null pattern, which can be simplified to !x Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-31Revert "tdf#88985 block app from exiting during macro execution"Jan-Marek Glogowski
This isn't needed anymore with the fixes for tdf#127205. Reverts commit 68cf256f506d4601a2d2cf3ec2d56713afd491e6. Change-Id: I1a7944632af8330f68d451d2c293143233039b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88837 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-05-21split out labelitemwindowCaolán McNamara
Change-Id: If5121b58538708a47783aee099bc426408989cbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94636 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-01improve loplugin:makesharedNoel Grandin
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-26all ItemWindows are now weldedCaolán McNamara
where native widgetery is hostable in a vcl toolbar or a native one Change-Id: I942ada335bb4bd6ced0f3352f632e25787f68597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-16loplugin:buriedassign in svtools..svxNoel Grandin
Change-Id: I04bc97effddb213e9c1ac613b61d3a0bc38522ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-07new loplugin:unusedvariableplusNoel Grandin
a particularly aggressive checker, which is why it is off by default Change-Id: Id5a0faa50b3ecc75e01f4aedc6579c5209e585da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>