Files
help/source/text/sbasic/shared/03090401.xhp
Ilmari Lauhakangas 7e42394ecb tdf#152323 drop name attribute from <link> elements
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>
2022-12-07 17:39:02 +00:00

69 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<helpdocument version="1.0">
<meta>
<topic id="textsbasicshared03090401xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Call Statement</title>
<filename>/text/sbasic/shared/03090401.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
</history>
</meta>
<body>
<section id="call">
<bookmark xml-lang="en-US" branch="index" id="bm_id3154422"><bookmark_value>Call statement</bookmark_value>
</bookmark>
<h1 id="hd_id3154422"><variable id="Call_h1"><link href="text/sbasic/shared/03090401.xhp">Call Statement</link></variable></h1>
<paragraph role="paragraph" id="par_id3153394" xml-lang="en-US">Transfers the control of the program to a subroutine, a function, or a procedure of a <link href="text/sbasic/shared/03090403.xhp">Dynamic Link Library (DLL)</link>. The keyword, type and number of parameters is dependent on the routine that is being called.</paragraph>
</section>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" id="par_id491585753339474">
<image src="media/helpimg/sbasic/Call_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Call Statement diagram</alt></image></paragraph>
<bascode>
<paragraph role="bascode" id="par_id3150984" xml-lang="en-US">[Call] name [(] [param :=] value, ... [)] </paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id3148473" xml-lang="en-US">
<emph>name:</emph> Name of the subroutine, the function, or the <link href="text/sbasic/shared/03090403.xhp">DLL</link> that you want to call</paragraph>
<paragraph role="paragraph" id="par_id3148946" xml-lang="en-US">
<emph>param:</emph> Keyword parameter name to pass to the routine, followed by its <emph>value</emph>. The name must match the routine declaration. Keywords are optional and can be used in any order. </paragraph>
<paragraph role="paragraph" id="par_id871586190690812"><emph>value:</emph> Positional parameter value. The type is dependent on the routine that is being called</paragraph>
<note id="par_id421586006407428" xml-lang="en-US">When mixing positional and keyword parameters, make sure positional parameters are following the routine declaration order.</note>
<tip id="par_id3154216" xml-lang="en-US">When a function is used as an expression, enclosing parameters with brackets becomes necessary. Using a <link href="text/sbasic/shared/03090403.xhp">Declare statement</link> is compulsory prior to call a DLL.</tip>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph role="bascode" id="par_id3159254" xml-lang="en-US" localize="false">Sub ExampleCall</paragraph>
<paragraph role="bascode" id="par_id3161832" xml-lang="en-US" localize="false"> Dim value As String</paragraph>
<paragraph role="bascode" id="par_id3147317" xml-lang="en-US" localize="false"> value = "LibreOffice"</paragraph>
<paragraph role="bascode" id="par_id3145273" xml-lang="en-US" localize="false"> Call aRoutine value</paragraph>
<paragraph role="bascode" id="bas_id181585749262948" xml-lang="en-US" localize="false"> aRoutine text := value</paragraph>
<paragraph role="bascode" id="par_id3147435" xml-lang="en-US" localize="false">End Sub</paragraph>
<paragraph role="bascode" id="par_id3147436" xml-lang="en-US" localize="false"></paragraph>
<paragraph role="bascode" id="par_id3155414" xml-lang="en-US" localize="false">Sub aRoutine (text as String)</paragraph>
<paragraph role="bascode" id="par_id3151112" xml-lang="en-US" localize="false"> Msgbox text</paragraph>
<paragraph role="bascode" id="par_id3148646" xml-lang="en-US" localize="false">End Sub</paragraph>
</bascode>
<section id="relatedtopics">
<embed href="text/sbasic/shared/CallByName.xhp#CallByName_h1"/>
</section>
</body>
</helpdocument>