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: g_numberformatter1.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-13 10:27:04 $
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 : wolfram.garten@sun.com
36 '* short description : update and resouce test for numberformatter
38 '************************************************************************
40 '#1 tNumberformatterGetLanguage
41 '#1 sNumberformatterPreconditions
42 '#1 sNumberformatterOpenDialog
43 '#1 tNumberformatterPre
45 '#1 tUserDefinedNumberformatter
46 '#1 tButtonsNumberformatter
48 '\***********************************************************************
50 '///Setting Variables..
52 dim sSeperatorCurr as string ' which kind of Separator is used
53 dim iCategoryCount as integer ' number of Category entries
54 dim sCategoryText as string ' names of Category entries
55 dim sFormatText as string ' variable for format string text
56 dim sFormatCode as string ' variable for format code text line
57 dim iLanguageCount as integer ' number of language entries
58 dim sLanguageText as string ' name sof language entries
59 dim iCount as integer ' count variable for/next
60 dim sCell as string ' Cell-Content
62 '-------------------------------------------------------------------------------
64 '///Setting Preconditions for tests
65 sub sNumberformatterPreconditions
67 printlog "Setting up some preconditions for starting the testcases now.."
69 select case gApplication
72 Kontext "DocumentWriter"
73 printlog "Application is " & gApplication
74 '/// Press CTRL+F12 to insert via shortcut a table
75 DocumentWriter.TypeKeys "<MOD1 F12>", true
76 Kontext "TabelleEinfuegenWriter"
77 '/// Leave the insert table dialog with OK
78 TabelleEinfuegenWriter.OK
79 printlog "Table inserted"
80 Kontext "DocumentWriter"
81 '/// Type 0 in the first cell
82 DocumentWriter.TypeKeys "0", true
83 Call sNumberformatterOpenDialog 'opening Dialog
87 '/// Calc with Chart in inplace mode:
88 Kontext "DokumentChart"
89 if DokumentChart.Exists(1) then
90 printlog "Application is " & gApplication & " with inserted Chart."
91 DokumentChart.TypeKeys "<TAB>",2,true 'selecting data serie
92 '/// Opening Number Formatter Dialog using Menu
97 '/// Selecting correct Tab page
98 active.SetPage TabDataSeriesLabels
99 Kontext "TabDataSeriesLabels"
101 PercentageFormat.Click
102 Kontext "TabChartAxisNumbers"
104 '/// fLocaleString function gets English from t_locale_strings1.inc
105 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
108 '/// Calc without Chart:
109 Kontext "DocumentCalc" 'just Calc without Chart
110 printlog "Application is " & gApplication
111 '/// Inserting 0 in first cell
112 DocumentCalc.TypeKeys "0", true
113 DocumentCalc.TypeKeys "<RETURN>", true
114 DocumentCalc.TypeKeys "<UP>", true
115 Call sNumberformatterOpenDialog 'opening Dialog
118 case else : warnlog "This testcase can only be tested in Writer,Calc or Chart!"
122 '-------------------------------------------------------------------------------
124 sub sNumberformatterOpenDialog
126 select case gApplication
129 Kontext "DocumentWriter"
130 '///Open Context Menu
131 DocumentWriter.TypeKeys "<SHIFT F10>", true
133 '///Open Number Formatter
134 DocumentWriter.TypeKeys "<DOWN>",11, true
136 DocumentWriter.TypeKeys "<RETURN>", true
138 printlog "Opening number formatter dialog."
139 Kontext "TabChartAxisNumbers"
140 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
143 '/// Calc with Chart in inplace mode
144 Kontext "DokumentChart"
145 if DokumentChart.Exists(1) then
146 printlog "Application is " & gApplication & " with inserted Chart."
147 '/// Opening Numberformatter using menu
148 DocumentCalc.TypeKeys "<TAB>",2,true 'selecting data serie
152 Kontext "TabDataSeriesLabels"
154 PercentageFormat.Click
155 Kontext "TabChartAxisNumbers"
157 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
161 Kontext "DocumentCalc"
162 '///Open Context Menu
163 DocumentCalc.TypeKeys "<SHIFT F10>", true
164 '///Open Number Format
165 DocumentCalc.TypeKeys "<DOWN>",3, true
166 DocumentCalc.TypeKeys "<RETURN>", true
168 Active.SetPage TabChartAxisNumbers
169 printlog "Opening number formatter dialog."
170 Kontext "TabChartAxisNumbers"
171 '/// fLocaleString function gets English from t_locale_strings1.inc
172 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
175 case else : warnlog "This testcase can only be tested in Writer and Calc!"
179 '------------------------------------------------------------------------------
181 testcase tNumberformatterPre
182 '/// Setting some preconditions for the testcases:
183 '/// Setting Measuring to cm by calling fSetMeasurementToCM
184 Call fSetMeasurementToCM
186 '///Getting the decimal separator with GetDecimalSeperator
187 printlog "looking for used Separator..."
188 sSeperatorCurr = GetDecimalSeperator
191 '------------------------------------------------------------------------------
193 testcase tNumberformatter
196 'This part is only for testing a testrun with Chart and can be deleted when checked in!!!
198 'DocumentCalc.UseMenu
202 'Kontext "OLEObjektInsert"
204 'printlog "Chart inserted"
205 'Kontext "DokumentChart"
207 'Check this one out if above is checked in:
208 '/// Calling new document
211 '/// Calling Subroutine for getting preconditions
212 Call sNumberformatterPreconditions
214 Kontext "TabChartAxisNumbers"
215 '/// Checking if Category entries in dialog are correct
216 iCategoryCount = Category.GetItemCount
217 '/// In the Category section list box 11 entries should be available.
218 if iCategoryCount = 11 then
219 printlog "All 11 entries present."
221 warnlog "Warning: Only " & iCategoryCount & " listed!"
224 'Checking if listbox comes up when switching category to Currency
225 '/// Select Currency in the Category section list box (entry 5)
227 '/// In the Format section
228 '/// A drop down list box should be visible
229 if FormatCurrency.IsVisible then
230 printlog "FormatCurrency available"
232 warnlog "Drop Down listbox did not come up"
235 'Checking if ZahlenFormat fits to selected Category
236 '/// The content should match to the category currency
237 FormatString.Select(1) 'selecting entry
238 sFormatText = FormatString.GetSelText 'getting text into variable
240 '/// Comparing with given value "-$1,234"
241 if sFormatText = "-$1,234" then
242 printlog "Text fitting to Format: " & sFormatText
244 warnlog "Text not fitting to Format: " & sFormatText
247 '/// Select Percent in the Category section list box
250 '/// In the Format section
251 '/// No drop down list box should be visible
252 'Checking if NO listbox comes up when switching category to Percent
253 if FormatCurrency.IsVisible then
254 warnlog "FormatCurrency should not be available!"
256 printlog "Drop Down listbox did not come up."
259 '/// The content should match to the category percent
260 'Checking if ZahlenFormat fits to selected Category
261 FormatString.Select(1)
262 sFormatText = FormatString.GetSelText
263 if sFormatText = "-13%" then
264 printlog "Text fitting to Format, " & sFormatText
266 warnlog "Text not fitting to Format: " & sFormatText
269 '/// Set the category to All
272 '/// Choose a language Lithuanian from the drop down list box for Language
273 Language.Select (fLocaleString ("LocaleNumFormLanLith"))
275 '/// In the Category list box the entry should Number should be selected
276 sCategoryText = Category.GetSelIndex
277 if sCategoryText = 3 then '3 = number entry in Category
278 printlog sCategoryText & " is selected."
280 warnlog "Wrong entry selected:" & sCategoryText & "!"
283 '/// In the Format list box
284 '/// the entry Bendras should be selected
285 sFormatText = FormatString.GetSelText
286 if sFormatText = "Bendras" then
287 printlog sFormatText & " is selected."
289 warnlog "Wrong entry in Format box selected: " & sformatText & "!"
292 '/// Select the entry -1,234 (or -1.234 depending on the locale used)
293 FormatString.Select(4)
295 '/// Does the checkbox Thousands separator get taged ?
296 if ThousandsSeparator.IsChecked then
297 printlog "Thousands Separator checked."
299 warnlog "Warning! Thousands Separator does not get checked!"
302 '/// Changed the format code to #,##0 (or #.##0) ?
303 sFormatCode = FormatCode.GetText
304 if sFormatCode = "#.##0" then
305 sFormatCode = "#,##0"
306 printlog "FormatCode changed to " & sFormatCode & "."
308 sFormatCode = "#.##0"
309 printlog "FormatCode changed to " & sFormatCode & "."
312 '/// Set the Language back to Default (English (USA) and choose the category Currency.
313 '/// Gets the string "English" from t_locale_Strings1.inc in the correct language and sets the
314 '/// language box to it
315 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
316 printlog "Language set to Default."
318 '/// Category set to Currency
319 printlog "Category set to Currency."
321 '/// Is the fourth entry in the format string box selected ?
322 if FormatString.GetSelIndex = 4 then
323 printlog "Fourth entry selected, good."
325 warnlog "Warning! Not the fourth entry selected!"
328 '/// Does the Decimal Places Spinfield change to 2?
329 if DecimalPlaces.GetText = "2" then
330 printlog "Decimal places = 2, good."
332 warnlog "Warning: Decimal places is not 2!"
335 '/// are the check boxes Negative numbers red and Thousands separator tagged ?
336 if NegativNumbersRed.IsChecked then
337 printlog "Negative numbers red is checked."
339 warnlog "Warning: Negative numbers red is NOT checked!"
342 if ThousandsSeparator.IsChecked then
343 printlog "ThousandsSeparator is checked."
345 warnlog "Warning: ThousandsSeparator is NOT checked!"
348 '/// Change the Language field under Format to $ English (USA) if it is not set to this value yet.
349 if FormatCurrency.GetSelText = "$ " & (fLocaleString ("LocaleNumFormLanEng")) then
350 printlog "Format already set to English."
352 printlog "Setting Format to English..."
353 '/// Getting correct L10N string from global/t_local_strings1.inc
354 FormatCurrency.Select "$ " & (fLocaleString ("LocaleNumFormLanEng"))
357 '/// Compares the Format String match this one : [$$-409]#,##0.00;[RED]-[$$-409]#,##0.00
358 sFormatCode = FormatCode.GetText
359 if sFormatCode = "[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00" then
360 printlog "Format Code is correct: " & sFormatCode
362 warnlog "Format Code wrong: " & sFormatCode & "!"
365 '/// Change the Language Dropdown list box to show Dutch (Netherlands).
366 printlog "Selecting Dutch..."
367 Language.Select (fLocaleString ("LocaleNumFormLanDutch"))
369 '/// Has the content of the format Listbox changed to show also Euro and Netherlands old fl currency values ?
370 FormatString.Select (15)
371 sFormatText = FormatString.GetSelText
372 '/// Checking for the string "fl 1.234-"
373 if sFormatText = "fl 1.234-" then
374 printlog "Format String also shows " & sFormatText
376 warnlog "Format String does not show fl 1.234- but " & sFormatText
379 '/// Reset the language to Default and change the Category to Date
380 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
381 printlog "Language set to English."
383 printlog "Category set to Currency."
385 '/// Checking if the Options Decimal places, leading zeroes, negative numnbers red,
386 '/// thousands seperator and so on are disabled ?
387 if DecimalPlaces.isEnabled = False AND LeadingZeroes.isEnabled = False AND NegativNumbersRed.isEnabled = False AND ThousandsSeparator.isEnabled = False then
388 printlog "Options disabled."
390 warnlog "Not all options disabled!"
393 '/// Checking the Date formats in the format section ?
394 sFormatText = FormatString.GetSelText
395 if sFormatText = "12/31/99" then
396 printlog "Format is correctly set to Date, " & sFormatText
398 warnlog "Format NOT correct: " & sFormatText
401 '/// Change the Category to Time. Does the Format List box show time formats ?
403 printlog "Category Time selected."
404 FormatString.Select(1)
405 sFormatText = FormatString.GetSelText
406 if sFormatText = "13:37" then
407 printlog "Format is correctly set to time, " & sFormatText
409 warnlog "Format NOT correct: " & sFormatText
412 '/// Change the Category to Scientific. Are there two formats shown ?
414 printlog "Category Scientific selected."
415 sFormatText = FormatString.GetSelText
416 if FormatString.GetSelText = "-1.23E+003" then
417 printlog "Format is correctly set to Scientific, " & sFormatText
419 warnlog "Format NOT correct: " & sFormatText
422 '/// Change to the Category Fraction. Are there Fraction formats shown ?
424 printlog "Category Fraction selected."
425 sFormatText = FormatString.GetSelText
426 if sFormatText = "-1234 1/8" then
427 printlog "Format is correctly set to Fraction, " & sFormatText
429 warnlog "Format NOT correct: " & sFormatText
432 '/// Change to Boolean Value. Is there one entry showing in the format section saying TRUE ?
434 printlog "Category Boolean Value selected."
435 if FormatString.GetSelText = "TRUE" then
436 printlog "Format is correctly set to Boolean Value."
438 warnlog "Format NOT correct!"
441 '/// Change to Category Text. Is there an @-sign shown in the Format section ?
443 printlog "Category Text selected."
444 if FormatString.GetSelText = "@" then
445 printlog "Format is correctly set to Text."
447 warnlog "Format NOT correct!"
450 '/// Closing Number Formatter Dialog
451 printlog "Closing number formatter dialog..."
452 if TabChartAxisNumbers.exists(1) then
453 TabChartAxisNumbers.Cancel
455 printlog "No dialog left, ok."
458 '/// Closing Data Series Dialog
459 Kontext "TabDataSeriesLabels"
460 printlog "Closing data series dialog..."
461 if TabDataSeriesLabels.exists(1) then
462 TabDataSeriesLabels.Cancel
464 printlog "No dialog left, ok."
466 '/// Closing document
470 '-------------------------------------------------------------------------------
472 testcase tUserDefinedNumberformatter
473 '/// Open an new doc for writer and calc
474 '/// for chart this should be disabled
475 Call hNewDocument 'opening new doc
477 '/// Start with the step 2. under preconditions
478 Call sNumberformatterPreconditions '/Calling Subroutine for getting preconditions
480 '/// Change to Category User-defined
481 Kontext "TabChartAxisNumbers"
482 Language.Select (fLocaleString ("LocaleNumFormLanEng"))
484 printlog "Selecting Category user-defined."
486 if AddButton.IsEnabled then
487 warnlog "Button should be disabled!"
489 printlog "Button disabled before typing, good."
492 '/// Enter the following Format string into the Format code line : [~jewish]yyyy-mm-dd and click on the green confirmation hook.
493 FormatCode.SetText "[~jewish]yyyy-mm-dd"
494 printlog "Entering text in Format Code line..."
496 '/// Did this Icon change from grey to green as you began typing ?
497 if AddButton.IsEnabled then
499 printlog "Add Button clicked."
501 warnlog "AddButton is not enabled."
504 '/// Changed the Category from User-defined to Date ?
505 if Category.GetSelIndex = 6 then
506 printlog "Category changed to Date, correct."
508 warnlog "Category must change to Date."
511 '/// Changed the Format Preview from 05/18/03 to 5663-02-21 ?
512 QAErrorLog "#i84085#-Number formatter: Preview box cannot be accessed by testool"
514 '/// Change back to User-defined and select the Format entered previously.
516 printlog "Changed to User-defined."
517 FormatString.Select(1)
518 'qaerrorlog "#i83551#-Bad focus behaviour in number formatter dialog."
519 '/// Click on the little note button next to the format code line. Can you enter a comment now into a newly visible line under the format code line ?
520 EditCommentButton.Click
521 if Comment.IsEnabled then
522 printlog "Comment Field made writable."
523 Comment.SetText "Test-Text"
525 warnlog "Comment Field not made writable!"
528 '/// Can you close this line by hitting the note button again and is the comment kept ?
529 EditCommentButton.Click
531 '/// Is the third Icon in the Format Code line (the X) colored Red ?
532 if RemoveButton.IsEnabled then
533 printlog "Remove button is active."
535 warnlog "Remove button not active!"
538 '/// Click on the Red X-Icon. Did the Category change to Date and the Format to the default one for the given locale (the third one from top for Englisch (USA)) ?
540 '/// Change back to the User-defined category. Is the previously created Number format still available ?
543 '/// Closing Number Formatter Dialog
544 printlog "Closing number formatter dialog..."
545 if TabChartAxisNumbers.exists(1) then
546 TabChartAxisNumbers.Cancel
548 printlog "No dialog left, ok."
551 '/// Closing Data Series Dialog
552 Kontext "TabDataSeriesLabels"
553 printlog "Closing data series dialog..."
554 if TabDataSeriesLabels.exists(1) then
555 TabDataSeriesLabels.Cancel
557 printlog "No dialog left, ok."
559 '/// Closing Document
563 '-------------------------------------------------------------------------------
565 testcase tButtonsNumberformatter
566 printlog "Testing some buttons now..."
567 '/// Opening new document
568 Call hNewDocument 'opening new doc
569 printlog "Setting some preconditions"
570 Call sNumberformatterPreconditions '/Calling Subroutine for getting preconditions
571 '/// Number format opened
572 Kontext "TabChartAxisNumbers"
573 '/// Change to Category Date
575 printlog "Changing to date..."
577 '/// Click on Cancel. Does the Number formatter dialog get closed ?
578 TabChartAxisNumbers.Cancel 'canceling Dialog
579 if TabChartAxisNumbers.Exists(1) then
580 warnlog "Dialog should have been closed now."
582 printlog "Ok, Dialog closed."
585 '/// Open the Number formatter dialog again. Press the ESC key on the Keyboard. Does the dialog close ?
586 Call sNumberformatterOpenDialog 'opening Dialog
587 printlog "testing closing with ESC."
588 Kontext "TabChartAxisNumbers"
589 if TabChartAxisNumbers.Exists(1) then
590 printlog "Dialog should be open now."
592 warnlog "Warning, Dialog not opened."
594 Kontext "TabChartAxisNumbers"
595 TabChartAxisNumbers.TypeKeys "<ESCAPE>", true 'using Escape to close the Dialog
597 if TabchartAxisNumbers.Exists(1) then
598 warnlog "ESC should have closed the dialog..."
600 printlog "Fine, Dialog closed."
603 '/// Open the Number formatter dialog again. Change to Category Date. Click on Ok.
604 '/// Does the dialog close and shows the cell you have formatted the date 12/30/99 ?
605 Call sNumberformatterOpenDialog 'opening Dialog
606 printlog "Assigning date.."
607 Kontext "TabChartAxisNumbers"
608 Category.Select (6) 'category date
609 TabChartAxisNumbers.OK 'closing dialog
610 if TabChartAxisNumbers.Exists(1) then 'checking if dialog is closed
611 warnlog "OK should have closed the dialog..."
613 printlog "Fine, Dialog closed with ok."
616 select case gApplication 'opening Dialog again
617 case "WRITER" :Kontext "DocumentWriter"
619 case "CALC" :Kontext "DocumentCalc"
620 case "CHART" :printlog "Chart"
621 case else :warnlog "This onyl runs in Writer and Calc!"
625 EditCopy 'getting content into clipboard
626 '/// Copying for comparing the content
628 sCell = GetClipboardtext 'clipboard into variable
629 if sCell = "12/30/99" then
630 printlog "Cell is formattted correctly, " & sCell
632 warnlog "Formatting is wrong: " & sCell
635 select case gApplication 'for selection in Writer, different context menu
636 case "WRITER" :Kontext "DocumentWriter"
637 DocumentWriter.TypeKeys "<ESCAPE>" 'deselecting
638 case "CALC" :Kontext "DocumentCalc"
639 case "CHART" :printlog "Chart"
640 case else :warnlog "This onyl runs in Writer and Calc!"
644 '/// Open the Number formatter dialog again. Change to Category Time. Press the RETURN Key.
645 '/// Does the dialog close and shows the cell you have formatted the time 12:00:00 AM ?
646 Call sNumberformatterOpenDialog 'opening Dialog
647 Kontext "TabChartAxisNumbers"
648 Category.Select (7) 'selecting Time
649 TabChartAxisNumbers.TypeKeys "<RETURN>", true
650 if TabChartAxisNumbers.Exists(1) then
651 warnlog "Return should have closed the dialog..."
653 printlog "Fine, Dialog closed with ok."
656 '/// Select case gApplication for selection in Writer, selecting to get content into clipboard
657 select case gApplication 'opening Dialog again
658 case "WRITER" :Kontext "DocumentWriter"
660 case "CALC" :Kontext "DocumentCalc"
661 case "CHART" :printlog "Chart"
662 case else :warnlog "This onyl runs in Writer and Calc!"
667 '/// Getting content into clipboard to compare
669 sCell = GetClipboardtext 'clipboard into variable
670 if sCell = "12:00:00 AM" then
671 printlog "Cell is formattted correctly: " & sCell
673 warnlog "Formatting is wrong: " & sCell
676 '/// Open the Number formatter dialog again. Change to Category Percent.
677 '/// The Format area shows Percent formats. Click on the Reset Button. Does the Category changes back to Time ?
679 'Resetting status for getting correct context menu
680 select case gApplication 'for selection in Writer, different context menu
681 case "WRITER" :Kontext "DocumentWriter"
682 DocumentWriter.TypeKeys "<ESCAPE>" 'deselecting
683 case "CALC" :Kontext "DocumentCalc"
684 case "CHART" :printlog "Chart"
685 case else :warnlog "This onyl runs in Writer and Calc!"
689 Call sNumberformatterOpenDialog 'opening Dialog
690 Kontext "TabChartAxisNumbers"
691 Category.Select (4) 'selecting percent
692 printlog "Selecting percent."
693 FormatString.Select (1)
694 sFormatText = FormatString.GetSelText
695 if sFormatText = "-13%" then 'checking if Percent is set in format box
696 printlog "Fine, switched to percent, " & sFormatText
698 warnlog "Format Box shows wrong value, " & sFormatText
700 if gApplication ="CALC" then 'checking Application for using Reset button
702 if Category.GetSelIndex = 7.then
703 printlog "Reset to Time."
705 warnlog "Reset did not succeed!"
708 Category.Select (7) 'setting the Category for other Application
711 TabChartAxisNumbers.OK 'closing dialog
712 printlog "Dialog closed."
714 '/// Open the Number formatter dialog again. Change to Category Percent.
715 '/// The Format area shows Percent formats. Press the Keys ALT+R . Does the Category changes back to Time ?
716 Call sNumberformatterOpenDialog 'opening Dialog
717 Kontext "TabChartAxisNumbers"
718 Category.Select (4) 'selecting percent
719 FormatString.Select (1)
720 sFormatText = FormatString.GetSelText
721 if sFormatText = "-13%" then 'checking entry of Format box
722 printlog "Fine, switched to percent, " & sFormatText
724 warnlog "Format Box shows wrong value: " & sFormatText
727 if gApplication = "CALC" then
728 TabChartAxisNumbers.TypeKeys "<MOD2 R>", true 'using ALT+R to reset back from percent to time
729 if Category.GetSelIndex = 7 then
730 printlog "ALT-R changed back to Time."
732 warnlog "ALT-R did not change Category back to time."
735 Category.Select (7) 'setting back to Time manually, no Reset button
737 if TabChartAxisNumbers.Exists(1) then
738 TabChartAxisNumbers.Cancel
740 printlog "No dialog left, ok."
743 '///Closing Number Formatter Dialog
744 printlog "Closing number formatter dialog..."
745 if TabChartAxisNumbers.exists(1) then
746 TabChartAxisNumbers.Cancel
748 printlog "No dialog left, ok."
751 '///Closing Data Series Dialog
752 Kontext "TabDataSeriesLabels"
753 printlog "Closing data series dialog..."
754 if TabDataSeriesLabels.exists(1) then
755 TabDataSeriesLabels.Cancel
757 printlog "No dialog left, ok."
762 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
764 sub sNumberformatterGetLanguage
766 '/// When adapting the test for a new language you will need this script to get the names out of the language dropdown box
767 '/// This routine is to be run isloated from the rest, the found languages from the dropdownbox willbe written into
768 '/// The result file. Simply copy'n'paste the needed words into global/tools/inc/t_locale_strings1.inc
769 '/// The test needs to be run once after the office has bben set to the needed language
770 '/// This sub routine is only for getting a list of the used languages out of the Numberformatter/Language.
771 '/// The list depends upon the used locale and is written into the result file
772 '/// This is not part of the normal test run. This is for getting new languages into t_locale_strings1.inc
774 Call hNewDocument 'new doc
775 Kontext "DocumentWriter"
776 '///Insert a table///
777 DocumentWriter.TypeKeys "<MOD1 F12>", true
778 Kontext "TabelleEinfuegenWriter"
779 TabelleEinfuegenWriter.OK 'insert table
780 printlog "Table inserted"
781 Kontext "DocumentWriter"
782 DocumentWriter.TypeKeys "0", true 'insert value
783 Kontext "DocumentWriter"
784 '///Open Context Menu///
785 DocumentWriter.TypeKeys "<SHIFT F10>", true 'Context menu
786 '///Open Number Format///
787 DocumentWriter.TypeKeys "<DOWN>",11, true
788 DocumentWriter.TypeKeys "<RETURN>", true
789 printlog "Opening number formatter dialog."
790 Kontext "TabChartAxisNumbers"
792 iLanguageCount = Language.GetItemCount 'getting number of entries
793 for iCount = 1 to iLanguageCount
794 Language.Select (iCount)
795 sLanguageText = Language.GetSelText
796 printlog sLanguageText 'printing entries
799 TabChartAxisNumbers.Close 'closing dialog
803 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\