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: w_207_.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-09-04 09:19:53 $
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 : helge.delfs@sun.com
36 '* short description : Testing Number and Bullets
38 '\***********************************************************************
42 Call tToolsNumbering12
43 Call tToolsNumbering13
47 '------------------------------------------------------------------------------------------------------------------------
49 testcase tToolsNumbering12
50 QaErrorLog "Testcase outcommented due to incompability with new Filtername-behaviour."
53 printlog "Import / Export Regression Test"
54 '/// Import / Export Regression-Test
55 Dim DocFileList( 30 ) as String, sCurrentFilter as string
56 Dim sSourcePath as String, sCurrentFilterExt as string
60 Dim ExportFileName as string
62 ReDim DocFileList( 30 ) as String
63 '/// load all documents from "sun_writer\\optional\\input\\number\\"
64 sSourcePath = ConvertPath ( gTesttoolPath + "writer\optional\input\number\regression\" )
65 GetFileList ( sSourcePath, "*.*", DocFileList() )
67 x = ListCount ( DocFileList() )
69 printlog " - (" & i & "/" & x & "): " & DocFileList(i)
73 sCurrentFilter = "writer8" 'gWriterFilter
74 sCurrentFilterExt = "odt" 'WriterFilterExtension(0)
76 sCurrentFilter = "StarOffice XML (Writer)" 'hGetUIFiltername("StarOffice XML (Writer)") & " (.sxw)"
77 sCurrentFilterExt = "sxw"
79 sCurrentFilter = "StarWriter 5.0/GlobalDocument" 'StarWriter 5.0 (.sdw)
80 sCurrentFilterExt = "sdw"
83 '/// Open a new writer document
87 Call hFileOpen ( DocFileList(i) )
88 Call sMakeReadOnlyDocumentEditable
90 Kontext "Filterauswahl"
91 if Filterauswahl.Exists then
92 Warnlog " - Filter Selection dialog is up !"
97 Kontext "AsciiFilterOptionen"
98 if AsciiFilterOptionen.Exists then AsciiFilterOptionen.Ok
100 ' Check for macro alert
101 Kontext "SecurityWarning"
102 if SecurityWarning.Exists then
103 SecurityWarning.Cancel
107 if GetDocumentCount >= 1 then
108 ExportFileName = ConvertPath ( gOfficePath + "user\work\" + DateiOhneExt(DateiExtract ( DocFileList(i) ) ) & "." & sCurrentFilterExt )
109 printlog " - export as: " & ExportFileName
110 Call hFileSaveAsWithFilterKill ( ExportFileName, sCurrentFilter )
113 printlog " - load previous saved document"
114 Call hFileOpen ( ExportFileName )
116 printlog " - close document"
119 Warnlog " - Doc probably didn't get loaded !!!"
127 '------------------------------------------------------------------------------------------------------------------------
129 testcase tToolsNumbering13
131 Dim i as integer, iCounter as integer
132 '/// #i73790 Regression testing
133 '/// This testcase loads a Worddocument that lost all formattings
134 printlog "#i73790 regression testing"
135 '/// Load document 'writer\\optional\\input\\number\\regression\\73790.doc'
136 Call hFileOpen ( gTesttoolPath + "writer\optional\input\number\regression\73790.doc" )
137 Call sMakeReadOnlyDocumentEditable
138 '/// Document has Heading1-Heading3 formatted, be sure it is
139 call wTypeKeys ("<Mod1 Home>")
140 '/// Point cursor to top of document with <STRG HOME>
142 case 01 : iCounter = 2
143 case 03 : iCounter = 1
144 case 07 : iCounter = 2
145 case 31 : iCounter = 1
146 case 33 : iCounter = 3
147 case 34 : iCounter = 2
148 case 36 : iCounter = 2
149 case 39 : iCounter = 2
150 case 45 : iCounter = 1
151 case 46 : iCounter = 2
152 case 48 : iCounter = 2
153 case 49 : iCounter = 3
154 case 55 : iCounter = 3
155 case 81 : iCounter = 3
156 case 82 : iCounter = 1
157 case 86 : iCounter = 1
158 case 88 : iCounter = 3
159 case else : iCounter = 2
162 call wTypeKeys ("<Shift End>")
163 '/// Select first to third entry and check it i formatted with 'Heading1','Heading2','Heading3'
164 Kontext "Textobjectbar"
165 if Vorlage.GetSelIndex <> ( i + iCounter ) then
166 Warnlog "Heading " & i & " not " & ( i + iCounter ) & " but " & Vorlage.GetSelIndex
168 call wTypeKeys ( "<Home>" )
169 call wTypeKeys ( "<Down>" )
172 printlog " Close active document "
173 Do Until GetDocumentCount = 0