summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2013-01-20 21:05:57 +0100
committerXisco Fauli <anistenis@gmail.com>2013-01-20 21:07:55 +0100
commit5bbc006823a8eba8dbcf06943f76c8fcb30ec7ba (patch)
tree9d48b754ab90b52dd5e020f06486cc315421e1e9 /wizards
parent7f038472fb4640f01f028185dc5e19781e8a8459 (diff)
pyagenda: table's cells are TextElement
Change-Id: Ica2289b710369b8d319991fde311d10f64acd295
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaDocument.py22
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.py6
-rw-r--r--wizards/com/sun/star/wizards/ui/ControlScroller.py2
3 files changed, 18 insertions, 12 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 001d5c2c11d0..86007786097f 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -844,16 +844,18 @@ class Topics(object):
# analyze the structure of the topic rows.
while not cursor.RangeName == afterLastCell:
cell = Topics.table.getCellByName(cursor.RangeName)
+ # first I store the content and para style of the cell
+ ae = TextElement(cell, cell.String)
# if the cell contains a relevant <...>
# i add the text element to the hash,
# so it's text can be updated later.
try:
if items[cell.CellName] is not None:
- self.topicItems[cell.String.lower().lstrip()] = cell
+ self.topicItems[cell.String.lower().lstrip()] = ae
except KeyError:
pass
- Topics.topicCells.append(cell)
+ Topics.topicCells.append(ae)
# goto next cell.
cursor.goRight(1, False)
'''
@@ -886,22 +888,25 @@ class Topics(object):
size = topic - len(self.writtenTopics)
self.writtenTopics += [None] * size
self.writtenTopics.insert(topic, "")
- # make sure threr are enough rows for me...
+ # make sure three are enough rows for me...
rows = self.agenda.getRowCount(Topics.table)
reqRows = 1 + (topic + 1) * Topics.rowsPerTopic
firstRow = reqRows - Topics.rowsPerTopic + 1
diff = reqRows - rows
if diff > 0:
- self.agenda.insertTableRows(Topics.table, rows, diff)
# set the item's text...
- '''self.setItemText(Topics.numCell, data[0].Value)
+ self.agenda.insertTableRows(Topics.table, rows, diff)
+
+ 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:
- self.write(Topics.table.getCellByName(cursor.RangeName))
+ i.placeHolderText = \
+ Topics.table.getCellByName(cursor.RangeName).String
+ i.write()
cursor.goRight(1, False)
# now format !
cursor.gotoCellByName("A" + str(firstRow), False)
@@ -961,7 +966,8 @@ class Topics(object):
cursor.goRight(cursorMoves, False)
xc = Topics.table.getCellByName(cursor.RangeName)
# and write it !
- te.write(xc)
+ te.placeHolderText = xc.String
+ te.write()
'''writes the given topic.
if the first topic was involved, reformat the
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
index 4a7231725e6f..809e468ab9a4 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
@@ -392,12 +392,12 @@ class TopicsControl(ControlScroller):
'''
while len(ControlScroller.scrollfields) > 1 \
and self.isRowEmpty(len(ControlScroller.scrollfields) - 2):
- removeLastRow()
+ self.removeLastRow()
cr = self.ControlGroupVector[
- ControlScroller.scrollfields.size - ControlScroller.nscrollvalue - 1]
+ len(ControlScroller.scrollfields) - ControlScroller.nscrollvalue - 1]
# if a remove was performed, set focus
#to the last row with some data in it...
- self.focus(getControl(cr, column))
+ self.focus(self.getControl(cr, column))
# update the preview document.
self.reduceDocumentToTopics()
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.py b/wizards/com/sun/star/wizards/ui/ControlScroller.py
index 219ffaa7ab7f..35b0bac4b212 100644
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.py
+++ b/wizards/com/sun/star/wizards/ui/ControlScroller.py
@@ -99,7 +99,7 @@ class ControlScroller(object):
if _ntotfieldcount is not None:
self.setTotalFieldCount(_ntotfieldcount)
if _nscrollvalue >= 0:
- ControlScroller.xScrollBar.xDialogModel.ScrollValue = _nscrollvalue
+ ControlScroller.xScrollBar.Model.ScrollValue = _nscrollvalue
self.scrollControls()
@classmethod