diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-11-08 01:01:31 +0100 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2012-11-08 07:42:29 +0100 |
commit | 0ff42915684fe773e58f5c77ce3c78470123412b (patch) | |
tree | ad8dc29d0ba1fc9e2ceebdf171168c9e3c7154d1 /wizards | |
parent | pyagenda: remove duplicate code (diff) | |
download | core-0ff42915684fe773e58f5c77ce3c78470123412b.tar.gz core-0ff42915684fe773e58f5c77ce3c78470123412b.zip |
pyagenda: remove duplicate code
Change-Id: I673818e6ab3ed5c430b9891af5c4bd5fe7ab146f
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/agenda/AgendaTemplate.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py index 0ecf8c32eda9..4f99bfdebc17 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py @@ -173,7 +173,6 @@ class AgendaTemplate(TextDocument): def redraw(self, itemName): AgendaTemplate.xTextDocument.lockControllers() try: - print "kinki" # get the table in which the item is... itemsTable = AgendaTemplate.itemsMap[itemName] # rewrite the table. @@ -450,9 +449,9 @@ class AgendaTemplate(TextDocument): @classmethod def writeTitle(self, te, tr, text): if text is None: - te.text = "" + te.placeHolderText = "" else: - te.text = text + te.placeHolderText = text te.write(tr) @classmethod @@ -1141,18 +1140,18 @@ inserts a placeholder instead. class PlaceholderTextElement(TextElement): def __init__(self, textRange, placeHolderText_, hint_, xmsf_): - super(PlaceholderTextElement,self).__init__(textRange, placeHolderText_) + super(PlaceholderTextElement,self).__init__(textRange, "") - self.placeHolderText = placeHolderText_ + self.text = placeHolderText_ self.hint = hint_ self.xmsf = xmsf_ def write(self, textRange): - textRange.String = self.text - if self.text is None or self.text == "": + textRange.String = self.placeHolderText + if self.placeHolderText is None or self.placeHolderText == "": try: xTextContent = AgendaTemplate.createPlaceHolder( - self.xmsf, self.placeHolderText, self.hint) + self.xmsf, self.text, self.hint) textRange.Text.insertTextContent( textRange.Start, xTextContent, True) except Exception, ex: |