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: i_view.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $
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 :
38 '*********************************************************************
39 ' #1 tAnsichtHintergrundNotizen
40 ' #1 tViewWorkspaceHandoutView
41 ' #1 tViewWorkspaceOutlineView
42 ' #1 tViewWorkspaceDrawingView
44 '\********************************************************************
46 'Datei$ = ConvertPath (gOfficePath + "user\work\test.sxi")
48 testcase tAnsichtHintergrundNotizen
49 Printlog "- View background notes"
50 Call hNewDocument '/// new document ///'
52 ViewNotes '/// view background notes ///'
55 Warnlog "View-Notes could not be accessed"
57 ViewWorkspaceDrawingView
59 Call hCloseDocument '/// close document ///'
63 '-------------------------------------------------------------------------------
65 testcase tViewWorkspaceHandoutView
66 Printlog "- View background handout"
67 Call hNewDocument '/// new document ///'
69 Kontext "DocumentImpress"
70 if NOT documentImpress.Exists then
75 Printlog " ViewWorkspaceHandoutView"
76 ViewWorkspaceHandoutView '/// view background handout ///'
80 if LayoutsPreview.GetItemCount <> 6 Then
81 Warnlog " this doesn't seem to be a handout ?: should be: 6 layouts in the Preview window, but are: " + LayoutsPreview.GetItemCount
83 Printlog " ViewWorkspaceHandoutView works"
85 Printlog "ViewWorkspaceHandoutView closed"
86 ViewWorkspaceDrawingView '/// back to view background drawing ///'
87 Call hCloseDocument '/// close document ///'
90 '-------------------------------------------------------------------------------
92 testcase tViewWorkspaceOutlineView
93 qaerrorlog "Outcommenting tViewWorkspaceOutlineView due to unreability. - FHA"
98 '/// load a document with heading styles in writer and use the function 'writer:'File->Send->Outline to presentation' to get it into the presentation ///'
99 ' all 'heading 1' are new slides
101 '/// document used : "graphics\\required\\input\\outlinefromwriter.sxw" -> you get into writer ///'
102 sFile = ConvertPath (gTesttoolPath + "graphics\required\input\outlinefromwriter.sxw")
103 hDateiOeffnen (sFile)
105 '///+ with 'File->Send->Outline to presentation' you get into impress ///'
106 FileSendOutlineToPresentation
108 Printlog "'/// View->Workspace->Outline View ///'"
109 ViewWorkspaceOutlineView
111 '/// go to the line with the 'I' (via 'search & replace' function) ///'
112 hTypeKeys "<STRG HOME>"
114 hFindeImDokument ("I")
116 '///<b> expected level/style: 'Outline 8' </b>///'
117 '/// get last character from selected style in stylist (expect a number of the outline(heading level) ///'
118 fGetPresentationStyle ("8")
120 '/// type keys [home] [tab] to go one level down ///'
121 Kontext "DocumentImpressOutlineView"
122 DocumentImpressOutlineView.TypeKeys "<Home><Tab>"
124 '///<b> expected level/style: 'Outline 9' </b>///'
125 fGetPresentationStyle ("9")
127 Kontext "DocumentImpressOutlineView"
128 '/// Edit - "Select All" to go select the whole text ///'
130 '/// type keys [shift]+[tab] eight times, to get all lines to the highest, except the one with the 'I' ///'
131 DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 8)
134 hTypeKeys "<STRG HOME>"
136 hFindeImDokument ("I")
137 '///<b> expected level/style: 'Outline 1' </b>///'
138 fGetPresentationStyle ("1")
140 '/// type keys [shift]+[tab] to get the last line to the highest level, too ///'
141 Kontext "DocumentImpressOutlineView"
142 DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 1)
143 '///<b> expected level/style: 'Title' </b>///'
144 fGetPresentationStyle (0)
146 Kontext "DocumentImpressOutlineView"
147 DocumentImpressOutlineView.TypeKeys ("<escape>", 1)
148 Printlog "'///<b> call 'Edit->Undo' nine times </b>///'"
154 hFindeImDokument ("I")
155 '///<b> expected level/style: 'Outline 9' </b>///'
156 fGetPresentationStyle (9)
158 Printlog "'///<b> call 'Edit->Redo' nine times </b>///'"
170 hTypeKeys "<STRG HOME>"
172 hFindeImDokument ("I")
173 '///<b> expected level/style: 'Title' </b>///'
174 fGetPresentationStyle (0)
176 Printlog "'///<b> call 'Edit->Undo' nine times </b>///'"
182 hTypeKeys "<STRG HOME>"
184 hFindeImDokument ("I")
185 '///<b> expected level/style: 'Outline 9' </b>///'
186 fGetPresentationStyle (9)
188 '/// type keys [strg]+[A] ///'
189 Kontext "DocumentImpressOutlineView"
191 '/// type keys [strg]+[X] ///'
192 DocumentImpressOutlineView.TypeKeys "<mod1 X>"
195 if messagebox.exists (5) then
196 Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'"
199 Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
202 '/// 'Edit->Undo' ///'
204 '/// 'Edit->Redo' ///'
206 '/// 'Edit->Undo' ///'
209 '/// type keys [strg]+[A] ///'
210 Kontext "DocumentImpressOutlineView"
212 '/// type keys [strg]+[X] ///'
213 DocumentImpressOutlineView.TypeKeys "<mod1 X>"
216 if messagebox.exists (5) then
217 Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'"
220 Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
223 '/// type keys [strg]+[V] ///'
224 Kontext "DocumentImpressOutlineView"
225 DocumentImpressOutlineView.TypeKeys "<mod1 V>"
227 '/// 'Edit->Undo' ///'
229 '/// 'Edit->Redo' ///'
232 '/// type keys [strg]+[End] ///'
233 Kontext "DocumentImpressOutlineView"
234 DocumentImpressOutlineView.TypeKeys "<mod1 End>"
235 '/// type keys [strg]+[V] ///'
236 DocumentImpressOutlineView.TypeKeys "<mod1 V>"
237 '/// type keys [strg]+[A] ///'
239 '/// type keys [delete] ///'
240 DocumentImpressOutlineView.TypeKeys "<delete>"
243 if messagebox.exists (5) then
244 Printlog "active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'"
245 Printlog "SAY CANCEL TO DIALOG!"
248 Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
251 '/// type keys [strg]+[A] ///'
252 Kontext "DocumentImpressOutlineView"
258 Warnlog "error 4711 TBO :-("
261 '/// type keys [delete] ///'
262 Kontext "DocumentImpressOutlineView"
263 DocumentImpressOutlineView.TypeKeys "<delete>"
266 if messagebox.exists (5) then
267 Printlog "Active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'"
270 Warnlog "Messagebox missing ! (about deleting pages with graphic objects:)"
273 Kontext "DocumentImpressOutlineView"
277 Warnlog "Didn't work!"
278 Printlog "'" + getclipboard() + "'"
283 ViewWorkspaceDrawingView
284 Call hCloseDocument '/// close document ///'
285 Call hCloseDocument '/// close document ///'
288 '-------------------------------------------------------------------------------
290 testcase tViewWorkspaceDrawingView
291 Printlog "- View/Background-drawing"
292 Call hNewDocument '/// new document ///'
294 ViewDrawing '/// view background drawing ///'
296 hRechteckErstellen ( 20,20,40,40 ) '/// create rectangle ///'
298 Printlog " - rectangle created"
300 Warnlog " Rectangle could not be created"
302 Call hCloseDocument '/// close document ///'
305 '-------------------------------------------------------------------------------
307 testcase tAnsichtEbene
308 printLog "- View/Layer" '/// view layer ///'
311 FileAutopilotPresentation '/// new document-autopilot ///'
312 Kontext "AutopilotPraesentation1"
314 AutopilotPraesentation1.Ok
317 ViewSlide '/// back to view slide ///'
320 Call hCloseDocument '/// close document ///'
324 '-------------------------------------------------------------------------------