diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-11-28 00:39:39 +0100 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2012-11-28 02:07:14 +0100 |
commit | 03a0ea88e94205bf14feffccf981e4aac82a28ae (patch) | |
tree | 7f4d264e24bab8a8612274cd6764f68d1251b70b /wizards | |
parent | e87d8747cf526af4cbb90502854c3b705aa52caa (diff) |
pyagenda: make buttons work in Agenda Items
Change-Id: Iadc5088b1e95fec0ae34c35cf650e9d53ceb6bf4
Diffstat (limited to 'wizards')
4 files changed, 21 insertions, 12 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py index b944bd414069..e6643e0994d5 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py @@ -795,6 +795,15 @@ class Topics(object): self.topicItems = {} self.firstRowFormat = [] self.agenda = agenda + ''' + this is a list which traces which topics were written to the document + and which not. When a cell needs to be actualized, it is checked that the + whole topic is already present in the document, using this vector. + The vector contains nulls for topics which were not written, and + empty strings for topics which were written (though any other + object would also do - i check only if it is a null or not...); + ''' + self.writtenTopics = [] try: Topics.table = self.agenda.getTable( self.agenda.templateConsts.SECTION_TOPICS) @@ -875,12 +884,11 @@ class Topics(object): to the table. 0 or a negative number: no rows added. ''' - @classmethod def write2(self, topic, data): - if topic >= len(self.agenda.writtenTopics): - size = topic - len(self.agenda.writtenTopics) - self.agenda.writtenTopics += [None] * size - self.agenda.writtenTopics.insert(topic, "") + if topic >= len(self.writtenTopics): + size = topic - len(self.writtenTopics) + self.writtenTopics += [None] * size + self.writtenTopics.insert(topic, "") # make sure threr are enough rows for me... rows = self.agenda.getRowCount(Topics.table) reqRows = 1 + (topic + 1) * Topics.rowsPerTopic @@ -911,8 +919,8 @@ class Topics(object): ''' def isWritten(self, topic): - return (len(self.agenda.writtenTopics) > topic \ - and self.agenda.writtenTopics[topic] is not None) + return (len(self.writtenTopics) > topic \ + and self.writtenTopics[topic] is not None) '''rewrites a single cell containing. This is used in order to refresh the topic/responsible/duration data @@ -1013,8 +1021,8 @@ class Topics(object): targetNumOfRows, tableRows.Count - targetNumOfRows)''' self.formatLastRow() - while len(self.agenda.writtenTopics) > topics: - del self.agenda.writtenTopics[topics] + while len(self.writtenTopics) > topics: + del self.writtenTopics[topics] '''reapply the format of the first (header) row. ''' @@ -1044,7 +1052,7 @@ class Topics(object): if cell >= 0: te = Topics.topicCells[cell] if te is not None: - te.text = str(value) + te.Text = str(value) return te return None diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py index e28fe6e972e3..00262ee3957d 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py @@ -15,6 +15,7 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +import uno from .CGTopic import CGTopic from ..ui.ControlScroller import * from .AgendaWizardDialogConst import HID diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index c33cbb13f985..7cbeb2a3a42b 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -17,6 +17,7 @@ # import traceback from .PeerConfig import PeerConfig +from .UIConsts import UIConsts from ..common.PropertyNames import PropertyNames from ..common.Helper import Helper diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index aae04149982f..2ca855dccd57 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -15,8 +15,7 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -from .UnoDialog import UnoDialog -from .UIConsts import UIConsts +from .UnoDialog import UnoDialog, UIConsts from ..common.Desktop import Desktop from ..common.PropertyNames import PropertyNames from .event.CommonListener import ItemListenerProcAdapter, \ |