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