summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)AuthorFilesLines
2018-04-23loplugin:singlevalfields improve unaryoperatorNoel Grandin2-4/+1
when we see a unaryoperator, unless it's one of a small set, we can know (mostly) that the field will not be written. there is still a small risk of false+ with code taking references via conditional expressions. Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e Reviewed-on: https://gerrit.libreoffice.org/53263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-21cppcheck: identicalInnerConditionJochen Nitschke2-18/+14
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow of a local variable Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690 Reviewed-on: https://gerrit.libreoffice.org/53244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-20loplugin:expressionalwayszero (clang-cl)Stephan Bergmann1-2/+2
Change-Id: If47b5bb3436ebdf799b74f7c0070f674ab52804e
2018-04-15remove some unused comphelper includesJochen Nitschke3-2/+1
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-12weld SbiInputDialogCaolán McNamara1-55/+29
this is basically the same as SvRTLInputBox Change-Id: Idbf0f58cf51ea706928e18b81ce80088015dccc4 Reviewed-on: https://gerrit.libreoffice.org/52763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-12weld SvRTLInputBoxCaolán McNamara1-91/+51
This (forgotten) dialog is the statbasic "InputBox" dialog Change-Id: Ifb65fb382be7bd6b5a2ba904e0cb64ddce2485a8 Reviewed-on: https://gerrit.libreoffice.org/52749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-06tdf#111313: Honor bWriteNoLenParam in !bCompatibility, tooStephan Bergmann1-36/+26
e8deba22e887a972f60ff05551e93c334ac1e7b6 "INTEGRATION: CWS ab26" had added the bCompatibility case with all the argument checking ("2006/05/04 08:33:46 ab 1.66.10.3: #111951# Changed Mid runtime behaviour only for CompatibilityMode(true)"), and it was probably an oversight that, for !bCompatibility, it left the bWriteNoLenParam case (triggered by Basic code like s = "abc" Mid(s,1) = "d" ) calling OUStringBuffer::remove with an illegal argument of len=-1. Change that so that only setting ERRCODE_BASIC_BAD_ARGUMENT is controlled by bCompatibility, while all the other checks (that are probably all necessary to not call rtl string functions with illegal arguments) are done in both modes. Also, the check nStartPos + 1 > nArgLen should probably be nStartPos > nArgLen instead, as nStartPos has already been decremented from the one-based Basic index to the zero-baesd rtl string index. Change-Id: I75deec0acf75b8677aa89f91897c06c1caa5614d Reviewed-on: https://gerrit.libreoffice.org/52500 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin3-10/+10
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke5-5/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-29loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29loplugin:virtualdown in basctl,basicNoel Grandin1-5/+0
Change-Id: If0d729ee84263a5afb2c7acb2d62b08602aa59f4 Reviewed-on: https://gerrit.libreoffice.org/52046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-20drop unnecessary includesCaolán McNamara1-1/+0
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-17Typos: definied->definedJulien Nabet1-1/+1
Change-Id: I052d6a4815372c79b6d62c1c85d303c6272af3df Reviewed-on: https://gerrit.libreoffice.org/51466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-15change recursive ImageURL prop. search to use XGraphicTomaž Vajngerl1-8/+13
In two cases we need to traverse and gather all ImageURL properties and get the URL string and store the graphic content to a storage (like we do in xmloff filter). ImageURL property can now only store external URL and Graphic stores the embedded XGraphic, so this was changed to look into Graphic property first and then ImageURL. We also don't gather URL sting anymore so they need to be loaded to XGraphic when gathering them. Change-Id: I5f3f4be2b403b9589d72b8733df0c97109f2b65d Reviewed-on: https://gerrit.libreoffice.org/51308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl1-1/+1
This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-27convert Redline warning dialog to .ui to get helpidsCaolán McNamara1-10/+10
etc. Change-Id: Ic5e6031fe99347f19002d5d8527b5632333fefb0 Reviewed-on: https://gerrit.libreoffice.org/50431 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-27convert remaining WarningBox to weld::MessageDialogCaolán McNamara3-3/+0
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin1-2/+1
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara2-90/+103
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25Blind fix for 3ceb01afc3e5f47930e24fb0b21e6e85b86f660eJulien Nabet1-2/+2
Change-Id: I01649065c93de368f900eb836a0467693f361f68 Reviewed-on: https://gerrit.libreoffice.org/50297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-24Use for range loops in basegfx and basicJulien Nabet8-68/+60
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56 Reviewed-on: https://gerrit.libreoffice.org/50280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-16Revert "loplugin:changetoolsgen in avmedia..basic" and reapply pluginNoel Grandin1-3/+3
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 1adb1a320a7e9832a41545bde13fd59d27ce7954. Change-Id: I52924b35008c8e4b44c8a6b6657cc3a1ac513886 Reviewed-on: https://gerrit.libreoffice.org/49848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-16ofz#6311 still problems with SdrEdgeObj listening to same obj at start as endCaolán McNamara4-11/+11
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-13loplugin:changetoolsgen in avmedia..basicNoel Grandin1-3/+3
Change-Id: I4e355ae27b9fad1cc6e8f8f408dbd9e93d7256d7 Reviewed-on: https://gerrit.libreoffice.org/49603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-09Decrease fragility in odd use cases with no current documentTor Lillqvist1-1/+4
Change-Id: I9966166561d4c6e577f3f7e8e04572f97a0b295e Reviewed-on: https://gerrit.libreoffice.org/49450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-31basic: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-9/+3
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 Bergmann1-1/+1
Change-Id: Idaf9e1858afb8f22bba1767470138ec820a8d7cb
2018-01-23Introduce SbxValues::clearStephan Bergmann1-11/+5
...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 Bergmann2-7/+7
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 Grandin1-3/+0
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 Grandin2-19/+13
Change-Id: I788ec594589d9708e12db83a7371b5a8d9fed38c
2018-01-19loplugin:useuniqueptr in SbiStdObjectNoel Grandin2-5/+5
Change-Id: Ic66d817746de423549c87f58068e47f9942d04fd
2018-01-19loplugin:useuniqueptr in SbUnoMethodNoel Grandin2-3/+3
Change-Id: Ibeae1754a18152c3a17379c95e3caa536a8822db
2018-01-19loplugin:useuniqueptr in SbiGlobalsNoel Grandin4-17/+18
Change-Id: I0ebec3193b4369039f90be4223ebdf6d048b8478
2018-01-19loplugin:useuniqueptr in SbModuleNoel Grandin4-30/+20
Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
2018-01-16Fix typosAndrea Gelmini1-1/+1
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 Bergmann12-47/+47
Change-Id: I0bb219632da384ab047a2b1fc3f2b041dacaf2cb
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-1/+1
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 Bergmann39-399/+399
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.ekuiitr2-11/+8
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 Iversen4-2/+18
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 Iversen1-1/+1
errobject is needed for runtime only (disable-scripting) Change-Id: I44f8c969f3e253fc3699e1bd12cd416b21ddcda3
2018-01-06SAL_TYPES_SIZEOFINT == 2 no longer possibleNoel Grandin1-16/+0
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 Bergmann1-4/+8
(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 Grandin2-7/+2
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 Gelmini1-1/+1
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 Grandin6-12/+12
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 Crhonek20-120/+27
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 Holesovsky1-3/+2
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 Crhonek18-490/+15
Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435 Reviewed-on: https://gerrit.libreoffice.org/45739 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>