Remove class UnoPage

This commit is contained in:
Mauricio Baeza 2020-11-25 17:25:36 -06:00
parent e8e3bc80a2
commit f5f53e8ec0
2 changed files with 6 additions and 57 deletions

View File

@ -813,57 +813,6 @@ class EventsMenu(EventsListenerBase, XMenuListener):
return
class UnoTab(UnoBaseObject):
def _special_properties(self, tipo, properties):
columns = properties.pop('Columns', ())
if tipo == 'grid':
properties['ColumnModel'] = _set_column_model(columns)
if not 'Width' in properties:
properties['Width'] = self.width
if not 'Height' in properties:
properties['Height'] = self.height
elif tipo == 'button' and 'ImageURL' in properties:
properties['ImageURL'] = self._set_image_url(properties['ImageURL'])
elif tipo == 'roadmap':
if not 'Height' in properties:
properties['Height'] = self.height
if 'Title' in properties:
properties['Text'] = properties.pop('Title')
elif tipo == 'pages':
if not 'Width' in properties:
properties['Width'] = self.width
if not 'Height' in properties:
properties['Height'] = self.height
return properties
def add_control(self, id, properties):
tipo = properties.pop('Type').lower()
root = properties.pop('Root', '')
sheets = properties.pop('Sheets', ())
properties = self._special_properties(tipo, properties)
sheet = self.get_sheet(id)
sheet_model = sheet.getModel()
model = sheet_model.createInstance(get_control_model(tipo))
set_properties(model, properties)
name = properties['Name']
sheet_model.insertByName(name, model)
control = sheet.getControl(name)
add_listeners(self.events, control, name)
control = get_custom_class(tipo, control)
if tipo == 'tree' and root:
control.root = root
elif tipo == 'pages' and sheets:
control.sheets = sheets
setattr(self, name, control)
return
class WriterTable(ObjectBase):
def __init__(self, obj):

View File

@ -4159,12 +4159,12 @@ class UnoPage(UnoBaseObject):
# ~ def color(self, value):
# ~ self.m.BackgroundColor = value
@property
def enabled(self):
return self.m.Enabled
@enabled.setter
def enabled(self, value):
self.obj.Enable = value
# ~ @property
# ~ def enabled(self):
# ~ return self.m.Enabled
# ~ @enabled.setter
# ~ def enabled(self, value):
# ~ self.obj.Enable = value
# ~ @property
# ~ def title(self):