summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/ui/event/UnoDataAware.py')
-rw-r--r--wizards/com/sun/star/wizards/ui/event/UnoDataAware.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
index 1ed80a10dbc6..1254e981313c 100644
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
@@ -34,8 +34,6 @@ For those controls, static convenience methods are offered, to simplify use.
class UnoDataAware(DataAware):
- disableObjects = []
-
def __init__(self, dataObject, field, unoObject_, unoPropName_, isShort=False):
super(UnoDataAware,self).__init__(dataObject, field)
self.unoControl = unoObject_
@@ -43,10 +41,6 @@ class UnoDataAware(DataAware):
self.unoPropName = unoPropName_
self.isShort = isShort
- def enableControls(self, value):
- for i in self.disableObjects:
- i.Model.Enabled = self.getBoolean(value)
-
def setToUI(self, value):
if (isinstance(value, list)):
value = tuple(value)
@@ -65,28 +59,6 @@ class UnoDataAware(DataAware):
else:
uno.invoke(self.unoModel, "set" + self.unoPropName, (value,))
- # Try to get from an arbitrary object a boolean value.
- # Null returns Boolean.FALSE;
- # A Boolean object returns itself.
- # An Array returns true if it not empty.
- # An Empty String returns Boolean.FALSE.
- # everything else returns a Boolean.TRUE.
- # @param value
- # @return
- def getBoolean(self, value):
- if (value is None):
- return False
- elif (isinstance(value, bool)):
- return bool(value)
- elif (isinstance(value, list)):
- return True if (len(value) is not 0) else False
- elif (value is ""):
- return False
- elif (isinstance(value, int)):
- return True if (value == 0) else False
- else:
- return True
-
def getFromUI(self):
return getattr(self.unoModel, self.unoPropName)