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_group.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
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 '\********************************************************************
42 testcase tiGruppierung
43 Dim PosX 'Variable fuer PositionX
45 Call hNewDocument '/// new document ///'
47 Kontext "DocumentImpress"
49 hRechteckErstellen (20,20,40,40) '/// create rectangle ///'
51 hRechteckErstellen (60,60,70,10) '/// create 2nd rectangle ///'
53 hRechteckErstellen (50,90,70,40) '/// create 3rd rectangle ///'
55 Printlog "- Created 3 rectangles for group testing"
56 gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///'
57 EditSelectAll '/// select all rectangles ///'
58 if (gApplication = "DRAW") then
61 hMenuSelectNr(12) ' Select "Group"
64 FormatGroupDraw '/// open context menue and group rectangles ///'
67 Printlog "- Get position and dimensions of elements"
68 ContextPositionAndSize '/// get dimensions of group ///'
71 Active.SetPage TabPositionAndSize
72 Kontext "TabPositionAndSize"
74 PosX=PositionX.GetText
77 Kontext "DocumentImpress"
80 hTypeKeys "<F3>" '/// entering group using key "F3" ///'
83 EditCut '/// cut rectangle out of document ///'
85 Warnlog "- Entering the group, no object within the group should have been selected"
87 Printlog "- entered group, nothing selected"
90 gMouseMove (30,30,60,60)
92 Printlog "- Exit group"
93 ' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///'
96 hTypeKeys "<mod1 F3>" '/// exit group using key "strg F3" ///'
97 ' would be better to call the slot TBO!
98 ContextPositionAndSize
101 Active.SetPage TabPositionAndSize
102 Kontext "TabPositionAndSize"
104 if PosX = PositionX.GetText then
105 Warnlog "- No change in position for X axis, even we changed position of 1 object within the group"
106 TabPositionAndSize.OK
108 Printlog "- Moving within the group works"
109 TabPositionAndSize.OK
111 Call hCloseDocument '/// close document ///'