summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2013-02-10 22:14:45 +0100
committerXisco Fauli <anistenis@gmail.com>2013-02-10 22:18:00 +0100
commitefa0451d8eab878812e2bbacc4319d7490d0f333 (patch)
tree97eba594cc93de6669a7743a5594beceba12d6ea /wizards
parent2f7bd777d9724ff3b6c7697bf7c02d32eb661214 (diff)
pyagenda: remove placeholder when text is not empty
Change-Id: I06ae1815ec1bd904e944929f1b50a0ee95a6a5ae
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaDocument.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index c993d623aa2b..07b3f35f7117 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -662,7 +662,6 @@ class ItemsTable(object):
# should this section be visible?
visible = False
# write items
- # ===========
cellName = ""
'''
now go through all items that belong to this
@@ -689,8 +688,6 @@ class ItemsTable(object):
if not visible:
return
'''
- remove obsolete rows
- ====================
if the cell that was last written is the current cell,
it means this is the end of the table, so we end here.
(because after getting the cellName above,
@@ -889,6 +886,7 @@ class PlaceholderTextElement(TextElement):
self.text = placeHolderText_
self.hint = hint_
self.xmsf = xmsf_
+ self.xTextContentList = []
def write(self, textRange):
textRange.String = self.placeHolderText
@@ -896,11 +894,16 @@ class PlaceholderTextElement(TextElement):
try:
xTextContent = AgendaDocument.createPlaceHolder(
self.xmsf, self.text, self.hint)
+ self.xTextContentList.append(xTextContent)
textRange.Text.insertTextContent(
textRange.Start, xTextContent, True)
except Exception:
traceback.print_exc()
-
+ else:
+ if self.xTextContentList:
+ for i in self.xTextContentList:
+ textRange.Text.removeTextContent(i)
+ self.xTextContentList = []
'''
An Agenda element which writes no text, but inserts a placeholder, and formats
it using a ParaStyleName.