From bfa3cfb08e182fff0f5b19b5e69c5472ce38327a Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Thu, 22 Jun 2017 22:41:41 -0300 Subject: Rearrange help page for VBA functions Save work for translators. Change-Id: I2072d85443ba32f10235123f3ba2b681182127d2 Reviewed-on: https://gerrit.libreoffice.org/39138 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- source/text/sbasic/shared/00000003.xhp | 30 +++++++++++--- source/text/sbasic/shared/03120111.xhp | 18 ++++----- source/text/sbasic/shared/03120112.xhp | 14 +++---- source/text/sbasic/shared/03120411.xhp | 16 +++----- source/text/sbasic/shared/03120412.xhp | 18 ++++----- source/text/sbasic/shared/03140000.xhp | 16 +++----- source/text/sbasic/shared/03140001.xhp | 16 +++----- source/text/sbasic/shared/03140002.xhp | 14 +++---- source/text/sbasic/shared/03140003.xhp | 14 +++---- source/text/sbasic/shared/03140004.xhp | 14 +++---- source/text/sbasic/shared/03140005.xhp | 14 +++---- source/text/sbasic/shared/special_vba_func.xhp | 56 ++++++++------------------ 12 files changed, 98 insertions(+), 142 deletions(-) (limited to 'source/text/sbasic') diff --git a/source/text/sbasic/shared/00000003.xhp b/source/text/sbasic/shared/00000003.xhp index bd3a2810d5..cebb51745f 100644 --- a/source/text/sbasic/shared/00000003.xhp +++ b/source/text/sbasic/shared/00000003.xhp @@ -31,7 +31,8 @@ Information
-You can set the locale used for controlling the formatting numbers, dates and currencies in $[officename] Basic in %PRODUCTNAME - PreferencesTools - Options - Language Settings - Languages. In Basic format codes, the decimal point (.) is always used as placeholder for the decimal separator defined in your locale and will be replaced by the corresponding character. +You can set the locale used for controlling the formatting numbers, dates and currencies in $[officename] Basic in %PRODUCTNAME - Preferences +Tools - Options - Language Settings - Languages. In Basic format codes, the decimal point (.) is always used as placeholder for the decimal separator defined in your locale and will be replaced by the corresponding character. The same applies to the locale settings for date, time and currency formats. The Basic format code will be interpreted and displayed according to your locale setting.
@@ -183,11 +184,28 @@ This function is enabled with the statement Option VBASupport 1 placed before the executable program code in a module. +
+ +Syntax: +
+
-Syntax: -Return value: -Parameters: -Example: + +
+ +Return value: +
+ +
+ +Parameters: +
+ +
+ +Example: +
+VBA financial functions
@@ -320,4 +338,4 @@
- + \ No newline at end of file diff --git a/source/text/sbasic/shared/03120111.xhp b/source/text/sbasic/shared/03120111.xhp index d220006baa..38f10a5771 100644 --- a/source/text/sbasic/shared/03120111.xhp +++ b/source/text/sbasic/shared/03120111.xhp @@ -28,7 +28,7 @@ -
+
AscW function @@ -38,22 +38,18 @@ Returns the Unicode value of the first character in a string expression.
- -Syntax: + -AscW (Text As String) +AscW (Text As String) - -Return value: + Integer - -Parameters: + Text: Any valid string expression. Only the first character in the string is relevant. Use the AscW function to replace keys with Unicode values. If the AscW function encounters a blank string, %PRODUCTNAME Basic reports a run-time error. Returned values are between 0 and 65535. - -Example: + Sub ExampleAscW Print AscW("A") ' returns 65 @@ -69,4 +65,4 @@
- \ No newline at end of file + diff --git a/source/text/sbasic/shared/03120112.xhp b/source/text/sbasic/shared/03120112.xhp index ee0c9828b5..0562752224 100644 --- a/source/text/sbasic/shared/03120112.xhp +++ b/source/text/sbasic/shared/03120112.xhp @@ -28,7 +28,7 @@ -
+
ChrW function @@ -38,22 +38,18 @@ Returns the Unicode character that corresponds to the specified character code.
- -Syntax: + ChrW(Expression As Integer) - -Return value: + String - -Parameters: + Expression: Numeric variables that represent a valid 16 bit Unicode value (0-65535). An empty value returns error code 5. A value out of the range [0,65535] returns error code 6. - -Example: + Sub ExampleChrW ' This example inserts the greek letter Alpha and Omega in a string. diff --git a/source/text/sbasic/shared/03120411.xhp b/source/text/sbasic/shared/03120411.xhp index c0ab1daada..0e1e7c004f 100644 --- a/source/text/sbasic/shared/03120411.xhp +++ b/source/text/sbasic/shared/03120411.xhp @@ -28,7 +28,7 @@ -
+
InStrRev function @@ -39,16 +39,13 @@
The InStrRev function returns the position at which the match was found, from the right. If the string was not found, the function returns 0. - -Syntax: + InStrRev (Text1 As String, Text2 As String [,Start As Long] [, Compare As Integer]) - -Return value: + Long - -Parameters: + Text1: The string expression that you want to search. Text2: The string expression that you want to search for. Start: Optional numeric expression that marks the position from the left in a string where the search for the specified substring starts. If you omit this parameter, the search starts at the last character of the string. The maximum allowed value is 65535. @@ -58,8 +55,7 @@ To avoid a run-time error, do not set the Compare parameter if the first return parameter is omitted. - -Example: + Sub ExamplePosition Dim sInput As String @@ -77,4 +73,4 @@
- \ No newline at end of file + diff --git a/source/text/sbasic/shared/03120412.xhp b/source/text/sbasic/shared/03120412.xhp index 11c69947d2..71ba4e6142 100644 --- a/source/text/sbasic/shared/03120412.xhp +++ b/source/text/sbasic/shared/03120412.xhp @@ -28,31 +28,27 @@ -
+
StrReverse function -StrReverse Function [Runtime - VBA] +StrReverse Function [Runtime - VBA] Returns the string with the character order reversed.
- -Syntax: + StrReverse (Text1 As String) - -Return value: + String - -Parameters: + Text1: The string expression that you want to reverse the character order. - -Example: + Sub ExampleReverse Print StrReverse("ABCdefGH") ' return "HGfedCBA" @@ -60,4 +56,4 @@ - \ No newline at end of file + diff --git a/source/text/sbasic/shared/03140000.xhp b/source/text/sbasic/shared/03140000.xhp index 97cace90d2..10c2bcf03e 100644 --- a/source/text/sbasic/shared/03140000.xhp +++ b/source/text/sbasic/shared/03140000.xhp @@ -38,16 +38,13 @@ Returns the depreciation of an asset for a specified period using the arithmetic-declining method.
- - + -DDB (Cost As Double, Salvage As Double, Life as Double, Period as Double, [Factor as Variant]) +DDB(Cost As Double, Salvage As Double, Life as Double, Period as Double, [Factor as Variant]) - - + Double - - + Cost fixes the initial cost of an asset. Salvage fixes the value of an asset at the end of its life. Life is the number of periods (for example, years or months) defining how long the asset is to be used. @@ -56,8 +53,7 @@ Use this form of depreciation if you require a higher initial depreciation value as opposed to linear depreciation. The depreciation value gets less with each period and is usually used for assets whose value loss is higher shortly after purchase (for example, vehicles, computers). Please note that the book value will never reach zero under this calculation type. - - + Sub ExampleDDB Dim ddb_yr1 As Double @@ -68,7 +64,7 @@
DDB function in CALC -VBA financial functions +
diff --git a/source/text/sbasic/shared/03140001.xhp b/source/text/sbasic/shared/03140001.xhp index 8246842a67..ce856be59e 100644 --- a/source/text/sbasic/shared/03140001.xhp +++ b/source/text/sbasic/shared/03140001.xhp @@ -38,16 +38,13 @@ Returns the future value of an investment based on periodic, constant payments and a constant interest rate (Future Value).
- - + FV(Rate as Double, NPer as Double, Pmt as Double, [PV as Variant], [Due as Variant]) - - + Double - - + Rate is the periodic interest rate. NPer is the total number of periods (payment period). Pmt is the annuity paid regularly per period. @@ -57,8 +54,7 @@ 1 - the payment is due at the beginning of the period. - - + Sub ExampleFV Dim myFV As Double @@ -69,8 +65,8 @@
FV function in CALC -VBA financial functions +
- + \ No newline at end of file diff --git a/source/text/sbasic/shared/03140002.xhp b/source/text/sbasic/shared/03140002.xhp index a4ebc9cb38..169dca1979 100644 --- a/source/text/sbasic/shared/03140002.xhp +++ b/source/text/sbasic/shared/03140002.xhp @@ -38,16 +38,13 @@ Calculates the periodic amortizement for an investment with regular payments and a constant interest rate. - - + IPmt(Rate as Double, Per as Double, NPer as Double, PV as Double, [FV as Variant], [Due as Variant]) - - + Double - - + Rate is the periodic interest rate. Per is the period, for which the compound interest is calculated. Period=NPER if compound interest for the last period is calculated. NPer is the total number of periods, during which annuity is paid. @@ -58,8 +55,7 @@ 1 - the payment is due at the beginning of the period. - - + Sub ExampleIPmt Dim myIPmt As Double @@ -70,7 +66,7 @@
IPMT function in CALC -VBA financial functions +
diff --git a/source/text/sbasic/shared/03140003.xhp b/source/text/sbasic/shared/03140003.xhp index cd5fc6f755..14b7c10eaf 100644 --- a/source/text/sbasic/shared/03140003.xhp +++ b/source/text/sbasic/shared/03140003.xhp @@ -38,22 +38,18 @@ Calculates the internal rate of return for an investment. - - + IRR(Values() as Double , [Guess as Variant]) - - + Double - - + Values(): The array of values of the cash-flow. The values represent cash flow values at regular intervals, at least one value must be negative (payments), and at least one value must be positive (income). Guess An initial estimate at what the IRR will be. - - + REM ***** BASIC ***** Option VBASupport 1 @@ -70,7 +66,7 @@
IRR function in CALC -VBA financial functions +
diff --git a/source/text/sbasic/shared/03140004.xhp b/source/text/sbasic/shared/03140004.xhp index 710b834ca7..bd4567248a 100644 --- a/source/text/sbasic/shared/03140004.xhp +++ b/source/text/sbasic/shared/03140004.xhp @@ -38,23 +38,19 @@ Calculates the modified internal rate of return of a series of investments. - - + MIRR(Values() as Double, Investment as Double, ReinvestRate as Double) - - + Double - - + Values(): An array of cash flows, representing a series of payments and income, where negative values are treated as payments and positive values are treated as income. This array must contain at least one negative and at least one positive value. Investment: is the rate of interest of the investments (the negative values of the array). ReinvestRate: the rate of interest of the reinvestment (the positive values of the array). - - + REM ***** BASIC ***** Option VBASupport 1 @@ -71,7 +67,7 @@
MIRR function in CALC -VBA financial functions +
diff --git a/source/text/sbasic/shared/03140005.xhp b/source/text/sbasic/shared/03140005.xhp index e46c2b9c40..036124f208 100644 --- a/source/text/sbasic/shared/03140005.xhp +++ b/source/text/sbasic/shared/03140005.xhp @@ -38,16 +38,13 @@ Calculates the number of periods for a loan or investment. - - + NPer (Rate as Double, Pmt as Double, PV as Double, [FV as Variant], [Due as Variant]) - - + Double - - + Rate is the periodic interest rate. Pmt is the annuity paid regularly per period. PV is the (present) cash value of an investment. @@ -57,8 +54,7 @@ 1 - the payment is due at the beginning of the period. - - + REM ***** BASIC ***** Option VBASupport 1 @@ -71,7 +67,7 @@
NPER function in CALC -VBA financial functions +
diff --git a/source/text/sbasic/shared/special_vba_func.xhp b/source/text/sbasic/shared/special_vba_func.xhp index 550395d4ca..b87c1adccb 100644 --- a/source/text/sbasic/shared/special_vba_func.xhp +++ b/source/text/sbasic/shared/special_vba_func.xhp @@ -43,47 +43,25 @@ -Text functions - - - - AscW - - - ChrW - - - InStrRev - - - StrReverse - +Text functions + + + + VBA Functions;Financial Functions -Financial functions +Financial functions + + + + + + - - DDB - - - FV - - - IPmt - - - IRR - - - MIRR - - - NPer - NPV @@ -110,7 +88,7 @@ -Date and time functions +Date and time functions @@ -124,7 +102,7 @@ -I/O Functions +I/O Functions @@ -135,7 +113,7 @@ -Mathematical Functions +Mathematical Functions @@ -146,7 +124,7 @@ -Object Functions +Object Functions @@ -157,4 +135,4 @@ - + \ No newline at end of file -- cgit