1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
'*
'* $RCSfile: sxd7_03.inc,v $
'*
'* $Revision: 1.2 $
'*
'* last change: $Author: rt $ $Date: 2008-07-11 07:32:52 $
'*
'* This file is part of OpenOffice.org.
'*
'* OpenOffice.org is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License version 3
'* only, as published by the Free Software Foundation.
'*
'* OpenOffice.org is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU Lesser General Public License version 3 for more details
'* (a copy is included in the LICENSE file that accompanied this code).
'*
'* You should have received a copy of the GNU Lesser General Public License
'* version 3 along with OpenOffice.org. If not, see
'* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
'/************************************************************************
'*
'* owner : wolfram.garten@sun.com
'*
'* short description : XML Draw Include File
'*
'\***********************************************************************************
Dim Isliste(250) as string
Dim OutputPath as string
sub sxd7_03
printlog "------------------- sxd_03.inc ---------------------"
Call ExitRestartTheOffice
call t18126
call t18127_18128
call t18129
call t18130_18131
call t18132
call t18133_18134
call t18135
call t18136
call t18137
call t18138
end sub
'
'-------------------------------------------------------------------------
'
testcase t18126
printlog "+- Draw: 18126.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18126.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18126.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18126.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18126\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18126\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18126\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18126\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18126.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18127_18128
printlog "+- Draw: 18127-18128.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18127-18128.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18127-18128.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18129
printlog "+- Draw: 18129.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18129.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18129.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18129.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18129\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18129\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18129\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18129\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18129.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18130_18131
printlog "+- Draw: 18130-18131.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18130-18131.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18130-18131.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18132
printlog "+- Draw: 18132.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18132.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18132.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18132.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18132\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18132\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18132\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18132\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18132.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18133_18134
printlog "+- Draw: 18133-18134.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18133-18134.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18133-18134.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18135
printlog "+- Draw: 18135.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18135.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18135.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18135.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18135\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18135\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18135\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18135\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18135.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18136
printlog "+- Draw: 18136.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18136.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18136.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18136.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18136\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18136\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18136\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18136\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18136.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18137
printlog "+- Draw: 18137.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18137.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18137.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18137.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18137\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18137\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18137\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18137\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18137.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
'
'-------------------------------------------------------------------------
'
testcase t18138
printlog "+- Draw: 18138.sda"
call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\graphics\so_bin\18138.sda"))
if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\draw\level1\18138.sxd") , "StarOffice XML (Draw)") then
call hCloseDocument
sleep(2)
UnpackStorage( gOfficePath & ConvertPath("user\work\xml\draw\level1\18138.sxd") , gOfficePath & ConvertPath("user\work\xml\draw\level1\18138\") )
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18138\styles.xml")) = FALSE then
warnlog "XML-file 'styles.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18138\meta.xml")) = FALSE then
warnlog "XML-file 'meta.xml' not well formed!"
end if
if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\draw\level1\18138\content.xml")) = FALSE then
warnlog "XML-file 'content.xml' not well formed!"
else
call hFileOpen (gOfficePath & ConvertPath("user\work\xml\draw\level1\18138.sxd")
call hCloseDocument
end if
else
call hCloseDocument
end if
endcase
|