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: id_opt_2.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:43:01 $
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 :
38 '************************************************************************************
39 ' #1 tToolsOptionsMeasurementUnit
40 '\***********************************************************************************
42 testcase tToolsOptionsMeasurementUnit (sApplication as string)
45 dim iCount2 as integer
46 dim sUnitOptions as string
47 dim sUnitDialog as string
52 hToolsOptions (sApplication,"General")
53 iCount2 = Masseinheit.GetSelIndex
54 printlog "current measurement unit is: " & iCount2
55 iCount = Masseinheit.GetItemCount
57 Kontext "ExtrasOptionenDlg"
59 printlog "----------------------"
61 printlog "Take Measurement Units from Graphics "
62 printlog "(1) reference from options; (2) BMP export dialog; (3) Format->3D Effects->Geometry"
63 ' In graphics are some more; beside the general one from writer we see large ones: m, km, Miles, foot
66 hToolsOptions (sApplication,"General")
69 sUnitOptions = GetMeasUnit(Tabulatorabstand.getText) ' (1)
70 printlog "(" + i + "/" + iCount + "): '" + Masseinheit.getSelText + "' - " + sUnitOptions + " (1)"
72 Kontext "ExtrasOptionenDlg"
76 Kontext "ExportierenDlg"
77 Dateiname.SetText "adagio"
78 Dateityp.Select "BMP - Windows Bitmap (.bmp)"
79 if AutomatischeDateinamenserweiterung.Exists then
80 AutomatischeDateinamenserweiterung.Check
82 warnlog( "Automatic Filename Extension checkbox is mising" )
85 kontext "AlienWarning"
86 if AlienWarning.exists(5) then
87 warnlog "#i41983# Alien Warning on export not allowed"
91 if Messagebox.Exists(2) then
97 sUnitDialog = getMeasUnit(Breite.getText) ' (2)
98 if (getMeasUnit(Hoehe.getText) <> sUnitDialog) then
99 warnlog " Measurement Unit is different for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'"
101 printlog "Measurement Unit is same for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'"
103 if (sUnitOptions <> sUnitDialog) then
104 printlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and BMP Dialog:'" + sUnitDialog + "' (1) <> (2)"
109 Kontext "Drei_D_Effekte"
112 if (getMeasUnit(Tiefe.getText) <> sUnitOptions) then
113 printlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and Depth:'" + getMeasUnit(Tiefe.getText) + "' (1) <> (3)"
115 printlog "Measurement Unit is same for Options:'" + sUnitOptions + "' and Depth:'" + getMeasUnit(Tiefe.getText) + "' (3)"
121 Messagebox.SetPage TabEinzuegeUndAbstaende
122 kontext "TabEinzuegeUndAbstaende"
124 if (getMeasUnit(Vonlinks.getText) <> sUnitOptions) then
125 warnlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and Vonlinks:'" + getMeasUnit(Vonlinks.getText) + "' Paragraph"
127 printlog "Measurement Unit is same for Options:'" + sUnitOptions + "' and Vonlinks:'" + getMeasUnit(Vonlinks.getText) + "' Paragraph"
129 TabEinzuegeUndAbstaende.cancel
133 printlog "Setting back measurement to " & iCount2
135 hToolsOptions (sApplication,"General")
136 Masseinheit.Select(iCount2)
137 Kontext "ExtrasOptionenDlg"
141 endcase 'tToolsOptionsMeasurementUnit