merge the formfield patch from ooo-build
[ooovba.git] / testautomation / global / tools / declare.bas
blobcea62bc481f692e64bd67987f699003e743b6222
1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 '*
4 '* Copyright 2008 by Sun Microsystems, Inc.
5 '*
6 '* OpenOffice.org - a multi-platform office productivity suite
7 '*
8 '* $RCSfile: declare.bas,v $
9 '*
10 '* $Revision: 1.1 $
12 '* last change: $Author: jsi $ $Date: 2008-06-13 10:27:06 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : thorsten.bosbach@sun.com
35 '* short description : To get Help ID's from the office
37 '\*************************************************************************************
38 sub main
39 Ich_Moechte_Help_IDs_haben
40 ' Ich_Moechte_Die_Position_Und_Groesse_Eines_Dialoges_Haben ( ChaosDokument )
42 ' ! set the proper Kontext for teh Application in the subroutine !
43 ' Ich_Moechte_Die_Mausposition_Herausbekommen
44 end sub
47 sub Ich_Moechte_Help_IDs_haben
48 '/// Get Id's ///'
49 DisplayHid true
50 end sub
52 sub Ich_Moechte_Die_Position_Und_Groesse_Eines_Dialoges_Haben ( window )
53 '/// Get Size an Position from dialogs ///'
54 Dim i
55 Dim Px : Dim Py : Dim Sx : Dim Sy
57 for i = 1 to 20
58 Px = window.GetPosX
59 Py = window.GetPosY
60 Sx = window.GetSizeX
61 Sy = window.GetSizeY
62 print "x: " + Px + " y: " + Py + " x-: " + Sx + " y-: " + Sy
63 next i
64 end sub
66 sub Ich_Moechte_Die_Mausposition_Herausbekommen
67 '/// Get Mouse Position ///'
68 ' Writer
69 ' Kontext "DocumentWriter"
70 ' DocumentWriter.DisplayPercent
72 ' Calc
73 ' Kontext "DocumentCalc"
74 ' DocumentCalc.DisplayPercent
76 ' Draw
77 ' Kontext "DocumentDraw"
78 ' DocumentDraw.DisplayPercent
80 ' Chart
81 ' Kontext "DocumentChart"
82 ' DocumentChart.DisplayPercent
83 end sub
85 sub LoadIncludeFiles
86 use "global\system\includes\declare.inc"
87 use "global\system\includes\gvariabl.inc"
88 Call GetUseFiles()
89 end sub