summaryrefslogtreecommitdiff
path: root/forms
AgeCommit message (Collapse)AuthorFilesLines
2018-02-16Revert "loplugin:changetoolsgen in filter..framework" and reapply pluginNoel Grandin2-7/+7
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit bf8a6cacd06d7c1961b5db8cc79ee4bbdb342e43. Change-Id: I4b5a9bf0c38ee1b57af91e6b7f184f1e8807f6f7 Reviewed-on: https://gerrit.libreoffice.org/49843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14loplugin:changetoolsgen in filter..frameworkNoel Grandin2-9/+9
Change-Id: I622da8a0c096c74efd97326451c4576b230f0483 Reviewed-on: https://gerrit.libreoffice.org/49701 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-07use scanline when reading pixel dataNoel Grandin1-6/+12
extracts code from the innermost part of fairly hot loops And add a GetIndexFromData method to make the call sites a little easier to read. Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107 Reviewed-on: https://gerrit.libreoffice.org/49337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-06clean up some include guard terminatorsNoel Grandin2-6/+2
found with git grep -n -A10 '#endif // INCLUDED' | grep -v endif | grep -v vim | grep -v -- '--' Change-Id: I7ae67cd7c1313e76f059fb8e6afb723caca8a6d7 Reviewed-on: https://gerrit.libreoffice.org/49244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01Typo: invlidateParameters->invalidateParameters (forms)Julien Nabet2-6/+6
Change-Id: Ia25e5e9968038849d539f9bc112a4a56e6190277 Reviewed-on: https://gerrit.libreoffice.org/49088 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-27Modernize a bit formsJulien Nabet7-125/+80
by using for-range loops + use returned iterator by erase call Change-Id: Ia41c9fae190dbad6a25b62a9b15ad51e89dd2906 Reviewed-on: https://gerrit.libreoffice.org/48759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-26tdf#108473: don't let empty date in datetime in formsJulien Nabet1-0/+3
If only an hour is given (so no date part), copy behavior for table and query and put 30/12/99 by default Change-Id: Ifb371758538d2d11bd02b101a347d34816b6fddf Reviewed-on: https://gerrit.libreoffice.org/48665 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23new loplugin: pointerboolNoel Grandin1-1/+1
look for possibly bogus implicit conversions to bool when passing (normally pointer) args to bool params. this plugin comes in the wake of a couple of bugs caused by refactoring, where some of the call sites were not currently updated. Of the changes, the following are real bugs: desktop/../dp_persmap.cxx StartInputFieldDlg in sw/../fldmgr.cxx which occurred as a result of commit 39d719a80d8c87856c84e3ecd569d45fa6f8a30e Date: Tue May 3 11:39:37 2016 +0200 tdf#99529 sw: don't pop up input field dialog before inserting field CSerializationURLEncoded::encode_and_append in forms/../serialization_urlencoded.cxx XclExpCFImpl::XclExpCFImpl in sc/../xecontent.cxx I have no idea how to properly fix this, just made a guess. SwDocTest::test64kPageDescs in sw/qa/core/uwriter.cxx which looks like a simple copy/paste error. Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441 Reviewed-on: https://gerrit.libreoffice.org/48291 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23Fix odd check for nFieldLen range, assuming typosStephan Bergmann1-1/+1
The code used the odd combination of checking signed nFieldLen for != 0 and <= USHRT_MAX, and then converting to sal_Int16 (not sal_uInt16) ever since bf4154eb5307ec8c35f000fd1df39ef3abb2eb6d "initial import". But there are indeed various MaxTextLen properties in offapi of type short, not unsigned short, so for one assume that checking for <= SAL_MAX_INT16 (not SAL_MAX_UINT16) was actually intended. And, for another, also assume that checking nFieldLen for > 0 instead of != 0 was intended. Change-Id: I119ef3ce71ee397cb6cbca714bca154e29e6599d Reviewed-on: https://gerrit.libreoffice.org/48348 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22remove some sal_Bool remnantsNoel Grandin1-1/+1
Change-Id: I0a9637aca523a73fbdbbd22f9ad735d6d1ba6898 Reviewed-on: https://gerrit.libreoffice.org/48273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15More loplugin:cstylecast: formsStephan Bergmann8-28/+28
Change-Id: Ide91ff51ef5c048272d742547597d6c66fc3abea
2018-01-14Fix typosAndrea Gelmini1-2/+2
Change-Id: Icc5fc590a6a90e30afa5f61028d4dd0279fbe120 Reviewed-on: https://gerrit.libreoffice.org/47861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: formsStephan Bergmann34-141/+140
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I91065e9ff1c160e5becda1ffa033de7c1b48b7f3
2018-01-11Use = for initializationStephan Bergmann1-1/+1
...so that an automatic loplugin:cstylecast rewrite (with a to-be-committed enhanced loplugin) won't rewrite that to -Werror,-Wvexing-parse sal_Int16 nDefaultState( sal_Int16(TRISTATE_FALSE) ); Change-Id: Ic02374a34c67284dfbbb829a76fe7af9f7599411 Reviewed-on: https://gerrit.libreoffice.org/47752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-11loplugin:redundantcast: formsStephan Bergmann1-1/+1
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: Ife5e10c33c8e6abefd303445b8820c0d6f2d3307
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky1-2/+1
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-18loplugin:unusedindexMike Kaganski4-48/+28
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146 Reviewed-on: https://gerrit.libreoffice.org/46652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-16convert EETextFormat to scoped enumNoel Grandin1-5/+5
and drop unused BIN constant Change-Id: I4ecda96f39147f7e9bceb11ecdb4f0ffe42d2053 Reviewed-on: https://gerrit.libreoffice.org/46589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann2-4/+4
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin34-49/+49
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:salcall handle static methodsNoel Grandin3-4/+4
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:constparamsNoel Grandin2-2/+2
Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b Reviewed-on: https://gerrit.libreoffice.org/45959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann2-0/+2
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05Replace deprecated std::bin2nd with lambda in formsStephan Bergmann2-5/+3
(as std::bind2nd is gone by default at least from recent libc++ in C++17 mode) Change-Id: Ia2c7970fd10e328a8b4a09e101ac3a89876c3d69 Reviewed-on: https://gerrit.libreoffice.org/45863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin10-20/+20
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin1-1/+1
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann1-5/+5
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-20Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib138f971c4efcc67c68c901c9f08b4d1d95cdde2 Reviewed-on: https://gerrit.libreoffice.org/44933 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-16use implict conversion operator in TypedWhichIdNoel Grandin1-1/+1
instead of spreading calls to Which() everywhere. Change-Id: Ie32d106e44f5cb583908eeebe254ab8b8168ae61 Reviewed-on: https://gerrit.libreoffice.org/44760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15TypedWhichIdNoel Grandin1-1/+1
use a strong-typedef template to give which IDs a type, which we can carry around to do a (a) little bit more convenience when Get()'ing them and (b) a little bit of enforcement of which PoolItem subclass each ID uses Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass in AccessibleEditableTextPara::_correctValues Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b Reviewed-on: https://gerrit.libreoffice.org/44587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02loplugin:finalclasses in formsNoel Grandin17-71/+38
Change-Id: I0f849fd104699e2861aaba2d4be38168e80703b0 Reviewed-on: https://gerrit.libreoffice.org/44189 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02Replace lists by vectors (forms)Julien Nabet2-13/+13
Change-Id: Id0215a1044f330ffe6d09875d2f0ed6d4aa0b4f0 Reviewed-on: https://gerrit.libreoffice.org/44179 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-01loplugin:constantparam in connectivityNoel Grandin1-2/+1
Change-Id: Ia13d0931bbdf642fe04119ea1112788fb143eba8 Reviewed-on: https://gerrit.libreoffice.org/44110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: formsStephan Bergmann79-170/+170
Change-Id: I770fe656a390045e850e967074545bf5dac7f335
2017-10-23overload std::hash for OUString and OStringNoel Grandin3-3/+3
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-18use rtl::Reference in formsNoel Grandin4-25/+14
instead of manual reference counting Change-Id: I5bad5b7b83049f5c018a1f2d5bbc37f03727c3ce Reviewed-on: https://gerrit.libreoffice.org/43497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17loplugin:useuniqueptr in tools/inetmsg.hxxNoel Grandin1-6/+4
Change-Id: Ifdf0da7f59af1777f214cbafeb75b46136775f67 Reviewed-on: https://gerrit.libreoffice.org/43450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin2-2/+2
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-01simplify some OUString compareTo callsMuhammet Kara1-2/+2
to either startsWith or == or != Change-Id: I595dd9d89d32134827980c4ba10f88584430137d Reviewed-on: https://gerrit.libreoffice.org/42988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-30work around clang-cl ABI bug PR25641Stephan Bergmann1-0/+3
<https://bugs.llvm.org/show_bug.cgi?id=25641> "clang-cl: vtordisp thunks not emitted for functions with class template specializations in their signatures". Change-Id: I4f9a9777ba7486a026cb3b34340fa5b78f210f05 Reviewed-on: https://gerrit.libreoffice.org/42949 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-29convert IsEqual/etc methods on ESelection to operatorsNoel Grandin1-1/+1
Change-Id: Ia8424e701b6f22d0536ee7f3bdb0ecaaed94a3b9 Reviewed-on: https://gerrit.libreoffice.org/42904 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin1-2/+1
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27loplugin:flatten in variousNoel Grandin4-54/+38
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0 Reviewed-on: https://gerrit.libreoffice.org/42842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski1-14/+12
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22loplugin:flatten in filter..i18npoolNoel Grandin1-5/+2
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb Reviewed-on: https://gerrit.libreoffice.org/42592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-20unused fields in XFormsEventConcreteNoel Grandin2-6/+3
ever since commit 6297bf4e24bd48b52083ca711ac9930f60bf85c8 Date: Wed Mar 23 10:39:28 2005 +0000 INTEGRATION: CWS eforms4 (1.1.2); FILE ADDED Change-Id: Ic4915a9b31c3a5f0222da0a4fc8557b2cbe6078e
2017-09-19unused m_nFieldType in OFormattedModelNoel Grandin2-6/+0
since initial import Change-Id: Ib347a24c108b97f76e9384d5c567db1474c8d686
2017-09-11clang-tidy modernize-use-emplace in editeng..frameworkNoel Grandin4-20/+18
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08set parent for file dialog helperCaolán McNamara1-1/+4
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-2/+2
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>