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):
if diff > 0:
self.agenda.insertTableRows(Topics.table, rows, diff)
# 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.responsibleCell, data[2].Value)
self.setItemText(Topics.timeCell, data[3].Value)
self.setItemText(Topics.timeCell, data[3].Value)'''
# now write !
cursor = Topics.table.createCursorByCellName("A" + str(firstRow))
for i in Topics.topicCells:
i.write(Topics.table.getCellByName(cursor.RangeName))
self.write(Topics.table.getCellByName(cursor.RangeName))
cursor.goRight(1, False)
# now format !
cursor.gotoCellByName("A" + str(firstRow), False)
......
......@@ -52,19 +52,7 @@ class ControlScroller(object):
self.nlineincrement = 1
self.sincSuffix = Desktop.getIncrementSuffix(
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(
"TitleScrollBar" + self.sincSuffix,
("Border", PropertyNames.PROPERTY_ENABLED,
......@@ -87,10 +75,6 @@ class ControlScroller(object):
self.insertControlGroup(i, ypos)
ypos += self.linedistance
def setComponentMouseTransparent(self):
ControlScroller.CurUnoDialog.getPeerConfiguration().\
setPeerProperties(self.oImgControl, "MouseTransparent", True)
@classmethod
def fillupControls(self, binitialize):
for i in range(ControlScroller.nblockincrement):
......@@ -115,7 +99,7 @@ class ControlScroller(object):
if _ntotfieldcount is not None:
self.setTotalFieldCount(_ntotfieldcount)
if _nscrollvalue >= 0:
ControlScroller.xScrollBar.Model.ScrollValue = _nscrollvalue
ControlScroller.xScrollBar.xDialogModel.ScrollValue = _nscrollvalue
self.scrollControls()
@classmethod
......@@ -209,8 +193,7 @@ class ControlScroller(object):
controlname).Model
propertyname = UnoDialog.getDisplayProperty(oControlModel)
if propertyname:
print(type(controlname))
setattr(controlname, propertyname, newvalue)
setattr(oControlModel, propertyname, newvalue)
@classmethod
def getControlData(self, controlname):
......@@ -218,7 +201,7 @@ class ControlScroller(object):
controlname).Model
propertyname = UnoDialog.getDisplayProperty(oControlModel)
if propertyname:
return getattr(controlname, propertyname)
return getattr(oControlModel, propertyname)
else:
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