2aed0d49d7
Resolves: tdf#98778 fix parsing of exponents
...
regression from...
commit 9e9f39d171cafa035d7b8e74187e25c3581cb89d
Date: Tue Mar 19 23:23:16 2013 +0100
resolved rhbz#919020 Basic CDbl() and CSng() scan localized number
Change-Id: I96535fd9bc9ec59d6e07739a3118c96eb2d8bd05
Reviewed-on: https://gerrit.libreoffice.org/27342
Reviewed-by: Eike Rathke <erack@redhat.com >
Tested-by: Eike Rathke <erack@redhat.com >
2016-07-20 15:55:01 +00:00
054cf21948
tdf#100726: Improve readability of OUString concatenation in basic module
...
Change-Id: I96c3215cf9f8932127e681aaaaee649774cac2e4
Reviewed-on: https://gerrit.libreoffice.org/27229
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-07-15 08:39:51 +00:00
9b0995439e
BASIC : Remove useless 16bits Remove function from SbxArray
...
Change-Id: I050a034437d3370a28c9e5ab47abee369e634f7d
Reviewed-on: https://gerrit.libreoffice.org/27089
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-07-11 07:28:16 +00:00
9b9e5cfd2f
tdf#99589 - tolower / toupper - dangerous to Turks ...
...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: jan iversen <jani@documentfoundation.org >
2016-06-23 09:59:49 +00:00
9f0997eb16
Resolves: tdf#59222 Crash in Basic with an array of values...
...
from a range address
trying to make all SbxVariables reference count their parents
is ludiciously hard, so just reference count this one known
crashing case
Change-Id: Ie1fa6624e8184146dd00d766cdbacef674153ef6
Reviewed-on: https://gerrit.libreoffice.org/26272
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-06-14 19:54:26 +00:00
272a8afa60
convert more DBG_ASSERT(false to SAL_WARN
...
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55
Reviewed-on: https://gerrit.libreoffice.org/26195
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-06-12 18:10:44 +00:00
4d49c9601c
Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
...
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
0216b8dc61
tdf#89329: use unique_ptr for pImpl in sbxvar
...
Change-Id: I74734c34e72ba5d508830dbcff88f0d3b93a0766
Reviewed-on: https://gerrit.libreoffice.org/25742
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-06-03 10:25:36 +00:00
f3c1d240bd
loplugin:constantparams
...
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361
Reviewed-on: https://gerrit.libreoffice.org/25769
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-06-03 09:08:42 +00:00
f107d45381
Convert SbxClassType to scoped enum
...
Change-Id: I48afcdd9924d22b52a8db21aa253061e4d38c85b
Reviewed-on: https://gerrit.libreoffice.org/25259
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-23 11:49:32 +00:00
d4d2fc2479
clang-tidy modernize-make-unique
...
Change-Id: I550bb69ddcef69906027516ccde62cf8e87c295b
Reviewed-on: https://gerrit.libreoffice.org/25138
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-19 08:33:10 +00:00
2c8fe2e737
update unusedmethods plugin to deal with constructors
...
and fix the operator< implementations in some of the other
plugins too.
Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-18 10:03:44 +00:00
bdacf96e3a
Add SAL_FALLTHROUGH, where apparently appropriate
...
Change-Id: Id6e230d026184ab243e994a17515f2e5539d3646
2016-05-10 17:08:02 +02:00
f3d9aab841
teach passstuffbyref plugin to check for..
...
unnecessarily passing primitives by const ref.
Suggested by Tor Lillqvist
Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com >
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-06 06:48:38 +00:00
d15163eceb
Fix typos
...
Change-Id: Ideafa411b53fe4a5f2e6559be10c4cb82b58a256
Reviewed-on: https://gerrit.libreoffice.org/24543
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com >
2016-05-01 09:46:27 +00:00
a7e23e7f7b
BASIC : Partially revert SbxArray simplification.
...
Revert partially commit 0fa6c88007f61176ac707cb5d77fd35cf1521123
(BASIC : Simplify SbxArray) to make sure SbxArray::Put add too much objects behind 65k limit.
Change-Id: I2d86f213711665f8cb522879ff78ff5bc9f42b31
Reviewed-on: https://gerrit.libreoffice.org/24223
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-04-19 07:41:48 +00:00
789055bc2a
clang-tidy performance-unnecessary-copy-initialization
...
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-04-18 07:37:31 +00:00
0fa6c88007
BASIC : Simplify SbxArray
...
Change-Id: I988fcfed2b03039cbc167eaee1d09bffe42cd411
Reviewed-on: https://gerrit.libreoffice.org/24171
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-04-18 07:20:57 +00:00
5304b94878
Related tdf#99089: avoid second crash
...
Second bt quoted in https://cgit.freedesktop.org/libreoffice/core/commit/?id=43109b751bf5fd36318de56b2fb686acc724673f
wasn't solved, try to fix it now.
Change-Id: I68484f9417ff0bf747306ac8774cad5fdf84b924
Reviewed-on: https://gerrit.libreoffice.org/24042
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2016-04-13 07:11:33 +00:00
b2706fcf9c
Avoid reserved identifier
...
Change-Id: I0ed8754bb06328b61a41079a4f446d8dd2b61bb7
2016-04-12 15:50:19 +02:00
a2f91994df
Avoid reserved identifier
...
Change-Id: I6dfb2961adeb412405c58e0a0b51e130cbd3e0c3
2016-04-11 14:32:29 +02:00
f088a556ca
Remove an useless check I had added
...
Reverts partly https://cgit.freedesktop.org/libreoffice/core/commit/?id=43109b751bf5fd36318de56b2fb686acc724673f
Change-Id: Ief7fd752d260031e243ea4304f6c55fa4dc42bfd
Reviewed-on: https://gerrit.libreoffice.org/23984
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2016-04-11 10:15:51 +00:00
f678b82f0e
clang-tidy performance-unnecessary-value-param in basic
...
Change-Id: I997213ca28efc2df04d454ffaf3c81c9cbad09ac
2016-04-11 11:38:57 +02:00
43109b751b
tdf#99089: avoid some crashes in Basic
...
First stacktrace:
soffice.bin: /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:577:
sal_Unicode rtl::OUString::operator[](sal_Int32) const:
Assertion `index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())' failed.
...
3 0x00002aaaab327452 in __GI___assert_fail (assertion=0x2aaaaeea62a8 "index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())", file=0x2aaaaeea6260 "/home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx", line=577, function=0x2aaaaeea6860 <rtl::OUString::operator[](int) const::__PRETTY_FUNCTION__> "sal_Unicode rtl::OUString::operator[](sal_Int32) const") at assert.c:101
4 0x00002aaaaed91e89 in rtl::OUString::operator[](int) const (this=0x7fffffff2770, index=0) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:577
5 0x00002aaaaee1c66f in SbRtl_Val(StarBASIC*, SbxArray&, bool) (pBasic=0xa2a7ec0, rPar=..., bWrite=false)
at /home/julien/compile-libreoffice/libreoffice/basic/source/runtime/methods.cxx:1792
Second stacktrace:
0x00002aaaaee6054d in printfmtstr (rStr="", rRes="", rFmt="\£0.##") at /home/julien/compile-libreoffice/libreoffice/basic/source/sbx/sbxscan.cxx:534
534 while( *pFmt != '\' );
(gdb) bt
0 0x00002aaaaee6054d in printfmtstr(rtl::OUString const&, rtl::OUString&, rtl::OUString const&) (rStr="", rRes="", rFmt="\£0.##")
at /home/julien/compile-libreoffice/libreoffice/basic/source/sbx/sbxscan.cxx:534
1 0x00002aaaaee617ce in SbxValue::Format(rtl::OUString&, rtl::OUString const*) const (this=0xb12dd60, rRes="", pFmt=0x7fffffff20e0)
at /home/julien/compile-libreoffice/libreoffice/basic/source/sbx/sbxscan.cxx:883
2 0x00002aaaaee217af in SbRtl_Format(StarBASIC*, SbxArray&, bool) (pBasic=0xa2cffa0, rPar=..., bWrite=false)
at /home/julien/compile-libreoffice/libreoffice/basic/source/runtime/methods.cxx:3519
Change-Id: I1798a1545ce08efa9d6fc39f4696195f9dc96c67
Reviewed-on: https://gerrit.libreoffice.org/23956
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2016-04-10 08:17:56 +00:00
ba95e61314
fix bug in SbxArray::Merge
...
bug was recently introduced by
commit a5c232831395f8987a8395816c5a60105a52b6a0
"BASIC: Store directly SbxVarEntry in SbxArray"
bug was found by clang-tidy
Change-Id: Ibcce6d6024ac60eb143cd873760586a7f6231858
Reviewed-on: https://gerrit.libreoffice.org/23890
Reviewed-by: Michael Stahl <mstahl@redhat.com >
Tested-by: Michael Stahl <mstahl@redhat.com >
2016-04-07 21:03:30 +00:00
a62ad21f98
BASIC: Calling SbxDimArray::Clear should also call SbxArray.
...
Change-Id: I832a192bbb3ddd2d32d80f22ae8f2cf95e3edfb7
Reviewed-on: https://gerrit.libreoffice.org/23192
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org >
2016-03-20 13:45:06 +00:00
670c2b3ca9
simply the SbxRes stuff, inheriting from OUString is icky
...
Change-Id: Ie9794ea164d587ad87ee13d360cb3abc18166051
2016-02-24 12:19:44 +02:00
459e3fe7c9
Removing #defines for String_XXX in sbxres.hxx
...
This is a [partial] patch for BUG #84938 :
https://bugs.documentfoundation.org/show_bug.cgi?id=84938
The objective is to substitute all apparitions of #defined constants
for enum class.
The victim here is the series of constants STRING_xxx that were
located in sbres.hxx and were changed for a StringId enum class.
Obviously some other files where the type is used must be changed too.
Change-Id: I31fa684eb5eb3508d2025c9a319d5b245cc177af
Reviewed-on: https://gerrit.libreoffice.org/22655
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-24 10:14:49 +00:00
4604a60128
Actually, why passive voice?
...
Change-Id: Ib8723c7ef1f74b7cfb4efa8e13e34953bff7d0da
2016-02-22 18:08:14 +02:00
a6ac3caaf9
Fix mis-translated German comment
...
Change-Id: I9c2dbccdc789b58c583e033a8d5627e0a95a95f9
2016-02-22 18:00:11 +02:00
2d0dab5b15
loplugin:commaoperator in basic/
...
Change-Id: I320a06e50d032a55d8d5e6354959c12327e319ee
2016-02-22 16:55:11 +02:00
14420e8329
BASIC : Add tools::make_ref and simplify SvRef usage
...
Change-Id: I8fe846dbd353bace05a8732a9b961f3507d97ef8
Reviewed-on: https://gerrit.libreoffice.org/22587
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-22 12:33:52 +00:00
2087484c65
use consistent #define checks for the Windows platform
...
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
In this stage we focus on replacing usage of the WIN macro
Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-17 11:33:57 +00:00
fd3cb8d822
tdf#39440: reduce scope of local variables
...
Change-Id: I6ba411d2e07240821518281996d543f71acf3259
Reviewed-on: https://gerrit.libreoffice.org/22378
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-16 12:47:55 +00:00
ce43d0ae92
use consistent #define checks for the Windows platform
...
stage 1 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f
Reviewed-on: https://gerrit.libreoffice.org/22390
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2016-02-16 10:37:55 +00:00
a238b1f8d3
Remove excess newlines
...
A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2016-02-09 08:18:05 +00:00
4fa4b9addf
loplugin:fpcomparison in basic/
...
Change-Id: I76ffac6a0f0b1525c85d1995277d3ca22ef268e1
Reviewed-on: https://gerrit.libreoffice.org/21869
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-04 06:41:19 +00:00
a20f9388f1
-Werror=misleading-indentation (GCC 6)
...
Change-Id: Ia633b859df94ede325469ec8a20e7383d2a178d4
2016-01-13 17:20:28 +01:00
c93486bbb8
loplugin:loopvartoosmall
...
Change-Id: Ifa813b91b153004aa0fba42cdc209f4c4fd9578f
2016-01-12 08:59:48 +02:00
bbfeab3b13
loplugin:unusedmethods unused return value in include/basic
...
Change-Id: Ib1a006adaa92e257d40a20ff0d8beeb37e7c2fe0
Reviewed-on: https://gerrit.libreoffice.org/21360
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-01-12 06:40:03 +00:00
a5c2328313
BASIC: Store directly SbxVarEntry in SbxArray
...
Change-Id: I64ae6c2a45e0ed880f5b76ca2ad420d684fdfeb4
Reviewed-on: https://gerrit.libreoffice.org/21308
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org >
2016-01-12 06:06:49 +00:00
9a64d7f8dd
fix windows build
...
Change-Id: Ie00d2dd3fbf6ff498c652249797f8d01acef8a97
2016-01-11 11:59:18 +02:00
bc80f951c1
loplugin:unusedmethods unused return value in basic
...
Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
2016-01-11 10:49:24 +02:00
64d624b651
Fix typos
...
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com >
2016-01-10 14:17:20 +00:00
cb98c423bb
sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32
...
also avoid some explicit temporaries and group some checks.
Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b
2015-12-27 16:51:27 +01:00
4df183e2c9
BASIC: use c++ foreach loops when possible.
...
Change-Id: Ia1c734e26da88010eef40a4375c423b0765f43ae
Reviewed-on: https://gerrit.libreoffice.org/20423
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org >
2015-12-13 15:57:42 +00:00
caa080ea80
Adapt to true wchar_t in clang-cl
...
Change-Id: I215b8215108a268f969106db6f01f876bd0dc0a0
2015-11-28 08:44:39 +01:00
d9e6270392
loplugin:unnecessaryvirtual
...
update the plugin with lessons learned from the mergeclasses plugin and
re-run it
Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711
Reviewed-on: https://gerrit.libreoffice.org/20015
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-11-17 12:26:32 +00:00
fa91dd31f3
5th step to remove tools/rtti.hxx
...
tools/rtti.hxx removed
completed the interface of some Sdr.* Items
and removed pseudo items
Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Oliver Specht <oliver.specht@cib.de >
2015-11-11 10:49:30 +00:00
db17d3c17c
new loplugin: memoryvar
...
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr
Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-11-11 07:16:20 +00:00