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 complex.tdoc;
24 
25 import com.sun.star.ucb.XCommandInfoChangeListener;
26 import com.sun.star.ucb.XCommandInfoChangeNotifier;
27 import share.LogWriter;
28 
29 /**
30  *
31  */
32 public class _XCommandInfoChangeNotifier {
33     public XCommandInfoChangeNotifier oObj = null;
34     public LogWriter log = null;
35     private CommandInfoChangeListener listener = new CommandInfoChangeListener();
36 
37     public boolean _addCommandInfoChangeListener() {
38         oObj.addCommandInfoChangeListener(listener);
39         return true;
40     }
41 
42     public boolean _removeCommandInfoChangeListener() {
43         oObj.removeCommandInfoChangeListener(listener);
44         return true;
45     }
46 
47     private class CommandInfoChangeListener implements XCommandInfoChangeListener {
48         boolean disposing = false;
49         boolean infoChanged = false;
50 
51         public void commandInfoChange(com.sun.star.ucb.CommandInfoChangeEvent commandInfoChangeEvent) {
52             infoChanged = true;
53         }
54 
55         public void disposing(com.sun.star.lang.EventObject eventObject) {
56             disposing = true;
57         }
58 
59     }
60 }
61