1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23
24<helpdocument version="1.0">
25<meta>
26<topic id="textswriter0104090005xml" indexer="include">
27<title id="tit" xml-lang="en-US">Variables</title>
28<filename>/text/swriter/01/04090005.xhp</filename>
29</topic>
30</meta>
31<body>
32<section id="variablen">
33<bookmark xml-lang="en-US" branch="index" id="bm_id8526261">
34<bookmark_value>user-defined fields, restriction</bookmark_value>
35</bookmark>
36<bookmark xml-lang="en-US" branch="hid/SW_HID_FLD_VAR" id="bm_id3151266" localize="false"/>
37<paragraph role="heading" id="hd_id3153716" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/swriter/01/04090005.xhp" name="Variables">Variables</link></paragraph>
38<paragraph role="paragraph" id="par_id3150764" xml-lang="en-US" l10n="U" oldref="2">Variable fields let you add dynamic content to your document. For example, you can use a variable to reset the page numbering.</paragraph>
39</section>
40<section id="howtoget">
41<embed href="text/swriter/00/00000404.xhp#feldvariablen"/>
42</section>
43<paragraph role="warning" id="par_id3149759" xml-lang="en-US" l10n="U" oldref="3">User-defined fields are only available in the current document.</paragraph>
44<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_VAR:LB_VARTYPE" id="bm_id3154692" localize="false"/>
45<paragraph role="paragraph" id="par_id0903200802243625" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Lists the available field types. To add a field to your document, click a field type, click a field in the <emph>Select</emph> list, and then click <emph>Insert</emph>.</ahelp></paragraph>
46<embed href="text/swriter/01/04090001.xhp#feldtyp"/>
47<table id="tbl_id3145416">
48<tablerow>
49<tablecell>
50<paragraph role="tablehead" id="par_id3150703" xml-lang="en-US" l10n="U" oldref="4">Type</paragraph>
51</tablecell>
52<tablecell>
53<paragraph role="tablehead" id="par_id3154096" xml-lang="en-US" l10n="U" oldref="5">Description</paragraph>
54</tablecell>
55</tablerow>
56<tablerow>
57<tablecell>
58<paragraph role="tablecontent" id="par_id3149803" xml-lang="en-US" l10n="U" oldref="6">Set Variable</paragraph>
59</tablecell>
60<tablecell>
61<paragraph role="tablecontent" id="par_id3150996" xml-lang="en-US" l10n="U" oldref="7">Defines a variable and its value. You can change the value of a variable by clicking in front of the variable field, and then choosing <emph>Edit - Field</emph>.</paragraph>
62</tablecell>
63</tablerow>
64<tablerow>
65<tablecell>
66<paragraph role="tablecontent" id="par_id3154571" xml-lang="en-US" l10n="U" oldref="8">Show Variable</paragraph>
67</tablecell>
68<tablecell>
69<paragraph role="tablecontent" id="par_id3153669" xml-lang="en-US" l10n="U" oldref="9">Inserts the current value of the variable that you click in the <emph>Selection</emph> list.</paragraph>
70</tablecell>
71</tablerow>
72<tablerow>
73<tablecell>
74<paragraph role="tablecontent" id="par_id3147531" xml-lang="en-US" l10n="U" oldref="10">DDE field</paragraph>
75</tablecell>
76<tablecell>
77<paragraph role="tablecontent" id="par_id3149684" xml-lang="en-US" l10n="U" oldref="11">Inserts a <link href="text/shared/00/00000005.xhp#dde" name="DDE">DDE</link> link into the document, that you can update as often as you want through the assigned name.</paragraph>
78</tablecell>
79</tablerow>
80<tablerow>
81<tablecell>
82<paragraph role="tablecontent" id="par_id3159196" xml-lang="en-US" l10n="U" oldref="12">Insert Formula</paragraph>
83</tablecell>
84<tablecell>
85<paragraph role="tablecontent" id="par_id3151322" xml-lang="en-US" l10n="U" oldref="13">Inserts a fixed number, or the result of a formula.</paragraph>
86</tablecell>
87</tablerow>
88<tablerow>
89<tablecell>
90<paragraph role="tablecontent" id="par_id3149494" xml-lang="en-US" l10n="U" oldref="14">Input field</paragraph>
91</tablecell>
92<tablecell>
93<paragraph role="tablecontent" id="par_id3154829" xml-lang="en-US" l10n="U" oldref="15">Inserts a new value for a variable or a User Field.</paragraph>
94<paragraph role="tablecontent" id="par_id3149098" xml-lang="en-US" l10n="U" oldref="37">The value of a variable in an Input field is only valid from where the field is inserted and onwards. To change the value of the variable later in the document, insert another Input field of the same name, but with a different value. However, the value of a User Field is changed globally.</paragraph>
95<paragraph role="tablecontent" id="par_id3151255" xml-lang="en-US" l10n="U" oldref="38">The variables are displayed in the <emph>Selection</emph> field. When you click the <emph>Insert</emph> button, the dialog<link href="text/swriter/01/04090100.xhp" name="Input Field"><emph>Input Field</emph></link> appears, where you can enter the new value or additional text as a remark.</paragraph>
96</tablecell>
97</tablerow>
98<tablerow>
99<tablecell>
100<paragraph role="tablecontent" id="par_id3149034" xml-lang="en-US" l10n="U" oldref="16">Number range</paragraph>
101</tablecell>
102<tablecell>
103<paragraph role="tablecontent" id="par_id3152772" xml-lang="en-US" l10n="U" oldref="17">Inserts automatic numbering for tables, graphics, or text frames.</paragraph>
104</tablecell>
105</tablerow>
106<tablerow>
107<tablecell>
108<paragraph role="tablecontent" id="par_id3147073" xml-lang="en-US" l10n="U" oldref="18">Set page variable</paragraph>
109</tablecell>
110<tablecell>
111<paragraph role="tablecontent" id="par_id3154389" xml-lang="en-US" l10n="U" oldref="19">Inserts a reference point in the document, after which the page count restarts. Select "on" to enable the reference point, and "off" to disable it. You can also enter an offset to start the page count at a different number.</paragraph>
112</tablecell>
113</tablerow>
114<tablerow>
115<tablecell>
116<paragraph role="tablecontent" id="par_id3156267" xml-lang="en-US" l10n="U" oldref="20">Show Page Variable</paragraph>
117</tablecell>
118<tablecell>
119<paragraph role="tablecontent" id="par_id3150588" xml-lang="en-US" l10n="U" oldref="21">Displays the number of pages from the "Set page variable" reference point to this field.</paragraph>
120</tablecell>
121</tablerow>
122<tablerow>
123<tablecell>
124<paragraph role="tablecontent" id="par_id3145779" xml-lang="en-US" l10n="U" oldref="22">User Field</paragraph>
125</tablecell>
126<tablecell>
127<paragraph role="tablecontent" id="par_id3151377" xml-lang="en-US" l10n="U" oldref="23">Inserts a custom global variable. You can use the User Field to define a variable for a condition statement. When you change a User Field, all instances of the variable in the document are updated.</paragraph>
128</tablecell>
129</tablerow>
130</table>
131<embed href="text/swriter/01/04090001.xhp#hinweis"/>
132<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_VAR:LB_VARNUMFORMAT" id="bm_id3148875" localize="false"/>
133<paragraph role="paragraph" id="par_id0903200802243892" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Click the format that you want to apply to the selected field, or click "Additional formats" to define a custom format.</ahelp></paragraph>
134<embed href="text/swriter/01/04090001.xhp#format"/>
135<paragraph role="paragraph" id="par_id3148886" xml-lang="en-US" l10n="U" oldref="25">For user-defined fields, click the format that you want to apply in the <emph>Format</emph> list, or click "Additional formats" to define a custom format.</paragraph>
136<bookmark xml-lang="en-US" branch="hid/sw:Edit:TP_FLD_VAR:ED_VARNAME" id="bm_id3150108" localize="false"/>
137<paragraph role="paragraph" id="par_id0903200802243880" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Type the name of the user-defined field that you want to create.</ahelp></paragraph>
138<embed href="text/swriter/01/04090002.xhp#name"/>
139<bookmark xml-lang="en-US" branch="hid/sw:Edit:TP_FLD_VAR:ED_VARVALUE" id="bm_id3150119" localize="false"/>
140<paragraph role="paragraph" id="par_id0903200802243951" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Enter the contents that you want to add to a user-defined field.</ahelp></paragraph>
141<embed href="text/swriter/01/04090001.xhp#wert"/>
142<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_VAR:LB_VARFORMAT" id="bm_id3155871" localize="false"/>
143<paragraph role="paragraph" id="par_id3155860" xml-lang="en-US" l10n="U" oldref="26"><ahelp hid="SW_LISTBOX_TP_FLD_VAR_LB_VARFORMAT">In the <emph>Format</emph> list, define if the value is inserted as text or a number.</ahelp></paragraph>
144<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_VAR:LB_VARSELECTION" id="bm_id3150684" localize="false"/>
145<paragraph role="heading" id="hd_id3888363" xml-lang="en-US" level="2" l10n="NEW">Selection<comment>on "Document" and "DocInformation" tab page this is called "Select", on the other tab pages "Selection"</comment></paragraph>
146<paragraph role="paragraph" id="par_id7453535" xml-lang="en-US" l10n="NEW"><ahelp hid="SW:LISTBOX:TP_FLD_DOK:LB_DOKSELECTION">Lists the available fields for the field type selected in the <emph>Type</emph> list. To insert a field, click the field, and then click <emph>Insert</emph>.</ahelp></paragraph>
147<paragraph role="tip" id="par_id3326822" xml-lang="en-US" l10n="NEW">To quickly insert a field from the list, hold down <switchinline select="sys"><caseinline select="MAC">Command
148</caseinline><defaultinline>Ctrl</defaultinline></switchinline> and double-click the field.</paragraph>
149<paragraph role="paragraph" id="par_id3150696" xml-lang="en-US" l10n="U" oldref="36">In an HTML document, two additional fields are available for the "Set variable" field type: HTML_ON and HTML_OFF. The text that you type in the <emph>Value</emph> box is converted to an opening HTML <link href="text/shared/00/00000002.xhp#tags" name="tag">tag</link> (&lt;Value&gt;) or to a closing HTML (&lt;/Value&gt;) tag when the file is saved as an HTML document, depending on the option that you select.</paragraph>
150<paragraph role="tip" id="par_id3149555" xml-lang="en-US" l10n="U" oldref="46">If you double-click an entry while holding the Ctrl key or select the desired variable and press the spacebar, it is immediately inserted into your document.</paragraph>
151<paragraph role="heading" id="hd_id3155969" xml-lang="en-US" level="2" l10n="U" oldref="27">Formula</paragraph>
152<paragraph role="paragraph" id="par_id3155982" xml-lang="en-US" l10n="U" oldref="28">This option is only available if the "Insert formula" field type is selected.</paragraph>
153<embed href="text/swriter/01/04090003.xhp#hinweis"/>
154<embed href="text/swriter/01/04090001.xhp#korrektur"/>
155<section id="unsichtbar">
156<bookmark xml-lang="en-US" branch="hid/sw:CheckBox:TP_FLD_VAR:CB_VARINVISIBLE" id="bm_id3156226" localize="false"/>
157<paragraph role="heading" id="hd_id3149229" xml-lang="en-US" level="2" l10n="U" oldref="29">Invisible</paragraph>
158<paragraph role="paragraph" id="par_id3156233" xml-lang="en-US" l10n="U" oldref="30"><ahelp hid="SW_CHECKBOX_TP_FLD_VAR_CB_VARINVISIBLE">Hides the field contents in the document.</ahelp> The field is inserted as a thin gray mark in the document. This option is only available for the "Set Variable" and "User Field" field types.</paragraph>
159</section>
160<paragraph role="heading" id="hd_id3146326" xml-lang="en-US" level="2" l10n="U" oldref="39">Chapter numbering</paragraph>
161<paragraph role="paragraph" id="par_id3146340" xml-lang="en-US" l10n="U" oldref="40">Sets the options for resetting chapter numbers.</paragraph>
162<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_VAR:LB_VARCHAPTERLEVEL" id="bm_id3149829" localize="false"/>
163<paragraph role="heading" id="hd_id3147456" xml-lang="en-US" level="3" l10n="U" oldref="41">Level</paragraph>
164<paragraph role="paragraph" id="par_id3149836" xml-lang="en-US" l10n="U" oldref="42"><ahelp hid="SW_LISTBOX_TP_FLD_VAR_LB_VARCHAPTERLEVEL">Choose the heading or chapter level at which to restart numbering in the document.</ahelp></paragraph>
165<bookmark xml-lang="en-US" branch="hid/sw:Edit:TP_FLD_VAR:ED_VARSEPARATOR" id="bm_id3147605" localize="false"/>
166<paragraph role="heading" id="hd_id3147594" xml-lang="en-US" level="3" l10n="U" oldref="43">Separator</paragraph>
167<paragraph role="paragraph" id="par_id3148846" xml-lang="en-US" l10n="U" oldref="44"><ahelp hid="SW_EDIT_TP_FLD_VAR_ED_VARSEPARATOR">Type the character that you want to use as a separator between the heading or chapter levels.</ahelp></paragraph>
168<section id="uebernehmen">
169<bookmark xml-lang="en-US" branch="hid/SW_HID_FLDVAR_APPLY" id="bm_id3147069" localize="false"/>
170<paragraph role="heading" id="hd_id3147057" xml-lang="en-US" level="2" l10n="U" oldref="31">Apply</paragraph>
171<paragraph role="paragraph" id="par_id3155562" xml-lang="en-US" l10n="U" oldref="32"><ahelp hid="HID_FLDVAR_APPLY">Adds the user-defined field to the <emph>Selection</emph> list.</ahelp></paragraph>
172<embed href="text/swriter/02/14040000.xhp#syuebernehmen"/>
173</section>
174<section id="loeschen">
175<bookmark xml-lang="en-US" branch="hid/SW_HID_FLDVAR_DELETE" id="bm_id3151092" localize="false"/>
176<paragraph role="heading" id="hd_id3151080" xml-lang="en-US" level="2" l10n="U" oldref="33">Delete</paragraph>
177<paragraph role="paragraph" id="par_id3154769" xml-lang="en-US" l10n="U" oldref="34"><ahelp hid="HID_FLDVAR_DELETE">Removes the user-defined field from the selection list. You can only remove fields that are not used in the current document.</ahelp> To remove a field that is used in the current document from the list, first delete all instances of the field in the document, and then remove it from the list.</paragraph>
178<table id="tbl_id3154080">
179<tablerow>
180<tablecell>
181<paragraph role="paragraph" id="par_id3145318" xml-lang="en-US" l10n="E">
182<image id="img_id3153293" src="svx/res/nu02.png" width="0.423cm" height="0.423cm"><alt id="alt_id3153293" xml-lang="en-US">Icon</alt>
183</image></paragraph>
184</tablecell>
185<tablecell>
186<paragraph role="paragraph" id="par_id3150169" xml-lang="en-US" l10n="U" oldref="35">Delete</paragraph>
187</tablecell>
188</tablerow>
189</table>
190</section>
191</body>
192</helpdocument>
193