summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2018-01-31basic: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski
Change-Id: I9e157f7b27eab831c5c15f6c22b9ffb20207b593 Reviewed-on: https://gerrit.libreoffice.org/48947 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-25loplugin:pointerbool (clang-cl)Stephan Bergmann
Change-Id: Idaf9e1858afb8f22bba1767470138ec820a8d7cb
2018-01-23Introduce SbxValues::clearStephan Bergmann
...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non- trivial type ‘struct SbxValues’") Change-Id: Icf610e692b81030bfd6f2f940c43ee8bf6f1d4e0 Reviewed-on: https://gerrit.libreoffice.org/48389 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19new loplugin:emptyifNoel Grandin
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42 Reviewed-on: https://gerrit.libreoffice.org/48128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19loplugin:useuniqeptr in SbxVariableNoel Grandin
Change-Id: I788ec594589d9708e12db83a7371b5a8d9fed38c
2018-01-19loplugin:useuniqueptr in SbiStdObjectNoel Grandin
Change-Id: Ic66d817746de423549c87f58068e47f9942d04fd
2018-01-19loplugin:useuniqueptr in SbUnoMethodNoel Grandin
Change-Id: Ibeae1754a18152c3a17379c95e3caa536a8822db
2018-01-19loplugin:useuniqueptr in SbiGlobalsNoel Grandin
Change-Id: I0ebec3193b4369039f90be4223ebdf6d048b8478
2018-01-19loplugin:useuniqueptr in SbModuleNoel Grandin
Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
2018-01-16Fix typosAndrea Gelmini
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: basicStephan Bergmann
Change-Id: I0bb219632da384ab047a2b1fc3f2b041dacaf2cb
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: basicStephan Bergmann
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: I20b38196ee1b6a34384dc46d9de1b6e1b44947ae
2018-01-10tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.ekuiitr
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48 Reviewed-on: https://gerrit.libreoffice.org/47082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-08basic, solve link problemsjan Iversen
When not using scripting, there were a number of unresolved symbols. First aproach did not work, so this commit is the more extensive. Change-Id: Iaf78bde10d9a43862d58d1aa8f46b14aa075eddb
2018-01-07basic, changed runtimejan Iversen
errobject is needed for runtime only (disable-scripting) Change-Id: I44f8c969f3e253fc3699e1bd12cd416b21ddcda3
2018-01-06SAL_TYPES_SIZEOFINT == 2 no longer possibleNoel Grandin
on any of our platforms Change-Id: Id453ada9c79c76f2736f568436e386b05bcd08c5 Reviewed-on: https://gerrit.libreoffice.org/47468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04Silence loplugin:unnecessarycatchthrow with --disable-debugStephan Bergmann
(An alternative fix could be to suppress warnings for catch blocks containing preprocessor conditionals, but as these two places seem to be the only ones affected, keep it simple for now.) Change-Id: Ia83e56d1eab69bb2920ffdbbfc2182addce47963 Reviewed-on: https://gerrit.libreoffice.org/47331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-02RID_* can be extern global variablesNoel Grandin
no need to access them via methods Change-Id: If0d1a65d6f56ce2fc585749d974ba13c9f2749b2 Reviewed-on: https://gerrit.libreoffice.org/47245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29Fix typosAndrea Gelmini
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e Reviewed-on: https://gerrit.libreoffice.org/47126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-26loplugin:passstuffbyref improved return in basic,frameworkNoel Grandin
Change-Id: Ib19836febb59f4e2bb07dc874cfc6baabc653237 Reviewed-on: https://gerrit.libreoffice.org/47065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23VBA tests (4) - don't pass when all tests failZdeněk Crhonek
Change-Id: Ib4f9b5df1cffe104ba27be95183d075f24f28bb3 Reviewed-on: https://gerrit.libreoffice.org/45774 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
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-22VB tests (3)-don't pass whe all tests failZdeněk Crhonek
Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435 Reviewed-on: https://gerrit.libreoffice.org/45739 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-19loplugin:unusedenumconstantsNoel Grandin
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18loplugin:unusedindexMike Kaganski
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-15Get rid of loop counter variableMike Kaganski
Change-Id: Ia4f4e24819525287e720a9c016b3666bc006b545 Reviewed-on: https://gerrit.libreoffice.org/46531 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13tools: remove unused #include from solar.hMichael Stahl
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-11loplugin:salcall fix functionsNoel Grandin
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-07VBA test - error() functionZdeněk Crhonek
Change-Id: Ia667342f9112932c71df593f08371d3c35255b19 Reviewed-on: https://gerrit.libreoffice.org/45917 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-07loplugin:countusersofdefaultparams in basctl..basegfxNoel Grandin
Change-Id: I515acfb9de1f6dff1de94a60055c5b600e5e5241 Reviewed-on: https://gerrit.libreoffice.org/45957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06VBA test - iserror function test repair, tdf#114232Zdeněk Crhonek
Change-Id: I924713f360a41fa5b269468fdf771df6a50df44b Reviewed-on: https://gerrit.libreoffice.org/45923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-06basic: SfxLibraryContainer: replace maMutexMichael Stahl
... with cppu::BaseMutex, because a member cannot ensure the life cycle guarantees expected by WeakComponentImplHelper. Change-Id: Iaa10c699abf69882d917487740db241ba1455e1c
2017-12-06loplugin:salcall handle virtual methodsNoel Grandin
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42 Reviewed-on: https://gerrit.libreoffice.org/45851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05Save an unnecessary duplicate GetObject() callEike Rathke
Change-Id: Ib0efc84ad2cedc1a149fa57996bc0481bd64591b
2017-12-05Simplify the IsObject()/GetObject() logic hereEike Rathke
Change-Id: I816b15b6795b4946b1bfed0d1f6d103a6a1aba4f
2017-12-05Rather call GetObject() only if IsObject(), tdf#112571 follow-upEike Rathke
Which effectively is what GetObject() internally also does to determine whether to set an error, so resetting an error here is moot (or might even hide a nested error?). Change-Id: I8736d16e386d1833126965538f96aaa1fd73dfd6
2017-12-05Resolves: tdf#114232 reset error after unsuccessful GetObject() queryEike Rathke
Probably broken already since commit 0b21b8b146fc4b982c7c9bbb866b9ff18a29332a Date: Wed Oct 6 10:16:27 2010 +0100 initial commit for vba blob ( not including container_control stuff ) Change-Id: Iecce564851a76921b491ff101365c70883ad7475
2017-12-05Resolves: tdf#114231 do not mask ErrCode with GetRest()Eike Rathke
Regression from commit 7ca950ec744b7af1d15724ec2abc296573a641e4 Date: Wed Aug 23 19:25:02 2017 +0200 no need to use ERRCODE_RES_MASK here the relevant usage sites already call GetRest() before comparing which exactly is the reason that it didn't work anymore. Old StringArray ItemList resources stored only 16-bit values, hence ERRCODE_RES_MASK was used to mask the ErrCode values in the resource for which code had to mask ERRCODE_RES_MASK as well to compare values. Now the full ErrCode is stored, so code must not use GetRest() on a value to compare against, or use GetRest() on both values (which theoretically could lead to ambiguities, but probably doesn't in resources that are restricted to one module). Change-Id: I835e47424bb008bc680dc4f8c502c9558397db36
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin
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-02VBA tests repair (2) - don't pass the test when all tests failZdeněk Crhonek
Change-Id: I2519fc54e2ce74ec3c6777aa002971548a21c3c6 Reviewed-on: https://gerrit.libreoffice.org/45715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-02VBA tests - repair tests (Don't pass when all tests fail)Zdeněk Crhonek
Change-Id: I70bfb8b909f9f7033cd1eb374db0fe710fd2a0c3 Reviewed-on: https://gerrit.libreoffice.org/45260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-11-29Find VBA-only functions when compiling first on module levelEike Rathke
This likely never worked as there is no SbiInstance in that step, but worked by chance when running a module's code that was compiled with VBA support where the VBA-only function was added as a symbol to be resolved later during runtime and then the SbiInstance exists and the symbol was magically resolved. Found when trying to correct vba_tests to actually fail if all subtests fail that then started to fail in Atn.vb because of the Round() function being VBA-only. Change-Id: I7d9f6e2640a73388a2a58c3d180820c6ef85abe3 Reviewed-on: https://gerrit.libreoffice.org/45425 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-29loplugin:unusedmethodsNoel Grandin
Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1 Reviewed-on: https://gerrit.libreoffice.org/45386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-26basic, disable scripting problemjan Iversen
When building without scripting a couple of functions were undeclared, to solve that source/runtime/runtime source/classes/sbintern were moved so they also compile in building without scripting Change-Id: I908fee3caf8376d70ed286c17085d6b8a700ae75
2017-11-24Get rid of two more temporary SvNumberFormatter instancesEike Rathke
Change-Id: Id2afd9dd9d791383a1374b5abe52b47b43a19f08 Reviewed-on: https://gerrit.libreoffice.org/45236 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-11-24Get rid of a temporary SvNumberFormatter instanceEike Rathke
For each Format call.. Change-Id: I2f9d875ca27d5a10e609df1c0168be2dad65eaab Reviewed-on: https://gerrit.libreoffice.org/45230 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-11-24Get rid of that LANGUAGE_GERMAN nonsenseEike Rathke
Change-Id: I1ca3125e893a54ac00a3d785d77ed5612fb01857 Reviewed-on: https://gerrit.libreoffice.org/45235 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>