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:
@@ -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 );
|
||||
|
||||
@@ -138,6 +138,7 @@ static const TokenTable aTokTable_Basic [] = {
|
||||
{ PRINT, "Print" },
|
||||
{ PRIVATE, "Private" },
|
||||
{ PROPERTY, "Property" },
|
||||
{ PTRSAFE, "PtrSafe" },
|
||||
{ PUBLIC, "Public" },
|
||||
{ RANDOM, "Random" },
|
||||
{ READ, "Read" },
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user