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: loadsave_new.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
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 : tborsten.bosbach@sun.com
36 '* short description : global functionality - load/save documents
38 '\***************************************************************************
41 PrintLog " open and close all documenttypes"
42 '///open all applications and close the document
43 '///file/new/textdocument => file/close
44 Call hNewCloseDocument ("WRITER")
45 '///file/new/spreadsheet => file/close
46 Call hNewCloseDocument ("CALC")
47 '///file/new/presentation => file/close
48 Call hNewCloseDocument ("IMPRESS")
49 '///file/new/drawing => file/close
50 Call hNewCloseDocument ("DRAW")
51 '///file/new/formular => file/close
52 Call hNewCloseDocument ("MATH")
53 '///file/new/HTML document => file/close
54 Call hNewCloseDocument ("HTML")
55 '///file/new/master document => file/close
56 Call hNewCloseDocument ("MASTERDOCUMENT")
61 PrintLog " open all applications and close all one by one"
62 '///open all document types and close all one by one
63 '///create a new Writer-doc
65 '///+a new Impress-doc
70 Call NewDocument ("WRITER")
71 Call NewDocument ("CALC")
72 Call NewDocument ("IMPRESS")
73 Call NewDocument ("DRAW")
74 Call NewDocument ("MATH")
75 Call NewDocument ("HTML")
76 Call NewDocument ("MASTERDOCUMENT")
78 '///close one by one with file/close
79 PrintLog " Close all documents ( file/close )"
82 if Navigator.Exists then Navigator.Close
86 if Active.Exists(10) then
88 printlog "" + i% + " " +active.gettext
94 warnlog "Error on hitting 'No' button"
102 sub hNewCloseDocument ( sApplikation as String )
103 PrintLog "- " + sApplikation
104 gApplication = sApplikation
108 if gApplication = "DRAW" OR gApplication = "IMPRESS" then
109 hTextrahmenErstellen ( "Dummy text", 20, 20, 50, 50 )
111 hTypeKeys "Dummy text<Return>"
115 if Navigator.Exists then Navigator.Close
118 Warnlog gApplication + ": a error is occurred."
123 sub NewDocument ( sApplikation as String )
124 PrintLog "- " + sApplikation
125 gApplication = sApplikation
128 if gApplication = "DRAW" OR gApplication = "IMPRESS" then
129 hTextrahmenerstellen ( "Dummy text",20,20,50,50 )
131 Call hTypeKeys "Dummy text<Return>"
135 Warnlog gApplication + ": a error is occurred."