merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / drawing / _RotationDescriptor.java
blob696da81efacbc173d118013383a6788259f944a7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _RotationDescriptor.java,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
31 package ifc.drawing;
33 import lib.MultiPropertyTest;
34 import lib.Status;
36 /**
37 * Testing <code>com.sun.star.drawing.RotationDescriptor</code>
38 * service properties :
39 * <ul>
40 * <li><code> RotateAngle</code></li>
41 * <li><code> ShearAngle</code></li>
42 * </ul> <p>
43 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
44 * @see com.sun.star.drawing.RotationDescriptor
46 public class _RotationDescriptor extends MultiPropertyTest {
48 /**
49 * Custom tester which increases value by 200
51 protected PropertyTester drawMeasureTester = new PropertyTester() {
52 protected Object getNewValue(String propName, Object oldValue) {
53 int val = ((Integer)oldValue).intValue() ;
54 return new Integer(val + 200) ;
56 } ;
58 /**
59 * !!! DEPRECATED !!!
61 public void _RotationPointX() {
62 log.println("Testing with custom Property tester") ;
63 testProperty("RotationPointX", drawMeasureTester) ;
66 /**
67 * !!! DEPRECATED !!!
69 public void _RotationPointY() {
70 log.println("Testing with custom Property tester") ;
71 testProperty("RotationPointY", drawMeasureTester) ;
74 /**
75 * Tests the property with custom tester
77 public void _ShearAngle() {
79 Object noShear = tEnv.getObjRelation("NoShear");
81 if (noShear != null) {
82 log.println("This shape type doesn't support shear, see #85556#");
83 tRes.tested("ShearAngle",Status.skipped(true));
84 return;
87 try {
88 oObj.setPropertyValue("RotateAngle",new Short((short) 0));
89 } catch (Exception e) {
91 log.println("Testing with custom Property tester") ;
92 testProperty("ShearAngle", drawMeasureTester) ;
95 /**
96 * Tests the property with custom tester
98 public void _RotateAngle() {
99 log.println("Testing with custom Property tester") ;
100 testProperty("RotateAngle", drawMeasureTester) ;
103 } // finish class _RotationDescriptor