merge the formfield patch from ooo-build
[ooovba.git] / testautomation / xml / optional / includes / sxw7_02.inc
blob0a370ff8efea7eb6cb926abbf660a0ad01922050
1 'encoding UTF-8  Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* 
5 '* Copyright 2008 by Sun Microsystems, Inc.
6 '*
7 '* OpenOffice.org - a multi-platform office productivity suite
8 '*
9 '* $RCSfile: sxw7_02.inc,v $
11 '* $Revision: 1.2 $
13 '* last change: $Author: rt $ $Date: 2008-07-11 07:34:57 $
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 : XML Writer Include File
38 '\***********************************************************************************
39    Dim Isliste(250) as string
40    Dim OutputPath as string
42 sub sxw7_02
44    printlog "-------------------------- SXW7_02.INC ------------------------------"   
45    call tframes
46    call hEnablePrettyPrinting(1)
47    printlog "---------------------------   C J K    ------------------------------"
48    call tschina
49    call ttchina
50    call tkorean
51    call tjapan
53 end sub
55 '-------------------------------------------------------------------------
57 testcase tframes
58     'NOTE: This test has been created as there were no SAX parser available for using
59     '      in testtools. It is very (!) time consuming to debug this routines.
60     '      Feel free to contact me if there is any issue with this script! jsi@openoffice.org
61     Dim Searchstring(20) as string
62     Dim StyleBodyA as string
63     Dim StyleDefinitionA as string
64     Dim i as integer
65     Dim a as integer
66     Dim AdditionalParameter as string
67     '/// Disabling the 'pretty printing' functionality.
68     call hEnablePrettyPrinting()
69     printlog "+- frames.sdw"
70     '/// Opening frames.sdw from input directory.
71     call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\writer\frames.sdw"))
72     '/// Saving document as OOo XML 1.0 file.
73     if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames.sxw") , "StarOffice XML (Writer)") then
74         '/// Closing the document also if there is a verification dialog.
75         call hCloseDocument()
76         sleep(3)
77         '/// Unpacking the file (ZIP archieve) into a seperate directory. 
78         UnpackStorage( gOfficePath & ConvertPath("user\work\xml\writer\level1\frames.sxw") , gOfficePath & ConvertPath("user\work\xml\writer\level1\frames") )
79         '/// Verifying well-formness of content.xml, styles.xml and meta.xml.
80         if XMLWellFormed (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\styles.xml")) = FALSE then
81             warnlog "XML-file 'styles.xml' not well formed!"
82         end if
83         if XMLWellFormed (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\meta.xml")) = FALSE then
84             warnlog "XML-file 'meta.xml' not well formed!"
85         end if
86         if XMLWellFormed (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")) = FALSE then
87             warnlog "XML-file 'content.xml' not well formed!"
88         else
89             call hFileOpen (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames.sxw"))
90             sleep(2)
91             call hCloseDocument
92             sleep(2)
93             printlog "-------------------------------------------------------------------------"
94             Searchstring(1) = "<draw:text-box draw:style-name=" & CHR$(34)
95             Searchstring(2) = "draw:name=" & CHR$(34)
96             Searchstring(3) = "text:anchor-type=" & CHR$(34) & "page" & CHR$(34)
97             Searchstring(4) = "text:anchor-page-number=" & CHR$(34) & "1" & CHR$(34)
98             Searchstring(5) = "svg:x=" & CHR$(34)
99             Searchstring(6) = "svg:y=" & CHR$(34)
100             Searchstring(7) = "svg:width=" & CHR$(34)
101             Searchstring(8) = "fo:min-height=" & CHR$(34)
102             Searchstring(9) = "draw:z-index=" & CHR$(34)
103             printlog "++ Feature(s) to be searched for:"
104             printlog " |"
105             '-------------------------------------------------------------------------
106             printlog " ..searching in 'draw:text-box' number 1"     
107             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 1)
108             For i = 1 to 9
109                 printlog " +- " & Searchstring(i)
110                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
111                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
112                 end if
113             Next i
114             printlog "-------------------------------------------------------------------------"            
115             Searchstring(1) = ">Anchor to page<"
116             printlog " +- " & Searchstring(1) 
117             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 1)     
118             printlog " +- " & Searchstring(1)
119             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
120                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
121             end if
122             printlog "-------------------------------------------------------------------------"         
123             Searchstring(1) = "<draw:text-box"
124             Searchstring(2) = "draw:style-name=" & CHR$(34)
125             Searchstring(3) = "draw:name=" & CHR$(34)
126             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "page" & CHR$(34)
127             Searchstring(5) = "text:anchor-page-number=" & CHR$(34) & "1" & CHR$(34)
128             Searchstring(6) = "svg:x=" & CHR$(34)
129             Searchstring(7) = "svg:y=" & CHR$(34)
130             Searchstring(8) = "svg:width=" & CHR$(34)
131             Searchstring(9) = "fo:min-height=" & CHR$(34)
132             Searchstring(10) = "draw:z-index=" & CHR$(34)
133             For a = 1 to 5
134                 printlog " ..searching in 'draw:text-box' number " & a
135                 AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , a)
136                 For i = 1 to 10
137                     printlog " +- " & Searchstring(i)
138                     if InStr (AdditionalParameter , Searchstring(i)) = 0 then
139                         warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
140                     end if
141                 Next i
142             Next a
143             printlog "-------------------------------------------------------------------------"
144             Searchstring(1) = ">No wrap<"
145             printlog " +- " & Searchstring(1)            
146             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 2)
147             printlog " +- " & Searchstring(1)
148             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
149                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
150             end if
151             printlog "-------------------------------------------------------------------------"
152             Searchstring(1) = ">Page wrap<"
153             printlog " +- " & Searchstring(1)
154             '-------------------------------------------------------------------------
155             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 3)
156             printlog " +- " & Searchstring(1)
157             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
158                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
159             end if
160             printlog "-------------------------------------------------------------------------"
161             Searchstring(1) = ">Optimal<"
162             printlog " +- " & Searchstring(1)            
163             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 4)
164             printlog " +- " & Searchstring(1)
165             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
166                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
167             end if
168             printlog "-------------------------------------------------------------------------"
169             Searchstring(1) = ">Wrap<"
170             printlog " +- " & Searchstring(1)            
171             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 5)
172             printlog " +- " & Searchstring(1)
173             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
174                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
175             end if
176             printlog "-------------------------------------------------------------------------"
177             Searchstring(1) = ">Background<"
178             printlog " +- " & Searchstring(1)            
179             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "text:p" , 6)
180             printlog " +- " & Searchstring(1)
181             if InStr (AdditionalParameter , Searchstring(1)) = 0 then
182                 warnlog "Draw Text Box (Frame) Content: " & Searchstring(1) & " not found!"
183             end if
184             printlog "-------------------------------------------------------------------------"
185             Searchstring(1) = "<draw:text-box"
186             Searchstring(2) = "draw:style-name=" & CHR$(34)
187             Searchstring(3) = "draw:name=" & CHR$(34)
188             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "paragraph" & CHR$(34)
189             Searchstring(5) = "svg:x=" & CHR$(34)
190             Searchstring(6) = "svg:y=" & CHR$(34)
191             Searchstring(7) = "svg:width=" & CHR$(34)
192             Searchstring(8) = "fo:min-height=" & CHR$(34)
193             Searchstring(9) = "draw:z-index=" & CHR$(34)
194             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 7)
195             For i = 1 to 9
196                 printlog " +- " & Searchstring(i)
197                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
198                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
199                 end if
200             Next i
201             printlog "-------------------------------------------------------------------------"
202             Searchstring(1) = "draw:style-name=" & CHR$(34)
203             Searchstring(2) = "draw:name=" & CHR$(34)
204             Searchstring(3) = "text:anchor-type=" & CHR$(34) & "char" & CHR$(34)
205             Searchstring(4) = "svg:y=" & CHR$(34)
206             Searchstring(5) = "svg:width=" & CHR$(34)
207             Searchstring(6) = "fo:min-height=" & CHR$(34)
208             For a = 1 to 2
209                 printlog " ..searching in 'draw:text-box' number " & a+7
210                 AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , a+7)
211                 if a = 2 then
212                     Searchstring(3) = "text:anchor-type=" & CHR$(34) & "as-char" & CHR$(34)
213                 end if
214                 For i = 1 to 6
215                     printlog " +- " & Searchstring(i)
216                     if InStr (AdditionalParameter , Searchstring(i)) = 0 then
217                         warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
218                     end if
219                 Next i
220             Next a
221             printlog "-------------------------------------------------------------------------"
222             Searchstring(1) = "<draw:text-box"
223             Searchstring(2) = "draw:style-name=" & CHR$(34)
224             Searchstring(3) = "draw:name=" & CHR$(34)
225             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "paragraph" & CHR$(34)
226             Searchstring(5) = "svg:x=" & CHR$(34)
227             Searchstring(6) = "svg:y=" & CHR$(34)
228             Searchstring(7) = "svg:width=" & CHR$(34)
229             Searchstring(8) = "fo:min-height=" & CHR$(34)
230             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 10)
231             For i = 1 to 8
232                 printlog " +- " & Searchstring(i)
233                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
234                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
235                 end if
236             Next i
237             printlog "-------------------------------------------------------------------------"
238             Searchstring(1) = "<draw:text-box"
239             Searchstring(2) = "draw:style-name=" & CHR$(34)
240             Searchstring(3) = "draw:name=" & CHR$(34)
241             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "paragraph" & CHR$(34)
242             Searchstring(5) = "svg:x=" & CHR$(34)
243             Searchstring(6) = "svg:y=" & CHR$(34)
244             Searchstring(7) = "svg:width=" & CHR$(34)
245             Searchstring(8) = "fo:min-height=" & CHR$(34)
246             Searchstring(9) = "draw:z-index=" & CHR$(34)
247             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 11)
248             For i = 1 to 9
249                 printlog " +- " & Searchstring(i)
250                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
251                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
252                 end if
253             Next i
254             printlog "-------------------------------------------------------------------------"
255             Searchstring(1) = "<draw:text-box"
256             Searchstring(2) = "draw:style-name=" & CHR$(34)
257             Searchstring(3) = "draw:name=" & CHR$(34)
258             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "paragraph" & CHR$(34)
259             Searchstring(5) = "svg:x=" & CHR$(34)
260             Searchstring(6) = "svg:y=" & CHR$(34)
261             Searchstring(7) = "svg:width=" & CHR$(34)
262             Searchstring(8) = "fo:min-height=" & CHR$(34)
263             Searchstring(9) = "draw:z-index=" & CHR$(34)
264             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 12)
265             For i = 1 to 9
266                 printlog " +- " & Searchstring(i)
267                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
268                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
269                 end if
270             Next i
271             printlog "-------------------------------------------------------------------------"
272             Searchstring(1) = "<draw:text-box"
273             Searchstring(2) = "draw:style-name=" & CHR$(34)
274             Searchstring(3) = "draw:name=" & CHR$(34)
275             Searchstring(4) = "text:anchor-type=" & CHR$(34) & "paragraph" & CHR$(34)
276             Searchstring(5) = "svg:x=" & CHR$(34)
277             Searchstring(6) = "svg:y=" & CHR$(34)
278             Searchstring(7) = "svg:width=" & CHR$(34)
279             Searchstring(8) = "fo:min-height=" & CHR$(34)
280             Searchstring(9) = "draw:z-index=" & CHR$(34)
281             AdditionalParameter = GetLineInXMLBody(gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 13)
282             For i = 1 to 9
283                 printlog " +- " & Searchstring(i)
284                 if InStr (AdditionalParameter , Searchstring(i)) = 0 then
285                     warnlog "Draw Text Box (Frame): " & Searchstring(i) & " not found!"
286                 end if
287             Next i
288             printlog "-------------------------------------------------------------------------"               
289             '    -----------------------
290             '       Frame S T Y L E S
291             '    -----------------------   
292             '-------------------------------------------------------------------------
293             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
294             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
295             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
296             Searchstring(4) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
297             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
298             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
299             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
300             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
301             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 1)
302             printlog " fr1 = " & StyleBodyA
303             printlog " =========="
304             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
305             For i = 1 to 8
306                 printlog " +- " & Searchstring(i)
307                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
308                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
309                 end if
310             Next i            
311             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
312             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
313             Searchstring(3) = "style:run-through=" & CHR$(34) & "foreground" & CHR$(34)
314             Searchstring(4) = "style:wrap=" & CHR$(34) & "none" & CHR$(34)
315             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
316             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
317             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
318             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
319             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 2)
320             printlog " fr2 = " & StyleBodyA
321             printlog " =========="
322             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
323             For i = 1 to 8
324                 printlog " +- " & Searchstring(i)
325                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
326                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
327                 end if
328             Next i
329             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
330             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
331             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
332             Searchstring(4) = "style:run-through=" & CHR$(34) & "foreground" & CHR$(34)
333             Searchstring(5) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
334             Searchstring(6) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
335             Searchstring(7) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
336             Searchstring(8) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
337             Searchstring(9) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
338             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 3)
339             printlog " fr3 = " & StyleBodyA
340             printlog " =========="
341             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
342             For i = 1 to 9
343                 printlog " +- " & Searchstring(i)
344                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
345                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
346                 end if
347             Next i            
348             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
349             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
350             Searchstring(3) = "style:wrap=" & CHR$(34) & "dynamic" & CHR$(34)
351             Searchstring(4) = "style:run-through=" & CHR$(34) & "foreground" & CHR$(34)
352             Searchstring(5) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
353             Searchstring(6) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
354             Searchstring(7) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
355             Searchstring(8) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
356             Searchstring(9) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
357             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 4)
358             printlog " fr4 = " & StyleBodyA
359             printlog " =========="
360             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
361             For i = 1 to 9
362                 printlog " +- " & Searchstring(i)
363                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
364                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
365                 end if
366             Next i
367             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
368             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
369             Searchstring(3) = "style:wrap=" & CHR$(34) & "run-through" & CHR$(34)
370             Searchstring(4) = "style:run-through=" & CHR$(34) & "foreground" & CHR$(34)
371             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
372             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
373             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
374             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "page" & CHR$(34)
375             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 5)
376             printlog " fr5 = " & StyleBodyA
377             printlog " =========="
378             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
379             For i = 1 to 8
380                 printlog " +- " & Searchstring(i)
381                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
382                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
383                 end if
384             Next i
385             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
386             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
387             Searchstring(3) = "style:wrap=" & CHR$(34) & "run-through" & CHR$(34)
388             Searchstring(4) = "style:run-through=" & CHR$(34) & "background" & CHR$(34)
389             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
390             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "page" & CHR$(34)
391             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
392             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)            
393             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box" , 6)
394             printlog " fr6 = " & StyleBodyA
395             printlog " =========="
396             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
397             For i = 1 to 8
398                 printlog " +- " & Searchstring(i)
399                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
400                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
401                 end if
402             Next i
403             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
404             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
405             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
406             Searchstring(4) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
407             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
408             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "paragraph" & CHR$(34)
409             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
410             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
411             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 7)
412             printlog " fr7 = " & StyleBodyA
413             printlog " =========="
414             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
415             For i = 1 to 8
416                 printlog " +- " & Searchstring(i)
417                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
418                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
419                 end if
420             Next i
421             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
422             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
423             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
424             Searchstring(4) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
425             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
426             Searchstring(6) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
427             Searchstring(7) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
428             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 8)
429             printlog " fr8 = " & StyleBodyA
430             printlog " =========="
431             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
432             For i = 1 to 7
433                 printlog " +- " & Searchstring(i)
434                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
435                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
436                 end if
437             Next i
438             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
439             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
440             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
441             Searchstring(4) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
442             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
443             Searchstring(6) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
444             Searchstring(7) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)            
445             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 9)
446             printlog " fr9 = " & StyleBodyA
447             printlog " =========="
448             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
449             For i = 1 to 7
450                 printlog " +- " & Searchstring(i)
451                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
452                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
453                 end if
454             Next i
455             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
456             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
457             Searchstring(3) = "style:protect=" & CHR$(34) & "content size position" & CHR$(34)
458             Searchstring(4) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
459             Searchstring(5) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
460             Searchstring(6) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
461             Searchstring(7) = "style:vertical-rel=" & CHR$(34) & "paragraph" & CHR$(34)
462             Searchstring(8) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
463             Searchstring(9) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
464             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 10)
465             printlog " fr10 = " & StyleBodyA
466             printlog " =========="
467             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
468             For i = 1 to 9
469                 printlog " +- " & Searchstring(i)
470                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
471                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
472                 end if
473             Next i
474             Searchstring(1)  = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
475             Searchstring(2)  = "style:parent-style-name=" & CHR$(34)
476             Searchstring(3)  = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
477             Searchstring(4)  = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
478             Searchstring(5)  = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
479             Searchstring(6)  = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
480             Searchstring(7)  = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
481             Searchstring(8)  = "style:border-line-width-left=" & CHR$(34)
482             Searchstring(9)  = "style:border-line-width-bottom=" & CHR$(34)
483             Searchstring(10) = "fo:padding-left=" & CHR$(34)
484             Searchstring(11) = "fo:padding-right=" & CHR$(34)
485             Searchstring(12) = "fo:padding-top=" & CHR$(34)
486             Searchstring(13) = "fo:padding-bottom=" & CHR$(34)
487             Searchstring(14) = "fo:border-left=" & CHR$(34)
488             Searchstring(15) = "double"
489             Searchstring(16) = "#0000ff"
490             Searchstring(17) = "fo:border-bottom=" & CHR$(34)
491             Searchstring(18) = "style:shadow=" & CHR$(34) & "#ff0000"
492             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 11)
493             printlog " fr11 = " & StyleBodyA
494             printlog " =========="
495             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
496             For i = 1 to 18
497                 printlog " +- " & Searchstring(i)
498                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
499                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
500                 end if
501             Next i
502             Searchstring(1) = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
503             Searchstring(2) = "style:parent-style-name=" & CHR$(34)
504             Searchstring(3) = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
505             Searchstring(4) = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
506             Searchstring(5) = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
507             Searchstring(6) = "style:vertical-rel=" & CHR$(34) & "paragraph" & CHR$(34)
508             Searchstring(7) = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
509             Searchstring(8) = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
510             Searchstring(9) = "fo:background-color=" & CHR$(34) & "#ffff00" & CHR$(34)
511             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 12)
512             printlog " fr12 = " & StyleBodyA
513             printlog " =========="
514             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
515             For i = 1 to 9
516                 printlog " +- " & Searchstring(i)
517                 if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
518                     warnlog "Frame Style: " & Searchstring(i) & " not found!"
519                 end if
520             Next i            
521             Searchstring(1)  = "style:family=" & CHR$(34) & "graphics" & CHR$(34)
522             Searchstring(2)  = "style:parent-style-name=" & CHR$(34)
523             Searchstring(3)  = "style:wrap=" & CHR$(34) & "parallel" & CHR$(34)
524             Searchstring(4)  = "style:number-wrapped-paragraphs=" & CHR$(34) & "no-limit" & CHR$(34)
525             Searchstring(5)  = "style:vertical-pos=" & CHR$(34) & "from-top" & CHR$(34)
526             Searchstring(6)  = "style:vertical-rel=" & CHR$(34) & "paragraph" & CHR$(34)
527             Searchstring(7)  = "style:horizontal-pos=" & CHR$(34) & "from-left" & CHR$(34)
528             Searchstring(8)  = "style:horizontal-rel=" & CHR$(34) & "paragraph" & CHR$(34)
529             Searchstring(9)  = "fo:background-color=" & CHR$(34) & "transparent" & CHR$(34)
530             Searchstring(10) = "<style:background-image/>"
531             Searchstring(11) = "<style:columns fo:column-count=" & CHR$(34) & "2" & CHR$(34)
532             
533             Searchstring(13) = "fo:margin-left=" & CHR$(34)
534             Searchstring(14) = "</style:columns>"
535             Searchstring(15) = "<style:properties"
536             Searchstring(16) = "</style:properties>"            
537             StyleBodyA = GetBodiesItemStyleName (gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml") , "draw:text-box", 13)
538             printlog " fr13 = " & StyleBodyA
539             printlog " =========="
540             StyleDefinitionA = GetXMLValueLineExtra ((gOfficePath & ConvertPath("user\work\xml\writer\level1\frames\content.xml")), "office:document-content", "office:automatic-styles;style:style" , "style:name" , StyleBodyA)
541             For i = 1 to 16
542                 if i <> 12 then
543                     printlog " +- " & Searchstring(i)
544                     if InStr (StyleDefinitionA , Searchstring(i)) = 0 then
545                         warnlog "Frame Style: " & Searchstring(i) & " not found!"
546                     end if
547                 end if
548             Next i
549         end if
550     else
551         call hCloseDocument
552     end if    
553 endcase
555 '-------------------------------------------------------------------------
557 testcase tschina
558     Dim i as integer
559     Dim a as integer
560     Dim xXMLStyleName as string
561     Dim xPath as string
562     Dim AttributeSearch(50) as string
563     Dim AttributeValue(50) as string
564     printlog "+- zh_cn_text.sxw"
565     call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\writer\zh_cn_text.sxw"))
566     if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text.sxw") , "StarOffice XML (Writer)") then
567         '/// Closing the document also if there is a verification dialog.
568         call hCloseDocument()
569         sleep(3)     
570         UnpackStorage( gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text.sxw") , gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text") )
571         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text\meta.xml")) = FALSE then
572             warnlog "XML-file 'meta.xml' not well formed!"
573         end if
574         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text\styles.xml")) = FALSE then
575             warnlog "XML-file 'styles.xml' not well formed!"
576         end if
577         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text\content.xml")) = FALSE then
578             warnlog "XML-file 'content.xml' not well formed!"
579         else
580             call hFileOpen (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_cn_text.sxw"))
581             sleep(2)
582             call hCloseDocument
583             sleep(2)
584         end if
585     else
586         call hCloseDocument
587     end if
588 endcase
590 '-------------------------------------------------------------------------
592 testcase ttchina
593     Dim i as integer
594     Dim a as integer
595     Dim xXMLStyleName as string
596     Dim xPath as string
597     Dim AttributeSearch(50) as string
598     Dim AttributeValue(50) as string
599     printlog "+- zh_tw_text.sxw"
600     call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\writer\zh_tw_text.sxw"))
601     if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text.sxw") , "StarOffice XML (Writer)") then
602         '/// Closing the document also if there is a verification dialog.
603         call hCloseDocument()
604         sleep(3)     
605         UnpackStorage( gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text.sxw") , gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text") )
606         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text\meta.xml")) = FALSE then
607             warnlog "XML-file 'meta.xml' not well formed!"
608         end if
609         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text\styles.xml")) = FALSE then
610             warnlog "XML-file 'styles.xml' not well formed!"
611         end if
612         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text\content.xml")) = FALSE then
613             warnlog "XML-file 'content.xml' not well formed!"
614         else
615             call hFileOpen (gOfficePath & ConvertPath("user\work\xml\writer\level1\zh_tw_text.sxw"))
616             sleep(2)
617             call hCloseDocument
618             sleep(2)
619         end if
620     else
621         call hCloseDocument
622     end if
623 endcase
625 '-------------------------------------------------------------------------
627 testcase tkorean
628     Dim i as integer
629     Dim a as integer
630     Dim xXMLStyleName as string
631     Dim xPath as string
632     Dim AttributeSearch(50) as string
633     Dim AttributeValue(50) as string
634     printlog "+- ko_text.sxw"
635     call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\writer\ko_text.sxw"))
636     if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text.sxw") , "StarOffice XML (Writer)") then
637         '/// Closing the document also if there is a verification dialog.
638         call hCloseDocument()
639         sleep(3)     
640         UnpackStorage( gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text.sxw") , gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text") )
641         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text\meta.xml")) = FALSE then
642             warnlog "XML-file 'meta.xml' not well formed!"
643         end if
644         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text\styles.xml")) = FALSE then
645             warnlog "XML-file 'styles.xml' not well formed!"
646         end if
647         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text\content.xml")) = FALSE then
648             warnlog "XML-file 'content.xml' not well formed!"
649         else
650             call hFileOpen (gOfficePath & ConvertPath("user\work\xml\writer\level1\ko_text.sxw"))
651             sleep(2)
652             call hCloseDocument
653             sleep(2)
654         end if
655     else
656         call hCloseDocument
657     end if
658 endcase
660 '-------------------------------------------------------------------------
662 testcase tjapan
663     Dim i as integer
664     Dim a as integer
665     Dim xXMLStyleName as string
666     Dim xPath as string
667     Dim AttributeSearch(50) as string
668     Dim AttributeValue(50) as string
669     printlog "+- jp_text.sxw"
670     call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\writer\jp_text.sxw"))
671     if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text.sxw") , "StarOffice XML (Writer)") then
672         '/// Closing the document also if there is a verification dialog.
673         call hCloseDocument()
674         sleep(3)     
675         UnpackStorage( gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text.sxw") , gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text") )
676         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text\meta.xml")) = FALSE then
677             warnlog "XML-file 'meta.xml' not well formed!"
678         end if
679         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text\styles.xml")) = FALSE then
680             warnlog "XML-file 'styles.xml' not well formed!"
681         end if
682         if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text\content.xml")) = FALSE then
683             warnlog "XML-file 'content.xml' not well formed!"
684         else
685             call hFileOpen (gOfficePath & ConvertPath("user\work\xml\writer\level1\jp_text.sxw"))
686             sleep(2)
687             call hCloseDocument
688             sleep(2)
689         end if
690     else
691         call hCloseDocument
692     end if
693 endcase