if ( aURL.Path.compareTo("add") == 0 ) {
com.sun.star.util.URL buttonAdd = new com.sun.star.util.URL();
buttonAdd.Path = "add";
buttonAdd.Protocol = "com.openkm.openoffice.openkmaddon:";
buttonAdd.Complete = "com.openkm.openoffice.openkmaddon:add";
FeatureStateEvent fsEventAdd = new FeatureStateEvent();
fsEventAdd.FeatureURL = buttonAdd;
fsEventAdd.Source = this;
fsEventAdd.IsEnabled = !isOpenKMDoc;
fsEventAdd.Requery = false;
xControl.statusChanged(fsEventAdd);
}
if ( aURL.Path.compareTo("edit") == 0 ) {
com.sun.star.util.URL buttonEdit = new com.sun.star.util.URL();
buttonEdit.Path = "edit";
buttonEdit.Protocol = "com.openkm.openoffice.openkmaddon:";
buttonEdit.Complete = "com.openkm.openoffice.openkmaddon:edit";
FeatureStateEvent fsEventEdit = new FeatureStateEvent();
fsEventEdit.FeatureURL = buttonEdit;
fsEventEdit.Source = this;
fsEventEdit.IsEnabled = !isOpenKMDoc;
fsEventEdit.Requery = false;
xControl.statusChanged(fsEventEdit);
}
if ( aURL.Path.compareTo("checkin") == 0 ) {
com.sun.star.util.URL buttonCheckin = new com.sun.star.util.URL();
buttonCheckin.Path = "checkin";
buttonCheckin.Protocol = "com.openkm.openoffice.openkmaddon:";
buttonCheckin.Complete = "com.openkm.openoffice.openkmaddon:checkin";
FeatureStateEvent fsEventCheckin = new FeatureStateEvent();
fsEventCheckin.FeatureURL = buttonCheckin;
fsEventCheckin.Source = this;
fsEventCheckin.IsEnabled = isOpenKMDoc;
fsEventCheckin.Requery = false;
xControl.statusChanged(fsEventCheckin);
}
if ( aURL.Path.compareTo("cancelcheckin") == 0 ) {
com.sun.star.util.URL buttonCancelCheckin = new com.sun.star.util.URL();
buttonCancelCheckin.Path = "cancelcheckin";
buttonCancelCheckin.Protocol = "com.openkm.openoffice.openkmaddon:";
buttonCancelCheckin.Complete = "com.openkm.openoffice.openkmaddon:cancelcheckin";
FeatureStateEvent fsEventCancelCheckin = new FeatureStateEvent();
fsEventCancelCheckin.FeatureURL = buttonCancelCheckin;
fsEventCancelCheckin.Source = this;
fsEventCancelCheckin.IsEnabled = isOpenKMDoc;
fsEventCancelCheckin.Requery = false;
xControl.statusChanged(fsEventCancelCheckin);