1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 package ifc.text;
29 
30 import lib.MultiPropertyTest;
31 
32 /**
33 * Testing <code>com.sun.star.text.BaseFrame</code>
34 * service properties :
35 * <ul>
36 *  <li><code> AnchorPageNo</code></li>
37 *  <li><code> AnchorFrame</code></li>
38 *  <li><code> BackColor</code></li>
39 *  <li><code> BackGraphicURL</code></li>
40 *  <li><code> BackGraphicFilter</code></li>
41 *  <li><code> BackGraphicLocation</code></li>
42 *  <li><code> LeftBorder</code></li>
43 *  <li><code> RightBorder</code></li>
44 *  <li><code> TopBorder</code></li>
45 *  <li><code> BottomBorder</code></li>
46 *  <li><code> BorderDistance</code></li>
47 *  <li><code> LeftBorderDistance</code></li>
48 *  <li><code> RightBorderDistance</code></li>
49 *  <li><code> TopBorderDistance</code></li>
50 *  <li><code> BottomBorderDistance</code></li>
51 *  <li><code> BackTransparent</code></li>
52 *  <li><code> ContentProtected</code></li>
53 *  <li><code> FrameStyleName</code></li>
54 *  <li><code> LeftMargin</code></li>
55 *  <li><code> RightMargin</code></li>
56 *  <li><code> TopMargin</code></li>
57 *  <li><code> BottomMargin</code></li>
58 *  <li><code> Height</code></li>
59 *  <li><code> Width</code></li>
60 *  <li><code> RelativeHeight</code></li>
61 *  <li><code> RelativeWidth</code></li>
62 *  <li><code> IsSyncWidthToHeight</code></li>
63 *  <li><code> IsSyncHeightToWidth</code></li>
64 *  <li><code> HoriOrient</code></li>
65 *  <li><code> HoriOrientPosition</code></li>
66 *  <li><code> HoriOrientRelation</code></li>
67 *  <li><code> VertOrient</code></li>
68 *  <li><code> VertOrientPosition</code></li>
69 *  <li><code> VertOrientRelation</code></li>
70 *  <li><code> HyperLinkURL</code></li>
71 *  <li><code> HyperLinkTarget</code></li>
72 *  <li><code> HyperLinkName</code></li>
73 *  <li><code> Opaque</code></li>
74 *  <li><code> PageToggle</code></li>
75 *  <li><code> PositionProtected</code></li>
76 *  <li><code> Print</code></li>
77 *  <li><code> ShadowFormat</code></li>
78 *  <li><code> ServerMap</code></li>
79 *  <li><code> Size</code></li>
80 *  <li><code> SizeProtected</code></li>
81 *  <li><code> Surround</code></li>
82 *  <li><code> SurroundAnchorOnly</code></li>
83 *  <li><code> BackColorTransparency</code></li>
84 *  <li><code> BackColorRGB</code></li>
85 *  <li><code> BackGraphicTransparency</code></li>
86 * </ul> <p>
87 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
88 * @see com.sun.star.text.BaseFrame
89 */
90 public class _BaseFrame extends MultiPropertyTest {
91     public String str1 = "Graphics";
92     public String str2 = "Watermark";
93 
94     /**
95     * Redefined method returns value, that differs from property value.
96     */
97     protected PropertyTester StringTester = new PropertyTester() {
98         protected Object getNewValue(String propName, Object oldValue) {
99             if (str1.equals(oldValue))
100                 return str2;
101             else
102                 return str1;
103         }
104     };
105 
106     /**
107     * This property can be VOID, and in case if it is so new
108     * value must be defined.
109     */
110     public void _FrameStyleName() {
111         log.println("Testing with custom Property tester") ;
112         testProperty("FrameStyleName", StringTester) ;
113     }
114 
115     /**
116      * This property can be VOID, and in case if it is so new
117      * value must be defined.
118      */
119     public void _BackColorTransparency() {
120         testProperty("BackColorTransparency", new Integer(10), new Integer(50)) ;
121     }
122 
123 } //finish class _BaseFrame
124 
125