summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-10-28 21:06:39 +0100
committerXisco Fauli <anistenis@gmail.com>2012-10-30 01:09:33 +0100
commit02dd4619b20d53158f6a48f30ceb299a029883eb (patch)
tree2b780eead445cb30eda002935c33de7bbf94970a /wizards
parent6fa0930ed4208e6fb13bc986616ad7441bbd4bd1 (diff)
pyagenda: Remove duplicate code
Change-Id: Ic839031a50c4bd84efaebe89dbbe975bf81db789
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
index 56b852397129..271aa249992b 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
@@ -377,28 +377,6 @@ class AgendaTemplate(TextDocument):
i += 1
'''
- searches the document for items in the format "&gt;*&lt;"
- @return a vector containing the XTextRanges of the found items
- '''
-
- def searchFillInItems(self):
- try:
- sd = AgendaTemplate.document.createSearchDescriptor()
- sd.setSearchString("<[^>]+>")
- sd.setPropertyValue("SearchRegularExpression", True)
- sd.setPropertyValue("SearchWords", True)
- ia = AgendaTemplate.document.findAll(sd)
- try:
- l = [ia.getByIndex(i) for i in xrange(ia.Count)]
- except Exception, ex:
- print "Nonfatal Error in finding fillins."
- return l
- except Exception, ex:
- traceback.print_exc()
- raise AttributeError (
- "Fatal Error: Loading template failed: searching fillins failed")
-
- '''
analyze the item sections in the template.
delegates the analyze of each table to the ItemsTable class.
'''
@@ -535,7 +513,7 @@ class AgendaTemplate(TextDocument):
try:
topicStartTime = int(AgendaTemplate.agenda.cp_Time)
#first I replace the minutes titles...
- AgendaTemplate.items = self.searchFillInItems()
+ AgendaTemplate.items = TextDocument.searchFillInItems()
itemIndex = 0
for item in self.items:
itemText = item.String.lstrip().lower()
@@ -566,7 +544,7 @@ class AgendaTemplate(TextDocument):
for i in xrange(len(topicsData) - 1):
topic = topicsData[i]
- AgendaTemplate.items = self.searchFillInItems()
+ AgendaTemplate.items = TextDocument.searchFillInItems()
itemIndex = 0
for item in self.items:
itemText = item.String.lstrip().lower()