Kaydet (Commit) 7f038472 authored tarafından Xisco Fauli's avatar Xisco Fauli

pyagenda: Fix fdo#42543 in python

Change-Id: I8dacaa369c62a3d4d183737f024edfe42b903d8c
üst be0dad06
...@@ -894,15 +894,14 @@ class Topics(object): ...@@ -894,15 +894,14 @@ class Topics(object):
if diff > 0: if diff > 0:
self.agenda.insertTableRows(Topics.table, rows, diff) self.agenda.insertTableRows(Topics.table, rows, diff)
# set the item's text... # set the item's text...
'''self.setItemText(Topics.numCell, data[0].Value)
self.setItemText(Topics.numCell, data[0].Value)
self.setItemText(Topics.topicCell, data[1].Value) self.setItemText(Topics.topicCell, data[1].Value)
self.setItemText(Topics.responsibleCell, data[2].Value) self.setItemText(Topics.responsibleCell, data[2].Value)
self.setItemText(Topics.timeCell, data[3].Value) self.setItemText(Topics.timeCell, data[3].Value)'''
# now write ! # now write !
cursor = Topics.table.createCursorByCellName("A" + str(firstRow)) cursor = Topics.table.createCursorByCellName("A" + str(firstRow))
for i in Topics.topicCells: for i in Topics.topicCells:
i.write(Topics.table.getCellByName(cursor.RangeName)) self.write(Topics.table.getCellByName(cursor.RangeName))
cursor.goRight(1, False) cursor.goRight(1, False)
# now format ! # now format !
cursor.gotoCellByName("A" + str(firstRow), False) cursor.gotoCellByName("A" + str(firstRow), False)
......
...@@ -52,19 +52,7 @@ class ControlScroller(object): ...@@ -52,19 +52,7 @@ class ControlScroller(object):
self.nlineincrement = 1 self.nlineincrement = 1
self.sincSuffix = Desktop.getIncrementSuffix( self.sincSuffix = Desktop.getIncrementSuffix(
ControlScroller.CurUnoDialog.xDialogModel, "imgBackground") ControlScroller.CurUnoDialog.xDialogModel, "imgBackground")
self.oImgControl = ControlScroller.CurUnoDialog.insertControlModel(
"com.sun.star.awt.UnoControlImageControlModel",
"imgBackground" + self.sincSuffix,
("Border", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_WIDTH),
(1, self.iCompHeight, self.iCompPosX,
self.iCompPosY, ControlScroller.iStep, self.iCompWidth))
self.oImgControl = ControlScroller.CurUnoDialog.xUnoDialog.getControl(
"imgBackground" + self.sincSuffix)
self.setComponentMouseTransparent()
ControlScroller.xScrollBar = ControlScroller.CurUnoDialog.insertScrollBar( ControlScroller.xScrollBar = ControlScroller.CurUnoDialog.insertScrollBar(
"TitleScrollBar" + self.sincSuffix, "TitleScrollBar" + self.sincSuffix,
("Border", PropertyNames.PROPERTY_ENABLED, ("Border", PropertyNames.PROPERTY_ENABLED,
...@@ -87,10 +75,6 @@ class ControlScroller(object): ...@@ -87,10 +75,6 @@ class ControlScroller(object):
self.insertControlGroup(i, ypos) self.insertControlGroup(i, ypos)
ypos += self.linedistance ypos += self.linedistance
def setComponentMouseTransparent(self):
ControlScroller.CurUnoDialog.getPeerConfiguration().\
setPeerProperties(self.oImgControl, "MouseTransparent", True)
@classmethod @classmethod
def fillupControls(self, binitialize): def fillupControls(self, binitialize):
for i in range(ControlScroller.nblockincrement): for i in range(ControlScroller.nblockincrement):
...@@ -115,7 +99,7 @@ class ControlScroller(object): ...@@ -115,7 +99,7 @@ class ControlScroller(object):
if _ntotfieldcount is not None: if _ntotfieldcount is not None:
self.setTotalFieldCount(_ntotfieldcount) self.setTotalFieldCount(_ntotfieldcount)
if _nscrollvalue >= 0: if _nscrollvalue >= 0:
ControlScroller.xScrollBar.Model.ScrollValue = _nscrollvalue ControlScroller.xScrollBar.xDialogModel.ScrollValue = _nscrollvalue
self.scrollControls() self.scrollControls()
@classmethod @classmethod
...@@ -209,8 +193,7 @@ class ControlScroller(object): ...@@ -209,8 +193,7 @@ class ControlScroller(object):
controlname).Model controlname).Model
propertyname = UnoDialog.getDisplayProperty(oControlModel) propertyname = UnoDialog.getDisplayProperty(oControlModel)
if propertyname: if propertyname:
print(type(controlname)) setattr(oControlModel, propertyname, newvalue)
setattr(controlname, propertyname, newvalue)
@classmethod @classmethod
def getControlData(self, controlname): def getControlData(self, controlname):
...@@ -218,7 +201,7 @@ class ControlScroller(object): ...@@ -218,7 +201,7 @@ class ControlScroller(object):
controlname).Model controlname).Model
propertyname = UnoDialog.getDisplayProperty(oControlModel) propertyname = UnoDialog.getDisplayProperty(oControlModel)
if propertyname: if propertyname:
return getattr(controlname, propertyname) return getattr(oControlModel, propertyname)
else: else:
return None return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment