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: w_tools_autocorrection.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:44:33 $
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 : Test the AutoCorrect/AutoFormat/Word tools
38 '************************************************************************
42 '\***********************************************************************
44 function fAutocorrectOptions(Options as String)
45 '/// Open Tools/Autocorrect/Autoformat diglog with tab page Options
46 '///+ then choose the relevant Options and press 'space bar'
50 Active.Setpage TabOptionenAutokorrektur
51 Kontext "TabOptionenAutokorrektur"
53 Einstellungen.TypeKeys "<Home>"
56 case "UseReplacementTable" : wait 500
57 case "CorrectTWoINitialCApitals" : Einstellungen.TypeKeys "<Down>"
58 case "CapitalizeFirstLetter" : Einstellungen.TypeKeys "<Down>",2
59 case "AutomaticBoldAndUnderline" : Einstellungen.TypeKeys "<Down>",3
60 case "URLRecognition" : Einstellungen.TypeKeys "<Down>",4
61 case "Replace1st" : Einstellungen.TypeKeys "<Down>",5
62 case "Replace1/2" : Einstellungen.TypeKeys "<Down>",6
63 case "ReplaceDashes" : Einstellungen.TypeKeys "<Down>",7
64 case "DeleteSpaceParagraph" : Einstellungen.TypeKeys "<Down>",8
65 case "DeleteSpaceLine" : Einstellungen.TypeKeys "<Down>",9
66 case "IgnoreDoulbeSpaces" : Einstellungen.TypeKeys "<Down>",10
67 case "ApplyNumbering" : Einstellungen.TypeKeys "<Down>",11
68 case "ApplyBorder" : Einstellungen.TypeKeys "<Down>",12
69 case "CreateTable" : Einstellungen.TypeKeys "<Down>",13
70 case "ApplyStyles" : Einstellungen.TypeKeys "<Down>",14
71 case "RemoveBlankParagraphs" : Einstellungen.TypeKeys "<Down>",15
72 case "ReplaceCustomStyles" : Einstellungen.TypeKeys "<Down>",16
73 case "ReplaceBullets" : Einstellungen.TypeKeys "<Down>",17
74 case "ReplaceQuotes" : Einstellungen.TypeKeys "<Down>",18
75 case "CombineSingleLine" : Einstellungen.TypeKeys "<End>"
79 Einstellungen.TypeKeys "<SPACE>"
80 TabOptionenAutokorrektur.OK
84 '---------------------------------------------------------------
86 function fFormatCharacter(Options as string)
87 '/// Open format/character diglog with Options.
92 case "TabFont" : active.SetPage TabFont
93 case "TabFontEffects" : active.SetPage TabFontEffects
94 case "TabFontPosition" : active.SetPage TabFontPosition
95 case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen
96 case "TabHintergrund" : active.SetPage TabHintergrund
103 '-------------------------------------------------------------------------
105 function fFormatParagraph(Options as string)
106 '/// Open format/paragraph diglog with Options
111 case "TabUmrandung" : active.SetPage TabUmrandung 'Borders
112 case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende 'Indents & Spacing
119 '-------------------------------------------------------------------------
121 function fDeleteAllEntries()
122 '/// This function is to delete all entries in tools/autocorrect/Word completions.
127 Active.Setpage TabWortergaenzung
128 Kontext "TabWortergaenzung"
130 if GesammelteWorte.GetItemCount > 0 then
131 for i= 1 to GesammelteWorte.GetItemCount
132 GesammelteWorte.Select 1
133 if EintragLoeschen.IsEnabled then
134 EintragLoeschen.Click
136 i = GesammelteWorte.GetItemCount + 1