From 7f038472fb4640f01f028185dc5e19781e8a8459 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sun, 20 Jan 2013 18:49:33 +0100 Subject: pyagenda: Fix fdo#42543 in python Change-Id: I8dacaa369c62a3d4d183737f024edfe42b903d8c --- .../com/sun/star/wizards/agenda/AgendaDocument.py | 7 +++--- wizards/com/sun/star/wizards/ui/ControlScroller.py | 25 ++++------------------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py index 4a7e097ab3ba..001d5c2c11d0 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py @@ -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) diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.py b/wizards/com/sun/star/wizards/ui/ControlScroller.py index 44c19576bc42..219ffaa7ab7f 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.py +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.py @@ -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 -- cgit v1.2.3