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.drawing; 25 26 import lib.MultiPropertyTest; 27 28 import com.sun.star.container.XIndexReplace; 29 30 public class _Text extends MultiPropertyTest { 31 compare(Object ob1, Object ob2)32 protected boolean compare(Object ob1, Object ob2) { 33 34 return super.compare(ob1, ob2); 35 36 } 37 _NumberingRules()38 public void _NumberingRules() { 39 //This property is readOnly 40 boolean bResult = false; 41 42 try { 43 Object theRules2 = oObj.getPropertyValue( "NumberingRules" ); 44 if (!(theRules2 instanceof com.sun.star.container.XIndexReplace)) { 45 log.println("Property 'NumberingRules' is an instance of "+ 46 theRules2.getClass().getName()); 47 log.println("Expected was an instance of "+ 48 "com.sun.star.container.XIndexReplace"); 49 } 50 log.println("Trying to cast property 'NumberingRules' "+ 51 "to XIndexReplace"); 52 XIndexReplace theRules = (XIndexReplace) 53 oObj.getPropertyValue( "NumberingRules" ); 54 bResult = true; 55 } catch( Exception e ) { 56 log.println("Error occured while trying to get property"+ 57 " 'NumberingRules'"); 58 e.printStackTrace( log ); 59 bResult = false; 60 } 61 62 tRes.tested( "NumberingRules", bResult); 63 } 64 65 } // finish class _Text 66 67 68 69