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 package ifc.text;
24 
25 import lib.MultiPropertyTest;
26 
27 
28 /**
29  * Testing <code>com.sun.star.text.TextEmbeddedObject</code>
30  * service properties :
31  * <ul>
32  *  <li><code> CLSID</code></li>
33  *  <li><code> Model</code></li>
34  *  <li><code> Component</code></li>
35  * </ul> <p>
36  * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
37  * @see com.sun.star.text.TextEmbeddedObject
38  */
39 public class _TextEmbeddedObject extends MultiPropertyTest {
40 
41     /**
42      * This property can't be set, as soon as the object is inserted
43      * so the set method will be skipped.
44      */
_CLSID()45     public void _CLSID() {
46         boolean result = false;
47 
48         try {
49             String clsid = (String) oObj.getPropertyValue("CLSID");
50             log.println("Getting " + clsid);
51             log.println(
52                     "According to the idl-description this property can't be set as soon as the Object is inserted in the document, so setting will be skipped");
53             result=true;
54         } catch (com.sun.star.beans.UnknownPropertyException e) {
55             log.println("Exception while getting Property 'CLSID' " +
56                         e.getMessage());
57         } catch (com.sun.star.lang.WrappedTargetException e) {
58             log.println("Exception while getting Property 'CLSID' " +
59                         e.getMessage());
60         }
61 
62         tRes.tested("CLSID", result);
63     }
64 } // finish class _TextEmbeddedObject
65