1 '*******************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: w_tool3.inc,v $
12 '* last change: $Author: vg $ $Date: 2008-08-18 12:43:26 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/******************************************************************************
33 '* owner : helge.delfs@sun.com
35 '* short description : Description of file
37 '\******************************************************************************
39 sub InTabelleKontrollieren
40 Call wTypeKeys ("<Home>")
41 Call wTypeKeys ("<Tab><Shift End>")
43 if GetClipBoardText <> "Text" then
44 Warnlog "Text has not been inserted in a table"
46 Call wTypeKeys "<Home>"
47 Call wTypeKeys "<Shift End>"
52 sub InTabelleKontrollierenExtra
53 Call wTypeKeys ("<Home><Shift Tab><Shift End>")
55 if GetClipBoardText <> "Der" then
56 Warnlog "Text has not been inserted in a table"
58 Call wTypeKeys "<Home>"
59 Call wTypeKeys "<Shift End>"
64 sub InTextKontrollieren
65 Call wTypeKeys ("<Home><Shift Mod1 Right>")
67 if Left$(GetClipBoardText,3) <> "Der" AND Left$(GetClipboardText,4) <> "Der " then
68 Warnlog "Table has not been changed to text"
70 Call wTypeKeys "<Home>"
71 Call wTypeKeys "<Shift End>"
76 sub AufsteigendKontrollieren ( Zahl as Boolean )
77 Call wTypeKeys "<Home><Up>",6
79 Call wTypeKeys ("<Home><Shift End>" )
80 hUseAsyncSlot( "EditCopy" )
82 if GetClipboardText <> "23" then Warnlog "1. Number not correctly sorted"
84 if GetClipboardText <> "Ahallo" then Warnlog "1. Word is not correctly sorted"
86 Call wTypeKeys ( "<Down><Down><Home><Shift End>" )
87 hUseAsyncSlot( "EditCopy" )
89 if GetClipboardText <> "54" then Warnlog "3. Number not correctly sorted"
91 if GetClipboardText <> "Ohallo" then Warnlog "3. Word not correctly sorted"
93 Call wTypeKeys ( "<Down><Down><Home><Shift End>" )
94 hUseAsyncSlot( "EditCopy" )
96 if GetClipboardText <> "65" then Warnlog "Last number is not correctly sorted"
98 if GetClipboardText <> "Zhallo" then Warnlog "Last word is not correctly sorted"
103 sub AbsteigendKontrollieren ( Zahl as Boolean )
104 Call wTypeKeys "<Home><Up>",6
106 Call wTypeKeys ( "<Home><Shift End>" )
107 hUseAsyncSlot( "EditCopy" )
109 if GetClipboardText <> "65" then Warnlog "1. Number not correctly sorted"
111 if GetClipboardText <> "Zhallo" then Warnlog "1. word not correctly sorted"
113 Call wTypeKeys ( "<Down><Down><Down><Home><Shift End>" )
114 hUseAsyncSlot( "EditCopy" )
116 if GetClipboardText <> "43" then Warnlog "4th number not correctly sorted"
118 if GetClipboardText <> "Ghallo" then Warnlog "4th word not correctly sorted"
120 Call wTypeKeys ( "<Down><Home><Shift End>" )
121 hUseAsyncSlot( "EditCopy" )
123 if GetClipboardText <> "23" then Warnlog "Wrong sort: last number. Should => "+"Ohallo"+" Is =>"+GetClipboardText
125 if GetClipboardText <> "Ahallo" then Warnlog "Wrong sort: last word. Should => "+"Ohallo"+" Is =>"+GetClipboardText
130 sub AufSortierungPruefen(i as integer)
131 Call wTypeKeys "<Home>"
132 Call wTypeKeys "<up>",6
133 Call wTypeKeys "<Shift Mod1 Right>"
134 hUseAsyncSlot( "EditCopy" )
135 if GetClipboardText = Trennzeichen then
136 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
137 Call wTypeKeys "<Right><Shift Mod1 Right>"
140 if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/1.Row incorrect"
142 Call wTypeKeys "<Mod1 Right>", 3
144 Call wTypeKeys "<Mod1 Right>"
146 Call wTypeKeys "<Shift Mod1 Right>"
147 hUseAsyncSlot( "EditCopy" )
148 if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 2.Column/1.Row incorrect"
149 Call wTypeKeys "<Down><Home>"
150 Call wTypeKeys "<Shift Mod1 Right>"
151 hUseAsyncSlot( "EditCopy" )
152 if GetClipboardText = Trennzeichen then
153 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
154 Call wTypeKeys "<Home><Shift Mod1 Right>"
157 if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/2.Row incorrect"
159 Call wTypeKeys "<Mod1 Right>", 3
161 Call wTypeKeys "<Mod1 Right>"
163 Call wTypeKeys "<Shift Mod1 Right>"
164 hUseAsyncSlot( "EditCopy" )
165 if GetClipboardText = Trennzeichen then
166 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
167 Call wTypeKeys "<Right><Shift Mod1 Right>"
170 if Left$(GetClipboardText,3) <> "DDD" then Warnlog "Entry in 2.Column/2.Row incorrect"
171 Call wTypeKeys "<Down><Home>"
173 Call wTypeKeys "<Mod1 Right>", 10
175 Call wTypeKeys "<Mod1 Right>", 5
177 Call wTypeKeys "<Shift Mod1 Right>"
178 hUseAsyncSlot( "EditCopy" )
179 if GetClipboardText = Trennzeichen then
180 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
181 Call wTypeKeys "<Right><Shift Mod1 Right>"
184 if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 4.Column/3.Row incorrect"
188 sub AbSortierungPruefen(i as integer)
189 Call wTypeKeys "<Home>"
190 Call wTypeKeys "<up>", 6
191 Call wTypeKeys "<Shift Mod1 Right>"
192 hUseAsyncSlot( "EditCopy" )
193 if GetClipboardText = Trennzeichen then
194 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
195 Call wTypeKeys "<Right><Shift Mod1 Right>"
198 if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/1.Row incorrect"
199 Call wTypeKeys "<Down><Shift Mod1 Left>"
200 hUseAsyncSlot( "EditCopy" )
201 if GetClipboardText = Trennzeichen then
202 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
203 Call wTypeKeys "<Home><Shift Mod1 Right>"
206 if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/2.Row incorrect"
208 Call wTypeKeys "<Mod1 Right>" , 4
210 Call wTypeKeys "<Mod1 Right>" , 2
212 Call wTypeKeys "<Shift Mod1 Right>"
213 hUseAsyncSlot( "EditCopy" )
214 if GetClipboardText = Trennzeichen then
215 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
216 Call wTypeKeys "<MOD1 Left>", 2
217 Call wTypeKeys "<Shift MOD1 Right>"
220 if Left$(GetClipboardText,3) <> "BBB" then Warnlog "Entry in 2.Column/2.Row incorrect"
221 Call wTypeKeys "<Left><Up>"
222 Call wTypeKeys "<Right>"
223 Call wTypeKeys "<Shift Mod1 Left>"
224 hUseAsyncSlot( "EditCopy" )
225 if GetClipboardText = Trennzeichen then
226 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
227 Call wTypeKeys "<Right><Shift Mod1 Right>"
230 if Left$(GetClipboardText,3) <> "EEE" then Warnlog "Entry in 2.Column/1.Row incorrect"
232 Call wTypeKeys "<Mod1 Right>", 6
233 Call wTypeKeys "<Down>", 3
234 Call wTypeKeys "<End><Shift Mod1 Left>"
236 Call wTypeKeys "<Mod1 Right>", 3
237 Call wTypeKeys "<Down>", 3
238 Call wTypeKeys "<Shift Mod1 Right>"
240 hUseAsyncSlot( "EditCopy" )
241 if GetClipboardText = Trennzeichen then
242 QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
243 Call wTypeKeys "<Right><Shift Mod1 Right>"
246 if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 2.Column/1.Row incorrect"
250 sub UndoRichtigBeiSortierung
251 Dim Fehler as Boolean
252 Call wTypeKeys "<Left Right>"
256 Call wTypeKeys "<Home>"
257 Call wTypeKeys "<up>", 6
258 Call wTypeKeys "<Shift Mod1 Right>"
260 if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE
261 Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
262 hUseAsyncSlot( "EditCopy" )
263 if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE
264 Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
265 hUseAsyncSlot( "EditCopy" )
266 if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE
267 Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
268 hUseAsyncSlot( "EditCopy" )
269 if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE
270 Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
271 hUseAsyncSlot( "EditCopy" )
272 if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE
273 Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
274 hUseAsyncSlot( "EditCopy" )
275 if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE
276 if Fehler = TRUE then
277 Warnlog "Undo after sorting has not been functioned correctly"
279 Call hFileOpen ( gTesttoolPath + "writer\optional\input\st1_5.sdw" )
281 Call wTypeKeys "<End>"
282 Call wTypeKeys "<Down>",6
283 Call wTypeKeys "<Mod1 a>"
288 sub TrennzeichenSetzen ( Trennstring as String )
290 Kontext "FindAndReplace"
291 if FindAndReplace.NotExists then EditSearchAndReplace
292 Kontext "FindAndReplace"
293 if Not RegularExpressions.IsVisible then More.Click
294 Select Case Trennstring
296 RegularExpressions.Check
297 SearchFor.SetText "\t"
300 RegularExpressions.Check
301 SearchFor.SetText "\t"
305 ReplaceWith.SetText TrennString
309 if MessageBox.Exists then
310 if InStr( MessageBox.GetText, "30" ) = 0 then
312 Kontext "FindAndReplace"
313 RegularExpressions.Check
314 SearchFor.SetText "\t"
315 ReplaceWith.SetText TrennString
319 if MessageBox.Exists then
320 if InStr( MessageBox.GetText, "30" ) = 0 then
323 Warnlog "Unable to insert Character. Following test doesn't work!"
331 Kontext "FindAndReplace"
333 if FindAndReplace.Exists then FindAndReplace.Close
337 function ZelleRuntertesten ( Wert$ ) as Boolean
338 Call wTypeKeys "<Down>"
339 Call wTypeKeys "<Mod1 a>"
340 hUseAsyncSlot( "EditCopy" )
341 if GetClipboardText = Wert$ then
342 ZelleRuntertesten = TRUE
344 ZelleRuntertesten = FALSE
350 sub wEinfuegenEintragAlle ( NaWieSollErheissen$ )
351 Call wTypeKeys NaWieSollErheissen$
352 Call wTypeKeys "<Mod1 Left><Shift Mod1 Right>"
354 Kontext "VerzeichniseintragEinfuegen"
356 VerzeichniseintragEinfuegen.OK
358 Call wTypeKeys "<End> "
359 Call wTypeKeys "<Left><Shift Mod1 Left>"
361 Kontext "VerzeichniseintragEinfuegen"
363 VerzeichniseintragEinfuegen.OK
365 Call wTypeKeys "<End> "
366 Call wTypeKeys "<Left><Left><Shift Mod1 Left>"
368 Kontext "VerzeichniseintragEinfuegen"
370 VerzeichniseintragEinfuegen.OK
371 Call wTypeKeys "<End> "
376 sub ReihenfolgePruefen
379 printlog " - Checking entry's on first page"
380 Call wTypeKeys "<Down><Shift Mod1 Right>"
381 hUseAsyncSlot( "EditCopy" )
382 sDummy$ = GetClipboardText
383 if sDummy$ <> "Zhallo" then
384 if sDummy$ <> "Ahallo" then
385 Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$
387 Warnlog "Sort infinitely is not in alphabetical order"
388 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
391 if GetClipboardText <> "Zhallo" then Warnlog "2. entry not Zhallo but "+GetClipboardText
394 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
397 if GetClipboardText <> "Ahallo" then Warnlog "2. entry not Ahallo but "+GetClipboardText
399 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
400 hUseAsyncSlot( "EditCopy" )
401 if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText
402 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
403 hUseAsyncSlot( "EditCopy" )
404 if GetClipboardText <> "Ghallo" then Warnlog "4. entry not Ghallo but "+GetClipboardText
406 printlog " - checking entrys on 3rd page"
407 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
408 hUseAsyncSlot( "EditCopy" )
409 sDummy$ = GetClipboardText
410 if sDummy$ <> "Zhallo" then
411 if sDummy$ <> "Ahallo" then
412 Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$
414 Warnlog "Sort infinitely is not in alphabetical order"
415 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
418 if GetClipboardText <> "Zhallo" then Warnlog "6. entry not Zhallo but "+GetClipboardText
421 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
424 if GetClipboardText <> "Ahallo" then Warnlog "6. entry not Ahallo but "+GetClipboardText
426 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
427 hUseAsyncSlot( "EditCopy" )
428 if GetClipboardText <> "Xhallo" then Warnlog "7. entry not Xhallo but "+GetClipboardText
429 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
430 hUseAsyncSlot( "EditCopy" )
431 if GetClipboardText <> "Ghallo" then Warnlog "8. entry not Ghallo but "+GetClipboardText
433 printlog " - checking page entrys"
434 Call wTypeKeys "<End><Shift Mod1 Left>"
435 hUseAsyncSlot( "EditCopy" )
436 if GetClipboardText <> "3" then Warnlog "8. Entry: Not page 3 but "+ GetClipboardText
437 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
438 hUseAsyncSlot( "EditCopy" )
439 if GetClipboardText <> "3" then Warnlog "7. Entry: Not page 3 but "+ GetClipboardText
440 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
441 hUseAsyncSlot( "EditCopy" )
442 if GetClipboardText <> "3" then Warnlog "6. entry: Not page 3 but "+ GetClipboardText
443 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
444 hUseAsyncSlot( "EditCopy" )
445 if GetClipboardText <> "3" then Warnlog "5. entry: Not page 3 but "+ GetClipboardText
446 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
447 hUseAsyncSlot( "EditCopy" )
448 if GetClipboardText <> "1" then Warnlog "4. entry: Not page 1 but "+ GetClipboardText
449 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
450 hUseAsyncSlot( "EditCopy" )
451 if GetClipboardText <> "1" then Warnlog "3. entry: Not page 1 but "+ GetClipboardText
452 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
453 hUseAsyncSlot( "EditCopy" )
454 if GetClipboardText <> "1" then Warnlog "2. entry: Not page 1 but "+ GetClipboardText
455 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
456 hUseAsyncSlot( "EditCopy" )
457 if GetClipboardText <> "1" then Warnlog "1. entry: Not page 1 but "+ GetClipboardText
458 Call wTypeKeys "<End><Up><Shift Mod1 Left>"
462 sub ReihenfolgePruefen2
463 printlog " - checking entrys"
464 Call wTypeKeys "<Down><Shift Mod1 Right>"
465 hUseAsyncSlot( "EditCopy" )
466 if GetClipboardText <> "Ahallo" then Warnlog "1. entry not Ahallo but "+GetClipboardText
467 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
468 hUseAsyncSlot( "EditCopy" )
469 if GetClipboardText <> "Ghallo" then Warnlog "2. entry not Ghallo but "+GetClipboardText
470 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
471 hUseAsyncSlot( "EditCopy" )
472 if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText
473 Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
474 hUseAsyncSlot( "EditCopy" )
475 if GetClipboardText <> "Zhallo" then Warnlog "4. entry not Zhallo but "+GetClipboardText
476 Call wTypeKeys "<Down><Mod1 Left><Shift Mod1 Right>"
477 hUseAsyncSlot( "EditCopy" )
478 if GetClipboardText <> "Bhallo " then Warnlog "Number of entrys more then 4."
480 printlog " - checking page entrys"
481 Call wTypeKeys "<Up>"
482 Call wTypeKeys "<Shift Mod1 Right>", 3
483 hUseAsyncSlot( "EditCopy" )
484 if GetClipboardText <> "1, 3" then Warnlog "4. entry: Not '1, 3' but "+ GetClipboardText
485 Call wTypeKeys "<Up>"
486 Call wTypeKeys "<Shift Mod1 Left>", 3
487 hUseAsyncSlot( "EditCopy" )
488 if GetClipboardText <> "1, 3" then Warnlog "3. entry: Not '1, 3' but "+ GetClipboardText
489 Call wTypeKeys "<Up>"
490 Call wTypeKeys "<Shift Mod1 Right>", 3
491 hUseAsyncSlot( "EditCopy" )
492 if GetClipboardText <> "1, 3" then Warnlog "2. entry: Not '1, 3' but "+ GetClipboardText
493 Call wTypeKeys "<Up>"
494 Call wTypeKeys "<Shift Mod1 Left>", 3
495 hUseAsyncSlot( "EditCopy" )
496 if GetClipboardText <> "1, 3" then Warnlog "1. entry: Not '1, 3' but "+ GetClipboardText
499 function SchriftFormatTesten ( sName$ ) as String
500 SchriftFormatTesten = sName$
503 Active.SetPage TabFont
505 if FontWest.GetSelText <> sName then SchriftFormatTesten = FontWest.GetSelText
509 ' *******************************************************************
511 function ErmittleErgebnis ( Ergebnis as String ) as Boolean
512 ErmittleErgebnis = TRUE
513 Kontext "DocumentWriter"
514 Call wTypeKeys "<End><Shift Home>"
517 if GetClipboardText <> Ergebnis then ErmittleErgebnis = FALSE
520 ' *******************************************************************
522 sub VerzeichnisUeberNavigator(Welches as integer)
525 if Navigator.NotExists then ViewNavigator
526 Kontext "NavigatorWriter"
527 if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click
529 if Auswahlliste.GetItemCount >11 then
531 Auswahlliste.Select j
532 Auswahlliste.TypeKeys "-"
538 Auswahlliste.Select 10
539 Auswahlliste.TypeKeys "+"
540 Auswahlliste.Select 10 + Welches
541 Auswahlliste.TypeKeys "<Return>"
542 Kontext "DocumentWriter"
545 '**********************************************************
547 sub sZahlenformatfuerZelle
548 Kontext "DocumentWriter"
550 Kontext "Zahlenformat"
552 KategorieFormat.Select 1
554 Kontext "DocumentWriter"
557 '**********************************************************
559 sub sNavigatorInBrauchbarenZustand
561 Kontext "NavigatorWriter"
562 if NavigatorWriter.NotExists then ViewNavigator
563 if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click
565 if Auswahlliste.GetItemCount >11 then
567 Auswahlliste.Select j
568 Auswahlliste.TypeKeys "-"
573 Auswahlliste.Select 2
574 Auswahlliste.TypeKeys "+"
576 Kontext "DocumentWriter"
579 '**********************************************************
581 sub sZellinhaltInZwischenablage(VergleichDas as string,Aktion as string)
582 Call wTypeKeys "<Home><Shift End>"
584 if VergleichDas <> GetClipboardText then Warnlog "- Table has not been splitted correctly!(" + Aktion + ")"
587 '**********************************************************
589 sub sSeiteMitBrauchbarerTabelleEinrichten
590 Call hTabelleEinfuegen
593 Active.SetPage TabTabelle
595 Tabellenname.Settext "MeineTabelle"
598 Call wTypeKeys "�berschrift 1"
599 Call wTypeKeys "<Down>"
600 Call wTypeKeys "Text 1"
601 Call wTypeKeys "<Down>"
603 Call hTabelleEinfuegen
605 Call wTypeKeys "�berschrift 2"
606 Call wTypeKeys "<Down>"
607 Call wTypeKeys "Text 2"
608 Call wTypeKeys "<Up>",1
611 '**********************************************************
613 sub wOpenContextMenu ( optional FocusParam as boolean)
614 if IsMissing(FocusParam) = True then
615 Select Case gApplication
617 Kontext "DocumentWriter"
618 Call DocumentWriter.TypeKeys "<SHIFT F10>" 'OpenContextMenu
620 Case "MASTERDOCUMENT"
621 Kontext "DocumentMasterDoc"
622 Call DocumentMasterDoc.TypeKeys "<SHIFT F10>" 'OpenContextMenu
626 if FocusParam = True then
627 Select Case gApplication
629 Kontext "DocumentWriter"
630 Call DocumentWriter.OpenContextMenu true
632 Case "MASTERDOCUMENT"
633 Kontext "DocumentMasterDoc"
634 Call DocumentMasterDoc.OpenContextMenu true
638 Select Case gApplication
640 Kontext "DocumentWriter"
641 Call DocumentWriter.OpenContextMenu
643 Case "MASTERDOCUMENT"
644 Kontext "DocumentMasterDoc"
645 Call DocumentMasterDoc.OpenContextMenu