1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: regular.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:34:19 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : helge.delfs@sun.com
36 '* short description : Search for regular expressions
38 '\***********************************************************************
42 call tWord_At_Paragraph_Beginning
43 call tWord_At_Paragraph_End
44 call tNone_Or_Several_Between
45 call tAtLeast_One_Between
46 call tText_At_WordBeginning
54 call tOne_Area_Selected
55 call tTwo_Areas_Selected
56 call tHexadecimal_Code
57 call tHexadecimal_Code_NEW
58 call tAttach_Behind_WordToFind
59 Call tWord_At_Beginning_With_Empty_Field
60 Call tWord_At_Beginning_With_Frame
61 Call tWord_At_End_With_Empty_Field
62 Call tWord_At_End_With_Frame
63 '---------New------------
75 '---------------------------------------------------------
76 ' Wort mit einem beliebigen Zeichen im Wort Search : geht mit '.'
78 testcase tAny_Character
79 call Ausgangszustand_herstellen
80 '/// <B>Set to default values</B> ///
81 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
82 '///+ Close 'Find&Replace' dialog if open ///
83 '///+ Point cursor to beginning of document ///
84 '///+ Open 'Find&Replace' dialog ///
85 '///+ Clear Editfield 'Search for' ///
86 '///+ Uncheck 'Whole words only' ///
87 '///+ Uncheck 'Backwards' ///
88 '///+ Uncheck 'Match Case' ///
89 '///+ Uncheck 'Current selection only' ///
90 '///+ Uncheck 'Search for Styles' ///
91 '///+ Uncheck 'Similarity Search' ///
92 '///+ Check 'Regular Expressions' ///
93 RegularExpressions.Check '/// hmmm, one time set, evry time work : just here gets regexp checked ?!///
94 '/// Start Search & Compare ///
95 Such_Text = "M.ller" 'beliebiges Zeichen im Wort
96 '///+ Enter RegExp in Field Search for : 'M.ller' ///
97 Vergleichstext = "MöllerMüller"
98 '/// Compare string found with: 'M�llerM�ller' ///
99 call Search_Und_Vergleichen
102 '---------------------------------------------------------
103 '///' Wort am Absatzanfang Search : geht mit '^' ///
105 testcase tWord_At_Paragraph_Beginning
106 call Ausgangszustand_herstellen
107 '/// <B>Set to default values</B> ///
108 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
109 '///+ Close 'Find&Replace' dialog if open ///
110 '///+ Point cursor to beginning of document ///
111 '///+ Open 'Find&Replace' dialog ///
112 '///+ Clear Editfield 'Search for' ///
113 '///+ Uncheck 'Whole words only' ///
114 '///+ Uncheck 'Backwards' ///
115 '///+ Uncheck 'Match Case' ///
116 '///+ Uncheck 'Current selection only' ///
117 '///+ Uncheck 'Search for Styles' ///
118 '///+ Uncheck 'Similarity Search' ///
119 '///+ Check 'Regular Expressions' ///
121 '/// Start Search & Compare ///
122 Such_Text = "^Anfang" 'Wort am Absatzanfang
123 '///+ Enter RegExp in Field Search for : '^Anfang' ///
124 Vergleichstext = "Anfang"
125 '/// Compare string found with: 'Anfang' ///
126 call Search_Und_Vergleichen
129 '---------------------------------------------------------
130 ' Wort am Absatzende Search : geht mit 'xxx$' - Dollarzeichen
132 testcase tWord_At_Paragraph_End
133 call Ausgangszustand_herstellen
134 '/// <B>Set to default values</B> ///
135 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
136 '///+ Close 'Find&Replace' dialog if open ///
137 '///+ Point cursor to beginning of document ///
138 '///+ Open 'Find&Replace' dialog ///
139 '///+ Clear Editfield 'Search for' ///
140 '///+ Uncheck 'Whole words only' ///
141 '///+ Uncheck 'Backwards' ///
142 '///+ Uncheck 'Match Case' ///
143 '///+ Uncheck 'Current selection only' ///
144 '///+ Uncheck 'Search for Styles' ///
145 '///+ Uncheck 'Similarity Search' ///
146 '///+ Check 'Regular Expressions' ///
148 '/// Start Search & Compare ///
149 Such_Text = "Ende$" 'Wort am Absatzende
150 '///+ Enter RegExp in Field Search for : 'Ende$' ///
151 Vergleichstext = "Ende"
152 '/// Compare string found with: 'Ende' ///
153 call Search_Und_Vergleichen
156 '---------------------------------------------------------
157 ' Wort oder Satzteile Search. Zwischen den Worten mit dem Suchbegriff darf kein oder mehrere Buchstaben stehen : geht mit '.*'
159 testcase tNone_Or_Several_Between
160 call Ausgangszustand_herstellen
161 '/// <B>Set to default values</B> ///
162 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
163 '///+ Close 'Find&Replace' dialog if open ///
164 '///+ Point cursor to beginning of document ///
165 '///+ Open 'Find&Replace' dialog ///
166 '///+ Clear Editfield 'Search for' ///
167 '///+ Uncheck 'Whole words only' ///
168 '///+ Uncheck 'Backwards' ///
169 '///+ Uncheck 'Match Case' ///
170 '///+ Uncheck 'Current selection only' ///
171 '///+ Uncheck 'Search for Styles' ///
172 '///+ Uncheck 'Similarity Search' ///
173 '///+ Check 'Regular Expressions' ///
175 '/// Start Search & Compare ///
176 Such_Text = "Peter.*Haus" 'Kein oder mehrere Zeichen dazwischen
177 '///+ Enter RegExp in Field Search for : 'Peter.*Haus' ///
178 Vergleichstext = "Peter ist im HausPeter liebt dieses HausPeters HausPeterhaus"
179 '/// Compare string found with: 'Peter ist im HausPeter liebt dieses HausPeters HausPeterhaus' ///
180 call Search_Und_Vergleichen
183 '---------------------------------------------------------
184 ' Wort oder Satzteile Search. Zwischen den Worten mit dem Suchbegriff mu├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£Ôòæ├ö├Â┬úÔö£Ôòæ├ö├Â┬úÔö£├æ mindestens ein Buchstabe stehen : geht mit '.+'
186 testcase tAtLeast_One_Between
187 call Ausgangszustand_herstellen
188 '/// <B>Set to default values</B> ///
189 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
190 '///+ Close 'Find&Replace' dialog if open ///
191 '///+ Point cursor to beginning of document ///
192 '///+ Open 'Find&Replace' dialog ///
193 '///+ Clear Editfield 'Search for' ///
194 '///+ Uncheck 'Whole words only' ///
195 '///+ Uncheck 'Backwards' ///
196 '///+ Uncheck 'Match Case' ///
197 '///+ Uncheck 'Current selection only' ///
198 '///+ Uncheck 'Search for Styles' ///
199 '///+ Uncheck 'Similarity Search' ///
200 '///+ Check 'Regular Expressions' ///
202 '/// Start Search & Compare ///
203 Such_Text = "Peter.+Haus"
204 '///+ Enter RegExp in Field Search for : 'Peter.+Haus' ///
205 Vergleichstext = "Peter ist im HausPeter liebt dieses HausPeters Haus"
206 '/// Compare string found with: 'Peter ist im HausPeter liebt dieses HausPeters Haus' ///
207 call Search_Und_Vergleichen
210 '---------------------------------------------------------
211 ' Worte mit Vergleichtext am Wortanfang Search : geht mit '\<'
213 testcase tText_At_WordBeginning
214 call Ausgangszustand_herstellen
215 '/// <B>Set to default values</B> ///
216 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
217 '///+ Close 'Find&Replace' dialog if open ///
218 '///+ Point cursor to beginning of document ///
219 '///+ Open 'Find&Replace' dialog ///
220 '///+ Clear Editfield 'Search for' ///
221 '///+ Uncheck 'Whole words only' ///
222 '///+ Uncheck 'Backwards' ///
223 '///+ Uncheck 'Match Case' ///
224 '///+ Uncheck 'Current selection only' ///
225 '///+ Uncheck 'Search for Styles' ///
226 '///+ Uncheck 'Similarity Search' ///
227 '///+ Check 'Regular Expressions' ///
229 '/// Start Search & Compare ///
231 '///+ Enter RegExp in Field Search for : '\<aaa' ///
232 Vergleichstext = "aaa"
233 '/// Compare string found with: 'aaa' ///
234 call Search_Und_Vergleichen
237 '---------------------------------------------------------
238 ' Worte mit Vergleichtext am Wortende Search : geht mit '\>'
240 testcase tText_At_WordEnd
241 call Ausgangszustand_herstellen
242 '/// <B>Set to default values</B> ///
243 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
244 '///+ Close 'Find&Replace' dialog if open ///
245 '///+ Point cursor to beginning of document ///
246 '///+ Open 'Find&Replace' dialog ///
247 '///+ Clear Editfield 'Search for' ///
248 '///+ Uncheck 'Whole words only' ///
249 '///+ Uncheck 'Backwards' ///
250 '///+ Uncheck 'Match Case' ///
251 '///+ Uncheck 'Current selection only' ///
252 '///+ Uncheck 'Search for Styles' ///
253 '///+ Uncheck 'Similarity Search' ///
254 '///+ Check 'Regular Expressions' ///
256 '/// Start Search & Compare ///
257 Such_Text = "eee\>" 'Text am Wortende
258 '///+ Enter RegExp in Field Search for : 'eee\>' ///
259 Vergleichstext = "eee"
260 '/// Compare string found with: 'eee' ///
261 call Search_Und_Vergleichen
264 '---------------------------------------------------------
265 ' Normale mit regulren Ausdrcke Search, hier das Dollarzeichen geht mit \$
268 call Ausgangszustand_herstellen
269 '/// <B>Set to default values</B> ///
270 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
271 '///+ Close 'Find&Replace' dialog if open ///
272 '///+ Point cursor to beginning of document ///
273 '///+ Open 'Find&Replace' dialog ///
274 '///+ Clear Editfield 'Search for' ///
275 '///+ Uncheck 'Whole words only' ///
276 '///+ Uncheck 'Backwards' ///
277 '///+ Uncheck 'Match Case' ///
278 '///+ Uncheck 'Current selection only' ///
279 '///+ Uncheck 'Search for Styles' ///
280 '///+ Uncheck 'Similarity Search' ///
281 '///+ Check 'Regular Expressions' ///
283 '/// Start Search & Compare ///
284 Such_Text = "\$" 'Sonderzeichen ($)
285 '///+ Enter RegExp in Field Search for : '\$' ///
286 Vergleichstext = "$$"
287 '/// Compare string found with: '$$' ///
288 call Search_Und_Vergleichen
291 '---------------------------------------------------------
292 ' sucht nach Tabulatoren : geht mit \t
295 call Ausgangszustand_herstellen
296 '/// <B>Set to default values</B> ///
297 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
298 '///+ Close 'Find&Replace' dialog if open ///
299 '///+ Point cursor to beginning of document ///
300 '///+ Open 'Find&Replace' dialog ///
301 '///+ Clear Editfield 'Search for' ///
302 '///+ Uncheck 'Whole words only' ///
303 '///+ Uncheck 'Backwards' ///
304 '///+ Uncheck 'Match Case' ///
305 '///+ Uncheck 'Current selection only' ///
306 '///+ Uncheck 'Search for Styles' ///
307 '///+ Uncheck 'Similarity Search' ///
308 '///+ Check 'Regular Expressions' ///
310 '/// Start Search & Compare ///
311 Such_Text = "\t" 'Tabulatoren
312 '///+ Enter RegExp in Field Search for : '\t' ///
313 Vergleichstext = Chr$(9)+Chr$(9)+Chr$(9)
314 '/// Compare string found with: ' ' ///
315 call Search_Und_Vergleichen
319 '---------------------------------------------------------
320 ' entweder das eine Wort oder das andere Wort Search : geht mit 'aaa|bbb'
323 call Ausgangszustand_herstellen
324 '/// <B>Set to default values</B> ///
325 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
326 '///+ Close 'Find&Replace' dialog if open ///
327 '///+ Point cursor to beginning of document ///
328 '///+ Open 'Find&Replace' dialog ///
329 '///+ Clear Editfield 'Search for' ///
330 '///+ Uncheck 'Whole words only' ///
331 '///+ Uncheck 'Backwards' ///
332 '///+ Uncheck 'Match Case' ///
333 '///+ Uncheck 'Current selection only' ///
334 '///+ Uncheck 'Search for Styles' ///
335 '///+ Uncheck 'Similarity Search' ///
336 '///+ Check 'Regular Expressions' ///
338 '/// Start Search & Compare ///
339 Such_Text = "Erstes|Zweites" 'ODER-Suche
340 '///+ Enter RegExp in Field Search for : 'Erstes|Zweites' ///
341 Vergleichstext = "ZweitesErstesZweites"
342 '/// Compare string found with: 'ZweitesErstesZweites' ///
343 call Search_Und_Vergleichen
346 '---------------------------------------------------------
347 ' sucht leere Abstze : geht mit '^$'
349 testcase tEmpty_Paragraph
350 call Ausgangszustand_herstellen
351 '/// <B>Set to default values</B> ///
352 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
353 '///+ Close 'Find&Replace' dialog if open ///
354 '///+ Point cursor to beginning of document ///
355 '///+ Open 'Find&Replace' dialog ///
356 '///+ Clear Editfield 'Search for' ///
357 '///+ Uncheck 'Whole words only' ///
358 '///+ Uncheck 'Backwards' ///
359 '///+ Uncheck 'Match Case' ///
360 '///+ Uncheck 'Current selection only' ///
361 '///+ Uncheck 'Search for Styles' ///
362 '///+ Uncheck 'Similarity Search' ///
363 '///+ Check 'Regular Expressions' ///
365 '/// Start Search & Compare ///
367 '///+ Enter RegExp in Field Search for : '^$' ///
368 if gPlatgroup = "unx" then
369 Vergleichstext = Chr$(10)
371 Vergleichstext = Chr$(13) + Chr$(10)
373 '/// Compare string found with: 'An empty paragraph' ///
374 call Search_Und_Vergleichen
377 '---------------------------------------------------------
378 ' sucht nach einem weichen Zeilenumbruch ( linefeed, newline ): geht mit '\n'
381 call Ausgangszustand_herstellen
382 '/// <B>Set to default values</B> ///
383 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
384 '///+ Close 'Find&Replace' dialog if open ///
385 '///+ Point cursor to beginning of document ///
386 '///+ Open 'Find&Replace' dialog ///
387 '///+ Clear Editfield 'Search for' ///
388 '///+ Uncheck 'Whole words only' ///
389 '///+ Uncheck 'Backwards' ///
390 '///+ Uncheck 'Match Case' ///
391 '///+ Uncheck 'Current selection only' ///
392 '///+ Uncheck 'Search for Styles' ///
393 '///+ Uncheck 'Similarity Search' ///
394 '///+ Check 'Regular Expressions' ///
396 '/// Start Search & Compare ///
397 Such_Text = "\n" 'Zeilenumbruch
398 '///+ Enter RegExp in Field Search for : '\n' ///
399 Vergleichstext = Chr$(10)
400 '/// Compare string found with: a line break ///
401 call Search_Und_Vergleichen
404 '---------------------------------------------------------
405 ' sucht alle ausgewlten Zeichen : geht mit '[xyz]'
407 testcase tSingle_Selected
408 call Ausgangszustand_herstellen
409 '/// <B>Set to default values</B> ///
410 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
411 '///+ Close 'Find&Replace' dialog if open ///
412 '///+ Point cursor to beginning of document ///
413 '///+ Open 'Find&Replace' dialog ///
414 '///+ Clear Editfield 'Search for' ///
415 '///+ Uncheck 'Whole words only' ///
416 '///+ Uncheck 'Backwards' ///
417 '///+ Uncheck 'Match Case' ///
418 '///+ Uncheck 'Current selection only' ///
419 '///+ Uncheck 'Search for Styles' ///
420 '///+ Uncheck 'Similarity Search' ///
421 '///+ Check 'Regular Expressions' ///
423 '/// Start Search & Compare ///
424 Such_Text = "[xyz]" 'Einzelne ausgewhlte Zeichen
425 '///+ Enter RegExp in Field Search for : '[xyz]' ///
426 Vergleichstext = "xZzzZzxxzzZZzZzXxYyZz"
427 '/// Compare string found with: 'xZzzZzxxzzZZzZzXxYyZz' ///
428 call Search_Und_Vergleichen
431 '---------------------------------------------------------
432 ' sucht alle Zeichen im Bereich zwischen zwei Buchstaben : geht mit '[x-z]'
434 testcase tOne_Area_Selected
435 call Ausgangszustand_herstellen
436 '/// <B>Set to default values</B> ///
437 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
438 '///+ Close 'Find&Replace' dialog if open ///
439 '///+ Point cursor to beginning of document ///
440 '///+ Open 'Find&Replace' dialog ///
441 '///+ Clear Editfield 'Search for' ///
442 '///+ Uncheck 'Whole words only' ///
443 '///+ Uncheck 'Backwards' ///
444 '///+ Uncheck 'Match Case' ///
445 '///+ Uncheck 'Current selection only' ///
446 '///+ Uncheck 'Search for Styles' ///
447 '///+ Uncheck 'Similarity Search' ///
448 '///+ Check 'Regular Expressions' ///
450 '/// Start Search & Compare ///
451 Such_Text = "[w-z]" 'Bereich ausgewhlter Zeichen
452 '///+ Enter RegExp in Field Search for : '[w-z]' ///
453 Vergleichstext = "xZWWzWzZzwWWxWwxWwzzZwWWwZwWzZzWwXxYyZz"
454 '/// Compare string found with: 'xZWWzWzZzwWWxWwxWwzzZwWWwZwWzZzWwXxYyZz' ///
455 call Search_Und_Vergleichen
458 '---------------------------------------------------------
459 ' sucht alle Zeichen aus zwei angegebenen Buchstabenbereichen : geht mit '[a-cg-h]'
461 testcase tTwo_Areas_Selected
462 call Ausgangszustand_herstellen
463 '/// <B>Set to default values</B> ///
464 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
465 '///+ Close 'Find&Replace' dialog if open ///
466 '///+ Point cursor to beginning of document ///
467 '///+ Open 'Find&Replace' dialog ///
468 '///+ Clear Editfield 'Search for' ///
469 '///+ Uncheck 'Whole words only' ///
470 '///+ Uncheck 'Backwards' ///
471 '///+ Uncheck 'Match Case' ///
472 '///+ Uncheck 'Current selection only' ///
473 '///+ Uncheck 'Search for Styles' ///
474 '///+ Uncheck 'Similarity Search' ///
475 '///+ Check 'Regular Expressions' ///
477 '/// Start Search & Compare ///
478 Such_Text = "[B-Dx-z]" 'Zwei Bereiche ausgewhlter Zeichen
479 '///+ Enter RegExp in Field Search for : '[B-Dx-z]' ///
480 Vergleichstext = "xdcbbZcddcddbzddcbddbzddcbddZczcdbdcDccxddcxddddzcbdbzZDddZbzZcbdzcBbCcDdXxYyZzcddDd"
481 '/// Compare string found with: 'xdcbbZcddcddbzddcbddbzddcbddZczcdbdcDccxddcxddddzcbdbzZDddZbzZcbdzcBbCcDdXxYyZzcddDd' ///
482 call Search_Und_Vergleichen
485 '---------------------------------------------------------
486 ' sucht alle Zeichen mit dem Hexadezimalcode .. : geht mit '\x..'
488 testcase tHexadecimal_Code_NEW
489 call Ausgangszustand_herstellen
490 '/// <B>Set to default values</B> ///
491 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
492 '///+ Close 'Find&Replace' dialog if open ///
493 '///+ Point cursor to beginning of document ///
494 '///+ Open 'Find&Replace' dialog ///
495 '///+ Clear Editfield 'Search for' ///
496 '///+ Uncheck 'Whole words only' ///
497 '///+ Uncheck 'Backwards' ///
498 '///+ Uncheck 'Match Case' ///
499 '///+ Uncheck 'Current selection only' ///
500 '///+ Uncheck 'Search for Styles' ///
501 '///+ Uncheck 'Similarity Search' ///
502 '///+ Check 'Regular Expressions' ///
504 '/// Start Search & Compare ///
505 Such_Text = "\x3E" 'Zeichen mit Hexadezimal-Code finden
506 '///+ Enter RegExp in Field Search for : '\x3E' ///
508 '/// Compare string found with: '>' ///
509 call Search_Und_Vergleichen
512 '---------------------------------------------------------
513 ' sucht alle Zeichen mit dem Hexadezimalcode .. : geht mit '\x..'
515 testcase tHexadecimal_Code
516 call Ausgangszustand_herstellen
517 '/// <B>Set to default values</B> ///
518 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
519 '///+ Close 'Find&Replace' dialog if open ///
520 '///+ Point cursor to beginning of document ///
521 '///+ Open 'Find&Replace' dialog ///
522 '///+ Clear Editfield 'Search for' ///
523 '///+ Uncheck 'Whole words only' ///
524 '///+ Uncheck 'Backwards' ///
525 '///+ Uncheck 'Match Case' ///
526 '///+ Uncheck 'Current selection only' ///
527 '///+ Uncheck 'Search for Styles' ///
528 '///+ Uncheck 'Similarity Search' ///
529 '///+ Check 'Regular Expressions' ///
531 '/// Start Search & Compare ///
532 Such_Text = "\x003E" 'Zeichen mit Hexadezimal-Code finden
533 '///+ Enter RegExp in Field Search for : '\x003E' ///
535 '/// Compare string found with: '>' ///
536 call Search_Und_Vergleichen
539 '---------------------------------------------------------
540 ' sucht Wort am Anfang eines Absatzes mit leerem Feldbefehl davor : geht mit '^'
542 testcase tWord_At_Beginning_With_Empty_Field
543 call Ausgangszustand_herstellen
544 '/// <B>Set to default values</B> ///
545 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
546 '///+ Close 'Find&Replace' dialog if open ///
547 '///+ Point cursor to beginning of document ///
548 '///+ Open 'Find&Replace' dialog ///
549 '///+ Clear Editfield 'Search for' ///
550 '///+ Uncheck 'Whole words only' ///
551 '///+ Uncheck 'Backwards' ///
552 '///+ Uncheck 'Match Case' ///
553 '///+ Uncheck 'Current selection only' ///
554 '///+ Uncheck 'Search for Styles' ///
555 '///+ Uncheck 'Similarity Search' ///
556 '///+ Check 'Regular Expressions' ///
558 '/// Start Search & Compare ///
559 Such_Text = "^Halloo"
560 '///+ Enter RegExp in Field Search for : '^Halloo' ///
561 Vergleichstext = "Halloo"
562 '/// Compare string found with: 'Halloo' ///
563 call Search_Und_Vergleichen
566 '---------------------------------------------------------
567 ' sucht Wort am Anfang eines Absatzes mit zeichengebundenen Rahmen davor : geht mit '^'
569 testcase tWord_At_Beginning_With_Frame
570 call Ausgangszustand_herstellen
571 '/// <B>Set to default values</B> ///
572 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
573 '///+ Close 'Find&Replace' dialog if open ///
574 '///+ Point cursor to beginning of document ///
575 '///+ Open 'Find&Replace' dialog ///
576 '///+ Clear Editfield 'Search for' ///
577 '///+ Uncheck 'Whole words only' ///
578 '///+ Uncheck 'Backwards' ///
579 '///+ Uncheck 'Match Case' ///
580 '///+ Uncheck 'Current selection only' ///
581 '///+ Uncheck 'Search for Styles' ///
582 '///+ Uncheck 'Similarity Search' ///
583 '///+ Check 'Regular Expressions' ///
585 '/// Start Search & Compare ///
586 Such_Text = "^Rahmen"
587 '///+ Enter RegExp in Field Search for : '^Rahmen' ///
588 Vergleichstext = "Rahmen"
589 '/// Compare string found with: 'Rahmen' ///
590 call Search_Und_Vergleichen
593 '---------------------------------------------------------
594 ' sucht Wort am Ende eines Absatzes mit leerem Feldbefehl davor : geht mit '^'
596 testcase tWord_At_End_With_Empty_Field
597 call Ausgangszustand_herstellen
598 '/// <B>Set to default values</B> ///
599 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
600 '///+ Close 'Find&Replace' dialog if open ///
601 '///+ Point cursor to beginning of document ///
602 '///+ Open 'Find&Replace' dialog ///
603 '///+ Clear Editfield 'Search for' ///
604 '///+ Uncheck 'Whole words only' ///
605 '///+ Uncheck 'Backwards' ///
606 '///+ Uncheck 'Match Case' ///
607 '///+ Uncheck 'Current selection only' ///
608 '///+ Uncheck 'Search for Styles' ///
609 '///+ Uncheck 'Similarity Search' ///
610 '///+ Check 'Regular Expressions' ///
612 '/// Start Search & Compare ///
613 Such_Text = "hhallo$"
614 '///+ Enter RegExp in Field Search for : 'hhallo$' ///
615 Vergleichstext = "hhallo"
616 '/// Compare string found with: 'hhallo' ///
617 call Search_Und_Vergleichen
620 '---------------------------------------------------------
621 ' sucht Wort am Ende eines Absatzes mit zeichengebundenen Rahmen davor : geht mit '^'
623 testcase tWord_At_End_With_Frame
624 call Ausgangszustand_herstellen
625 '/// <B>Set to default values</B> ///
626 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
627 '///+ Close 'Find&Replace' dialog if open ///
628 '///+ Point cursor to beginning of document ///
629 '///+ Open 'Find&Replace' dialog ///
630 '///+ Clear Editfield 'Search for' ///
631 '///+ Uncheck 'Whole words only' ///
632 '///+ Uncheck 'Backwards' ///
633 '///+ Uncheck 'Match Case' ///
634 '///+ Uncheck 'Current selection only' ///
635 '///+ Uncheck 'Search for Styles' ///
636 '///+ Uncheck 'Similarity Search' ///
637 '///+ Check 'Regular Expressions' ///
639 '/// Start Search & Compare ///
640 Such_Text = "Rahmenend$"
641 '///+ Enter RegExp in Field Search for : 'Rahmenend$' ///
642 Vergleichstext = "Rahmenend"
643 '/// Compare string found with: 'Rahmenend' ///
644 call Search_Und_Vergleichen
647 '---------------------------------------------------------
648 testcase tAttach_Behind_WordToFind
649 call Ausgangszustand_herstellen
650 '/// <B>Set to default values</B> ///
651 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
652 '///+ Close 'Find&Replace' dialog if open ///
653 '///+ Point cursor to beginning of document ///
654 '///+ Open 'Find&Replace' dialog ///
655 '///+ Clear Editfield 'Search for' ///
656 '///+ Uncheck 'Whole words only' ///
657 '///+ Uncheck 'Backwards' ///
658 '///+ Uncheck 'Match Case' ///
659 '///+ Uncheck 'Current selection only' ///
660 '///+ Uncheck 'Search for Styles' ///
661 '///+ Uncheck 'Similarity Search' ///
662 '///+ Check 'Regular Expressions' ///
664 '/// look for 'Sonderzeichen' replace with '& sind toll' ///'
665 '/// Start Search & Compare ///
666 Such_Text = "Sonderzeichen" 'Anh├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£ÔòæÔö£├ÂÔö£├éÔö¼├║Ôö£├ÂÔö£ÔòùÔö£├Ñngen an gesuchtes Wort
667 '///+ Enter RegExp in Field Search for : 'Sonderzeichen' ///
668 SearchFor.SetText Such_Text
669 ReplaceWith.SetText "& sind toll"
673 if Active.Exists then
674 if Active.GetRT = 304 then
675 Active.OK 'MSG-Box (... x ersetzt) schlie�en
677 Warnlog "Messagebox, how often replaced, not up !"
680 Kontext "FindAndReplace"
682 kontext "DocumentWriter"
683 DocumentWriter.Typekeys "<PAGEUP>"
684 DocumentWriter.Typekeys "<MOD1 HOME>"
686 kontext "FindAndReplace" 'Search&Replace-Fenster ├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£ÔòæÔö£├ÂÔö£├éÔö¼├║├ö├Â┬úÔö¼┬½ffnen
687 if RegularExpressions.IsVisible = False then More.Click
688 RegularExpressions.Uncheck
689 Such_Text = "Sonderzeichen sind toll"
690 Vergleichstext = "Sonderzeichen sind tollSonderzeichen sind toll"
691 call Search_Und_Vergleichen
694 '--------------NEW ONES from TBO; to SO 6.0---------------------------------
696 testcase tChartype_digit
697 call Ausgangszustand_herstellen
698 '/// <B>Set to default values</B> ///
699 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
700 '///+ Close 'Find&Replace' dialog if open ///
701 '///+ Point cursor to beginning of document ///
702 '///+ Open 'Find&Replace' dialog ///
703 '///+ Clear Editfield 'Search for' ///
704 '///+ Uncheck 'Whole words only' ///
705 '///+ Uncheck 'Backwards' ///
706 '///+ Uncheck 'Match Case' ///
707 '///+ Uncheck 'Current selection only' ///
708 '///+ Uncheck 'Search for Styles' ///
709 '///+ Uncheck 'Similarity Search' ///
710 '///+ Check 'Regular Expressions' ///
712 '/// Start Search & Compare ///
713 Such_Text = "[:digit:]*"
714 '///+ Enter RegExp in Field Search for : '[:digit:]*' ///
715 Vergleichstext = "²³¹¼½¾"
716 '/// Compare string found with: '' ///
717 call Search_Und_Vergleichen
720 testcase tChartype_space
721 call Ausgangszustand_herstellen
722 '/// <B>Set to default values</B> ///
723 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
724 '///+ Close 'Find&Replace' dialog if open ///
725 '///+ Point cursor to beginning of document ///
726 '///+ Open 'Find&Replace' dialog ///
727 '///+ Clear Editfield 'Search for' ///
728 '///+ Uncheck 'Whole words only' ///
729 '///+ Uncheck 'Backwards' ///
730 '///+ Uncheck 'Match Case' ///
731 '///+ Uncheck 'Current selection only' ///
732 '///+ Uncheck 'Search for Styles' ///
733 '///+ Uncheck 'Similarity Search' ///
734 '///+ Check 'Regular Expressions' ///
736 '/// Start Search & Compare ///
737 Such_Text = "[:space:]*"
738 '///+ Enter RegExp in Field Search for : '[:space:]*' ///
740 '/// Compare string found with: 'All spaces in document' ///
741 call Search_Und_Vergleichen
744 testcase tChartype_print
745 call Ausgangszustand_herstellen
746 '/// <B>Set to default values</B> ///
747 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
748 '///+ Close 'Find&Replace' dialog if open ///
749 '///+ Point cursor to beginning of document ///
750 '///+ Open 'Find&Replace' dialog ///
751 '///+ Clear Editfield 'Search for' ///
752 '///+ Uncheck 'Whole words only' ///
753 '///+ Uncheck 'Backwards' ///
754 '///+ Uncheck 'Match Case' ///
755 '///+ Uncheck 'Current selection only' ///
756 '///+ Uncheck 'Search for Styles' ///
757 '///+ Uncheck 'Similarity Search' ///
758 '///+ Check 'Regular Expressions' ///
760 '/// Start Search & Compare ///
761 Such_Text = "[:print:]*"
762 '///+ Enter RegExp in Field Search for : '[:print:]*' ///
763 Vergleichstext = "HuhuhuHuhuhuTest-Text für "+chr$(34)+"Reguläre Ausdrücke"+chr$(34)+"Ein beliebiges Zeichen in einem WortFinde Möller und Müller, nicht Mller und Mueller !Wort am Anfang des AbsatzesAnfang Quaeramus tum aliarum rerum, quae vitam instruunt, diligens sine admiratione cuiusquam, usura fortunae muneribus, non servitura.Wort am Ende des AbsatzesQuaeramus tum aliarum rerum, quae vitam instruunt, diligens sine admiratione cuiusquam, usura fortunae muneribus, non servitura EndeKein oder mehrere Zeichen zwischen den WörternPeter ist im Haus. - Aha !Peter liebt dieses Haus. - Warum?Es ist Peters Haus. Ach so.Das Peterhaus. - Natürlich!Suchtext am Anfang des Wortesaaahier kommt das wortaaaSuchtext am Ende des Worteseeehier kommt das worteeeSonderzeichen$TabulatorenHiersindTabsgesetzt !AlternativgruppenErst kam ein Zweites WortDann kam ein Erstes WortUnd wieder ein Zweites WortLeerer AbsatzZeilenvorschubSonderzeichen@`Àà!Aa¡Áá"+chr$(34)+"Bb¢Ââ#Cc£Ãã$Dd¤Ää%Ee¥Åå&FfÆæ'Gg§Çç(Hh¨Èè)Ii©ÉéJjªÊê+KkËë,Ll¬ÌìMmÍí.®Îî/Oo¯ÏïPp°ÐðQq±ÑñRr²ÒòSs³ÓóTt´ÔôUuÕõVv¶ÖöWw·×÷Xx¸ØøYy¹Ùù:ZzºÚú;[{Ûû<\|¼Üü=]}½Ýý>^~¾Þþ?_¿ßÿ-RahmenHalloo kikiriki kirikeircidkvvdn hhalloDer Rahmen ist hier hinten Rahmenend" 'Test-Text für "+chr$(34)+"Reguläre Ausdrücke"+chr$(34)
764 '/// Compare string found with: '' ///
765 call Search_Und_Vergleichen
768 testcase tChartype_alnum
769 call Ausgangszustand_herstellen
770 '/// <B>Set to default values</B> ///
771 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
772 '///+ Close 'Find&Replace' dialog if open ///
773 '///+ Point cursor to beginning of document ///
774 '///+ Open 'Find&Replace' dialog ///
775 '///+ Clear Editfield 'Search for' ///
776 '///+ Uncheck 'Whole words only' ///
777 '///+ Uncheck 'Backwards' ///
778 '///+ Uncheck 'Match Case' ///
779 '///+ Uncheck 'Current selection only' ///
780 '///+ Uncheck 'Search for Styles' ///
781 '///+ Uncheck 'Similarity Search' ///
782 '///+ Check 'Regular Expressions' ///
784 '/// Start Search & Compare ///
785 Such_Text = "[:alnum:]*"
786 '///+ Enter RegExp in Field Search for : '[:alnum:]*' ///
787 Vergleichstext = "HuhuhuHuhuhuTestTextfürReguläreAusdrückeEinbeliebigesZeichenineinemWortFindeMöllerundMüllernichtMllerundMuellerWortamAnfangdesAbsatzesAnfangQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraWortamEndedesAbsatzesQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraEndeKeinodermehrereZeichenzwischendenWörternPeteristimHausAhaPeterliebtdiesesHausWarumEsistPetersHausAchsoDasPeterhausNatürlichSuchtextamAnfangdesWortesaaahierkommtdaswortaaaSuchtextamEndedesWorteseeehierkommtdasworteeeSonderzeichenTabulatorenHiersindTabsgesetztAlternativgruppenErstkameinZweitesWortDannkameinErstesWortUndwiedereinZweitesWortLeererAbsatzZeilenvorschubSonderzeichenÀàAaÁáBbÂâCcÃãDdÄäEeÅåFfÆæGgÇçHhÈèIiÉéJjªÊêKkËëLlÌìMmÍíÎîOoÏïPpÐðQqÑñRr²ÒòSs³ÓóTtÔôUuÕõVvÖöWwXxØøYy¹ÙùZzºÚúÛû¼Üü½Ýý¾ÞþßÿRahmenHallookikirikikirikeircidkvvdnhhalloDerRahmenisthierhintenRahmenend" 'Test
788 '/// Compare string found with: '' ///
789 call Search_Und_Vergleichen
792 testcase tChartype_alpha
793 call Ausgangszustand_herstellen
794 '/// <B>Set to default values</B> ///
795 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
796 '///+ Close 'Find&Replace' dialog if open ///
797 '///+ Point cursor to beginning of document ///
798 '///+ Open 'Find&Replace' dialog ///
799 '///+ Clear Editfield 'Search for' ///
800 '///+ Uncheck 'Whole words only' ///
801 '///+ Uncheck 'Backwards' ///
802 '///+ Uncheck 'Match Case' ///
803 '///+ Uncheck 'Current selection only' ///
804 '///+ Uncheck 'Search for Styles' ///
805 '///+ Uncheck 'Similarity Search' ///
806 '///+ Check 'Regular Expressions' ///
808 '/// Start Search & Compare ///
809 Such_Text = "[:alpha:]*"
810 '///+ Enter RegExp in Field Search for : '[:alpha:]*' ///
811 Vergleichstext = "HuhuhuHuhuhuTestTextfürReguläreAusdrückeEinbeliebigesZeichenineinemWortFindeMöllerundMüllernichtMllerundMuellerWortamAnfangdesAbsatzesAnfangQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraWortamEndedesAbsatzesQuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraEndeKeinodermehrereZeichenzwischendenWörternPeteristimHausAhaPeterliebtdiesesHausWarumEsistPetersHausAchsoDasPeterhausNatürlichSuchtextamAnfangdesWortesaaahierkommtdaswortaaaSuchtextamEndedesWorteseeehierkommtdasworteeeSonderzeichenTabulatorenHiersindTabsgesetztAlternativgruppenErstkameinZweitesWortDannkameinErstesWortUndwiedereinZweitesWortLeererAbsatzZeilenvorschubSonderzeichenÀàAaÁáBbÂâCcÃãDdÄäEeÅåFfÆæGgÇçHhÈèIiÉéJjªÊêKkËëLlÌìMmÍíÎîOoÏïPpÐðQqÑñRrÒòSsÓóTtÔôUuÕõVvÖöWwXxØøYyÙùZzºÚúÛûÜüÝýÞþßÿRahmenHallookikirikikirikeircidkvvdnhhalloDerRahmenisthierhintenRahmenend" 'Test"
812 '/// Compare string found with: '' ///
813 call Search_Und_Vergleichen
816 testcase tChartype_cntrl
817 call Ausgangszustand_herstellen
818 '/// <B>Set to default values</B> ///
819 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
820 '///+ Close 'Find&Replace' dialog if open ///
821 '///+ Point cursor to beginning of document ///
822 '///+ Open 'Find&Replace' dialog ///
823 '///+ Clear Editfield 'Search for' ///
824 '///+ Uncheck 'Whole words only' ///
825 '///+ Uncheck 'Backwards' ///
826 '///+ Uncheck 'Match Case' ///
827 '///+ Uncheck 'Current selection only' ///
828 '///+ Uncheck 'Search for Styles' ///
829 '///+ Uncheck 'Similarity Search' ///
830 '///+ Check 'Regular Expressions' ///
832 '/// Start Search & Compare ///
833 Such_Text = "[:cntrl:]*"
834 '///+ Enter RegExp in Field Search for : '[:cntrl:]*' ///
835 Vergleichstext = Chr(9) + Chr(9) + Chr(9)
836 '/// Compare string found with: '' ///
837 call Search_Und_Vergleichen
840 testcase tChartype_lower
841 call Ausgangszustand_herstellen
842 '/// <B>Set to default values</B> ///
843 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
844 '///+ Close 'Find&Replace' dialog if open ///
845 '///+ Point cursor to beginning of document ///
846 '///+ Open 'Find&Replace' dialog ///
847 '///+ Clear Editfield 'Search for' ///
848 '///+ Uncheck 'Whole words only' ///
849 '///+ Uncheck 'Backwards' ///
850 '///+ Uncheck 'Match Case' ///
851 '///+ Uncheck 'Current selection only' ///
852 '///+ Uncheck 'Search for Styles' ///
853 '///+ Uncheck 'Similarity Search' ///
854 '///+ Check 'Regular Expressions' ///
856 '/// Start Search & Compare ///
857 Such_Text = "[:lower:]*"
858 '///+ Enter RegExp in Field Search for : '[:lower:]*' ///
859 Vergleichstext = "uhuhuuhuhuestextfüreguläreusdrückeinbeliebigeseichenineinemortindeöllerundüllernichtllerunduellerortamnfangdesbsatzesnfanguaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonservituraortamndedesbsatzesuaeramustumaliarumrerumquaevitaminstruuntdiligenssineadmirationecuiusquamusurafortunaemuneribusnonserviturandeeinodermehrereeichenzwischendenörterneteristimaushaeterliebtdiesesausarumsistetersauschsoaseterhausatürlichuchtextamnfangdesortesaaahierkommtdaswortaaauchtextamndedesorteseeehierkommtdasworteeeonderzeichenabulatoreniersindabsgesetztlternativgruppenrstkameinweitesortannkameinrstesortndwiedereinweitesorteererbsatzeilenvorschubonderzeichenàaábâcãdäeåfægçhèiéjªêkëlìmíîoïpðqñròsótôuõvöwxøyùzºúûüýþßÿahmenallookikirikikirikeircidkvvdnhhalloerahmenisthierhintenahmenend" 'est"
860 '/// Compare string found with: '' ///
862 call Search_Und_Vergleichen
865 testcase tChartype_upper
866 call Ausgangszustand_herstellen
867 '/// <B>Set to default values</B> ///
868 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
869 '///+ Close 'Find&Replace' dialog if open ///
870 '///+ Point cursor to beginning of document ///
871 '///+ Open 'Find&Replace' dialog ///
872 '///+ Clear Editfield 'Search for' ///
873 '///+ Uncheck 'Whole words only' ///
874 '///+ Uncheck 'Backwards' ///
875 '///+ Uncheck 'Match Case' ///
876 '///+ Uncheck 'Current selection only' ///
877 '///+ Uncheck 'Search for Styles' ///
878 '///+ Uncheck 'Similarity Search' ///
879 '///+ Check 'Regular Expressions' ///
881 '/// Start Search & Compare ///
882 Such_Text = "[:upper:]*"
883 '///+ Enter RegExp in Field Search for : '[:upper:]*' ///
884 Vergleichstext = "HHTTRAEZWFMMMMWAAAQWEAQEKZWPHAPHWEPHADPNSAWSEWSTHTAEZWDEWUZWLAZSÀAÁBÂCÃDÄEÅFÆGÇHÈIÉJÊKËLÌMÍÎOÏPÐQÑRÒSÓTÔUÕVÖWXØYÙZÚÛÜÝÞRHDRR"
885 '/// Compare string found with: '' ///
887 call Search_Und_Vergleichen
890 '---------------------------------------------------------
891 '---------------------------------------------------------
892 '--------------- Unterprogramme ----------------------
893 '---------------------------------------------------------
894 sub Ausgangszustand_herstellen
895 '/// <B>Set to default values</B> ///
896 '///+ Open file "..\writer\optional\input\search\regu_aus.sxw" ///
897 '///+ Close 'Find&Replace' dialog if open ///
898 '///+ Point cursor to beginning of document ///
899 '///+ Open 'Find&Replace' dialog ///
900 '///+ Clear Editfield 'Search for' ///
901 '///+ Uncheck 'Whole words only' ///
902 '///+ Uncheck 'Backwards' ///
903 '///+ Uncheck 'Match Case' ///
904 '///+ Uncheck 'Current selection only' ///
905 '///+ Uncheck 'Search for Styles' ///
906 '///+ Uncheck 'Similarity Search' ///
907 '///+ Check 'Regular Expressions' ///
908 Call hFileOpen ( gtesttoolpath + "writer\optional\input\search\regu_aus.sxw")
909 Call sMakeReadOnlyDocumentEditable
911 if FindAndReplace.Exists then FindAndReplace.Close
912 kontext "DocumentWriter"
913 DocumentWriter.Typekeys "<PAGEUP>", 2 'an den Anfang des Textes gehen
914 DocumentWriter.Typekeys "<MOD1 HOME>"
916 kontext "FindAndReplace" 'Search&Replace-Fenster ├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£ÔòæÔö£├ÂÔö£├éÔö¼├║├ö├Â┬úÔö¼┬½ffnen
921 if SimilaritySearch.IsVisible = False then More.Click
922 if SimilaritySearch.IsEnabled then SimilaritySearch.Uncheck
923 if SearchForStyles.IsEnabled then SearchForStyles.Uncheck
924 if RegularExpressions.IsEnabled then RegularExpressions.Uncheck
925 if NoFormat.IsEnabled then NoFormat.Click
926 if CurrentSelectionOnly.IsEnabled then CurrentSelectionOnly.Uncheck
927 WholeWordsOnly.Uncheck 'Im Suchdialog alles unchecken,
928 Backwards.Uncheck 'damit ein definierter Anfangs-
929 MatchCase.Uncheck 'zustand erreicht wird.
930 RegularExpressions.Check 'Regul├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£ÔòæÔö£├ÂÔö£├éÔö¼├║Ôö£├ÂÔö£ÔòùÔö£├Ñrer Ausdruck mu├ö├Â┬úÔö£├é├ö├Â┬úÔö£├®├ö├Â┬╝Ôö£Ôòæ├ö├Â┬úÔö£Ôòæ├ö├Â┬úÔö£├æ gecheckt sein
933 '-------------------------------------------------------
934 sub Search_Und_Vergleichen
935 dim dummy as string 'Sucht den Ausdruck und vergleicht
936 'Such_Text mit dem Text, der nach
937 SearchFor.SetText Such_Text 'nach der Suche markiert ist und
938 if Such_Text = "$" then
944 if Active.Exists then
945 if Active.GetRT = 304 then ' MESSBOX
946 Warnlog "active: " + Active.Gettext
950 kontext "FindAndReplace"
951 if FindAndReplace.Exists then
954 Warnlog "Dialog 'Find & Replace' not open anymore!"
956 Kontext "DocumentWriter"
960 Warnlog "Edit /Copy disabled!"
961 DocumentWriter.Typekeys "<MOD1 HOME>"
967 if Vergleichstext = chr(13)+chr(10) OR Vergleichstext = chr(10) OR Vergleichstext = chr(13) then
970 dummy = GetClipboardText
972 if Vergleichstext <> dummy then
973 Warnlog "'",dummy,"' has been found, and not '",Vergleichstext,"'"
975 printlog "'Find' found correct word!"
977 DocumentWriter.Typekeys "<MOD1 HOME>"