summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-02-21 18:26:20 +0300
committerJustin Luth <justin_luth@sil.org>2017-02-27 04:25:45 +0000
commit51eb2ad7a05938b69aa7874caf17079ed6c19e31 (patch)
tree65ce2f6192d3efca094981f3cafc460114aac153 /basic
parentaf871d02914c9fc6a08079f67b4af71a198e166a (diff)
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>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/dim.cxx3
-rw-r--r--basic/source/comp/token.cxx1
-rw-r--r--basic/source/inc/token.hxx2
3 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index dc6522c9bfc3..1ea7ce3c6ca5 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -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 );
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index f422147950af..b4de0f0d024a 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -138,6 +138,7 @@ static const TokenTable aTokTable_Basic [] = {
{ PRINT, "Print" },
{ PRIVATE, "Private" },
{ PROPERTY, "Property" },
+ { PTRSAFE, "PtrSafe" },
{ PUBLIC, "Public" },
{ RANDOM, "Random" },
{ READ, "Read" },
diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx
index f9d7c0d32ab5..3799d2963582 100644
--- a/basic/source/inc/token.hxx
+++ b/basic/source/inc/token.hxx
@@ -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)