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 : wolfram.garten@oracle.com
30 '* short description : XML Tools
32 '\***********************************************************************************
34 sub CreateWorkXMLExportDir ( DirName as string )
36 '/*** <i>CreateWorkXMLExportDir</i> creates in the StarOffice/work-
37 '/*** +directory a directory. If the same name exists the content (files only)
38 '/*** +will be deleted.
40 Dim OutputPath as string
41 Dim Isliste(200) as string
42 Dim iCurrentFile as integer
43 dim iFileCount as integer
45 printlog "Checking work-dir & creating '" & gOfficePath & ConvertPath(DirName) & "'."
46 if ( FileExists( gOfficePath & ConvertPath( DirName ) ) ) then
48 OutputPath = gOfficePath & ConvertPath( DirName )
50 GetFileList ( OutputPath , "*", IsListe() )
51 iFileCount = KillFileList ( IsListe() )
53 for iCurrentFile = 1 to iFileCount
54 warnlog IsListe( iCurrentFile ) & " could not be deleted!"
59 app.mkDir( gOfficePath & ConvertPath(DirName))
65 '-------------------------------------------------------------------------------
67 sub hEnablePrettyPrinting ( optional bDisablePrettyPrinting )
69 '/// <i>hEnablePrettyPrinting</i> enables the pretty printing (=better
70 '/// +formated view) in XML file export. It takes >10 percent more time
71 '/// +to save files!!! OPTIONAL parameter is used to DISABLE it.
74 Kontext "ExtrasOptionenDLG"
75 if ( ExtrasOptionenDlg.exists( 1 ) ) then
77 call hToolsOptions("loadsave","general")
79 Kontext "TabSpeichern"
80 if IsMissing( bDisablePrettyPrinting ) then
82 if ( NoPrettyPrinting.IsChecked() ) then
83 NoPrettyPrinting.Uncheck()
84 printlog "- XML pretty printing enabled ( xmltool1.inc )"
89 if ( Not NoPrettyPrinting.IsChecked() ) then
90 NoPrettyPrinting.Check()
91 printlog "- XML pretty printing disabled ( xmltool1.inc )"
95 Kontext "ExtrasOptionenDLG"
96 hCloseDialog( ExtrasOptionenDLG, "ok" )
98 warnlog( "hEnablePrettyPrinting(): Tools/Options dialog not open" )