Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / mod / _forms / OImageControlModel.java
blob3e965f33e91623b214571435c1a8e4cab3295b33
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 package mod._forms;
20 import com.sun.star.beans.NamedValue;
21 import java.io.PrintWriter;
23 import lib.TestEnvironment;
24 import lib.TestParameters;
25 import util.DBTools;
28 /**
29 * Test for object which is represented by service
30 * <code>com.sun.star.form.component.DatabaseImageControl</code>. <p>
31 * Object implements the following interfaces :
32 * <ul>
33 * <li> <code>com::sun::star::form::XImageProducerSupplier</code></li>
34 * <li> <code>com::sun::star::io::XPersistObject</code></li>
35 * <li> <code>com::sun::star::form::XReset</code></li>
36 * <li> <code>com::sun::star::form::XBoundComponent</code></li>
37 * <li> <code>com::sun::star::form::FormComponent</code></li>
38 * <li> <code>com::sun::star::beans::XFastPropertySet</code></li>
39 * <li> <code>com::sun::star::awt::UnoControlImageControlModel</code></li>
40 * <li> <code>com::sun::star::beans::XMultiPropertySet</code></li>
41 * <li> <code>com::sun::star::form::XUpdateBroadcaster</code>
42 * <b>(currently nonavailable)</b></li>
43 * <li> <code>com::sun::star::form::DataAwareControlModel</code></li>
44 * <li> <code>com::sun::star::beans::XPropertyState</code></li>
45 * <li> <code>com::sun::star::form::FormControlModel</code></li>
46 * <li> <code>com::sun::star::form::component::DatabaseImageControl</code></li>
47 * <li> <code>com::sun::star::container::XNamed</code></li>
48 * <li> <code>com::sun::star::lang::XComponent</code></li>
49 * <li> <code>com::sun::star::lang::XEventListener</code></li>
50 * <li> <code>com::sun::star::beans::XPropertyAccess</code></li>
51 * <li> <code>com::sun::star::beans::XPropertyContainer</code></li>
52 * <li> <code>com::sun::star::beans::XPropertySet</code></li>
53 * <li> <code>com::sun::star::form::XLoadListener</code></li>
54 * <li> <code>com::sun::star::container::XChild</code></li>
55 * </ul> <p>
56 * This object test <b> is NOT </b> designed to be run in several
57 * threads concurently.
59 * @see com.sun.star.form.XImageProducerSupplier
60 * @see com.sun.star.io.XPersistObject
61 * @see com.sun.star.form.XReset
62 * @see com.sun.star.form.XBoundComponent
63 * @see com.sun.star.form.FormComponent
64 * @see com.sun.star.beans.XFastPropertySet
65 * @see com.sun.star.awt.UnoControlImageControlModel
66 * @see com.sun.star.beans.XMultiPropertySet
67 * @see com.sun.star.form.XUpdateBroadcaster
68 * @see com.sun.star.form.DataAwareControlModel
69 * @see com.sun.star.beans.XPropertyState
70 * @see com.sun.star.form
71 * @see com.sun.star.form.component.DatabaseImageControl
72 * @see com.sun.star.container.XNamed
73 * @see com.sun.star.lang.XComponent
74 * @see com.sun.star.lang.XEventListener
75 * @see com.sun.star.beans.XPropertyAccess
76 * @see com.sun.star.beans.XPropertyContainer
77 * @see com.sun.star.beans.XPropertySet
78 * @see com.sun.star.form.XLoadListener
79 * @see com.sun.star.container.XChild
80 * @see ifc.form._XImageProducerSupplier
81 * @see ifc.io._XPersistObject
82 * @see ifc.form._XReset
83 * @see ifc.form._XBoundComponent
84 * @see ifc.form._FormComponent
85 * @see ifc.beans._XFastPropertySet
86 * @see ifc.awt._UnoControlImageControlModel
87 * @see ifc.beans._XMultiPropertySet
88 * @see ifc.form._XUpdateBroadcaster
89 * @see ifc.form._DataAwareControlModel
90 * @see ifc.beans._XPropertyState
91 * @see ifc.form._FormControlModel
92 * @see ifc.form.component._DatabaseImageControl
93 * @see ifc.container._XNamed
94 * @see ifc.lang._XComponent
95 * @see ifc.lang._XEventListener
96 * @see ifc.beans._XPropertySet
97 * @see ifc.form._XLoadListener
98 * @see ifc.container._XChild
100 public class OImageControlModel extends GenericModelTest {
102 * Set some member variable of the super class <CODE>GenericModelTest</CODE>:
103 * <pre>
104 * super.m_kindOfControl="DatabaseImageControl";
105 * super.m_ObjectName = "stardiv.one.form.component.DatabaseImageControl";
106 * NamedValue DataField = new NamedValue();
107 * DataField.Name = "DataField";
108 * DataField.Value = DBTools.TST_BINARY_STREAM_F;
109 * super.m_propertiesToSet.add(DataField);
111 * super.m_LCShape_Type = "FixedText";
112 * </pre>
113 * Then <CODE>super.initialize()</CODE> was called.
114 * @param tParam the test parameter
115 * @param log the log writer
117 @Override
118 protected void initialize(TestParameters tParam, PrintWriter log) {
120 super.initialize(tParam, log);
122 super.m_kindOfControl= "DatabaseImageControl";
124 super.m_ObjectName = "stardiv.one.form.component.ImageControl";
126 NamedValue DataField = new NamedValue();
127 DataField.Name = "DataField";
128 DataField.Value = DBTools.TST_BINARY_STREAM_F;
129 super.m_propertiesToSet.add(DataField);
131 super.m_LCShape_Type = "FixedText";
136 * calls <CODE>createTestEnvironment()</CODE> from it's super class
137 * @param Param the test parameter
138 * @param log the log writer
139 * @return lib.TestEnvironment
141 @Override
142 protected synchronized TestEnvironment createTestEnvironment(TestParameters Param,
143 PrintWriter log) {
144 return super.createTestEnvironment(Param, log);
146 } // finish class OImageControlModel