summaryrefslogtreecommitdiff
path: root/testautomation/xml
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-18 16:25:03 +0200
committerobo <obo@openoffice.org>2010-06-18 16:25:03 +0200
commit86f6b528f49090c0c47df170c04ee857a14fb967 (patch)
tree9d584877469bd22a4e00053a253825ac848f5171 /testautomation/xml
parente8d54724f09a68d8ffd99cd3c407401019b10437 (diff)
parenta4d5cd0ecc4ae083865927c68dcdd1b7925b2995 (diff)
CWS-TOOLING: integrate CWS vitomation01
Diffstat (limited to 'testautomation/xml')
-rw-r--r--testautomation/xml/optional/includes/docbook_001.inc2
-rw-r--r--testautomation/xml/tools/includes/xmltool1.inc115
2 files changed, 68 insertions, 49 deletions
diff --git a/testautomation/xml/optional/includes/docbook_001.inc b/testautomation/xml/optional/includes/docbook_001.inc
index f79f4fd36c4a..d26a60025de6 100644
--- a/testautomation/xml/optional/includes/docbook_001.inc
+++ b/testautomation/xml/optional/includes/docbook_001.inc
@@ -43,7 +43,7 @@ sub tDocBookXMLtestdocs
exit sub
end if
'Calculating how many documents are in that directory (max. 500)
- if hDirectoryExists(sSourcePath) then
+ if FileExists(sSourcePath) then
'Get the file list and put it in a list (max. 500 per directory!)
call GetAllFileList(sSourcePath, "*.xml" , sSourceDocuments())
iNumberOfDocuments = ListCount(sSourceDocuments())
diff --git a/testautomation/xml/tools/includes/xmltool1.inc b/testautomation/xml/tools/includes/xmltool1.inc
index e0356be2076c..67a52c48714e 100644
--- a/testautomation/xml/tools/includes/xmltool1.inc
+++ b/testautomation/xml/tools/includes/xmltool1.inc
@@ -29,56 +29,75 @@
'*
'* short description : XML Tools
'*
-'***************************************************************************************
-'*
-' #1 CreateWorkXMLExportDir
-' #1 hEnablePrettyPrinting
-'*
'\***********************************************************************************
+
sub CreateWorkXMLExportDir ( DirName as string )
-'/*** <i>CreateWorkXMLExportDir</i> creates in the StarOffice/work-
-'/*** +directory a directory. If the same name exists the content (files only)
-'/*** +will be deleted.
- Dim OutputPath as string
- Dim Isliste(200) as string
- Dim i, BornToKill
- printlog "Checking work-dir & creating '" & gOfficePath & ConvertPath(DirName) & "'."
- if hDirectoryExists ( gOfficePath & ConvertPath(DirName) ) = TRUE then
- OutputPath = gOfficePath & ConvertPath(DirName)
- IsListe(0) = 0
- GetFileList ( OutputPath , "*", IsListe() )
- BornToKill = KillFileList ( IsListe() )
- for i = 1 to BornToKill
- warnlog IsListe(i) & " could not be deleted!"
- next i
- else
- app.mkDir( gOfficePath & ConvertPath(DirName))
- end if
+
+ '/*** <i>CreateWorkXMLExportDir</i> creates in the StarOffice/work-
+ '/*** +directory a directory. If the same name exists the content (files only)
+ '/*** +will be deleted.
+
+ Dim OutputPath as string
+ Dim Isliste(200) as string
+ Dim iCurrentFile as integer
+ dim iFileCount as integer
+
+ printlog "Checking work-dir & creating '" & gOfficePath & ConvertPath(DirName) & "'."
+ if ( FileExists( gOfficePath & ConvertPath( DirName ) ) ) then
+
+ OutputPath = gOfficePath & ConvertPath( DirName )
+ IsListe(0) = 0
+ GetFileList ( OutputPath , "*", IsListe() )
+ iFileCount = KillFileList ( IsListe() )
+
+ for iCurrentFile = 1 to iFileCount
+ warnlog IsListe( iCurrentFile ) & " could not be deleted!"
+ next iCurrentFile
+
+ else
+
+ app.mkDir( gOfficePath & ConvertPath(DirName))
+
+ endif
+
end sub
-'-------------------------------------------------------------------------
-sub hEnablePrettyPrinting (OPTIONAL A)
-'/// <i>hEnablePrettyPrinting</i> enables the pretty printing (=better
-'/// +formated view) in XML file export. It takes >10 percent more time
-'/// +to save files!!! OPTIONAL parameter is used to DISABLE it.
- ToolsOptions
- Kontext "ExtrasOptionenDLG"
- call hToolsOptions("loadsave","general")
- Kontext "TabSpeichern"
- if IsMissing(A) then
- if NoPrettyPrinting.IsChecked = TRUE then
- NoPrettyPrinting.Uncheck
- sleep(1)
- printlog "- XML pretty printing enabled ( xmltool1.inc )"
- end if
- else
- if NoPrettyPrinting.IsChecked = FALSE then
- NoPrettyPrinting.Check
- sleep(1)
- printlog "- XML pretty printing disabled ( xmltool1.inc )"
- end if
- end if
- Kontext "ExtrasOptionenDLG"
- ExtrasOptionenDLG.OK
+
+'-------------------------------------------------------------------------------
+
+sub hEnablePrettyPrinting ( optional bDisablePrettyPrinting )
+
+ '/// <i>hEnablePrettyPrinting</i> enables the pretty printing (=better
+ '/// +formated view) in XML file export. It takes >10 percent more time
+ '/// +to save files!!! OPTIONAL parameter is used to DISABLE it.
+
+ ToolsOptions
+ Kontext "ExtrasOptionenDLG"
+ if ( ExtrasOptionenDlg.exists( 1 ) ) then
+
+ call hToolsOptions("loadsave","general")
+
+ Kontext "TabSpeichern"
+ if IsMissing( bDisablePrettyPrinting ) then
+
+ if ( NoPrettyPrinting.IsChecked() ) then
+ NoPrettyPrinting.Uncheck()
+ printlog "- XML pretty printing enabled ( xmltool1.inc )"
+ endif
+
+ else
+
+ if ( Not NoPrettyPrinting.IsChecked() ) then
+ NoPrettyPrinting.Check()
+ printlog "- XML pretty printing disabled ( xmltool1.inc )"
+ endif
+
+ endif
+ Kontext "ExtrasOptionenDLG"
+ hCloseDialog( ExtrasOptionenDLG, "ok" )
+ else
+ warnlog( "hEnablePrettyPrinting(): Tools/Options dialog not open" )
+ endif
+
end sub
-'-------------------------------------------------------------------------
+