1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 package ifc.text; 25 26 import lib.MultiPropertyTest; 27 28 /** 29 * Testing <code>com.sun.star.text.BaseFrame</code> 30 * service properties : 31 * <ul> 32 * <li><code> AnchorPageNo</code></li> 33 * <li><code> AnchorFrame</code></li> 34 * <li><code> BackColor</code></li> 35 * <li><code> BackGraphicURL</code></li> 36 * <li><code> BackGraphicFilter</code></li> 37 * <li><code> BackGraphicLocation</code></li> 38 * <li><code> LeftBorder</code></li> 39 * <li><code> RightBorder</code></li> 40 * <li><code> TopBorder</code></li> 41 * <li><code> BottomBorder</code></li> 42 * <li><code> BorderDistance</code></li> 43 * <li><code> LeftBorderDistance</code></li> 44 * <li><code> RightBorderDistance</code></li> 45 * <li><code> TopBorderDistance</code></li> 46 * <li><code> BottomBorderDistance</code></li> 47 * <li><code> BackTransparent</code></li> 48 * <li><code> ContentProtected</code></li> 49 * <li><code> FrameStyleName</code></li> 50 * <li><code> LeftMargin</code></li> 51 * <li><code> RightMargin</code></li> 52 * <li><code> TopMargin</code></li> 53 * <li><code> BottomMargin</code></li> 54 * <li><code> Height</code></li> 55 * <li><code> Width</code></li> 56 * <li><code> RelativeHeight</code></li> 57 * <li><code> RelativeWidth</code></li> 58 * <li><code> IsSyncWidthToHeight</code></li> 59 * <li><code> IsSyncHeightToWidth</code></li> 60 * <li><code> HoriOrient</code></li> 61 * <li><code> HoriOrientPosition</code></li> 62 * <li><code> HoriOrientRelation</code></li> 63 * <li><code> VertOrient</code></li> 64 * <li><code> VertOrientPosition</code></li> 65 * <li><code> VertOrientRelation</code></li> 66 * <li><code> HyperLinkURL</code></li> 67 * <li><code> HyperLinkTarget</code></li> 68 * <li><code> HyperLinkName</code></li> 69 * <li><code> Opaque</code></li> 70 * <li><code> PageToggle</code></li> 71 * <li><code> PositionProtected</code></li> 72 * <li><code> Print</code></li> 73 * <li><code> ShadowFormat</code></li> 74 * <li><code> ServerMap</code></li> 75 * <li><code> Size</code></li> 76 * <li><code> SizeProtected</code></li> 77 * <li><code> Surround</code></li> 78 * <li><code> SurroundAnchorOnly</code></li> 79 * <li><code> BackColorTransparency</code></li> 80 * <li><code> BackColorRGB</code></li> 81 * <li><code> BackGraphicTransparency</code></li> 82 * </ul> <p> 83 * Properties testing is automated by <code>lib.MultiPropertyTest</code>. 84 * @see com.sun.star.text.BaseFrame 85 */ 86 public class _BaseFrame extends MultiPropertyTest { 87 public String str1 = "Graphics"; 88 public String str2 = "Watermark"; 89 90 /** 91 * Redefined method returns value, that differs from property value. 92 */ 93 protected PropertyTester StringTester = new PropertyTester() { 94 protected Object getNewValue(String propName, Object oldValue) { 95 if (str1.equals(oldValue)) 96 return str2; 97 else 98 return str1; 99 } 100 }; 101 102 /** 103 * This property can be VOID, and in case if it is so new 104 * value must be defined. 105 */ _FrameStyleName()106 public void _FrameStyleName() { 107 log.println("Testing with custom Property tester") ; 108 testProperty("FrameStyleName", StringTester) ; 109 } 110 111 /** 112 * This property can be VOID, and in case if it is so new 113 * value must be defined. 114 */ _BackColorTransparency()115 public void _BackColorTransparency() { 116 testProperty("BackColorTransparency", new Integer(10), new Integer(50)) ; 117 } 118 119 } //finish class _BaseFrame 120 121