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: sxc7_01.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-07-11 07:31:25 $
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 : oliver.creamer@sun.com
36 '* short description : XML Calc Include File
38 '\***********************************************************************************
39 Dim Isliste(250) as string
40 Dim OutputPath as string
44 printlog "--------------------------- sxc_01.inc ------------------------------"
45 printlog "------------------------ Alien Attributes ---------------------------"
47 printlog "---------------------- File Format Changes --------------------------"
49 printlog "------------------------------ Cells --------------------------------"
57 '-------------------------------------------------------------------------
58 testcase tAlienAttributes
62 Dim xXMLStyleName as string
64 Dim AttrNameInDOM as string
65 Dim AttributeSearch(50) as string
66 Dim AttributeValue(50) as string
68 printlog "+- alien_attributes.sxc"
69 call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\calc\ooo10\alien_attributes.sxc"))
70 if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes.sxc") , "StarOffice XML (Calc)") then
71 '/// Closing the document also if there is a verification dialog.
74 UnpackStorage( gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes.sxc") , gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes") )
75 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes\styles.xml")) = FALSE then
76 warnlog "XML-file 'styles.xml' not well formed!"
78 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes\meta.xml")) = FALSE then
79 warnlog "XML-file 'meta.xml' not well formed!"
81 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes\content.xml")) = FALSE then
82 warnlog "XML-file 'content.xml' not well formed!"
84 call hFileOpen (gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes.sxc"))
88 SAXReadFile(gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes\content.xml"))
89 printlog "-----------------"
90 printlog "Hidden Namespaces"
91 printlog "-----------------"
92 '/// <u><b>content.xml</u></b>
93 '/// <u>Hidden attributes in namespaces</u>
94 '///+ Searching for: xmlns:foo="http://openoffice.org/2000/foo"
95 '///+ Searching for: xmlns:bla="http://openoffice.org/2000/bla"
96 '-------------------------------------------------------------------------
97 AttributeSearch(1) = "xmlns:foo"
98 AttributeValue(1) = "http://openoffice.org/2000/foo"
100 AttributeSearch(2) = "xmlns:bla"
101 AttributeValue(2) = "http://openoffice.org/2000/bla"
102 printlog "++ Feature(s) to be searched for:"
104 '-------------------------------------------------------------------------
105 SAXSeekElement("office:document-content")
107 printlog " +- " & AttributeSearch(i)
108 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
109 warnlog "Hidden attributes (in namespace): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
113 '/// <u>hidden attributes</u>
114 '///+<ol><li><b>in a cell style</b></li>
115 '///+<li><b>in a paragraph style (twice)</b></li>
116 '///+<li><b>in a text style (twice)</b></li>
117 '///+<li><b>in a graphic style</b></li></ol>
118 '///+ Searching for: bla="holla"
119 '///+ Searching for: bla1="holla1"
120 '///+ Searching for: bla2="holla2"
121 '///+ Searching for: foo:foobla="holla"
122 '///+ Searching for: foo:foobla1="holla1"
123 '///+ Searching for: foo:foobla2="holla2"
124 '///+ Searching for: bla:blabla="holla"
125 '///+ Searching for: bla:blabla1="holla1"
126 '///+ Searching for: bla:blabla2="holla2"
127 AttributeSearch(1) = "bla"
128 AttributeValue(1) = "holla"
129 AttributeSearch(2) = "bla1"
130 AttributeValue(2) = "holla1"
131 AttributeSearch(3) = "bla2"
132 AttributeValue(3) = "holla2"
133 AttributeSearch(4) = "foo:foobla"
134 AttributeValue(4) = "holla"
135 AttributeSearch(5) = "foo:foobla1"
136 AttributeValue(5) = "holla1"
137 AttributeSearch(6) = "foo:foobla2"
138 AttributeValue(6) = "holla2"
139 AttributeSearch(7) = "bla:blabla"
140 AttributeValue(7) = "holla"
141 AttributeSearch(8) = "bla:blabla1"
142 AttributeValue(8) = "holla1"
143 AttributeSearch(9) = "bla:blabla2"
144 AttributeValue(9) = "holla2"
145 '-------------------------------------------------------------------------
146 printlog "++ Feature(s) to be searched for:"
148 '-------------------------------------------------------------------------
151 printlog "---------------------------------------"
152 printlog "Hidden attributes in a cell style"
153 printlog "---------------------------------------"
155 if c = 2 OR c = 3 then
156 printlog "---------------------------------------"
157 printlog "Hidden attributes in a paragraph style (" & c-1 & ")"
158 printlog "---------------------------------------"
160 if c = 4 or c = 5 then
161 printlog "---------------------------------------"
162 printlog "Hidden attributes in a text style (" & c-3 & ")"
163 printlog "---------------------------------------"
166 printlog "---------------------------------------"
167 printlog "Hidden attributes in a graphic style"
168 printlog "---------------------------------------"
171 SAXSeekElement("office:document-content")
172 SAXSeekElement("office:automatic-styles")
173 'The hidden attributes are in a known sequence included,
174 'so the same routine will be used for different styles!
176 'Note: The first four style:style elements do not have any hidden attributes -> 4+c.
177 SAXSeekElement("style:style" , 4+c )
178 AttrNameInDOM = SAXGetAttributeValue("style:name")
179 printlog " + Style name: " & AttrNameInDOM
181 SAXSeekElement("style:properties")
183 printlog " +- " & AttributeSearch(i)
184 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
185 'c = <nr> means <nr>'th+4 style:style in DOM tree
187 warnlog "Hidden attributes (in a cell style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
189 if c = 2 or c = 3 then
190 ' warnlog "Hidden attributes (in a paragraph style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
191 warnlog "#i100879# : Hidden attributes (in a paragraph style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
193 if c = 4 or c = 5 then
194 warnlog "Hidden attributes (in a text style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
197 warnlog "Hidden attributes (in a graphic style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
204 '-------------------------------------------------------------------------
206 SAXReadFile(gOfficePath & ConvertPath("user\work\xml\calc\level1\alien_attributes\styles.xml"))
207 '-------------------------------------------------------------------------
208 printlog " -------------------"
209 printlog " s t y l e s . x m l"
210 printlog " -------------------"
211 printlog "-----------------"
212 printlog "Hidden Namespaces"
213 printlog "-----------------"
214 '/// <u><b>styles.xml</u></b>
215 '/// <u>Hidden attributes in namespaces</u>
216 '///+ Searching for: xmlns:foo="http://openoffice.org/2000/foo"
217 '///+ Searching for: xmlns:bla="http://openoffice.org/2000/bla"
218 '-------------------------------------------------------------------------
219 AttributeSearch(1) = "xmlns:foo"
220 AttributeValue(1) = "http://openoffice.org/2000/foo"
222 AttributeSearch(2) = "xmlns:bla"
223 AttributeValue(2) = "http://openoffice.org/2000/bla"
224 printlog "++ Feature(s) to be searched for:"
226 '-------------------------------------------------------------------------
227 SAXSeekElement("office:document-styles")
229 printlog " +- " & AttributeSearch(i)
230 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
231 warnlog "Hidden attributes (in namespace): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
236 '-------------------------------------------------------------------------
237 '/// <u>hidden attributes</u>
238 '///+<ol><li><b>in a table cell template style</b></li>
239 '///+<li><b>in a master page template style</b></li></ol>
240 '///+ Searching for: bla="holla"
241 '///+ Searching for: bla1="holla1"
242 '///+ Searching for: bla2="holla2"
243 '///+ Searching for: foo:foobla="holla"
244 '///+ Searching for: foo:foobla1="holla1"
245 '///+ Searching for: foo:foobla2="holla2"
246 '///+ Searching for: bla:blabla="holla"
247 '///+ Searching for: bla:blabla1="holla1"
248 '///+ Searching for: bla:blabla2="holla2"
249 AttributeSearch(1) = "bla"
250 AttributeValue(1) = "holla"
251 AttributeSearch(2) = "bla1"
252 AttributeValue(2) = "holla1"
253 AttributeSearch(3) = "bla2"
254 AttributeValue(3) = "holla2"
255 AttributeSearch(4) = "foo:foobla"
256 AttributeValue(4) = "holla"
257 AttributeSearch(5) = "foo:foobla1"
258 AttributeValue(5) = "holla1"
259 AttributeSearch(6) = "foo:foobla2"
260 AttributeValue(6) = "holla2"
261 AttributeSearch(7) = "bla:blabla"
262 AttributeValue(7) = "holla"
263 AttributeSearch(8) = "bla:blabla1"
264 AttributeValue(8) = "holla1"
265 AttributeSearch(9) = "bla:blabla2"
266 AttributeValue(9) = "holla2"
267 '-------------------------------------------------------------------------
268 printlog "++ Feature(s) to be searched for:"
270 '-------------------------------------------------------------------------
274 printlog "-----------------------------------------------"
275 printlog "Hidden attributes in a template of a cell style"
276 printlog "-----------------------------------------------"
277 SAXSeekElement("office:document-styles")
278 SAXSeekElement("office:styles")
279 SAXSeekElement("style:style" , 2)
280 AttrNameInDOM = SAXGetAttributeValue("style:name")
281 printlog " + Style name: " & AttrNameInDOM
285 printlog "------------------------------------------------------"
286 printlog "Hidden attributes in a template of a master page style"
287 printlog "------------------------------------------------------"
288 SAXSeekElement("office:document-styles")
289 SAXSeekElement("office:automatic-styles")
290 SAXSeekElement("style:page-master")
291 AttrNameInDOM = SAXGetAttributeValue("style:name")
292 printlog " + Style name: " & AttrNameInDOM
295 SAXSeekElement("style:properties")
297 printlog " +- " & AttributeSearch(i)
298 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
300 warnlog "Hidden attributes (in a template of a cell style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
303 warnlog "Hidden attributes (in a template of a master page style): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
309 '-------------------------------------------------------------------------
318 '-------------------------------------------------------------------------
324 Dim xXMLStyleName as string
326 Dim AttrNameInDOM as string
327 Dim AttributeSearch(50) as string
328 Dim AttributeValue(50) as string
330 printlog "+- feat906.sxc"
331 call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\calc\ooo10\feat906.sxc"))
332 if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906.sxc") , "StarOffice XML (Calc)") then
333 '/// Closing the document also if there is a verification dialog.
334 call hCloseDocument()
336 UnpackStorage( gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906.sxc") , gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906") )
337 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906\styles.xml")) = FALSE then
338 warnlog "XML-file 'styles.xml' not well formed!"
340 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906\meta.xml")) = FALSE then
341 warnlog "XML-file 'meta.xml' not well formed!"
343 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906\content.xml")) = FALSE then
344 warnlog "XML-file 'content.xml' not well formed!"
346 call hFileOpen (gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906.sxc"))
350 SAXReadFile(gOfficePath & ConvertPath("user\work\xml\calc\level1\feat906\content.xml"))
351 printlog "-------------------------------"
352 printlog "draw:notify-on-update-of-ranges"
353 printlog "-------------------------------"
354 '/// <u><b>content.xml</u></b>
355 '/// <u>draw:notify-on-update-of-ranges</u>
356 '/// <i>Feature (Change) 906</i>
357 '///+ <blockquote>The draw:object got a new attribute. This attribute is only
358 '///+ on chart objects given. It gives the ranges or tablenames
359 '///+ of the chart (the ranges or tablenames the chart is
360 '///+ connected to). If the attribute is not given the object
361 '///+ will be loaded otherwise the object is only loaded if in
362 '///+ the ranges or tables is something changed or the object is
363 '///+ showed. If the value of the attribute is empty it is a OLE
364 '///+ chart with its own data.
365 '///+ This increase the performance of loading charts, because
366 '///+ they are only loaded if they are needed.<br>
367 '///+ This attribute <u>replaces</u> the <i>draw:notify-on-update-table</i>
368 '///+ attribute which only was usable by the wordprocessing
369 '///+ application. The new one is used by the wordprocessing and
370 '///+ the spreadsheet application.
371 '///+ The data in this attribute are twice, because the chart has
372 '///+ this data too, but to get this data from the chart it has
373 '///+ to be loaded.</blockquote>
374 '/// Searching for: draw:notify-on-update-of-ranges="Sheet1.A1:Sheet1.A5"
376 '-------------------------------------------------------------------------
377 AttributeSearch(1) = "draw:notify-on-update-of-ranges"
378 AttributeValue(1) = "Sheet1.A1:Sheet1.A5"
380 printlog "++ Feature(s) to be searched for:"
382 '-------------------------------------------------------------------------
383 SAXSeekElement("office:document-content")
384 SAXSeekElement("office:body")
385 SAXSeekElement("table:table")
386 SAXSeekElement("table:table-row" , 2)
387 SAXSeekElement("table:table-cell" , 2)
388 SAXSeekElement("draw:object")
390 printlog " +- " & AttributeSearch(i)
391 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
392 warnlog "Hidden attributes (in namespace): " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
403 '-------------------------------------------------------------------------
405 testcase tCellformats1
408 Dim xXMLStyleName as string
410 Dim AttributeSearch(50) as string
411 Dim AttributeValue(50) as string
413 printlog "+- cellformats1.sdc"
414 call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\calc\so_binary\cellformats1.sdc"))
415 if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1.sxc") , "StarOffice XML (Calc)") then
416 '/// Closing the document also if there is a verification dialog.
417 call hCloseDocument()
419 UnpackStorage( gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1.sxc") , gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1") )
420 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1\styles.xml")) = FALSE then
421 warnlog "XML-file 'styles.xml' not well formed!"
423 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1\meta.xml")) = FALSE then
424 warnlog "XML-file 'meta.xml' not well formed!"
426 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1\content.xml")) = FALSE then
427 warnlog "XML-file 'content.xml' not well formed!"
429 call hFileOpen (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1.sxc"))
433 printlog " ---------------------"
434 printlog " c o n t e n t . x m l"
435 printlog " ---------------------"
437 '/// <u><b>content.xml</u></b>
438 SAXReadFile(gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats1\content.xml"))
439 printlog "-----------"
440 printlog "T A B L E S"
441 printlog "-----------"
442 '/// <u>table style t1</u>
443 '///+ Searching for: style:master-page-name="Default" ///
444 '///+ Searching for: style:family="table" ///
445 '-------------------------------------------------------------------------
446 AttributeSearch(1) = "style:family"
447 AttributeValue(1) = "table"
449 AttributeSearch(2) = "style:master-page-name"
450 AttributeValue(2) = "Default"
451 printlog "++ Feature(s) to be searched for:"
453 '-------------------------------------------------------------------------
454 xXMLStyleName = GetItemStyleName ( "office:body", "table:table", "table:table" , 1 , "table:style-name" )
455 printlog " +---------------------------------------------------------"
456 printlog " |" & xXMLStyleName
457 printlog " +---------------------------------------------------------"
458 xPath = GetXMLElementPath( "office:automatic-styles" , "style:style" , "style:name" , xXMLStyleName)
460 SAXSeekElement(xPath)
461 printlog " +- " & AttributeSearch(i)
462 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
463 warnlog "Table Style: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
466 '///+ <i>style properties:</i>
467 '///+ Searching for: table:display="true"
468 '-------------------------------------------------------------------------
469 AttributeSearch(1) = "table:display"
470 AttributeValue(1) = "true"
471 '-------------------------------------------------------------------------
472 SAXSeekElement(xPath)
473 SAXSeekElement("style:properties")
474 printlog " +- " & AttributeSearch(1)
475 if SAXGetAttributeValue(AttributeSearch(1)) <> AttributeValue(1) then
476 warnlog "style:properties: " & AttributeSearch(1) & " is not " & AttributeValue(1) & "!"
485 '/// <u>cell style ce2</u>
486 '///+ Searching for: style:family="table-cell"
487 '///+ Searching for: style:parent-style-name="Default"
488 '-------------------------------------------------------------------------
489 AttributeSearch(1) = "style:family"
490 AttributeValue(1) = "table-cell"
491 AttributeSearch(2) = "style:parent-style-name"
492 AttributeValue(2) = "Default"
493 printlog "++ Feature(s) to be searched for:"
495 '-------------------------------------------------------------------------
496 SAXSeekElement("office:document-content")
497 SAXSeekElement("office:body")
498 SAXSeekElement("table:table")
499 SAXSeekElement("table:table-row" , 2)
500 SAXSeekElement("table:table-cell" , 2)
501 xXMLStyleName = SAXGetAttributeValue("table:style-name")
502 printlog " +---------------------------------------------------------"
503 printlog " |" & xXMLStyleName
504 printlog " +---------------------------------------------------------"
505 xPath = GetXMLElementPath( "office:automatic-styles" , "style:style" , "style:name" , xXMLStyleName)
507 SAXSeekElement(xPath)
508 printlog " +- " & AttributeSearch(i)
509 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
510 warnlog "Table Style: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
513 '///+ <i>style properties:</i>
514 '///+ Searching for: fo:color="#000000"
515 '///+ Searching for: style:font-name="Arial"
516 '///+ Searching for: fo:font-size="10pt"
517 '///+ Searching for: fo:font-style="italic"
518 '///+ Searching for: style:text-underline="single"
519 '///+ Searching for: fo:font-weight="bold"
520 '-------------------------------------------------------------------------
521 AttributeSearch(1) = "fo:color"
522 AttributeValue(1) = "#000000"
523 AttributeSearch(2) = "style:font-name"
524 AttributeValue(2) = "Arial"
525 AttributeSearch(3) = "fo:font-size"
526 AttributeValue(3) = "10pt"
527 AttributeSearch(4) = "fo:font-style"
528 AttributeValue(4) = "italic"
529 AttributeSearch(5) = "style:text-underline"
530 AttributeValue(5) = "single"
531 AttributeSearch(6) = "fo:font-weight"
532 AttributeValue(6) = "bold"
533 '-------------------------------------------------------------------------
534 SAXSeekElement(xPath)
535 SAXSeekElement("style:properties")
538 printlog " +- " & AttributeSearch(i)
539 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
540 warnlog "style:properties: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
547 '///+ Searching for: style:family="table-cell"
548 '///+ Searching for: style:parent-style-name="Default"
549 '-------------------------------------------------------------------------
550 AttributeSearch(1) = "style:family"
551 AttributeValue(1) = "table-cell"
552 AttributeSearch(2) = "style:parent-style-name"
553 AttributeValue(2) = "Default"
554 printlog "++ Feature(s) to be searched for:"
556 '-------------------------------------------------------------------------
558 SAXSeekElement("office:body")
559 SAXSeekElement("table:table")
560 SAXSeekElement("table:table-row" , 4)
561 SAXSeekElement("table:table-cell" , 2)
562 xXMLStyleName = SAXGetAttributeValue("table:style-name")
563 printlog " +---------------------------------------------------------"
564 printlog " |" & xXMLStyleName
565 printlog " +---------------------------------------------------------"
566 xPath = GetXMLElementPath( "office:automatic-styles" , "style:style" , "style:name" , xXMLStyleName)
568 SAXSeekElement(xPath)
569 printlog " +- " & AttributeSearch(i)
570 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
571 warnlog "Table Style: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
574 '///+ <i>style properties:</i>
575 '///+ Searching for: fo:color="#800000"
576 '///+ Searching for: style:text-outline="true"
577 '///+ Searching for: style:text-crossing-out="single-line"
578 '///+ Searching for: fo:font-size="12pt"
579 '///+ Searching for: fo:language="en"
580 '///+ Searching for: fo:country="US"
581 '///+ Searching for: fo:text-shadow="none"
582 '-------------------------------------------------------------------------
583 AttributeSearch(1) = "fo:color"
584 AttributeValue(1) = "#800000"
585 AttributeSearch(2) = "style:text-outline"
586 AttributeValue(2) = "true"
587 AttributeSearch(3) = "fo:font-size"
588 AttributeValue(3) = "12pt"
589 AttributeSearch(4) = "style:text-crossing-out"
590 AttributeValue(4) = "single-line"
591 AttributeSearch(5) = "fo:text-shadow"
592 AttributeValue(5) = "none"
593 AttributeSearch(6) = "fo:country"
594 AttributeValue(6) = "US"
595 AttributeSearch(7) = "fo:language"
596 AttributeValue(7) = "en"
597 '-------------------------------------------------------------------------
598 SAXSeekElement(xPath)
599 SAXSeekElement("style:properties")
602 printlog " +- " & AttributeSearch(i)
603 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
604 warnlog "style:properties: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
611 '///+ <i>style properties:</i>
612 '///+ Searching for: style:font-name="Times New Roman"
613 '///+ Searching for: fo:font-size="28pt"
614 '-------------------------------------------------------------------------
615 AttributeSearch(1) = "style:font-name"
616 AttributeValue(1) = "Comic Sans MS"
617 AttributeSearch(2) = "fo:font-size"
618 AttributeValue(2) = "16pt"
619 '-------------------------------------------------------------------------
621 SAXSeekElement("office:body")
622 SAXSeekElement("table:table")
623 SAXSeekElement("table:table-row", 6)
624 SAXSeekElement("table:table-cell" , 2)
625 xXMLStyleName = SAXGetAttributeValue("table:style-name")
626 printlog " +---------------------------------------------------------"
627 printlog " |" & xXMLStyleName
628 printlog " +---------------------------------------------------------"
629 xPath = GetXMLElementPath( "office:automatic-styles" , "style:style" , "style:name" , xXMLStyleName)
630 SAXSeekElement(xPath)
633 printlog " +- " & AttributeSearch(i)
634 if SAXGetAttributeValue(AttributeSearch(i)) <> AttributeValue(i) then
635 warnlog "style:properties: " & AttributeSearch(i) & " is not " & AttributeValue(i) & "!"
645 '-------------------------------------------------------------------------
647 testcase tCellformats2
648 printlog "+- cellformats2.sdc"
649 call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\calc\so_binary\cellformats2.sdc"))
650 if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2.sxc") , "StarOffice XML (Calc)") then
651 '/// Closing the document also if there is a verification dialog.
652 call hCloseDocument()
654 UnpackStorage( gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2.sxc") , gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2") )
655 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2\styles.xml")) = FALSE then
656 warnlog "XML-file 'styles.xml' not well formed!"
658 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2\meta.xml")) = FALSE then
659 warnlog "XML-file 'meta.xml' not well formed!"
661 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2\content.xml")) = FALSE then
662 warnlog "XML-file 'content.xml' not well formed!"
664 call hFileOpen (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats2.sxc"))
674 '-------------------------------------------------------------------------
676 testcase tCellformats3
677 printlog "+- cellformats3.sdc"
678 call hFileOpen (gTesttoolPath & ConvertPath("xml\optional\input\calc\so_binary\cellformats3.sdc"))
679 if hFileSaveAsWithFilterKill (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3.sxc") , "StarOffice XML (Calc)") then
680 '/// Closing the document also if there is a verification dialog.
681 call hCloseDocument()
683 UnpackStorage( gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3.sxc") , gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3") )
684 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3\styles.xml")) = FALSE then
685 warnlog "XML-file 'styles.xml' not well formed!"
687 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3\meta.xml")) = FALSE then
688 warnlog "XML-file 'meta.xml' not well formed!"
690 if XMLWellformed (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3\content.xml")) = FALSE then
691 warnlog "XML-file 'content.xml' not well formed!"
693 call hFileOpen (gOfficePath & ConvertPath("user\work\xml\calc\level1\cellformats3.sxc"))