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: tabpages.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:06 $
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 : joerg.skottke@sun.com
36 '* short description : Tools to access special tabpages
38 '\******************************************************************************
40 function hDocumentInfoSelectTab( cTabPage as string ) as boolean
43 '///<h3>Switch between the tabpages in the document info dialog</h3>
44 '///<i>The declaration of the document info dialog is not complete which
45 '///+ enforces special treatment</i><br><br>
47 '///<u>Parameter(s):</u><br>
50 '///+<li>The name of the tabpage to be activated (String)</li>
52 '///+<li>"General"</li>
53 '///+<li>"Description"</li>
54 '///+<li>"User"</li>
55 '///+<li>"Internet"</li>
56 '///+<li>"Statistics"</li>
57 '///+<li>The string is case insensitive</li>
64 '///<u>Returns:</u><br>
66 '///+<li>Errorcondition (Boolean)</li>
68 '///+<li>TRUE if tabpage is known and switching worked</li>
69 '///+<li>FALSE on icorrect input parameter</li>
70 '///+<li>FALSE on any other error</li>
74 const CFN = "hDocumentInfoSelectTab::"
75 printlog( CFN & "Enter with option (tabpage): " & cTabPage )
76 dim brc as boolean 'a multi purpose boolean returnvalue
79 '///<u>Description:</u>
81 '///+<li>Kontext to the dialog</li>
84 '///+<li>Select the page to switch to, context to the new page</li>
85 select case ( ucase( cTabPage ) )
86 case "GENERAL" : active.setPage TabDokument : kontext "TabDokument"
87 case "DESCRIPTION" : active.setPage TabBeschreibung : kontext "TabBeschreibung"
88 case "USER" : warnlog( "#i95523# - Cannot access controls on Custom page" )
90 'active.setPage TabBenutzer : kontext "TabBenutzer"
91 case "INTERNET" : active.setPage TabInternet : kontext "TabInternet"
92 case "STATISTICS" : active.setPage TabStatistik : kontext "TabStatistik"
93 case default : brc = false
98 printlog( CFN & "Exit with result: " & brc )
99 hDocumentInfoSelectTab() = brc