Refs #i112383#, #i117960#, and #i126272# - Basic lang backports #150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are a few fixes for the Basic compiler that are in trunk and AOO42X but not backported to AOO41X.
Can't cherry-pick due to file changes and two commits changed the same test file.
Each of these are covered by a test now that I've added one for i126272.
Descriptions and original commit messages and links follow:
Fix for error in Convert to Long function.
original commit:
#i112383# CLng('&HFFFFFFFF') fails on 64-bits rather than returning -1
Found-by: andrew
Patch-by: Damjan Jovanovic
323c350
Fix for using certain keywords as variable names in single line if statements
Original commit:
#i117960# Basic: Line Input doesn't work in single-line If
i92642 added the ability to use certain keywords as variable names (eg. name = 1, line = 'hi'),
but also caused a regression where "Line Input" is broken in single-line If statements.
This patch fixes that by allowing Then and Else to also be the start-of-line tokens expected to
immediately preceed the 'Line' token in order for that 'Line' token to be recognized a keyword instead
of a variable name. Also added FVT spreadsheet tests for 'Line' as both a variable name and as 'Line Input'.
Patch by: Damjan Jovanovic
725d867
Basic compile error when comment is at the end of a single line if then else statement
original commit:
#i126272# OpenOffice.org Basic compile error : if statement followed by End If - in next Line ???
Allow the Else in a single-line If statement to be terminated by a comment instead of only EOL.
Patch by: Damjan Jovanovic
0739618