1ef39d40dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3ef39d40dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4ef39d40dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5ef39d40dSAndrew Rist  * distributed with this work for additional information
6ef39d40dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7ef39d40dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8ef39d40dSAndrew Rist  * "License"); you may not use this file except in compliance
9ef39d40dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10ef39d40dSAndrew Rist  *
11ef39d40dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12ef39d40dSAndrew Rist  *
13ef39d40dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14ef39d40dSAndrew Rist  * software distributed under the License is distributed on an
15ef39d40dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ef39d40dSAndrew Rist  * KIND, either express or implied.  See the License for the
17ef39d40dSAndrew Rist  * specific language governing permissions and limitations
18ef39d40dSAndrew Rist  * under the License.
19ef39d40dSAndrew Rist  *
20ef39d40dSAndrew Rist  *************************************************************/
21ef39d40dSAndrew Rist 
22ef39d40dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir package ifc.drawing;
25cdf0e10cSrcweir 
26cdf0e10cSrcweir import lib.MultiPropertyTest;
27cdf0e10cSrcweir 
28cdf0e10cSrcweir import com.sun.star.container.XIndexReplace;
29cdf0e10cSrcweir 
30cdf0e10cSrcweir public class _Text extends MultiPropertyTest {
31cdf0e10cSrcweir 
compare(Object ob1, Object ob2)32cdf0e10cSrcweir     protected boolean compare(Object ob1, Object ob2) {
33cdf0e10cSrcweir 
34cdf0e10cSrcweir         return super.compare(ob1, ob2);
35cdf0e10cSrcweir 
36cdf0e10cSrcweir     }
37cdf0e10cSrcweir 
_NumberingRules()38cdf0e10cSrcweir     public void _NumberingRules() {
39cdf0e10cSrcweir         //This property is readOnly
40cdf0e10cSrcweir         boolean bResult = false;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir         try {
43cdf0e10cSrcweir             Object theRules2 = oObj.getPropertyValue( "NumberingRules" );
44cdf0e10cSrcweir             if (!(theRules2 instanceof com.sun.star.container.XIndexReplace)) {
45cdf0e10cSrcweir                 log.println("Property 'NumberingRules' is an instance of "+
46cdf0e10cSrcweir                     theRules2.getClass().getName());
47cdf0e10cSrcweir                 log.println("Expected was an instance of "+
48cdf0e10cSrcweir                     "com.sun.star.container.XIndexReplace");
49cdf0e10cSrcweir             }
50cdf0e10cSrcweir             log.println("Trying to cast property 'NumberingRules' "+
51cdf0e10cSrcweir                 "to XIndexReplace");
52cdf0e10cSrcweir             XIndexReplace theRules = (XIndexReplace)
53cdf0e10cSrcweir                 oObj.getPropertyValue( "NumberingRules" );
54cdf0e10cSrcweir             bResult = true;
55cdf0e10cSrcweir         } catch( Exception e ) {
56*bb6af6bcSPedro Giffuni             log.println("Error occurred while trying to get property"+
57cdf0e10cSrcweir                 " 'NumberingRules'");
58cdf0e10cSrcweir             e.printStackTrace( log );
59cdf0e10cSrcweir             bResult = false;
60cdf0e10cSrcweir         }
61cdf0e10cSrcweir 
62cdf0e10cSrcweir         tRes.tested( "NumberingRules", bResult);
63cdf0e10cSrcweir     }
64cdf0e10cSrcweir 
65cdf0e10cSrcweir }  // finish class _Text
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 
69