tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / qadevOOo / tests / java / ifc / linguistic2 / _XLinguServiceEventBroadcaster.java
blob9396ebf2876ed0b1cdfc9f0f3d55ce4184561c31
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package ifc.linguistic2;
21 import lib.MultiMethodTest;
23 import com.sun.star.lang.EventObject;
24 import com.sun.star.linguistic2.LinguServiceEvent;
25 import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
26 import com.sun.star.linguistic2.XLinguServiceEventListener;
28 /**
29 * Testing <code>com.sun.star.linguistic2.XLinguServiceEventBroadcaster</code>
30 * interface methods:
31 * <ul>
32 * <li><code>addLinguServiceEventListener()</code></li>
33 * <li><code>removeLinguServiceEventListener()</code></li>
34 * </ul><p>
35 * @see com.sun.star.linguistic2.XLinguServiceEventBroadcaster
37 public class _XLinguServiceEventBroadcaster extends MultiMethodTest {
39 public XLinguServiceEventBroadcaster oObj = null;
41 /**
42 * Class implements interface <code>XLinguServiceEventListener</code>
43 * for test method <code>addLinguServiceEventListener</code>.
44 * @see com.sun.star.linguistic2.XLinguServiceEventListener
46 public class MyLinguServiceEventListener implements
47 XLinguServiceEventListener {
48 public void disposing ( EventObject oEvent ) {
49 log.println("Listener has been disposed");
51 public void processLinguServiceEvent(LinguServiceEvent aServiceEvent) {
52 log.println("Listener called");
57 XLinguServiceEventListener listener = new MyLinguServiceEventListener();
59 /**
60 * Test calls the method and checks returned value. <p>
61 * Has <b> OK </b> status if returned value is true. <p>
63 public void _addLinguServiceEventListener() {
64 boolean res = true;
66 res = oObj.addLinguServiceEventListener(listener);
68 tRes.tested("addLinguServiceEventListener()",res);
71 /**
72 * Test calls the method and checks returned value. <p>
73 * Has <b> OK </b> status if returned value is true. <p>
75 public void _removeLinguServiceEventListener() {
76 boolean res = true;
78 res = oObj.removeLinguServiceEventListener(listener);
80 tRes.tested("removeLinguServiceEventListener()",res);
83 } // finish class XLinguServiceEventBroadcaster