From 93b7b1c8c79744b8d172dc0f2bbdf8a80e05abd8 Mon Sep 17 00:00:00 2001 From: Alain Romedenne Date: Wed, 28 Nov 2018 23:58:44 -0200 Subject: [PATCH] Help pages for VBA Enum statement Change-Id: I4f382453334aa964115d30d7e11e7d202d63a230 Reviewed-on: https://gerrit.libreoffice.org/64202 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- AllLangHelp_sbasic.mk | 1 + source/auxiliary/sbasic.tree | 1 + source/text/sbasic/shared/03120412.xhp | 2 - source/text/sbasic/shared/enum.xhp | 50 +++++++++++++++++++ .../text/sbasic/shared/special_vba_func.xhp | 9 +++- 5 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 source/text/sbasic/shared/enum.xhp diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk index 4b3323aac0..f1f3ad8964 100644 --- a/AllLangHelp_sbasic.mk +++ b/AllLangHelp_sbasic.mk @@ -354,6 +354,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\ helpcontent2/source/text/sbasic/shared/03170010 \ helpcontent2/source/text/sbasic/shared/05060700 \ helpcontent2/source/text/sbasic/shared/code-stubs \ + helpcontent2/source/text/sbasic/shared/enum \ helpcontent2/source/text/sbasic/shared/GetPathSeparator \ helpcontent2/source/text/sbasic/shared/keys \ helpcontent2/source/text/sbasic/shared/main0211 \ diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree index 03818d0e7a..b71d4c21b9 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -122,6 +122,7 @@ Do...Loop Statement Comparison Operators End Statement + Enum Statement [VBA] Environ Function Eof Function EqualUnoObjects Function diff --git a/source/text/sbasic/shared/03120412.xhp b/source/text/sbasic/shared/03120412.xhp index ff0462f23e..0bf1202fb5 100644 --- a/source/text/sbasic/shared/03120412.xhp +++ b/source/text/sbasic/shared/03120412.xhp @@ -32,8 +32,6 @@ StrReverse function - - StrReverse Function [VBA] Returns the string with the character order reversed. diff --git a/source/text/sbasic/shared/enum.xhp b/source/text/sbasic/shared/enum.xhp new file mode 100644 index 0000000000..f891c7cbfb --- /dev/null +++ b/source/text/sbasic/shared/enum.xhp @@ -0,0 +1,50 @@ + + + + + Enum Statement + /text/sbasic/shared/enum.xhp + + + + + + Enum statement + constants groups + enumerations + + +
+

Enum Statement [VBA]

+ Define enumerations or non UNO constant groups. An enumeration is a value list that facilitates programming and eases code logic review. +
+ + + Enum + Object Statement block + End Enum +

Parameters:

+ Within a given enumeration, fit together values that logically relate to one another. + + + Option VBASupport 1
+ Private Enum _WindowManager + W1ND0WS = 1 ' Windows + OS2PM = 2 ' OS/2 Presentation Manager + MACINTOSH = 3 ' Macintosh + MOTIF = 4 ' Motif Window Manager / Unix-like + OPENLOOK = 5 ' Open Look / Unix-like + End Enum + + Enumerated values are rendered to Long datatype. Basic functions are public accessors to enumerations. Enumeration names and value names must be unique within a library and across modules. + +
+ + Const statement, constants + + + Option VBASupport statement + +
+ +
diff --git a/source/text/sbasic/shared/special_vba_func.xhp b/source/text/sbasic/shared/special_vba_func.xhp index 634891e7a8..54762cc8e2 100644 --- a/source/text/sbasic/shared/special_vba_func.xhp +++ b/source/text/sbasic/shared/special_vba_func.xhp @@ -34,11 +34,18 @@ -Exclusive VBA functions +Exclusive VBA Functions and Statements %PRODUCTNAME Basic adds this set of functions when VBA support is enabled These exclusive VBA functions are enabled when the statement Option VBASupport 1 is placed before the first macro of a %PRODUCTNAME Basic module. +
+ + VBA Statements + +

VBA Statements

+ +