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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
| Sub S
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(21) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SearchItem.StyleFamily"
args1(0).Value = 2
args1(1).Name = "SearchItem.CellType"
args1(1).Value = 0
args1(2).Name = "SearchItem.RowDirection"
args1(2).Value = true
args1(3).Name = "SearchItem.AllTables"
args1(3).Value = false
args1(4).Name = "SearchItem.SearchFiltered"
args1(4).Value = false
args1(5).Name = "SearchItem.Backward"
args1(5).Value = false
args1(6).Name = "SearchItem.Pattern"
args1(6).Value = false
args1(7).Name = "SearchItem.Content"
args1(7).Value = false
args1(8).Name = "SearchItem.AsianOptions"
args1(8).Value = false
args1(9).Name = "SearchItem.AlgorithmType"
args1(9).Value = 1
args1(10).Name = "SearchItem.SearchFlags"
args1(10).Value = 65536
args1(11).Name = "SearchItem.SearchString"
args1(11).Value = "<i>"
args1(12).Name = "SearchItem.ReplaceString"
args1(12).Value = " "
args1(13).Name = "SearchItem.Locale"
args1(13).Value = 255
args1(14).Name = "SearchItem.ChangedChars"
args1(14).Value = 2
args1(15).Name = "SearchItem.DeletedChars"
args1(15).Value = 2
args1(16).Name = "SearchItem.InsertedChars"
args1(16).Value = 2
args1(17).Name = "SearchItem.TransliterateFlags"
args1(17).Value = 1280
args1(18).Name = "SearchItem.Command"
args1(18).Value = 3
args1(19).Name = "SearchItem.SearchFormatted"
args1(19).Value = false
args1(20).Name = "SearchItem.AlgorithmType2"
args1(20).Value = 2
args1(21).Name = "Quiet"
args1(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(21) as new com.sun.star.beans.PropertyValue
args2(0).Name = "SearchItem.StyleFamily"
args2(0).Value = 2
args2(1).Name = "SearchItem.CellType"
args2(1).Value = 0
args2(2).Name = "SearchItem.RowDirection"
args2(2).Value = true
args2(3).Name = "SearchItem.AllTables"
args2(3).Value = false
args2(4).Name = "SearchItem.SearchFiltered"
args2(4).Value = false
args2(5).Name = "SearchItem.Backward"
args2(5).Value = false
args2(6).Name = "SearchItem.Pattern"
args2(6).Value = false
args2(7).Name = "SearchItem.Content"
args2(7).Value = false
args2(8).Name = "SearchItem.AsianOptions"
args2(8).Value = false
args2(9).Name = "SearchItem.AlgorithmType"
args2(9).Value = 1
args2(10).Name = "SearchItem.SearchFlags"
args2(10).Value = 65536
args2(11).Name = "SearchItem.SearchString"
args2(11).Value = "</i>"
args2(12).Name = "SearchItem.ReplaceString"
args2(12).Value = " "
args2(13).Name = "SearchItem.Locale"
args2(13).Value = 255
args2(14).Name = "SearchItem.ChangedChars"
args2(14).Value = 2
args2(15).Name = "SearchItem.DeletedChars"
args2(15).Value = 2
args2(16).Name = "SearchItem.InsertedChars"
args2(16).Value = 2
args2(17).Name = "SearchItem.TransliterateFlags"
args2(17).Value = 1280
args2(18).Name = "SearchItem.Command"
args2(18).Value = 3
args2(19).Name = "SearchItem.SearchFormatted"
args2(19).Value = false
args2(20).Name = "SearchItem.AlgorithmType2"
args2(20).Value = 2
args2(21).Name = "Quiet"
args2(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(21) as new com.sun.star.beans.PropertyValue
args3(0).Name = "SearchItem.StyleFamily"
args3(0).Value = 2
args3(1).Name = "SearchItem.CellType"
args3(1).Value = 0
args3(2).Name = "SearchItem.RowDirection"
args3(2).Value = true
args3(3).Name = "SearchItem.AllTables"
args3(3).Value = false
args3(4).Name = "SearchItem.SearchFiltered"
args3(4).Value = false
args3(5).Name = "SearchItem.Backward"
args3(5).Value = false
args3(6).Name = "SearchItem.Pattern"
args3(6).Value = false
args3(7).Name = "SearchItem.Content"
args3(7).Value = false
args3(8).Name = "SearchItem.AsianOptions"
args3(8).Value = false
args3(9).Name = "SearchItem.AlgorithmType"
args3(9).Value = 1
args3(10).Name = "SearchItem.SearchFlags"
args3(10).Value = 65536
args3(11).Name = "SearchItem.SearchString"
args3(11).Value = "\[.*\]"
args3(12).Name = "SearchItem.ReplaceString"
args3(12).Value = " "
args3(13).Name = "SearchItem.Locale"
args3(13).Value = 255
args3(14).Name = "SearchItem.ChangedChars"
args3(14).Value = 2
args3(15).Name = "SearchItem.DeletedChars"
args3(15).Value = 2
args3(16).Name = "SearchItem.InsertedChars"
args3(16).Value = 2
args3(17).Name = "SearchItem.TransliterateFlags"
args3(17).Value = 1280
args3(18).Name = "SearchItem.Command"
args3(18).Value = 3
args3(19).Name = "SearchItem.SearchFormatted"
args3(19).Value = false
args3(20).Name = "SearchItem.AlgorithmType2"
args3(20).Value = 2
args3(21).Name = "Quiet"
args3(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(21) as new com.sun.star.beans.PropertyValue
args4(0).Name = "SearchItem.StyleFamily"
args4(0).Value = 2
args4(1).Name = "SearchItem.CellType"
args4(1).Value = 0
args4(2).Name = "SearchItem.RowDirection"
args4(2).Value = true
args4(3).Name = "SearchItem.AllTables"
args4(3).Value = false
args4(4).Name = "SearchItem.SearchFiltered"
args4(4).Value = false
args4(5).Name = "SearchItem.Backward"
args4(5).Value = false
args4(6).Name = "SearchItem.Pattern"
args4(6).Value = false
args4(7).Name = "SearchItem.Content"
args4(7).Value = false
args4(8).Name = "SearchItem.AsianOptions"
args4(8).Value = false
args4(9).Name = "SearchItem.AlgorithmType"
args4(9).Value = 1
args4(10).Name = "SearchItem.SearchFlags"
args4(10).Value = 65536
args4(11).Name = "SearchItem.SearchString"
args4(11).Value = "\(.*\)"
args4(12).Name = "SearchItem.ReplaceString"
args4(12).Value = " "
args4(13).Name = "SearchItem.Locale"
args4(13).Value = 255
args4(14).Name = "SearchItem.ChangedChars"
args4(14).Value = 2
args4(15).Name = "SearchItem.DeletedChars"
args4(15).Value = 2
args4(16).Name = "SearchItem.InsertedChars"
args4(16).Value = 2
args4(17).Name = "SearchItem.TransliterateFlags"
args4(17).Value = 1280
args4(18).Name = "SearchItem.Command"
args4(18).Value = 3
args4(19).Name = "SearchItem.SearchFormatted"
args4(19).Value = false
args4(20).Name = "SearchItem.AlgorithmType2"
args4(20).Value = 2
args4(21).Name = "Quiet"
args4(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(21) as new com.sun.star.beans.PropertyValue
args5(0).Name = "SearchItem.StyleFamily"
args5(0).Value = 2
args5(1).Name = "SearchItem.CellType"
args5(1).Value = 0
args5(2).Name = "SearchItem.RowDirection"
args5(2).Value = true
args5(3).Name = "SearchItem.AllTables"
args5(3).Value = false
args5(4).Name = "SearchItem.SearchFiltered"
args5(4).Value = false
args5(5).Name = "SearchItem.Backward"
args5(5).Value = false
args5(6).Name = "SearchItem.Pattern"
args5(6).Value = false
args5(7).Name = "SearchItem.Content"
args5(7).Value = false
args5(8).Name = "SearchItem.AsianOptions"
args5(8).Value = false
args5(9).Name = "SearchItem.AlgorithmType"
args5(9).Value = 1
args5(10).Name = "SearchItem.SearchFlags"
args5(10).Value = 65536
args5(11).Name = "SearchItem.SearchString"
args5(11).Value = "^.*\: "
args5(12).Name = "SearchItem.ReplaceString"
args5(12).Value = " "
args5(13).Name = "SearchItem.Locale"
args5(13).Value = 255
args5(14).Name = "SearchItem.ChangedChars"
args5(14).Value = 2
args5(15).Name = "SearchItem.DeletedChars"
args5(15).Value = 2
args5(16).Name = "SearchItem.InsertedChars"
args5(16).Value = 2
args5(17).Name = "SearchItem.TransliterateFlags"
args5(17).Value = 1280
args5(18).Name = "SearchItem.Command"
args5(18).Value = 3
args5(19).Name = "SearchItem.SearchFormatted"
args5(19).Value = false
args5(20).Name = "SearchItem.AlgorithmType2"
args5(20).Value = 2
args5(21).Name = "Quiet"
args5(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args5())
rem ----------------------------------------------------------------------
dim args6(21) as new com.sun.star.beans.PropertyValue
args6(0).Name = "SearchItem.StyleFamily"
args6(0).Value = 2
args6(1).Name = "SearchItem.CellType"
args6(1).Value = 0
args6(2).Name = "SearchItem.RowDirection"
args6(2).Value = true
args6(3).Name = "SearchItem.AllTables"
args6(3).Value = false
args6(4).Name = "SearchItem.SearchFiltered"
args6(4).Value = false
args6(5).Name = "SearchItem.Backward"
args6(5).Value = false
args6(6).Name = "SearchItem.Pattern"
args6(6).Value = false
args6(7).Name = "SearchItem.Content"
args6(7).Value = false
args6(8).Name = "SearchItem.AsianOptions"
args6(8).Value = false
args6(9).Name = "SearchItem.AlgorithmType"
args6(9).Value = 1
args6(10).Name = "SearchItem.SearchFlags"
args6(10).Value = 65536
args6(11).Name = "SearchItem.SearchString"
args6(11).Value = "^.*\:$"
args6(12).Name = "SearchItem.ReplaceString"
args6(12).Value = " "
args6(13).Name = "SearchItem.Locale"
args6(13).Value = 255
args6(14).Name = "SearchItem.ChangedChars"
args6(14).Value = 2
args6(15).Name = "SearchItem.DeletedChars"
args6(15).Value = 2
args6(16).Name = "SearchItem.InsertedChars"
args6(16).Value = 2
args6(17).Name = "SearchItem.TransliterateFlags"
args6(17).Value = 1280
args6(18).Name = "SearchItem.Command"
args6(18).Value = 3
args6(19).Name = "SearchItem.SearchFormatted"
args6(19).Value = false
args6(20).Name = "SearchItem.AlgorithmType2"
args6(20).Value = 2
args6(21).Name = "Quiet"
args6(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args6())
rem ----------------------------------------------------------------------
dim args7(21) as new com.sun.star.beans.PropertyValue
args7(0).Name = "SearchItem.StyleFamily"
args7(0).Value = 2
args7(1).Name = "SearchItem.CellType"
args7(1).Value = 0
args7(2).Name = "SearchItem.RowDirection"
args7(2).Value = true
args7(3).Name = "SearchItem.AllTables"
args7(3).Value = false
args7(4).Name = "SearchItem.SearchFiltered"
args7(4).Value = false
args7(5).Name = "SearchItem.Backward"
args7(5).Value = false
args7(6).Name = "SearchItem.Pattern"
args7(6).Value = false
args7(7).Name = "SearchItem.Content"
args7(7).Value = false
args7(8).Name = "SearchItem.AsianOptions"
args7(8).Value = false
args7(9).Name = "SearchItem.AlgorithmType"
args7(9).Value = 1
args7(10).Name = "SearchItem.SearchFlags"
args7(10).Value = 65536
args7(11).Name = "SearchItem.SearchString"
args7(11).Value = "^[A-Z\s]+$"
args7(12).Name = "SearchItem.ReplaceString"
args7(12).Value = " "
args7(13).Name = "SearchItem.Locale"
args7(13).Value = 255
args7(14).Name = "SearchItem.ChangedChars"
args7(14).Value = 2
args7(15).Name = "SearchItem.DeletedChars"
args7(15).Value = 2
args7(16).Name = "SearchItem.InsertedChars"
args7(16).Value = 2
args7(17).Name = "SearchItem.TransliterateFlags"
args7(17).Value = 1280
args7(18).Name = "SearchItem.Command"
args7(18).Value = 3
args7(19).Name = "SearchItem.SearchFormatted"
args7(19).Value = false
args7(20).Name = "SearchItem.AlgorithmType2"
args7(20).Value = 2
args7(21).Name = "Quiet"
args7(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args7())
rem ----------------------------------------------------------------------
dim args8(21) as new com.sun.star.beans.PropertyValue
args8(0).Name = "SearchItem.StyleFamily"
args8(0).Value = 2
args8(1).Name = "SearchItem.CellType"
args8(1).Value = 0
args8(2).Name = "SearchItem.RowDirection"
args8(2).Value = true
args8(3).Name = "SearchItem.AllTables"
args8(3).Value = false
args8(4).Name = "SearchItem.SearchFiltered"
args8(4).Value = false
args8(5).Name = "SearchItem.Backward"
args8(5).Value = false
args8(6).Name = "SearchItem.Pattern"
args8(6).Value = false
args8(7).Name = "SearchItem.Content"
args8(7).Value = false
args8(8).Name = "SearchItem.AsianOptions"
args8(8).Value = false
args8(9).Name = "SearchItem.AlgorithmType"
args8(9).Value = 1
args8(10).Name = "SearchItem.SearchFlags"
args8(10).Value = 65536
args8(11).Name = "SearchItem.SearchString"
args8(11).Value = "^[^a-z0-9]+"
args8(12).Name = "SearchItem.ReplaceString"
args8(12).Value = " "
args8(13).Name = "SearchItem.Locale"
args8(13).Value = 255
args8(14).Name = "SearchItem.ChangedChars"
args8(14).Value = 2
args8(15).Name = "SearchItem.DeletedChars"
args8(15).Value = 2
args8(16).Name = "SearchItem.InsertedChars"
args8(16).Value = 2
args8(17).Name = "SearchItem.TransliterateFlags"
args8(17).Value = 1280
args8(18).Name = "SearchItem.Command"
args8(18).Value = 3
args8(19).Name = "SearchItem.SearchFormatted"
args8(19).Value = false
args8(20).Name = "SearchItem.AlgorithmType2"
args8(20).Value = 2
args8(21).Name = "Quiet"
args8(21).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args8())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
End Sub |