summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2018-05-04Removed executable permission on data filesAndrea Gelmini
chmod -x for .patch, .pptm, and .vb Change-Id: I98e1221e48df22e8b58aaf305898cbe301f187ce Reviewed-on: https://gerrit.libreoffice.org/52568 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-04Related: tdf#116579 tell SvNumberFormatter the proper NfEvalDateFormatEike Rathke
So far Basic relied on the side effect of date acceptance patterns selected according to the passed format's locale, which changed with the (temporarily reverted) commit dfb9138b8b5a239b46f189a717999bcaff19aa79. Explicitly tell the formatter the behavior to use. Change-Id: I9819399df69bdfa36d79bc9db116dec37a85cbeb Reviewed-on: https://gerrit.libreoffice.org/53787 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-05-02loplugin:useuniqueptr in SbiImageNoel Grandin
Change-Id: I24ee5de3628d6436dc045cb543d35b16074ef189 Reviewed-on: https://gerrit.libreoffice.org/53700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-29Avoid comphelper::string::getTokenCount()Matteo Casalin
Change-Id: I2aae4f106f783969ede076ce7af14e5946a554ae
2018-04-29loplugin:useuniqueptr pStringOff in SbiImageNoel Grandin
Change-Id: I05de3e910bf857e095c99cade6fec22ccb2dd99d Reviewed-on: https://gerrit.libreoffice.org/53606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-26[API CHANGE] deprecate XGraphicObjectResolverTomaž Vajngerl
XGraphicObjectResolver was used to get the GraphicObject URL from an storage (package) URL. This isn't possible anymore in LO 6.1 since creating GraphicObject from uniqueID was removed for its lifecycle issues. XGraphicObjectResolver is now deprecated and when the "resolveGraphicObjectURL" is called, it throws a RuntimeExeption. In places where XGraphicObjectResolver was used, we now use the XGraphicStorageHandler as the alternative. Both share a common implementation so previously we could cast one to the other at any time. Now only XGraphicStorageHandler is used. GraphicObjectResolver was removed and replaced by the alternative GraphicStorageHandler for instance creation - where needed. Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84 Reviewed-on: https://gerrit.libreoffice.org/53279 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-23loplugin:singlevalfields improve unaryoperatorNoel Grandin
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 Nitschke
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 Bergmann
Change-Id: If47b5bb3436ebdf799b74f7c0070f674ab52804e
2018-04-15remove some unused comphelper includesJochen Nitschke
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 McNamara
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 McNamara
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 Bergmann
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 Grandin
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 Nitschke
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 Grandin
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 Grandin
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 McNamara
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 Nabet
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ž Vajngerl
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ž Vajngerl
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 McNamara
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 McNamara
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin
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 McNamara
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 Nabet
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 Nabet
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 Grandin
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 McNamara
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 Grandin
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 Lillqvist
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 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>