Commit Graph

85 Commits

Author SHA1 Message Date
Arnaud Versini
8414d8434b Basic: scanner should'nt use 0xFF mask on characters
Change-Id: I2fd3f70c3d8e411430f84c7383da7ab8700513bd
Reviewed-on: https://gerrit.libreoffice.org/14682
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-03-25 13:41:25 +00:00
Arnaud Versini
78f25d565e Basic : Partially rewrite hex and octal constant reading.
Change-Id: I42f72e7b1ca897aba71950841f90b501cf3b6dc2
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-02-09 13:18:31 +01:00
Arnaud Versini
4b9a9ce8a0 Use rtl/character.hxx in basic module when possible
Change-Id: I1296541ac1a6a65a613818a1264c2b7482915e64
Reviewed-on: https://gerrit.libreoffice.org/14170
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2015-01-31 09:48:27 +00:00
Stephan Bergmann
39ddeb53c0 basic: Use appropriate OUString functions on string constants
Change-Id: I43f99ba6759b0f8f633af784beaec583dbab0b9e
2014-12-18 14:12:23 +01:00
Michael Weghorn
93124f7710 reduce scope of local variables
This eliminates some of the warnings from Cppcheck report of
2014-11-29.

Change-Id: Ic4bf3bd8f5982d2ea2f25a28c0dd61084c59af11
Reviewed-on: https://gerrit.libreoffice.org/13331
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-12-06 14:12:31 +00:00
Luboš Luňák
dc7ca91a04 avoid calling OUString::copy() with length being -1
Which asserts in dbgutil build.

Change-Id: I0f8205ae98c5a57c430b7d8a574e4c0019855841
2014-10-01 11:45:01 +02:00
Stephan Bergmann
145b64c4eb Avoid undefined signed integer overflow
Change-Id: I3f32ea88dbb34a05baccba49c15b6691d923753e
2014-05-28 14:34:13 +02:00
Noel Grandin
e9c4ee996d remove unnecessary use of OUString constructor in BASIC module
Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44
2013-11-11 11:21:25 +02:00
Noel Grandin
8396cce9b5 clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.

Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-23 13:12:55 +02:00
Eike Rathke
66a96c8274 clean up SbiScanner::NextSym() a little, fdo#70319 follow-up
Number recognition was suboptimal and didn't properly resync scan
positions after having detected an error.

Change-Id: I278fdaaf17ed40560785deaaad0e3412a249d90a
2013-10-15 12:52:15 +02:00
Caolán McNamara
470af978eb CID#707648 uninitialized member
Change-Id: Ib8371710dd6c856b143782ca9c18f4ee76798f0e
2013-10-07 11:46:58 +01:00
Noel Power
4c9a08e78b fix for fdo#62323 bad conversion of Hex strings for certain values
Basic hex literals are basic Integer ( e.g. 4 byte ) types with
-2,147,483,648 through 2,147,483,647 range. Interally the scanner
was using a long to form/scan the literal, this led to bad behaviour
on 64bit linux ( where normally long -> 8 bytes )

Change-Id: I1d0fcc55ed0eda636da1445329737d1684e69f33
2013-08-20 08:59:54 +01:00
Eike Rathke
caecf6102f SbiScanner::NextSym: check status after rtl_math_uStringToDouble()
For example, 10e308 is overflow, not 0 ...

Change-Id: Ib7d622865bfb73581732bda45c76e078ee7d05d0
2013-03-21 19:32:45 +01:00
Marcos Paulo de Souza
c40cd8a4f2 Remove all occurences of RTL_* and ::rtl prefix from basic
This is a big commit, so thanks for your time reviewing this :)

Conflicts:
	basic/source/sbx/sbxscan.cxx

Change-Id: Ib9bc710b87475b5695764557321e5dcef25e5933
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-03 10:07:39 +01:00
Takeshi Abe
533194a6b3 bErrors was always true
Change-Id: I193029e1fb2434161679498fa0ba7e1c7c0ab3ba
2012-08-12 09:16:59 +09:00
Julien Nabet
df579b1f66 Fix "Boolean result is used in bitwise operation"
Change-Id: Ifed0d87da3ac5bd19a0285f1074f2eeec5717f05
2012-08-06 16:45:47 +02:00
Michael Meeks
63c508e3e8 re-base on ALv2 code. Includes:
118568: switch to using ucpp
    Patch contributed by Juergen Schmidt
    http://svn.apache.org/viewvc?view=revision&revision=1209396
2012-07-18 09:29:19 +01:00
Caolán McNamara
7d042c50f5 use rtl_ustr_getLength instead of a temporary string just to find length
Change-Id: Ibbf777e57af6b98611cb5dce5a31517de80305b7
2012-06-12 13:35:49 +01:00
Caolán McNamara
bc069413e5 WaE: return SYMBOL -> return true
has been return SYMBOL since initial checkin in 2000,
SYMBOL is a non-0 enum so return true here instead
2012-04-24 15:44:37 +01:00
Noel Power
634b211632 allow keyword Append to be used as a variable. bnc#745930
statements like
  Dim AppEnd As Integer
will generate compiler errors because Append is a special symbol/keyword in libreoffice basic. This restriction though is too strict because 'Append' is only such a keyword when used within the 'Open' statement ( where it refers to one of the possible values for a paramater ).
2012-02-21 12:26:29 +00:00
Takeshi Abe
6073c31fe8 Replaced String by rtl::OUString in SbiScanner 2012-01-31 02:29:23 +09:00
August Sodora
746b39e4d1 Remove uses of pLine in scanner 2012-01-15 23:30:30 -05:00
August Sodora
944140ae44 Remove uses of pLine in scanner 2012-01-14 18:39:58 -05:00
August Sodora
e4d6dfae33 Remove use of pLine in scanner 2012-01-14 18:39:57 -05:00
August Sodora
679a8e1cfd Remove use of pLine in scanner 2012-01-14 18:39:57 -05:00
August Sodora
28f16e4c25 Only set bSpaces once here 2012-01-09 00:54:30 -05:00
August Sodora
ed5b6ace89 Remove use of pLine in scanner 2012-01-09 00:54:30 -05:00
August Sodora
c3259776aa Prefer prefix increment 2012-01-09 00:54:30 -05:00
August Sodora
dd7eeed27d Remove uses of pLine in scanner 2012-01-08 11:48:08 -05:00
August Sodora
d3a52bd7b3 scanner cleanup for consistency 2012-01-07 18:33:32 -05:00
August Sodora
1e04280bce Refactor readLine in scanner 2012-01-07 18:33:31 -05:00
Caolán McNamara
5258afdc70 bUsedForHilite always false 2011-12-13 10:11:43 +00:00
August Sodora
971bf1aa4c Use sal_Int32 in all these places 2011-12-05 17:42:26 -05:00
August Sodora
40be618fb3 Refactor scanAlphanumeric 2011-12-04 22:13:24 -05:00
August Sodora
0bcc6c93b8 Use appropriate datatypes here too 2011-12-04 18:09:07 -05:00
August Sodora
cc744ef568 Use sal_uInt16 here 2011-12-04 17:29:16 -05:00
Norbert Thiebaud
2ca38d3c7c rmove include of pch header in basic 2011-11-27 12:55:59 -06:00
August Sodora
7cc258f35b Refactor BasicCharClass out from scanner and make it a singleton 2011-11-20 17:16:35 -05:00
August Sodora
edc4118e18 Fix scanning bug 2011-11-18 22:27:45 -05:00
August Sodora
76f4712c7d Remove uses of pLine in scanner 2011-11-18 21:40:39 -05:00
August Sodora
53a662f530 Refactoring in scanner 2011-11-18 21:40:39 -05:00
August Sodora
2edba12412 sal_Bool to bool 2011-11-18 01:53:30 -05:00
August Sodora
c8f0503a1b Cleanup GetSuffixType in basic scanner 2011-11-18 01:20:36 -05:00
August Sodora
f3098a52b9 Removed unused headers 2011-11-17 23:06:47 -05:00
Jan Holesovsky
548fc5db7c A small cleanup after the String -> OUString conversion. 2011-10-21 18:08:49 +02:00
Michael Meeks
e31496c938 misc trivial tweaks, and documentation addition 2011-10-21 10:08:58 +01:00
August Sodora
034350a509 String->OUString, with accompanying tests 2011-10-21 10:08:57 +01:00
Allmann-Rahn
8b11173f34 Translated German comments, removed redundant ones till cairo (incl.) 2011-08-31 16:29:43 +03:00
Francisco Saito
e60d365c86 drop bogus executable flag from [ch]xx/bas/asm files 2011-03-29 21:40:28 +01:00
Xisco Faulí
f6e0527033 Remove most of dead code inlibs-core (basic) 2011-03-21 12:55:58 +01:00