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_imagemap.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 ' #1 tEditImageMapProperties
41 '\*************************************************************************************
43 testcase tEditImageMap
44 Call hNewDocument '/// new document ///'
45 EditImageMap '/// edit image map ///'
46 Kontext "ImageMapEditor"
48 if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
49 printlog "ImageMap editor exists"
50 DialogTest ( ImageMapEditor )
53 Printlog "ImageMap closed"
56 Printlog "ImageMap closed using the edit-menu entry"
60 DialogTest ( ImageMapEditor )
63 Printlog "ImageMap closed"
66 Printlog "ImageMap closed using the edit-menu entry"
69 Call hCloseDocument '/// close document ///'
71 endcase 'tEditImageMap
72 '------------------------------------------------------------------------------------------------------------------------------------
73 testcase tEditImageMapProperties
75 qaerrorlog "test not yet ready."
77 Call hNewDocument '/// new document ///'
78 InsertGraphicsFromFile '/// Insert a graphic and select it ///'
80 Kontext "GrafikEinfuegenDlg"
82 Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx")
86 EditImageMap '/// Open the image map dialog ///'
87 Kontext "ImageMapEditor"
89 if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
90 printlog "ImageMap editor exists"
92 warnlog "Something is wrong, the Imagemap didn't show up."
95 Ellipse.Click '/// Insert an 'image map' object ///'
96 Dokument.MouseDown 50,50
97 Dokument.MouseMove 50,50,10,10
98 Dokument.MouseUp 10,10
100 Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
101 kontext "ImageMapHyperlink"
103 if ImageMapHyperlink.Exists (2) then
104 printlog "ImageMapHyperlink (properties) editor exists"
106 warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
109 URL.SetText "http://www.cnn.com" '/// Write some text in each field ///'
110 Frame.SetText "http://www.framed.com"
111 Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
112 Alternativetext.SetText "Alternative, the only way to fly..."
113 Description.SetText "Just a Foney-text... or whatever it's called."
114 ImageMapHyperlink.Ok '/// Close the Properties-Dialogue with "Ok" ///'
115 kontext "ImageMapEditor"
120 if gApplication = "DRAW" then
121 kontext "DocumentDraw"
123 kontext "DocumentImpress"
126 EditImageMap '/// Check if what we wrote in the Properites-Dialogue still is visible."
127 Kontext "ImageMapEditor"
129 if ImageMapEditor.Exists (2) then
130 printlog "ImageMap editor exists"
132 warnlog "Something is wrong, the ImageMap Editor didn't show up."
135 Dokument.TypeKeys "<TAB>"
138 Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
139 kontext "ImageMapHyperlink"
141 if ImageMapHyperlink.Exists (2) then
142 printlog "ImageMapHyperlink (properties) editor exists"
144 warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
147 '/// Check if the entries we set before has remained the same, with one exception: cnn.com should now have a slash after it. ///'
148 if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText
149 ' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText
150 if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText
151 if Alternativetext.GetText <> "Alternative, the only way to fly..." then warnlog "Alternativetext should have been: . But was " + Alternativetext.GetText
152 if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText
153 ImageMapHyperlink.Ok '/// Close the Properties-Dialogue ///'
156 kontext "ImageMapEditor"
162 Call hCloseDocument '/// close document ///'
164 endcase 'tEditImageMapProperties
165 '------------------------------------------------------------------------------------------------------------------------------------