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_zoom.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:41 $
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 '*********************************************************************
40 '\********************************************************************
43 dim Zaehler as integer
44 dim Position1 as integer
45 dim Position2 as integer
47 Printlog "- view Zoom"
49 if (gApplication = "IMPRESS") then
50 ExtensionString = "odp"
52 ExtensionString = "odg"
55 Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString)
57 Printlog "- View-Zoom testing"
58 if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
59 Call hNewDocument '/// new document ///'
62 Vergroesserung100.Check '/// set zoom to 50% ///'
64 '/// create a number of rectangles with different color properties ///'
65 Kontext "SD_Farbleiste"
67 if SD_Farbleiste.Exists then
68 Printlog "- Color toolbar will be disabled now"
71 '/// All rectangles are created with same dimensions but using different zoom settings ///'
73 Position1 = 5 * Zaehler - 3
74 Position2 = 105 - 5 * Zaehler
75 Call hRechteckErstellen (Position1, Position1, Position2, Position2)
78 Active.SetPage TabFarben
80 Farbe.Select 5*Zaehler
86 hFileSaveAs (Datei$) '/// save document ///'
88 for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///'
91 VergroesserungStufenlos.check
92 Stufenlos.Settext "45"
99 Case 1: VergroesserungStufenlos.check
100 Stufenlos.Settext "40"
101 Case 2: VergroesserungStufenlos.check
102 Stufenlos.Settext "50"
103 Case 3: VergroesserungStufenlos.check
104 Stufenlos.Settext "75"
105 Case 4: VergroesserungStufenlos.check
106 Stufenlos.Settext "100"
107 Case 5: VergroesserungStufenlos.check
108 Stufenlos.Settext "150"
109 Case 6: VergroesserungStufenlos.check
110 Stufenlos.Settext "200"
112 'Case 2: Vergroesserung50.check
113 'Case 3: Vergroesserung75.check
114 'Case 4: Vergroesserung100.check
115 'Case 5: Vergroesserung150.check
116 'Case 6: Vergroesserung200.check
120 Kontext "DocumentImpress"
121 gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen;
122 'die Farbe des Rechtecks sagt uns dann, ob
123 FormatArea 'richtig vergroessert oder verkleinert wurde.
126 Active.SetPage TabFarben
128 printlog "Color index ", Farbe.GetSelIndex
138 Call hCloseDocument '/// close document ///'