1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
'/************************************************************************
'*
'* owner : helge.delfs@sun.com
'*
'* short description : Tools for writer/Optional - 1
'*
'************************************************************************
'*
' #0 fFileProperties
' #0 fFormatGraphic
' #0 fFormatFrame
' #0 fFormatPageWriter
' #0 fFormatParagraph
' #0 fFormatCharacter
' #0 fFormatTable
' #0 fFormatStylesCatalog
' #0 fPositionAndSize
' #0 fInsertFieldsOther
' #0 fInsertSection
' #0 fToolsAutocorrect
'*
'\***********************************************************************
'This routine is executing file/properties , then tabpage Options
'*****************************************************************
function fFileProperties(Options as string)
FileProperties
sleep(1)
Kontext
Select case Options
case "TabDokument" : active.SetPage TabDokument
case "TabBeschreibung" : active.SetPage TabBeschreibung
case "TabBenutzer" : active.SetPage TabBenutzer
case "TabInternet" : active.SetPage TabInternet
case "TabStatistik" : active.SetPage TabStatistik
end Select
Kontext Options
end function
'*****************************************************************
'This routine is executing format/graphic , then tabpage Options
'*****************************************************************
function fFormatGraphic(Options as string) as boolean
Dim j as integer, sSlotOK as boolean
try
FormatGraphics
sSlotOK = true
catch
warnlog "Unable to execute Format / Graphics"
endcatch
sleep(1)
Kontext
if sSlotOK = true then
Select case Options
case "TabType" : active.SetPage TabType
case "TabZusaetze" : active.SetPage TabZusaetze
case "TabUmlauf" : active.SetPage TabUmlauf
case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
case "TabGrafik" : active.SetPage TabGrafik
case "TabZuschneiden" : active.SetPage TabZuschneiden
case "TabUmrandung" : active.SetPage TabUmrandung
case "TabHintergrund" : active.SetPage TabHintergrund
case "TabMakro"
active.SetPage TabMakro
' if no JRE is installed a messagebox appears
Do
j = j + 1
Kontext "Active"
if Active.Exists then
if Active.GetRT = 304 then
if j = 1 then Warnlog Active.Gettext
Active.Ok
else
exit do
end if
else
exit do
end if
Loop
end select
Kontext Options
end if
fFormatGraphic = sSlotOK
end function
'*****************************************************************
'This routine is executing format/frame , then tabpage Options
'****************************************************************
function fFormatFrame(Options as string)
Sleep 1
FormatFrame
Kontext
Select case Options
case "TabType" : active.SetPage TabType
case "TabZusaetze" : active.SetPage TabZusaetze
case "TabUmlauf" : active.SetPage TabUmlauf
case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
case "TabUmrandung" : active.SetPage TabUmrandung
case "TabHintergrund" : active.SetPage TabHintergrund
case "TabSpalten" : active.SetPage TabSpalten
case "TabMakro" : active.SetPage TabMakro
end Select
Kontext Options
end function
'*************************************************************************
'This routine is executing format/page in writer , then tabpage Options
'*************************************************************************
function fFormatPageWriter(Options as string)
FormatPageWriter
Kontext
Select case Options
case "TabVerwalten" : active.SetPage TabVerwalten
case "TabSeite" : active.SetPage TabSeite
case "TabHintergrund" : active.SetPage TabHintergrund
case "TabKopfzeile" : active.SetPage TabKopfzeile
case "TabFusszeile" : active.SetPage TabFusszeile
case "TabUmrandung" : active.SetPage TabUmrandung
case "TabSpalten" : active.SetPage TabSpalten
case "TabFussnote" : active.SetPage TabFussnote
case "TabGrid" : active.SetPage TabGrid
end Select
Kontext Options
end function
'*************************************************************************
'This routine is executing format/paragraph in writer , then tabpage Options
'*************************************************************************
function fFormatParagraph(Options as string)
FormatParagraph
Kontext
Select case Options
case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende
case "TabAusrichtungAbsatz" : active.SetPage TabAusrichtungAbsatz
case "TabTextfluss" : active.SetPage TabTextfluss
case "TabAsianTypography" : active.SetPage TabAsianTypography
case "TabNumerierungAbsatz" : active.SetPage TabNumerierungAbsatz
case "TabTabulatoren" : active.SetPage TabTabulatoren
case "TabInitialen" : active.SetPage TabInitialen
case "TabUmrandung" : active.SetPage TabUmrandung
case "TabHintergrund" : active.SetPage TabHintergrund
end Select
Kontext Options
end function
'*************************************************************************
'This routine is executing format/character in writer , then tabpage Options
'*************************************************************************
function fFormatCharacter(Options as string)
FormatCharacter
Kontext
Select case Options
case "TabFont" : active.SetPage TabFont
case "TabFontEffects" : active.SetPage TabFontEffects
case "TabFontPosition" : active.SetPage TabFontPosition
case "TabAsianLayout" : active.SetPage TabAsianLayout
case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen
case "TabHintergrund" : active.SetPage TabHintergrund
end Select
Kontext Options
end function
'*************************************************************************
'This routine is executing format/table in writer , then tabpage Options
'*************************************************************************
function fFormatTable(Options as string)
FormatTable
Kontext
Select case Options
case "TabTabelle" : active.SetPage TabTabelle
case "TabTextflussTabelle" : active.SetPage TabTextflussTabelle
case "TabSpaltenTabelle" : active.SetPage TabSpaltenTabelle
case "TabUmrandung" : active.SetPage TabUmrandung
case "TabHintergrund" : active.SetPage TabHintergrund
end Select
Kontext Options
end function
'*************************************************************************
'This routine is executing Format/Styles / Catalog in writer , then tabpage Options
'*************************************************************************
function fFormatStylesCatalog(Options as string)
FormatStylesCatalog
Kontext "VorlagenKatalog"
Select case Options
case "Paragraph" : Vorlagen.Select 1
case "Character" : Vorlagen.Select 2
case "Frame" : Vorlagen.Select 3
case "Page" : Vorlagen.Select 4
case "Numbering" : Vorlagen.Select 5
end Select
end function
'******************************************************************************
'This routine is executing insert/fields/other in writer , then tabpage Options
'*******************************************************************************
function fInsertFieldsOther(Options as string)
InsertFieldsOther
Kontext
Select case Options
case "TabDokumentFeldbefehle" : active.SetPage TabDokumentFeldbefehle
case "TabReferenzen" : active.SetPage TabReferenzen
case "TabFunktionen" : active.SetPage TabFunktionen
case "TabDokumentinfoFeldbefehle" : active.SetPage TabDokumentinfoFeldbefehle
case "TabVariablen" : active.SetPage TabVariablen
case "TabDatenbank" : active.SetPage TabDatenbank
end Select
Kontext Options
end function
'******************************************************
'* insert a section with tabpage Options **
'******************************************************
function fInsertSection(Options as string)
InsertSection
wait 500
Kontext
Select case Options
case "TabBereiche" : active.SetPage TabBereiche
case "TabSpalten" : active.SetPage TabSpalten
case "TabSectionIndent" : active.SetPage TabSectionIndent
case "TabHintergrund" : active.SetPage TabHintergrund
case "TabFussEndnoten" : active.SetPage TabFussEndnoten
end Select
Kontext Options
Sleep 1
end function
'*************************************************************************
'This routine is executing Tools/AutoCorrect in writer , then tabpage Options
'*************************************************************************
function fToolsAutocorrect(Options as string)
Kontext
ToolsAutoCorrect
Select case Options
case "TabErsetzung" : active.SetPage TabErsetzung
case "TabAusnahmen" : active.SetPage TabAusnahmen
case "TabOptionenAutokorrektur" : active.SetPage TabOptionenAutokorrektur
case "TabLocalizedOptions" : active.SetPage TabLocalizedOptions
case "TabWortergaenzung" : active.SetPage TabWortergaenzung
end Select
Kontext Options
end function
'******************************************************
'* Open Format/Position and Size diglog with Options **
'******************************************************
function fPositionAndSize(Options as string)
Kontext
FormatPositionAndSize
Select case Options
case "TabPositionAndSizeWriter" : active.SetPage TabPositionAndSizeWriter
case "TabDrehung" : active.SetPage TabDrehung
case "TabSchraegstellen" : active.SetPage TabSchraegstellen
end Select
Kontext Options
end function
|