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_shape.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 : owner : wolfram.garten@sun.com
36 '* short description : import presentations with shapes in .ppt format
38 '************************************************************************
40 ' #1 t_import_shapes ' Load all shapes with .ppt format one time
42 '\***********************************************************************
44 testcase t_import_shapes
46 dim iOldState as integer
47 dim iDocuments as integer
48 dim lDocuments(100) as string
51 iOldState = hSetMacroSecurity ( 0 )
52 iDocuments = GetFileList(convertPath(gTesttoolPath + "graphics/required/input/shapes"),"*.ppt",lDocuments())
53 for i = 1 to iDocuments
54 printlog "(" + i + "/" + iDocuments + "): " + lDocuments(i)
55 printlog "------------------------------------------------------"
56 hFileOpen(lDocuments(i))
58 ' check if the document is writable
59 if fIsDocumentWritable = false then
60 ' make the document writable and check if it's succesfull
61 if fMakeDocumentWritable = false then
62 warnlog "The document can't be make writeable. Test stopped."
67 kontext "DocumentImpress"
68 DocumentImpress.typeKeys("<home>")
69 while (sPage <> DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6)))
70 printlog "------------"
72 DocumentImpress.typeKeys("<tab>")
73 sleep 1 ' loop while empty: break after 10 minutes
74 DocumentImpress.typeKeys("<tab>")
77 active.setpage TabPositionAndSize
78 kontext "TabPositionAndSize"
79 printlog "w: '" + Width.getText + "'; h: '" + Height.getText + "'"
80 TabPositionAndSize.cancel
81 kontext "DocumentImpress"
82 DocumentImpress.typeKeys("<F2>")
86 sPage = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6))
88 DocumentImpress.typeKeys("<escape><pageDown>")
93 hSetMacroSecurity ( iOldState )