VBA: accept the PtrSafe keyword

64bit MSOffice VBA7 requires the PtrSafe Declare attribute
 #If Win64 Then
   Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll"
 #Else
   Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll"
 #End If

Accept this new keyword to enable compatibility with macros adjusted
to work in a 64bit MSOffice environment.

Change-Id: I9e64cb5339075cdda2ec91e8128fd0a35d458432
Reviewed-on: https://gerrit.libreoffice.org/34519
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
This commit is contained in:
Justin Luth
2017-02-27 04:25:45 +00:00
parent af871d0291
commit 51eb2ad7a0
3 changed files with 5 additions and 1 deletions
+3
View File
@@ -1012,6 +1012,9 @@ void SbiParser::Declare()
void SbiParser::DefDeclare( bool bPrivate )
{
Next();
if( eCurTok == PTRSAFE )
Next();
if( eCurTok != SUB && eCurTok != FUNCTION )
{
Error( ERRCODE_BASIC_UNEXPECTED, eCurTok );
+1
View File
@@ -138,6 +138,7 @@ static const TokenTable aTokTable_Basic [] = {
{ PRINT, "Print" },
{ PRIVATE, "Private" },
{ PROPERTY, "Property" },
{ PTRSAFE, "PtrSafe" },
{ PUBLIC, "Public" },
{ RANDOM, "Random" },
{ READ, "Read" },
+1 -1
View File
@@ -88,7 +88,7 @@ enum SbiToken {
FIRSTEXTRA,
NUMBER=FIRSTEXTRA, FIXSTRING, SYMBOL, CDECL_, BYVAL, BYREF,
OUTPUT, RANDOM, APPEND, BINARY, ACCESS,
LOCK, READ, PRESERVE, BASE, ANY, LIB, OPTIONAL_,
LOCK, READ, PRESERVE, BASE, ANY, LIB, OPTIONAL_, PTRSAFE,
BASIC_EXPLICIT, COMPATIBLE, CLASSMODULE, PARAMARRAY, WITHEVENTS,
// from here there are JavaScript-tokens (same enum so that same type)