private bool setIntProperty(string name, int value) { int oldVal = getIntProperty(name); //if (OoUtils.GetIntProperty(Shape, name).Equals(value)) return true; OoUtils.SetPropertyUndoable(Shape as XPropertySet, name, value, GetDocument() as XUndoManagerSupplier); int newVal = getIntProperty(name); return(newVal.Equals(value)); }
private bool setBoolProperty(string name, bool value) { if (OoUtils.GetBooleanProperty(Shape as XPropertySet, name).Equals(value)) { return(true); } OoUtils.SetPropertyUndoable(Shape as XPropertySet, name, value, GetDocument() as XUndoManagerSupplier); bool newVal = getBoolProperty(name); return(newVal.Equals(value)); }
/// <summary> /// Try to sets the property. The function doesn't give feedback /// if the property is valid or available /// </summary> /// <param name="name">The name.</param> /// <param name="value">The value.</param> public bool SetProperty(string name, Object value) { return(OoUtils.SetPropertyUndoable(Shape as XPropertySet, name, value, GetDocument() as XUndoManagerSupplier)); }