[Libreoffice-commits] help.git: 2 commits - AllLangHelp_sbasic.mk source/auxiliary source/text

2019-07-14 Thread LibreOļ¬ƒciant (via logerrit)
 AllLangHelp_sbasic.mk|1 
 source/auxiliary/sbasic.tree |1 
 source/text/sbasic/python/python_2_basic.xhp |  151 +++
 source/text/sbasic/python/python_document_events.xhp |3 
 source/text/sbasic/python/python_examples.xhp|1 
 source/text/sbasic/python/python_screen.xhp  |1 
 source/text/scalc/01/func_switch.xhp |2 
 7 files changed, 158 insertions(+), 2 deletions(-)

New commits:
commit 3d1c81107309511f00a024a2e1a706a8bf96af47
Author: LibreOļ¬ƒciant 
AuthorDate: Wed Jul 3 19:43:26 2019 +0200
Commit: Olivier Hallot 
CommitDate: Mon Jul 15 02:23:47 2019 +0200

Python to Basic Help page

- Python x Basic inter-language calls
- Dialog handlers with Basic or Python

Amend 1
- place page at right path
- inter-page link calls
- entry in Contents
- Some changes in passive voice, articles in text

Change-Id: I5bb54150f534486c092036a8ed4fa7cc38cc9ef0
Reviewed-on: https://gerrit.libreoffice.org/75057
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index a1f3fed2c..1cac18fe4 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -372,6 +372,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/special_vba_func \
 helpcontent2/source/text/sbasic/shared/vbasupport \
 helpcontent2/source/text/sbasic/python/main \
+helpcontent2/source/text/sbasic/python/python_2_basic \
 helpcontent2/source/text/sbasic/python/python_dialogs \
 helpcontent2/source/text/sbasic/python/python_document_events \
 helpcontent2/source/text/sbasic/python/python_examples \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 8ecb215a0..308f10f99 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -338,6 +338,7 @@
 
 Programming with Python 
Scripts
 Python Programming 
Examples
+Calling Basic Macros from 
Python
 
 
 
diff --git a/source/text/sbasic/python/python_2_basic.xhp 
b/source/text/sbasic/python/python_2_basic.xhp
new file mode 100644
index 0..7be490b75
--- /dev/null
+++ b/source/text/sbasic/python/python_2_basic.xhp
@@ -0,0 +1,151 @@
+
+
+
+   
+ 
+Python to Basic
+/text/sbasic/python/python_2_basic.xhp
+ 
+   
+   
+ 
+Python;Calling Basic
+ParamArray
+ 
+  Calling Basic Macros from Python
+ You can call %PRODUCTNAME 
Basic macros from Python scripts, and notable features can be obtained in 
return such as:
+ 
+  Simple logging 
facilities out of Access2Base library Trace 
console,
+  InputBox and MsgBox screen I/O 
functions based on Basic to ease Python development,
+  Xray calls interrupting Python script execution 
to help inspect variables.
+ 
+ 
+ The %PRODUCTNAME 
Application Programming Interface (API) Scripting Framework supports 
inter-language script execution between Python and Basic, or other supported 
programming languages for that matter. Arguments can be passed back and fourth 
across calls, providing they represent primitives data types that both 
languages recognize, and assuming that the Scripting Framework converts them 
appropriately.
+ 
+ It is recommended to have knowledge of Python 
standard modules and %PRODUCTNAME API features prior to perform inter-language 
calls from Python to Basic, JavaScript or any other script engine.
+ When running Python scripts from an Integrated 
Development Environment (IDE), the %PRODUCTNAME nested Basic engine is absent. 
Avoid Python to %PRODUCTNAME Basic calls in this context. However Python 
environment and Universal Networks Objects (UNO) are fully available. Refer to 
Setting Up an 
Integrated IDE for Python for more information.
+ Retrieving %PRODUCTNAME Basic Scripts
+ %PRODUCTNAME Basic macros can 
be personal, shared, or embedded in documents. In order to execute them, Python 
run time needs to be provided with Basic macro locations. Implementing the 
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1script_1_1provider_1_1XScript.html;
 name ="external">com.sun.star.script.provider.XScriptProvider interface 
allows the retrieval of executable scripts:
+ 
+
+   
API;script.provider.MasterScriptProviderFactory: Retrieving 
Basic scripts
+   API;script.provider.XScript : Executing 
Basic scripts
+   API;XScriptProvider: Retrieving Basic 
scripts
+
+
+import uno
+from 
com.sun.star.script.provider 

[Libreoffice-commits] help.git: 2 commits - AllLangHelp_sbasic.mk source/auxiliary source/text

2017-07-24 Thread Olivier Hallot
 AllLangHelp_sbasic.mk  |2 
 source/auxiliary/sbasic.tree   |2 
 source/text/sbasic/shared/03140010.xhp |6 +-
 source/text/sbasic/shared/03140011.xhp |   72 
 source/text/sbasic/shared/03140012.xhp |   74 +
 source/text/sbasic/shared/special_vba_func.xhp |   13 
 6 files changed, 155 insertions(+), 14 deletions(-)

New commits:
commit aef2d0a3117abf45df98b11342799097ec36d796
Author: Olivier Hallot 
Date:   Mon Jul 24 01:48:32 2017 -0300

tdf#108680 Help page for VBA function SYD

Change-Id: Icec5d785a73b31313aaacd86252cae9cc9013043
Reviewed-on: https://gerrit.libreoffice.org/40354
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 10f5ad4e9..f1c388e8e 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -336,6 +336,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03140009 \
 helpcontent2/source/text/sbasic/shared/03140010 \
 helpcontent2/source/text/sbasic/shared/03140011 \
+helpcontent2/source/text/sbasic/shared/03140012 \
 helpcontent2/source/text/sbasic/shared/05060700 \
 helpcontent2/source/text/sbasic/shared/code-stubs \
 helpcontent2/source/text/sbasic/shared/keys \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index ae661528e..a0b31e2f8 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -246,6 +246,7 @@
 String Function 
[Runtime]
 Sub Statement 
[Runtime]
 Switch Function 
[Runtime]
+SYD Function [Runtime - 
VBA]
 Tan Function 
[Runtime]
 TimeSerial Function 
[Runtime]
 TimeValue Function 
[Runtime]
diff --git a/source/text/sbasic/shared/03140012.xhp 
b/source/text/sbasic/shared/03140012.xhp
new file mode 100644
index 0..a87685328
--- /dev/null
+++ b/source/text/sbasic/shared/03140012.xhp
@@ -0,0 +1,74 @@
+
+
+
+
+
+  
+SYD Function [Runtime - VBA]
+/text/sbasic/shared/03140012.xhp
+  
+
+
+
+
+
+
+
+  SYD function
+
+
+
+SYD 
Function [Runtime - VBA]
+Returns the 
arithmetic-declining depreciation rate.
+
+
+
+
+SYD (Cost as Double, Salvage as Double, Life as Double, Period 
as Double)
+
+
+Double
+
+Cost is the initial cost of an asset.
+Salvage is the value of an asset at the end of 
the depreciation.
+Life is the depreciation period determining the 
number of periods in the depreciation of the asset.
+Period is the period number for which you want to 
calculate the depreciation.
+
+
+
+
+REM * BASIC *
+Option VBASupport 1
+Sub ExampleSYD
+REM 
Calculate the yearly depreciation of an asset that cost $10,000 at
+REM 
the start of year 1, and has a salvage value of $1,000 after 5 
years.
+Dim syd_yr1 As Double
+REM 
Calculate the depreciation during year 1
+syd_yr1 = SYD( 1, 1000, 5, 1 )
+print 
syd_yr1 ' syd_yr1 is now equal to 3000.
+End Sub
+
+
+
+SYD 
function in CALC
+
+
+
+
+
\ No newline at end of file
diff --git a/source/text/sbasic/shared/special_vba_func.xhp 
b/source/text/sbasic/shared/special_vba_func.xhp
index 730b360bb..a1d6aa105 100644
--- a/source/text/sbasic/shared/special_vba_func.xhp
+++ b/source/text/sbasic/shared/special_vba_func.xhp
@@ -66,14 +66,7 @@
 
 
 
-
-
-  
-SYD
-  
-
-  VBA Functions;Date and Time Functions
-
+
 
 
 Date and time functions
commit aee97f023acc483b46ed41af4f7fabd796e8b4f0
Author: Olivier Hallot 
Date:   Mon Jul 24 01:30:46 2017 -0300

tdf#108679 Help page for VBA function SLN

Change-Id: Ida99588e30da477d8bc280492c5e90d52d24aee0
Reviewed-on: https://gerrit.libreoffice.org/40353
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index d576d7aa4..10f5ad4e9 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -335,6 +335,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03140008 \
 helpcontent2/source/text/sbasic/shared/03140009 \
 helpcontent2/source/text/sbasic/shared/03140010 \
+helpcontent2/source/text/sbasic/shared/03140011 \
 helpcontent2/source/text/sbasic/shared/05060700 \
 helpcontent2/source/text/sbasic/shared/code-stubs \
 helpcontent2/source/text/sbasic/shared/keys \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 26531c192..ae661528e 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -233,6 +233,7 @@
 Sgn Function 
[Runtime]
 Shell Function 
[Runtime]
 Sin Function 
[Runtime]
+SLN Function [Runtime - 
VBA]
 Space Function 
[Runtime]
 Split Function 
[Runtime]
 Sqr Function 
[Runtime]
diff --git a/source/text/sbasic/shared/03140010.xhp