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: _RotationDescriptor.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
;
37 * Testing <code>com.sun.star.drawing.RotationDescriptor</code>
38 * service properties :
40 * <li><code> RotateAngle</code></li>
41 * <li><code> ShearAngle</code></li>
43 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
44 * @see com.sun.star.drawing.RotationDescriptor
46 public class _RotationDescriptor
extends MultiPropertyTest
{
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) ;
61 public void _RotationPointX() {
62 log
.println("Testing with custom Property tester") ;
63 testProperty("RotationPointX", drawMeasureTester
) ;
69 public void _RotationPointY() {
70 log
.println("Testing with custom Property tester") ;
71 testProperty("RotationPointY", drawMeasureTester
) ;
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));
88 oObj
.setPropertyValue("RotateAngle",new Short((short) 0));
89 } catch (Exception e
) {
91 log
.println("Testing with custom Property tester") ;
92 testProperty("ShearAngle", drawMeasureTester
) ;
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