diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk index 8515bb65a7..4b3323aac0 100644 --- a/AllLangHelp_sbasic.mk +++ b/AllLangHelp_sbasic.mk @@ -360,6 +360,9 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\ helpcontent2/source/text/sbasic/shared/main0601 \ helpcontent2/source/text/sbasic/shared/special_vba_func \ helpcontent2/source/text/sbasic/shared/vbasupport \ + helpcontent2/source/text/sbasic/python/main0000 \ + helpcontent2/source/text/sbasic/python/python_ide \ + helpcontent2/source/text/sbasic/python/python_locations \ )) # vim: set noet sw=4 ts=4: diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree index fbae74d0de..03818d0e7a 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -1,320 +1,327 @@ - - -%PRODUCTNAME Basic Help -Programming with %PRODUCTNAME Basic -%PRODUCTNAME Basic Glossary -Basics -Syntax -%PRODUCTNAME Basic IDE -IDE Overview -The Basic Editor -Watch Window -Macro Toolbar -Macro -Working with VBA Macros - - -Using Procedures and Functions -Libraries, Modules and Dialogs - -Screen I/O Functions -File I/O Functions -Date and Time Functions -Error-Handling Functions -Logical Operators -Mathematical Operators -Numeric Functions -Controlling Program Execution -Variables -Basic Constants -Comparison Operators -Strings -Exclusive VBA functions -Other Commands - - -Abs Function -AND Operator -Array Function -Asc Function -AscW Function [VBA] -Atn Function -Beep Statement -Blue Function -CBool Function -CByte Function -CCur Function -CDateFromUnoDateTime Function -CDateToUnoDateTime Function -CDateFromUnoTime Function -CDateToUnoTime Function -CDateFromUnoDate Function -CDateToUnoDate Function -CDateFromIso Function -CDateToIso Function -CDate Function -CDbl Function -CDec Function -CInt Function -CLng Function -CSng Function -CStr Function -Call Statement -ChDir Statement -ChDrive Statement -Choose Function -Chr Function -ChrW Function [VBA] -Close Statement -Comparison Operators -Const Statement -ConvertFromURL Function -ConvertToURL Function -Cos Function -CreateObject Function -CreateUnoDialog Function -CreateUnoListener Function -CreateUnoService Function -CreateUnoStruct Function -CreateUnoValue Function -CurDir Function -CVar Function -CVErr Function -DateAdd Function -DateDiff Function -DatePart Function -DateSerial Function -DateValue Function -Date Statement -Day Function -DDB Function [VBA] -Declare Statement -DefBool Statement -DefDate Statement -DefDbl Statement -DefInt Statement -DefLng Statement -DefObj Statement -DefVar Statement -DimArray Function -Dim Statement -Dir Function -Do...Loop Statement -Comparison Operators -End Statement -Environ Function -Eof Function -EqualUnoObjects Function -Eqv Operator -Erl Function -Err Function -Error Function -Error-Handling Functions -Exit Statement -Exp Function -FileAttr Function -FileCopy Statement -FileDateTime Function -FileExists Function -FileLen Function -FindObject Function -FindPropertyObject Function -Fix Function -For...Next Statement -Format Function -FormatDateTime Function [VBA] -FormatNumber Function [VBA] -FreeFile Function -FreeLibrary Function -Function Statement -Further Statements -FV Function [VBA] -Generating Random Numbers -GetAttr Function -GetDefaultContext Function -GetGUIType Function -GetProcessServiceManager Function -GetPathSeparator Function -GetSolarVersion Function -GetSystemTicks Function -Get Statement -GlobalScope -GoSub...Return Statement -GoTo Statement -Green Function -HasUnoInterfaces Function -Hex Function -Hour Function -IIf Statement -If...Then...Else Statement -Imp-Operator -InStr Function -InStrRev Function [VBA] -Input Function [VBA] -InputBox Function -Input# Statement -Int Function -IPmt Function [VBA] -IRR Function [VBA] -IsArray Function -IsDate Function -IsEmpty Function -IsMissing function -IsNull Function -IsNumeric Function -IsObject Function -IsUnoStruct Function -Join Function -Kill Statement -LBound Function -LCase Function -LSet Statement -LTrim Function -Left Function -Len Function -Let Statement -Line Input # Statement -Loc Function -Lof Function -Log Function -Mid Function, Mid Statement -Minute Function -MIRR Function [VBA] -MkDir Statement -Mod-Operator -Month Function -MonthName Function [VBA] -MsgBox Function -MsgBox Statement -Name Statement -Not-Operator -Now Function -NPer Function [VBA] -NPV Function [VBA] -Numeric Functions -Oct Function -On Error GoTo ... Resume Statement -On...GoSub Statement; On...GoTo Statement -Open Statement -Option Base Statement -Option Explicit Statement -Option VBASupport Statement -Optional (in Function Statement) -Or-Operator -Pmt Function [VBA] -PPmt Function [VBA] -PV Function [VBA] -Print Statement -Public Statement -Put Statement -QBColor Function -Rate Function [VBA] -RGB Function -RSet Statement -RTrim Function -Randomize Statement -ReDim Statement -Red Function -Rem Statement -Reset Statement -Right Function -RmDir Statement -Rnd Function -Round Function [VBA] -Second Function -Seek Function -Seek Statement -Select...Case Statement -SetAttr Statement -Set Statement -Sgn Function -Shell Function -Sin Function -SLN Function [VBA] -Space Function -Split Function -Sqr Function -Square Root Calculation -Static Statement -Stop Statement -StrComp Function -Str Function -StrReverse Function [VBA] -String Function -Sub Statement -Switch Function -SYD Function [VBA] -Tan Function -TimeSerial Function -TimeValue Function -Time Statement -Timer Function -Trigonometric Functions -Trim Function -TwipsPerPixelX Function -TwipsPerPixelY Function -Type Statement -TypeName Function; VarType Function -UBound Function -UCase Function -Val Function -Wait Statement -WeekDay Function -WeekdayName Function [VBA] -While...Wend Statement -With Statement -Write Statement -Xor-Operator -Year Function -"-" Operator -"*" Operator -"+" Operator -"/" Operator -"^" Operator - - -Tools Library -Depot Library -Euro Library -FormWizard Library -Gimmicks Library -Schedule Library -ScriptBindingLibrary Library -Template Library - - - -Recording a Macro -Changing the Properties of Controls in the Dialog Editor -Creating Controls in the Dialog Editor -Programming Examples for Controls in the Dialog Editor -Opening a Dialog With Program Code -Creating a Basic Dialog -Organizing Libraries and Modules -Using Variables -Using Objects -Debugging a Basic Program -Event-Driven Macros -Access2Base, the API for Base users - - + + + + %PRODUCTNAME Basic Help + Programming with %PRODUCTNAME Basic + %PRODUCTNAME Basic Glossary + Basics + Syntax + %PRODUCTNAME Basic IDE + IDE Overview + The Basic Editor + Watch Window + Macro Toolbar + Macro + Working with VBA Macros + + + Using Procedures and Functions + Libraries, Modules and Dialogs + + Screen I/O Functions + File I/O Functions + Date and Time Functions + Error-Handling Functions + Logical Operators + Mathematical Operators + Numeric Functions + Controlling Program Execution + Variables + Basic Constants + Comparison Operators + Strings + Exclusive VBA functions + Other Commands + + + Abs Function + AND Operator + Array Function + Asc Function + AscW Function [VBA] + Atn Function + Beep Statement + Blue Function + CBool Function + CByte Function + CCur Function + CDateFromUnoDateTime Function + CDateToUnoDateTime Function + CDateFromUnoTime Function + CDateToUnoTime Function + CDateFromUnoDate Function + CDateToUnoDate Function + CDateFromIso Function + CDateToIso Function + CDate Function + CDbl Function + CDec Function + CInt Function + CLng Function + CSng Function + CStr Function + Call Statement + ChDir Statement + ChDrive Statement + Choose Function + Chr Function + ChrW Function [VBA] + Close Statement + Comparison Operators + Const Statement + ConvertFromURL Function + ConvertToURL Function + Cos Function + CreateObject Function + CreateUnoDialog Function + CreateUnoListener Function + CreateUnoService Function + CreateUnoStruct Function + CreateUnoValue Function + CurDir Function + CVar Function + CVErr Function + DateAdd Function + DateDiff Function + DatePart Function + DateSerial Function + DateValue Function + Date Statement + Day Function + DDB Function [VBA] + Declare Statement + DefBool Statement + DefDate Statement + DefDbl Statement + DefInt Statement + DefLng Statement + DefObj Statement + DefVar Statement + DimArray Function + Dim Statement + Dir Function + Do...Loop Statement + Comparison Operators + End Statement + Environ Function + Eof Function + EqualUnoObjects Function + Eqv Operator + Erl Function + Err Function + Error Function + Error-Handling Functions + Exit Statement + Exp Function + FileAttr Function + FileCopy Statement + FileDateTime Function + FileExists Function + FileLen Function + FindObject Function + FindPropertyObject Function + Fix Function + For...Next Statement + Format Function + FormatDateTime Function [VBA] + FormatNumber Function [VBA] + FreeFile Function + FreeLibrary Function + Function Statement + Further Statements + FV Function [VBA] + Generating Random Numbers + GetAttr Function + GetDefaultContext Function + GetGUIType Function + GetProcessServiceManager Function + GetPathSeparator Function + GetSolarVersion Function + GetSystemTicks Function + Get Statement + GlobalScope + GoSub...Return Statement + GoTo Statement + Green Function + HasUnoInterfaces Function + Hex Function + Hour Function + IIf Statement + If...Then...Else Statement + Imp-Operator + InStr Function + InStrRev Function [VBA] + Input Function [VBA] + InputBox Function + Input# Statement + Int Function + IPmt Function [VBA] + IRR Function [VBA] + IsArray Function + IsDate Function + IsEmpty Function + IsMissing function + IsNull Function + IsNumeric Function + IsObject Function + IsUnoStruct Function + Join Function + Kill Statement + LBound Function + LCase Function + LSet Statement + LTrim Function + Left Function + Len Function + Let Statement + Line Input # Statement + Loc Function + Lof Function + Log Function + Mid Function, Mid Statement + Minute Function + MIRR Function [VBA] + MkDir Statement + Mod-Operator + Month Function + MonthName Function [VBA] + MsgBox Function + MsgBox Statement + Name Statement + Not-Operator + Now Function + NPer Function [VBA] + NPV Function [VBA] + Numeric Functions + Oct Function + On Error GoTo ... Resume Statement + On...GoSub Statement; On...GoTo Statement + Open Statement + Option Base Statement + Option Explicit Statement + Option VBASupport Statement + Optional (in Function Statement) + Or-Operator + Pmt Function [VBA] + PPmt Function [VBA] + PV Function [VBA] + Print Statement + Public Statement + Put Statement + QBColor Function + Rate Function [VBA] + RGB Function + RSet Statement + RTrim Function + Randomize Statement + ReDim Statement + Red Function + Rem Statement + Reset Statement + Right Function + RmDir Statement + Rnd Function + Round Function [VBA] + Second Function + Seek Function + Seek Statement + Select...Case Statement + SetAttr Statement + Set Statement + Sgn Function + Shell Function + Sin Function + SLN Function [VBA] + Space Function + Split Function + Sqr Function + Square Root Calculation + Static Statement + Stop Statement + StrComp Function + Str Function + StrReverse Function [VBA] + String Function + Sub Statement + Switch Function + SYD Function [VBA] + Tan Function + TimeSerial Function + TimeValue Function + Time Statement + Timer Function + Trigonometric Functions + Trim Function + TwipsPerPixelX Function + TwipsPerPixelY Function + Type Statement + TypeName Function; VarType Function + UBound Function + UCase Function + Val Function + Wait Statement + WeekDay Function + WeekdayName Function [VBA] + While...Wend Statement + With Statement + Write Statement + Xor-Operator + Year Function + "-" Operator + "*" Operator + "+" Operator + "/" Operator + "^" Operator + + + Tools Library + Depot Library + Euro Library + FormWizard Library + Gimmicks Library + Schedule Library + ScriptBindingLibrary Library + Template Library + + + + Recording a Macro + Changing the Properties of Controls in the Dialog Editor + Creating Controls in the Dialog Editor + Programming Examples for Controls in the Dialog Editor + Opening a Dialog With Program Code + Creating a Basic Dialog + Organizing Libraries and Modules + Using Variables + Using Objects + Debugging a Basic Program + Event-Driven Macros + Access2Base, the API for Base users + + + + + %PRODUCTNAME Python Scripts Help + + + diff --git a/source/text/sbasic/python/main0000.xhp b/source/text/sbasic/python/main0000.xhp new file mode 100644 index 0000000000..989ea22d0e --- /dev/null +++ b/source/text/sbasic/python/main0000.xhp @@ -0,0 +1,39 @@ + + + + + + + Python Scripts + /text/sbasic/python/main0000.xhp + + + + + macros;Python scripts + Python;macros + + %PRODUCTNAME Python Scripts Help + +
+ %PRODUCTNAME provides an Application Programming Interface (API) that allows controlling the $[officename] components with different programming languages by using the $[officename] Software Development Kit (SDK). For more information about the $[officename] API and the Software Development Kit, visit https://api.libreoffice.org + This help section explains the most common Python script functions for %PRODUCTNAME. For more in-depth information please refer to the Designing & Developing Python Applications on the Wiki. +
+ + Working with Python Scripts in %PRODUCTNAME. + + + Programming with Python Scripts + + Creating a dialog + Programming Examples + + +
diff --git a/source/text/sbasic/python/python_ide.xhp b/source/text/sbasic/python/python_ide.xhp new file mode 100644 index 0000000000..05645cc501 --- /dev/null +++ b/source/text/sbasic/python/python_ide.xhp @@ -0,0 +1,32 @@ + + + + + + + IDE for Python + /text/sbasic/python/python_ide.xhp + + + +
+ + + python;IDE - integrated development environment + python;editor + + Setting up an Integrated Development Environment (IDE) for Python + Writing Python macros requires extra configuration steps in order set an IDE of choice. + +
+ + Unlike Basic language macros development in %PRODUCTNAME, writing Python macros requires extra configuration steps in order to build your IDE of choice. In return you are provided with flexible design experience built upon your Python developing preferences or habits. Hereafter are IDE setup guidelines that range from beginner to advanced user. + +
diff --git a/source/text/sbasic/python/python_locations.xhp b/source/text/sbasic/python/python_locations.xhp new file mode 100644 index 0000000000..f8bb85ff52 --- /dev/null +++ b/source/text/sbasic/python/python_locations.xhp @@ -0,0 +1,29 @@ + + + + + + + Location of Python Scripts + /text/sbasic/python/python_locations.xhp + + + +
+ Location of Python scripts + The Python script files are simply stored within the file system. + +
+ + %PRODUCTNAME installation share + %PRODUCTNAME user profile + Embedded in the document + +
diff --git a/source/text/shared/00/00000406.xhp b/source/text/shared/00/00000406.xhp index 1456031b95..7189aa00ea 100644 --- a/source/text/shared/00/00000406.xhp +++ b/source/text/shared/00/00000406.xhp @@ -77,6 +77,9 @@ Choose Tools - Media Player. Choose Tools - Macros - Organize Macros - %PRODUCTNAME Basic, or press OptionAlt+F11 (if not assigned by your system). + Choose Tools - Macros - Organize Macros - BeanShell. + Choose Tools - Macros - Organize Macros - JavaScript. + Choose Tools - Macros - Organize Macros - Python.
Choose Tools - Macros - Record Macro.
diff --git a/source/text/shared/01/06130000.xhp b/source/text/shared/01/06130000.xhp index 54f3bee11c..0207188eea 100644 --- a/source/text/shared/01/06130000.xhp +++ b/source/text/shared/01/06130000.xhp @@ -119,9 +119,12 @@ Importchanged in #i64102 Locate that $[officename] Basic library that you want to add to the current list, and then click Open. -Scripts +Scripts -To open the BeanShell Macros dialog box, choose Tools - Macros - Organize Macros - BeanShell. To open the JavaScript dialog box, choose Tools - Macros - Organize Macros - JavaScript. +
+ + +
Export Opens a dialog to export the selected library either as an extension or as a Basic library. @@ -149,6 +152,15 @@ Select a macro or script from "user", "share", or an open document. To view the contents of a library, double-click an entry in the list. Macro name Click a script, and then click a command button. +Python +
+ +
+Macros +Select a macro or script from "user", "share", or an open document. +Run +To run a script, select a script in the list, and then click Run. +