Stephan Bergmann
649313625b
New o3tl::temporary to simplify calls of std::modf
...
...that ignore the out-parameter integral part
Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca
Reviewed-on: https://gerrit.libreoffice.org/54474
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2018-05-17 21:03:12 +02:00
Stephan Bergmann
7ab34b51f2
loplugin:redundantcast improvements for floating-integer conversions
...
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016
Reviewed-on: https://gerrit.libreoffice.org/54416
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2018-05-17 08:22:14 +02:00
Noel Grandin
0e384e1080
loplugin:unnecessaryvirtual improvements
...
look for virtual methods where all of the overrides of the method are
empty
Change-Id: I87d99a0b647700a8d53498e0ab5f0437d3508553
Reviewed-on: https://gerrit.libreoffice.org/54060
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-05-10 11:34:18 +02:00
Noel Grandin
1cb646dc5f
loplugin:useuniqueptr in SbiImage
...
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-05-02 08:25:37 +02:00
Noel Grandin
d254f8a926
loplugin:singlevalfields improve unaryoperator
...
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-23 08:16:18 +02:00
Jochen Nitschke
b4d36b5dcf
remove some unused comphelper includes
...
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-15 11:17:24 +02:00
Jochen Nitschke
9401c7c28a
remove unused processfactory.hxx includes
...
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-04-01 12:11:26 +02:00
Julien Nabet
359f2035bc
Typos: definied->defined
...
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-17 19:03:02 +01:00
Mike Kaganski
7a42f39663
basic: MSVC: pragma warning: make more specific, remove obsolete
...
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-31 21:01:49 +01:00
Noel Grandin
263d732569
loplugin:useuniqueptr in SbModule
...
Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
2018-01-19 08:58:46 +02:00
Stephan Bergmann
3a40d3de89
More loplugin:cstylecast: basic
...
Change-Id: I0bb219632da384ab047a2b1fc3f2b041dacaf2cb
2018-01-15 09:07:14 +01:00
Stephan Bergmann
6070aaa47d
More loplugin:cstylecast: basic
...
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-12 20:29:14 +01:00
Andrea Gelmini
d0222ba1fd
Fix typos
...
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-29 09:54:33 +01:00
Noel Grandin
00bc5a0973
wrap scoped enum around css::util::NumberFormat
...
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-19 22:08:26 +01:00
Mike Kaganski
4e144751f1
loplugin:unusedindex
...
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-18 07:36:32 +01:00
Noel Grandin
a566fd1c1a
loplugin:unusedmethods
...
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-29 07:28:57 +01:00
Eike Rathke
28288295ae
Get rid of a temporary SvNumberFormatter instance
...
... in case we have a runtime instance already. Only used for
scanning date literals in source so not frequently used, otherwise
we could remember a non-runtime instance formatter somewhere.
Change-Id: I1146860c4b0aa4091708c22e498a6f720d6c7a13
Reviewed-on: https://gerrit.libreoffice.org/45232
Reviewed-by: Eike Rathke <erack@redhat.com >
Tested-by: Eike Rathke <erack@redhat.com >
2017-11-24 21:31:15 +01:00
Mike Kaganski
daf7c3e732
basic: consistently use "" and <> in include directives
...
Change-Id: I147c0e9b9b1e09af593f54799e45e1348cd40716
Reviewed-on: https://gerrit.libreoffice.org/43298
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-10 07:43:46 +02:00
Tor Lillqvist
6978f506a4
Bin some noise comments and ASCII graphics
...
Change-Id: Ib0e786b0e8401da3e3c93bf254727411774e8f43
2017-09-20 09:47:38 +03:00
Noel Grandin
c8ff3059a7
move all the basic errcodes to one file
...
Change-Id: Ic3353c80ac9fdbd17f17503b1c973c9a7cef0c7f
Reviewed-on: https://gerrit.libreoffice.org/41617
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-29 11:50:43 +02:00
Noel Grandin
6d829ae4f2
loplugin:constparams in basic
...
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60
Reviewed-on: https://gerrit.libreoffice.org/40214
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-20 12:01:08 +02:00
Takeshi Abe
b9bda1d791
tdf#103104 Allow line-continuation followed by a dot in BASIC
...
as in VBA-compatibility mode.
Change-Id: If263183fc1fa5742235213a8617fdf412d2a245e
Reviewed-on: https://gerrit.libreoffice.org/39893
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-07-14 02:52:54 +02:00
Stephan Bergmann
85d71244eb
loplugin:oncevar: empty strings: basic
...
Change-Id: I4edf130e526c4004aa8913e6aafdcd1e2f4ac1ef
2017-07-13 11:47:27 +02:00
Stephan Bergmann
4e451cad21
loplugin:oncevar for value-dependent constant expressions
...
(Where the change to basic/source/comp/codegen.cxx reveals that
loplugin:loopvartoosmall also needs the Clang < 3.9 workaround from
33ee8e6129 "Work around bug in Clang 3.8".)
Change-Id: I9f23b9648bc11ca4136a0fbdd332570ba70ee77c
Reviewed-on: https://gerrit.libreoffice.org/39667
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-07-13 10:37:53 +02:00
Stephan Bergmann
c8fd385d61
loplugin:casttovoid: basic
...
Change-Id: I4e70accf67d4d812b8998b0baa07cd04c27216ad
2017-07-02 22:35:38 +02:00
Noel Grandin
7b5fac67fd
loplugin:unusedfields in accessibility..comphelper
...
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695
Reviewed-on: https://gerrit.libreoffice.org/39137
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-23 09:01:24 +02:00
Noel Grandin
528632660b
convert ErrCode to strong typedef
...
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.
Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-21 08:42:30 +02:00
Noel Grandin
6ee9f2c188
loplugin:oncevar accessibility..basic
...
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6
Reviewed-on: https://gerrit.libreoffice.org/38969
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-20 07:50:06 +02:00
Noel Grandin
7aee0ea7c5
replace SbxError typedef with ErrCode
...
part of a larger patch to convert ErrCode to strong_int
Change-Id: Ia56e5d6d8c4217d6f258e2113d20ce737977892f
Reviewed-on: https://gerrit.libreoffice.org/38813
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-15 09:48:11 +02:00
Noel Grandin
3059ede409
drop SbError typedef
...
in favour of ErrCode.
Part of a larger patch to convert ErrCode to strong_int
Change-Id: Ia846bfc93c58c85c6a6cec79e9d19b9ecbd1c05f
Reviewed-on: https://gerrit.libreoffice.org/38783
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-15 08:25:22 +02:00
Noel Grandin
a6aa57ff59
use ERRCODE_NONE instead of 0
...
peeling off a small chunk of my ErrCode strong_int conversion
Change-Id: Idc89e8496083beed7608cba705cd981139eb7111
Reviewed-on: https://gerrit.libreoffice.org/38777
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-14 15:42:31 +02:00
Noel Grandin
1dd5e226bd
clang-tidy readability-non-const-parameter
...
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470
Reviewed-on: https://gerrit.libreoffice.org/38593
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-09 15:05:54 +02:00
Noel Grandin
2ccde70d60
teach redundantcast plugin about functional casts
...
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-30 08:50:31 +02:00
Grzegorz Araminowicz
f45463d8e2
tdf#93727 Support date literals in basic
...
* detect #...# in SbiScanner
* add vb test
* made date locale-independent
Change-Id: Ic269df2df8d3a7c5af7858c3655bb40a0b6033f0
Reviewed-on: https://gerrit.libreoffice.org/36002
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Eike Rathke <erack@redhat.com >
2017-05-24 18:55:45 +02:00
Takeshi Abe
7948e84091
basic: Stop detecting the number of tokens at runtime
...
which removes static variables and improves SbiTokenizer's
thread-safety.
Change-Id: Ic3eb52adfa85691af65f214c1b90c43c03f9a3dd
Reviewed-on: https://gerrit.libreoffice.org/37867
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-24 04:15:32 +02:00
Noel Grandin
2e51afc77c
loplugin:comparisonwithconstant in basic
...
Change-Id: Ie34a17d2fb465ffbe675ba4e99917d23959f1fb5
Reviewed-on: https://gerrit.libreoffice.org/37809
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-19 12:53:34 +02:00
Johnny_M
2c3f58eff2
Translate German comments and debug strings (leftovers in dirs a... to c...)
...
Translates all (leftovers) found using a custom regex, in directories not
shown by /bin/find-german-comments and beginning with "a" to "c".
Change-Id: I3b0152ee78ad80a29d714cbd98bf888f31be4763
Reviewed-on: https://gerrit.libreoffice.org/37573
Reviewed-by: Eike Rathke <erack@redhat.com >
Tested-by: Eike Rathke <erack@redhat.com >
2017-05-15 15:27:52 +02:00
Takeshi Abe
f99c95c80d
basic: Fix VBA constant vbNewLine with unit test
...
... making its value CRLF on Windows and LF on others.
A winding road of regressions passed through it;
first b680e35254 ,
then 7beeced463 .
Change-Id: I9e4da4a17436949b4fea35481b8355b4321cb268
Reviewed-on: https://gerrit.libreoffice.org/37500
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-15 04:57:59 +02:00
Takeshi Abe
9425245a87
basic: Remove strange ifdef-guard for SHARED
...
Was there any platform predefining it?
Change-Id: I4c155c00272b426c0d2b1b1ec0184cc223f9e38c
Reviewed-on: https://gerrit.libreoffice.org/37461
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-12 03:57:08 +02:00
Takeshi Abe
e5a4858e1a
basic: Compare with keywords without creating temporary strings
...
Change-Id: Ie284bbe4759a31c48cde415a4e673efd4c789741
Reviewed-on: https://gerrit.libreoffice.org/37252
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-10 05:49:19 +02:00
Jochen Nitschke
959496794c
cleanup osl/diagnose.h includes
...
with command
> git grep -l osl/diagnose.h *.cxx |
xargs grep -L -w 'OSL_\w*' |
xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'
headers need more work
Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-09 15:41:46 +02:00
Noel Grandin
719a2adfbd
remove unnecessary empty OUString fields and vars
...
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
Reviewed-on: https://gerrit.libreoffice.org/37394
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 08:28:56 +02:00
Stephan Bergmann
f06e696723
loplugin:salunicodeliteral: basic
...
Change-Id: I479666b439f1d6324f07253d65181983b7c2c3ea
2017-04-28 18:27:01 +02:00
Chris Sherlock
da64d198ec
tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
...
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2017-04-25 09:31:31 +02:00
Arnaud Versini
f747797772
BASIC: Call OUString() instead of OUString("");
...
Change-Id: Ie68d48a5dd0fd3593054e853f179db9a4be03b24
Reviewed-on: https://gerrit.libreoffice.org/36831
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
Tested-by: Michael Meeks <michael.meeks@collabora.com >
2017-04-24 15:01:32 +02:00
Arnaud Versini
4a27349879
BASIC: Make TokenLabelInfo a singleton, never modified and simplify it.
...
Change-Id: Ie233aebc39f5b181087a64d3cf2053ef4ecbab91
Reviewed-on: https://gerrit.libreoffice.org/36829
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-23 21:26:47 +02:00
Katarina Behrens
351dead74b
tdf#106529: Revert "tdf#80731 Closing parenthesis is now detected"
...
This reverts commit 65e294e221e0ad1d37c6667eecb995817ace870d, which
breaks several widely used Basic extensions and hundreds of anonymous
macros that miss closing parenthesis here and there
(cherry picked from commit 660e394b893a045a077ccded263f94a1be03fcf9)
Change-Id: I5d27e6d4e7c8aea3f0762c41ede46e35a5a24aaa
Reviewed-on: https://gerrit.libreoffice.org/35970
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk >
Tested-by: Jenkins <ci@libreoffice.org >
2017-03-31 14:27:57 +00:00
Jens Carl
243b3fa9c4
tdf#39468 Translate German comments
...
Translate German comments and terms in basic/
Change-Id: I8baf76ea866823a155dfa25c74149dac989c841c
Reviewed-on: https://gerrit.libreoffice.org/35793
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-03-28 11:22:53 +00:00
Andrea Gelmini
5ad636acc6
Fix typos
...
Change-Id: Idbf0aa261b829e83d4c08a2e989a4ced871dc6de
Reviewed-on: https://gerrit.libreoffice.org/35616
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Julien Nabet <serval2412@yahoo.fr >
2017-03-26 20:37:59 +00:00
Stephan Bergmann
6291574d94
Remove unused #include <ctype.h>
...
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00