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: g_accessability.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:39 $
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 : wolfram.garten@sun.com
36 '* short description : Accessability
38 '**************************************************************************************
42 '\*************************************************************************************
46 call hTextrahmenErstellen ("Sun",20,20,70,20)
48 hTypeKeys ("<escape><escape>")
49 hTypeKeys ("<end><shift home>")
52 if GetClipboardText <> "" then
53 warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
56 Printlog "Left text edit mode :-)"
62 hTypeKeys ("<shift home>")
65 if GetClipboardText = "Sun is" then
66 Printlog "Activating a textobject with 'printable' characters works :-)"
68 warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
71 warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
74 hTypeKeys ("<escape><escape>")
75 hTypeKeys ("<end><shift home>")
78 if GetClipboardText <> "" then
79 warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
82 Printlog "Left text edit mode :-)"
86 ' hTypeKeys ("<end><shift home>")
87 hTypeKeys ("<shift home>")
90 if GetClipboardText = "Sun is" then
91 Printlog "Activating a textobject with <F2> works :-)"
93 warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
96 warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
99 hTypeKeys ("<escape><escape>")
100 hTypeKeys ("<end><shift home>")
103 if GetClipboardText <> "" then
104 warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
107 Printlog "Left text edit mode :-)"
110 hTypeKeys ("<Return>")
111 ' hTypeKeys ("<end><shift home>")
112 hTypeKeys ("<shift home>")
115 if GetClipboardText = "Sun is" then
116 Printlog "Activating a textobject with <Return> works :-)"
118 warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
121 warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
129 call hTextrahmenErstellen ("A",20,20,30,30)
130 hTypeKeys ("<escape><escape>")
131 call hTextrahmenErstellen ("B",10,10,15,15)
132 hTypeKeys ("<escape><escape>")
133 call hTextrahmenErstellen ("C",40,40,50,50)
134 hTypeKeys ("<escape><escape>")
136 hTypeKeys ("<mod1 Return>")
137 ' hTypeKeys ("<end><shift home>")
138 hTypeKeys ("<shift home>")
141 if GetClipboardText <> "A" then
142 warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
145 warnlog "Unexpected error :-("
147 hTypeKeys ("<mod1 Return>")
148 ' hTypeKeys ("<end><shift home>")
149 hTypeKeys ("<shift home>")
152 if GetClipboardText <> "B" then
153 warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
156 warnlog "Unexpected error :-("
158 hTypeKeys ("<mod1 Return>")
159 hTypeKeys ("<end><shift home>")
162 if GetClipboardText <> "C" then
163 warnlog "First textbox not activated :-( Instead '" + GetClipboardText + "'"
166 warnlog "Unexpected error :-("
169 hTypeKeys ("<mod1 Return>")
170 hTypeKeys ("<PageDown>")
171 call hTextrahmenErstellen ("D",20,20,30,30)
172 hTypeKeys ("<escape><escape>")
173 hTypeKeys ("<mod1 Return>")
174 hTypeKeys ("<end><shift home>")
177 if GetClipboardText <> "D" then
178 warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
181 warnlog "Unexpected error :-("
184 if (gApplication = "IMPRESS") then
185 hTypeKeys ("<mod1 Return>")
186 FormatModifyPage ' ..Layout
189 hTypeKeys ("<PageDown>")
190 hTypeKeys ("<PageDown>")
192 LayoutsPreview.TypeKeys "<home>"
193 LayoutsPreview.TypeKeys "<down>"
194 LayoutsPreview.TypeKeys "<Return>"
195 hTypeKeys ("<mod1 Return>")
196 hTypeKeys ("<end><shift home>")
199 if GetClipboardText <> "" then
200 warnlog "No new layout :-( '" + GetClipboardText + "'"
203 Printlog "Layout accepted :-)"
206 hTypeKeys ("<end><shift home>")
209 if GetClipboardText <> "Great" then
210 warnlog "No new layout 2:-( '" + GetClipboardText + "'"
213 Printlog "Layout accepted :-)"
224 if (gApplication = "IMPRESS") then
228 LayoutsPreview.TypeKeys "<home>"
229 kontext "Pagelayout_UndoDeleteWarning"
230 if Pagelayout_UndoDeleteWarning.exists then
231 Pagelayout_UndoDeleteWarning.ok
235 LayoutsPreview.TypeKeys "<RIGHT>"
236 kontext "Pagelayout_UndoDeleteWarning"
237 if Pagelayout_UndoDeleteWarning.exists then
238 warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
239 Pagelayout_UndoDeleteWarning.ok
243 LayoutsPreview.TypeKeys "<Return>"
245 hTypeKeys ("<tab><tab>")
247 hTypeKeys ("<Return>")
249 kontext "GeneralFileDialog"
250 if GeneralFileDialog.exists then
252 GeneralFileDialog.cancel
254 warnlog "Graphic wasn't selected :-("
257 LayoutsPreview.TypeKeys "<home>"
258 kontext "Pagelayout_UndoDeleteWarning"
259 if Pagelayout_UndoDeleteWarning.exists then
260 warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
261 Pagelayout_UndoDeleteWarning.ok
266 LayoutsPreview.TypeKeys "<RIGHT>"
267 kontext "Pagelayout_UndoDeleteWarning"
268 if Pagelayout_UndoDeleteWarning.exists then
269 warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
270 Pagelayout_UndoDeleteWarning.ok
274 LayoutsPreview.TypeKeys "<Return>"
276 hTypeKeys ("<tab><tab><tab>")
278 hTypeKeys ("<Return>")
281 ' InsertTitle *OLEObjektEinfuegen/OLEObjektInsert SID_INSERT_OBJECT
282 kontext "OLEObjektInsert"
284 OLEObjektInsert.cancel
286 warnlog "Ole wasn't selected :-("