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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : tborsten.bosbach@oracle.com
30 '* short description : global functionality - load/save documents
32 '\***************************************************************************
35 PrintLog " open and close all documenttypes"
36 Call hNewCloseDocument ("WRITER")
37 Call hNewCloseDocument ("CALC")
38 Call hNewCloseDocument ("IMPRESS")
39 Call hNewCloseDocument ("DRAW")
40 Call hNewCloseDocument ("MATH")
41 Call hNewCloseDocument ("HTML")
42 Call hNewCloseDocument ("MASTERDOCUMENT")
47 PrintLog " open all applications and close all one by one"
48 Call NewDocument ("WRITER")
49 Call NewDocument ("CALC")
50 Call NewDocument ("IMPRESS")
51 Call NewDocument ("DRAW")
52 Call NewDocument ("MATH")
53 Call NewDocument ("HTML")
54 Call NewDocument ("MASTERDOCUMENT")
56 PrintLog " Close all documents ( file/close )"
59 if Navigator.Exists then Navigator.Close
63 if Active.Exists(10) then
65 printlog "" + i% + " " +active.gettext
71 warnlog "Error on hitting 'No' button"
79 sub hNewCloseDocument ( sApplikation as String )
80 PrintLog "- " + sApplikation
81 gApplication = sApplikation
85 if gApplication = "DRAW" OR gApplication = "IMPRESS" then
86 hTextrahmenErstellen ( "Dummy text", 20, 20, 50, 50 )
88 hTypeKeys "Dummy text<Return>"
92 if Navigator.Exists then Navigator.Close
95 Warnlog gApplication + ": a error is occurred."
100 sub NewDocument ( sApplikation as String )
101 PrintLog "- " + sApplikation
102 gApplication = sApplikation
105 if gApplication = "DRAW" OR gApplication = "IMPRESS" then
106 hTextrahmenerstellen ( "Dummy text",20,20,50,50 )
108 Call hTypeKeys "Dummy text<Return>"
112 Warnlog gApplication + ": a error is occurred."