1*c07c6c98SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c07c6c98SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c07c6c98SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c07c6c98SAndrew Rist  * distributed with this work for additional information
6*c07c6c98SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c07c6c98SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c07c6c98SAndrew Rist  * "License"); you may not use this file except in compliance
9*c07c6c98SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c07c6c98SAndrew Rist  *
11*c07c6c98SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c07c6c98SAndrew Rist  *
13*c07c6c98SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c07c6c98SAndrew Rist  * software distributed under the License is distributed on an
15*c07c6c98SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c07c6c98SAndrew Rist  * KIND, either express or implied.  See the License for the
17*c07c6c98SAndrew Rist  * specific language governing permissions and limitations
18*c07c6c98SAndrew Rist  * under the License.
19*c07c6c98SAndrew Rist  *
20*c07c6c98SAndrew Rist  *************************************************************/
21*c07c6c98SAndrew Rist 
22*c07c6c98SAndrew Rist 
23cdf0e10cSrcweir package complex.tdoc;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir import com.sun.star.ucb.XCommandInfoChangeListener;
26cdf0e10cSrcweir import com.sun.star.ucb.XCommandInfoChangeNotifier;
27cdf0e10cSrcweir import share.LogWriter;
28cdf0e10cSrcweir 
29cdf0e10cSrcweir /**
30cdf0e10cSrcweir  *
31cdf0e10cSrcweir  */
32cdf0e10cSrcweir public class _XCommandInfoChangeNotifier {
33cdf0e10cSrcweir     public XCommandInfoChangeNotifier oObj = null;
34cdf0e10cSrcweir     public LogWriter log = null;
35cdf0e10cSrcweir     private CommandInfoChangeListener listener = new CommandInfoChangeListener();
36cdf0e10cSrcweir 
_addCommandInfoChangeListener()37cdf0e10cSrcweir     public boolean _addCommandInfoChangeListener() {
38cdf0e10cSrcweir         oObj.addCommandInfoChangeListener(listener);
39cdf0e10cSrcweir         return true;
40cdf0e10cSrcweir     }
41cdf0e10cSrcweir 
_removeCommandInfoChangeListener()42cdf0e10cSrcweir     public boolean _removeCommandInfoChangeListener() {
43cdf0e10cSrcweir         oObj.removeCommandInfoChangeListener(listener);
44cdf0e10cSrcweir         return true;
45cdf0e10cSrcweir     }
46cdf0e10cSrcweir 
47cdf0e10cSrcweir     private class CommandInfoChangeListener implements XCommandInfoChangeListener {
48cdf0e10cSrcweir         boolean disposing = false;
49cdf0e10cSrcweir         boolean infoChanged = false;
50cdf0e10cSrcweir 
commandInfoChange(com.sun.star.ucb.CommandInfoChangeEvent commandInfoChangeEvent)51cdf0e10cSrcweir         public void commandInfoChange(com.sun.star.ucb.CommandInfoChangeEvent commandInfoChangeEvent) {
52cdf0e10cSrcweir             infoChanged = true;
53cdf0e10cSrcweir         }
54cdf0e10cSrcweir 
disposing(com.sun.star.lang.EventObject eventObject)55cdf0e10cSrcweir         public void disposing(com.sun.star.lang.EventObject eventObject) {
56cdf0e10cSrcweir             disposing = true;
57cdf0e10cSrcweir         }
58cdf0e10cSrcweir 
59cdf0e10cSrcweir     }
60cdf0e10cSrcweir }
61