summaryrefslogtreecommitdiff
path: root/source/text/sbasic/guide
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2022-12-06 14:05:20 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2022-12-07 17:39:02 +0000
commit7e42394ecbf921ee53160b495aa12c1cba158604 (patch)
tree9f0b4dcbbf31112c0260a6a6831cbddf86d82c6d /source/text/sbasic/guide
parent490d42493e8dbec31ad58978df5084b080a36fcb (diff)
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>
Diffstat (limited to 'source/text/sbasic/guide')
-rw-r--r--source/text/sbasic/guide/access2base.xhp2
-rw-r--r--source/text/sbasic/guide/basic_2_python.xhp10
-rw-r--r--source/text/sbasic/guide/basic_examples.xhp2
-rw-r--r--source/text/sbasic/guide/calc_borders.xhp12
-rw-r--r--source/text/sbasic/guide/control_properties.xhp2
-rw-r--r--source/text/sbasic/guide/create_dialog.xhp2
-rw-r--r--source/text/sbasic/guide/insert_control.xhp2
-rw-r--r--source/text/sbasic/guide/read_write_values.xhp2
-rw-r--r--source/text/sbasic/guide/sample_code.xhp4
-rw-r--r--source/text/sbasic/guide/show_dialog.xhp2
10 files changed, 20 insertions, 20 deletions
diff --git a/source/text/sbasic/guide/access2base.xhp b/source/text/sbasic/guide/access2base.xhp
index 507a63c9dd..afb44b345f 100644
--- a/source/text/sbasic/guide/access2base.xhp
+++ b/source/text/sbasic/guide/access2base.xhp
@@ -45,7 +45,7 @@
<paragraph role="paragraph" id="par_idA2B004" xml-lang="en-US">Access2Base is a %PRODUCTNAME BASIC library of macros for (business or personal) application developers and advanced users. It is one of the libraries stored in "Application macros and dialogs".</paragraph>
<paragraph role="paragraph" id="par_idA2B005" xml-lang="en-US">The functionalities provided by the implemented macros are all directly inspired by Microsoft Access. The macros are callable mainly from a %PRODUCTNAME <emph>Base</emph> application, but also from <emph>any</emph> %PRODUCTNAME document (Writer, Calc, ...) where access to data stored in a database makes sense.</paragraph>
<paragraph role="paragraph" id="par_idA2B006" xml-lang="en-US">The API provided by Access2Base is intended to be more concise, intuitive and easy to learn than the standard UNO API (API = Application Programming Interface).</paragraph>
- <paragraph role="warning" id="par_idA2B007" xml-lang="en-US"><emph>The library is documented online on </emph><link href="http://www.access2base.com" name="http://www.access2base.com"><emph>http://www.access2base.com</emph></link>.</paragraph>
+ <paragraph role="warning" id="par_idA2B007" xml-lang="en-US"><emph>The library is documented online on </emph><link href="http://www.access2base.com"><emph>http://www.access2base.com</emph></link>.</paragraph>
<paragraph role="heading" id="hd_idA2B008" xml-lang="en-US" level="2">The implemented macros include:</paragraph>
<list type="ordered" format="1">
<listitem>
diff --git a/source/text/sbasic/guide/basic_2_python.xhp b/source/text/sbasic/guide/basic_2_python.xhp
index 4ea2d89f4e..0022270329 100644
--- a/source/text/sbasic/guide/basic_2_python.xhp
+++ b/source/text/sbasic/guide/basic_2_python.xhp
@@ -21,17 +21,17 @@
<bookmark_value>API;PathSettings</bookmark_value>
<bookmark_value>API;XScript</bookmark_value>
</bookmark>
- <h1 id="hd_id811571848401485"><variable id="basic2python"><link href="text/sbasic/guide/basic_2_python.xhp" name="Basic Programming Examples">Calling Python Scripts from Basic</link></variable></h1>
+ <h1 id="hd_id811571848401485"><variable id="basic2python"><link href="text/sbasic/guide/basic_2_python.xhp">Calling Python Scripts from Basic</link></variable></h1>
<paragraph role="paragraph" id="N0432">Calling Python scripts from %PRODUCTNAME Basic macros is possible, and valuable features can be obtained such as:</paragraph>
<list type="unordered">
<listitem><paragraph role="listitem" id="N0433"><literal>ComputerName</literal> identification or <literal>OSName</literal> detection are possible,</paragraph></listitem>
- <listitem><paragraph role="listitem" id="N0434">Basic <literal>FileLen()</literal> function and <link href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1ucb_1_1SimpleFileAccess.html" name="ucb.SimpleFileAccess">com.sun.star.ucb.SimpleFileAccess.</link><literal>getSize()</literal> API function exhibit a 2 Gigabytes file size upper limit that Python helps to overcome,</paragraph></listitem>
- <listitem><paragraph role="listitem" id="N0435"><link href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1util_1_1PathSettings.html" name="util.PathSettings">com.sun.star.util.PathSettings</link> can be normalized,</paragraph></listitem>
+ <listitem><paragraph role="listitem" id="N0434">Basic <literal>FileLen()</literal> function and <link href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1ucb_1_1SimpleFileAccess.html">com.sun.star.ucb.SimpleFileAccess.</link><literal>getSize()</literal> API function exhibit a 2 Gigabytes file size upper limit that Python helps to overcome,</paragraph></listitem>
+ <listitem><paragraph role="listitem" id="N0435"><link href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1util_1_1PathSettings.html">com.sun.star.util.PathSettings</link> can be normalized,</paragraph></listitem>
<listitem><paragraph role="listitem" id="N0436">and many more.</paragraph></listitem>
</list>
- <tip id="N0437">A reasonable exposure to %PRODUCTNAME Basic and to <link href="https://api.libreoffice.org/" name="Application Programming Interface">Application Programming Interface (API)</link> features is recommended prior to perform inter-language calls from Basic to Python, to JavaScript or any other script engine.</tip>
+ <tip id="N0437">A reasonable exposure to %PRODUCTNAME Basic and to <link href="https://api.libreoffice.org/">Application Programming Interface (API)</link> features is recommended prior to perform inter-language calls from Basic to Python, to JavaScript or any other script engine.</tip>
<h2 id="N0438">Retrieving Python Scripts</h2>
- <paragraph role="paragraph" id="N0439">Python scripts can be personal, shared, or embedded in documents. In order to execute them, %PRODUCTNAME Basic needs to be provided with Python script locations. Locating <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1script_1_1provider_1_1XScript.html" name="script.provider.XScript">com.sun.star.script.provider.XScript</link> interface compliant UNO objects allows the execution of Python scripts:</paragraph>
+ <paragraph role="paragraph" id="N0439">Python scripts can be personal, shared, or embedded in documents. In order to execute them, %PRODUCTNAME Basic needs to be provided with Python script locations. Locating <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1script_1_1provider_1_1XScript.html">com.sun.star.script.provider.XScript</link> interface compliant UNO objects allows the execution of Python scripts:</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="N0440">Option Explicit</paragraph>
<paragraph role="bascode" localize="false" id="N0441"> </paragraph>
diff --git a/source/text/sbasic/guide/basic_examples.xhp b/source/text/sbasic/guide/basic_examples.xhp
index 97b11c0659..9a21e1cf32 100644
--- a/source/text/sbasic/guide/basic_examples.xhp
+++ b/source/text/sbasic/guide/basic_examples.xhp
@@ -19,7 +19,7 @@
<bookmark_value>Basic;programming examples</bookmark_value>
</bookmark>
<section id="basicexamplesh1">
- <h1 id="hd_id471559139063621"><variable id="basicexamplestit"><link href="text/sbasic/guide/basic_examples.xhp" name="Basic Programming Examples">Basic Programming Examples</link></variable></h1>
+ <h1 id="hd_id471559139063621"><variable id="basicexamplestit"><link href="text/sbasic/guide/basic_examples.xhp">Basic Programming Examples</link></variable></h1>
</section>
<embed href="text/sbasic/python/python_handler.xhp#pythonhandler_h1"/>
<embed href="text/sbasic/python/python_listener.xhp#pythonlistener"/>
diff --git a/source/text/sbasic/guide/calc_borders.xhp b/source/text/sbasic/guide/calc_borders.xhp
index 23fa7b885a..8295c0ad98 100644
--- a/source/text/sbasic/guide/calc_borders.xhp
+++ b/source/text/sbasic/guide/calc_borders.xhp
@@ -20,7 +20,7 @@
<bookmark localize="false" branch="index" id="bm_id41582391760114">
<bookmark_value>macros;format borders</bookmark_value>
</bookmark>
- <h1 id="hd_id461623364876507"><variable id="title"><link href="text/sbasic/guide/calc_borders.xhp" name="Calc_Borders_h1">Formatting Borders in Calc with Macros</link></variable></h1>
+ <h1 id="hd_id461623364876507"><variable id="title"><link href="text/sbasic/guide/calc_borders.xhp">Formatting Borders in Calc with Macros</link></variable></h1>
<paragraph role="paragraph" id="par_id461630536347127">By using Basic or Python programming languages it is possible to write macros that apply formats to ranges of cells in Calc.</paragraph>
<h2 id="hd_id81630536486560">Formatting Borders in Ranges of Cells</h2>
@@ -48,13 +48,13 @@
<paragraph id="par_id841630538209958" role="listitem"><emph>cellAddress</emph> is a string denoting the range to be formatted in the format "A1".</paragraph>
</listitem>
<listitem>
- <paragraph id="par_id821630538210271" role="listitem"><emph>newStyle</emph> is an integer value that corresponds to the border line style (see <link href="text/sbasic/guide/calc_borders.xhp#LineStyles_h2" name="LineStyles_link">Line Styles</link> below).</paragraph>
+ <paragraph id="par_id821630538210271" role="listitem"><emph>newStyle</emph> is an integer value that corresponds to the border line style (see <link href="text/sbasic/guide/calc_borders.xhp#LineStyles_h2">Line Styles</link> below).</paragraph>
</listitem>
<listitem>
<paragraph id="par_id191630538210607" role="listitem"><emph>newWidth</emph> is an integer value that defines the line width.</paragraph>
</listitem>
<listitem>
- <paragraph id="par_id71630538211142" role="listitem"><emph>newColor</emph> is an integer value corresponding to a color defined using the <link href="text/sbasic/shared/03010305.xhp" name="RGB_link">RGB</link> function.</paragraph>
+ <paragraph id="par_id71630538211142" role="listitem"><emph>newColor</emph> is an integer value corresponding to a color defined using the <link href="text/sbasic/shared/03010305.xhp">RGB</link> function.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id201630538522838">To call <literal>FormatCellBorder</literal> create a new macro and pass the desired arguments, as shown below:</paragraph>
@@ -97,7 +97,7 @@
<paragraph role="pycode" localize="false" id="pyc_id531630541792043"> formatCellBorder("B5", cStyle.SOLID, 20, bas.RGB(0, 0, 255))</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id601630541792230"> formatCellBorder("D2:F6", cStyle.DOTTED, 20, bas.RGB(255, 0, 0))</paragraph>
</pycode>
- <note id="par_id261630541889040">The Python code presented above uses the <link href="text/sbasic/shared/03/lib_ScriptForge.xhp" name="SF_link">ScriptForge library</link> that is available since %PRODUCTNAME 7.2.</note>
+ <note id="par_id261630541889040">The Python code presented above uses the <link href="text/sbasic/shared/03/lib_ScriptForge.xhp">ScriptForge library</link> that is available since %PRODUCTNAME 7.2.</note>
<section id="LineStyles_h2">
<h2 id="hd_id361630539136798">Line Styles</h2>
@@ -193,7 +193,7 @@
</tablecell>
</tablerow>
</table>
- <tip id="par_id751630539680866">Refer to the <link href="https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1table_1_1BorderLineStyle.html" name="BorderLineStyle_link">BorderLineStyle Constant Reference</link> in the LibreOffice API documentation to learn more about line style constants.</tip>
+ <tip id="par_id751630539680866">Refer to the <link href="https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1table_1_1BorderLineStyle.html">BorderLineStyle Constant Reference</link> in the LibreOffice API documentation to learn more about line style constants.</tip>
<h2 id="hd_id31630542361666">Formatting Borders Using TableBorder2</h2>
<paragraph role="paragraph" id="par_id11630542436346">Range objects have a property named <literal>TableBorder2</literal> that can be used to format range borders as it is done in the <menuitem>Format - Cells - Borders</menuitem> dialog in the <emph>Line Arrangement</emph> section.</paragraph>
@@ -239,7 +239,7 @@
<paragraph role="pycode" localize="false" id="pyc_id341630544115915"> cell = doc.XCellRange("B2:E5")</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id841630544116128"> cell.TableBorder2 = table_format</paragraph>
</pycode>
- <tip id="par_id751630539680102">Refer to the <link href="https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1table_1_1TableBorder2.html" name="BorderLineStyle_link">TableBorder2 Struct Reference</link> in the LibreOffice API documentation to learn more about its attributes.</tip>
+ <tip id="par_id751630539680102">Refer to the <link href="https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1table_1_1TableBorder2.html">TableBorder2 Struct Reference</link> in the LibreOffice API documentation to learn more about its attributes.</tip>
<section id="relatedtopics">
<embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#ScriptForge_lib"/>
diff --git a/source/text/sbasic/guide/control_properties.xhp b/source/text/sbasic/guide/control_properties.xhp
index 7d8ff2c3eb..3de28c42df 100644
--- a/source/text/sbasic/guide/control_properties.xhp
+++ b/source/text/sbasic/guide/control_properties.xhp
@@ -35,7 +35,7 @@
<bookmark_value>controls;changing properties</bookmark_value>
<bookmark_value>dialog editor;changing control properties</bookmark_value>
</bookmark>
-<paragraph role="heading" id="hd_id3145786" xml-lang="en-US" level="1"><variable id="control_properties"><link href="text/sbasic/guide/control_properties.xhp" name="Changing the Properties of Controls in the Dialog Editor">Changing the Properties of Controls in the Dialog Editor</link>
+<paragraph role="heading" id="hd_id3145786" xml-lang="en-US" level="1"><variable id="control_properties"><link href="text/sbasic/guide/control_properties.xhp">Changing the Properties of Controls in the Dialog Editor</link>
</variable></paragraph>
<paragraph role="paragraph" id="par_id3147317" xml-lang="en-US">You can set the properties of control that you add to a dialog. For example, you can change the color, name, and size of a button that you added. You can change most control properties when you create or edit a dialog. However, you can only change some properties at runtime.</paragraph>
<paragraph role="paragraph" id="par_id3145749" xml-lang="en-US">To change the properties of a control in design mode, right-click the control, and then choose <emph>Properties</emph>.</paragraph>
diff --git a/source/text/sbasic/guide/create_dialog.xhp b/source/text/sbasic/guide/create_dialog.xhp
index e948d44672..434cc6647b 100644
--- a/source/text/sbasic/guide/create_dialog.xhp
+++ b/source/text/sbasic/guide/create_dialog.xhp
@@ -30,7 +30,7 @@
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3149346"><bookmark_value>dialogs;creating Basic dialogs</bookmark_value>
-</bookmark><paragraph role="heading" id="hd_id3149346" xml-lang="en-US" level="1"><variable id="create_dialog"><link href="text/sbasic/guide/create_dialog.xhp" name="Creating a Basic Dialog">Creating a Basic Dialog</link>
+</bookmark><paragraph role="heading" id="hd_id3149346" xml-lang="en-US" level="1"><variable id="create_dialog"><link href="text/sbasic/guide/create_dialog.xhp">Creating a Basic Dialog</link>
</variable></paragraph>
<list type="ordered">
<listitem>
diff --git a/source/text/sbasic/guide/insert_control.xhp b/source/text/sbasic/guide/insert_control.xhp
index cbc6fdbdbd..605040b8a9 100644
--- a/source/text/sbasic/guide/insert_control.xhp
+++ b/source/text/sbasic/guide/insert_control.xhp
@@ -33,7 +33,7 @@
<bookmark xml-lang="en-US" branch="index" id="bm_id3149182"><bookmark_value>controls; creating in the dialog editor</bookmark_value>
<bookmark_value>dialog editor;creating controls</bookmark_value>
</bookmark>
-<paragraph role="heading" id="hd_id3149182" xml-lang="en-US" level="1"><variable id="insert_control"><link href="text/sbasic/guide/insert_control.xhp" name="Creating Controls in the Dialog Editor">Creating Controls in the Dialog Editor</link>
+<paragraph role="heading" id="hd_id3149182" xml-lang="en-US" level="1"><variable id="insert_control"><link href="text/sbasic/guide/insert_control.xhp">Creating Controls in the Dialog Editor</link>
</variable></paragraph>
<paragraph role="paragraph" id="par_id3146797" xml-lang="en-US">Use the tools on the <emph>Toolbox </emph>of the BASIC dialog editor to add controls to your dialog.</paragraph>
<list type="ordered">
diff --git a/source/text/sbasic/guide/read_write_values.xhp b/source/text/sbasic/guide/read_write_values.xhp
index b8dab321c1..2ac928a2d6 100644
--- a/source/text/sbasic/guide/read_write_values.xhp
+++ b/source/text/sbasic/guide/read_write_values.xhp
@@ -21,7 +21,7 @@
<bookmark_value>macros;read values from cells</bookmark_value>
<bookmark_value>macros;write values to cells</bookmark_value>
</bookmark>
- <h1 id="hd_id461623364876507"><variable id="title"><link href="text/sbasic/guide/read_write_values.xhp" name="ReadWriteValues_h1">Reading and Writing values to Ranges</link></variable></h1>
+ <h1 id="hd_id461623364876507"><variable id="title"><link href="text/sbasic/guide/read_write_values.xhp">Reading and Writing values to Ranges</link></variable></h1>
<paragraph role="paragraph" id="par_id781633210592228">Macros in %PRODUCTNAME Calc often need to read and write values from/to sheets. This help page describes the various approaches to accessing sheets and ranges to read or write their values.</paragraph>
<note id="par_id191633214565965">All examples presented in this page can be implemented both in Basic and Python.</note>
diff --git a/source/text/sbasic/guide/sample_code.xhp b/source/text/sbasic/guide/sample_code.xhp
index cdb79e3837..3b38f6946c 100644
--- a/source/text/sbasic/guide/sample_code.xhp
+++ b/source/text/sbasic/guide/sample_code.xhp
@@ -38,10 +38,10 @@
<bookmark_value>Tools;LoadDialog</bookmark_value>
</bookmark>
<section id="samplecode">
- <paragraph role="heading" id="hd_id3155338" xml-lang="en-US" level="1"><variable id="sample_code"><link href="text/sbasic/guide/sample_code.xhp" name="Programming Examples for Controls in the Dialog Editor">Programming Examples for Controls in the Dialog Editor</link>
+ <paragraph role="heading" id="hd_id3155338" xml-lang="en-US" level="1"><variable id="sample_code"><link href="text/sbasic/guide/sample_code.xhp">Programming Examples for Controls in the Dialog Editor</link>
</variable></paragraph>
</section>
-<paragraph role="paragraph" id="par_id3153031" xml-lang="en-US">The following examples are for a new <link href="text/sbasic/guide/create_dialog.xhp" name="dialog">dialog</link> called "Dialog1". Use the tools on the <emph>Toolbox</emph> bar in the dialog editor to create the dialog and add the following controls: a <emph>Check Box</emph> called "CheckBox1", a <emph>Label Field</emph> called "Label1", a <emph>Button</emph> called "CommandButton1", and a <emph>List Box</emph> called "ListBox1".</paragraph>
+<paragraph role="paragraph" id="par_id3153031" xml-lang="en-US">The following examples are for a new <link href="text/sbasic/guide/create_dialog.xhp">dialog</link> called "Dialog1". Use the tools on the <emph>Toolbox</emph> bar in the dialog editor to create the dialog and add the following controls: a <emph>Check Box</emph> called "CheckBox1", a <emph>Label Field</emph> called "Label1", a <emph>Button</emph> called "CommandButton1", and a <emph>List Box</emph> called "ListBox1".</paragraph>
<paragraph role="warning" id="par_id3154141" xml-lang="en-US">Be consistent with uppercase and lowercase letter when you attach a control to an object variable.</paragraph>
<paragraph role="heading" id="hd_id3154909" xml-lang="en-US" level="3">Global Function for Loading Dialogs</paragraph>
<bascode>
diff --git a/source/text/sbasic/guide/show_dialog.xhp b/source/text/sbasic/guide/show_dialog.xhp
index 117ff796c2..00872c9732 100644
--- a/source/text/sbasic/guide/show_dialog.xhp
+++ b/source/text/sbasic/guide/show_dialog.xhp
@@ -30,7 +30,7 @@
<bookmark_value>examples; showing a dialog with Basic</bookmark_value>
<bookmark_value>Tools;LoadDialog</bookmark_value>
</bookmark>
-<paragraph role="heading" id="hd_id3154140" xml-lang="en-US" level="1"><variable id="show_dialog"><link href="text/sbasic/guide/show_dialog.xhp" name="Opening a Dialog With Basic">Opening a Dialog With Basic</link>
+<paragraph role="heading" id="hd_id3154140" xml-lang="en-US" level="1"><variable id="show_dialog"><link href="text/sbasic/guide/show_dialog.xhp">Opening a Dialog With Basic</link>
</variable></paragraph>
<paragraph role="paragraph" id="par_id3145171" xml-lang="en-US">In the <item type="productname">%PRODUCTNAME</item> BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.</paragraph>
<paragraph role="paragraph" id="par_id3153968" xml-lang="en-US">Enter the following code for a subroutine called <emph>Dialog1Show</emph>. In this example, the name of the dialog that you created is "Dialog1":</paragraph>