forked from amazingfate/help
Replacement done with
find . -name \*.xhp -print0 |xargs -0 -P 0 perl -CS -pi -e \
's#(<link[^>]*?) +name *="[^"]*" *( [^>]+|) *>#$1$2>#g'
(note some inconsistencies with space between name and = and also having
empty value, and some more complicated expression to also clear up
double space before/after the attribute)
translation files will be prepped with:
find */helpcontent2 -name \*.po -print0 |xargs -0 -P 0 perl -CS -pi -e \
$'s#(<link[^>]*?) +name=(?:\\\\"[^"]*\\\\"|\'[^\']*\') *( [^>]+|) *(/?>)#$1$2$3#g unless /^#/'
(note that not all languages use the " as quote character for the
attributes, but that also single quotes appera in the po file. Hence
the use of the shell $'string' syntax to be able to quote ' as \'
It also requires to quote the backslash, so that it needs to be escaped
once for the shell, then another time for perl. Also don't work on
obsolete strings (those are prefixed with #~ in the po files)
Also note that <link..></link> gets turned into <link ../> during
translation extraction (along with removal of the space between the
attribute name and the value), so the pattern needs to be slightly
different here)
Change-Id: I95e53a08e6b0095cd894109ea0de154cc4859d8f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143713
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
61 lines
4.5 KiB
XML
61 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<helpdocument version="1.0">
|
|
<!--
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
-->
|
|
|
|
<meta>
|
|
<topic id="vbapartition" indexer="include" status="PUBLISH">
|
|
<title id="tit" xml-lang="en-US">Partition Function</title>
|
|
<filename>/text/sbasic/shared/partition.xhp</filename>
|
|
</topic>
|
|
</meta>
|
|
<body>
|
|
<section id="vbapartition">
|
|
<bookmark xml-lang="en-US" branch="index" id="bm_id31548421805896">
|
|
<bookmark_value>Partition Function</bookmark_value>
|
|
</bookmark>
|
|
<h1 id="hd_id171548419512929"><link href="text/sbasic/shared/partition.xhp">Partition Function [VBA]</link></h1>
|
|
<paragraph role="paragraph" id="par_id461548419700445">Returns a string indicating where a number occurs within a calculated series of ranges.</paragraph>
|
|
</section>
|
|
<embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
|
|
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
|
|
<paragraph role="code" id="par_id111548419647867">Partition( Number, Start, End, Interval)</paragraph>
|
|
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
|
|
<paragraph role="paragraph" localize="false" id="par_id971548420129767">String</paragraph>
|
|
|
|
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
|
|
<paragraph role="paragraph" id="par_id481548420000538"><emph>Number</emph>: Required. The number to determine the partition.</paragraph>
|
|
<paragraph role="paragraph" id="par_id841548420006137"><emph>Start</emph>: Required. An integer number defining the lower value of the range of numbers.</paragraph>
|
|
<paragraph role="paragraph" id="par_id781548420012105"><emph>End</emph>: Required. An integer number defining the highest value of the range.</paragraph>
|
|
<paragraph role="paragraph" id="par_id371548420017250"><emph>Interval</emph>: Required. An integer number that specifies the size of the partitions within the range of numbers (between Start and End).</paragraph>
|
|
|
|
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
|
|
<bascode>
|
|
<paragraph role="bascode" id="par_id321548420503855" xml-lang="en-US" localize="false">Option VBASupport 1</paragraph>
|
|
<paragraph role="bascode" id="par_id431548420514604" xml-lang="en-US" localize="false">Option Explicit</paragraph>
|
|
<paragraph role="bascode" id="par_id181548420522842" xml-lang="en-US" localize="false">Sub Test_Partition</paragraph>
|
|
<paragraph role="bascode" id="par_id721548420527861" xml-lang="en-US" localize="false"> Dim retStr As String</paragraph>
|
|
<paragraph role="bascode" id="par_id21548420534821" xml-lang="en-US" localize="false"> retStr = Partition(20, 0, 98, 5)</paragraph>
|
|
<paragraph role="bascode" id="par_id561548420541509" xml-lang="en-US"> print "20:24 the number 20 occurs in the range: " & retStr</paragraph>
|
|
<paragraph role="bascode" id="par_id261548420553088" xml-lang="en-US" localize="false"> retStr = Partition(20, 0, 99, 1)</paragraph>
|
|
<paragraph role="bascode" id="par_id161548420558523" xml-lang="en-US"> print " 20: 20 the number 20 occurs in the range: " & retStr</paragraph>
|
|
<paragraph role="bascode" id="par_id251548420573894" xml-lang="en-US" localize="false"> retStr = Partition(120, 0, 99, 5)</paragraph>
|
|
<paragraph role="bascode" id="par_id561548420579525" xml-lang="en-US"> print "100: the number 120 occurs in the range: " & retStr</paragraph>
|
|
<paragraph role="bascode" id="par_id611548420591014" xml-lang="en-US" localize="false"> retStr = Partition(-5, 0, 99, 5)</paragraph>
|
|
<paragraph role="bascode" id="par_id921548420596118" xml-lang="en-US"> print " : -1 the number -5 occurs in the range: " & retStr</paragraph>
|
|
<paragraph role="bascode" id="par_id561548420604604" xml-lang="en-US" localize="false"> retStr = Partition(2, 0, 5, 2)</paragraph>
|
|
<paragraph role="bascode" id="par_id861548420616153" xml-lang="en-US" > print " 2: 3 the number 2 occurs in the range: " & retStr</paragraph>
|
|
<paragraph role="bascode" id="par_id841548421054219" xml-lang="en-US" localize="false">End Sub</paragraph>
|
|
</bascode>
|
|
<section id="relatedtopics">
|
|
<embed href="text/sbasic/shared/00000003.xhp#VBAMath"/>
|
|
</section>
|
|
</body>
|
|
</helpdocument>
|