summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/text
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2013-01-19 22:12:42 +0100
committerXisco Fauli <anistenis@gmail.com>2013-01-20 21:07:53 +0100
commit93bed66a1de719a7b2fb59445ff6847aaae6f1a9 (patch)
tree5253253b5a7d8fe2e82a697ff5791f0f21c46800 /wizards/com/sun/star/wizards/text
parentc71a811bbddcb33f5296a2b21598cee2ea36e6f5 (diff)
pyagenda: Fix a problem with template's sections
Change-Id: Ifbd5ba9800c1b52b2f0ed929b8919ff60fc48120
Diffstat (limited to 'wizards/com/sun/star/wizards/text')
-rw-r--r--wizards/com/sun/star/wizards/text/TextSectionHandler.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
index 4a35fb4ac48d..8896539b08c5 100644
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
@@ -85,22 +85,23 @@ class TextSectionHandler(object):
oSectionLink = \
uno.createUnoStruct('com.sun.star.text.SectionFileLink')
oSectionLink.FileURL = ""
- oTextSection.FileLink = oSectionLink
- oTextSection.LinkRegion = ""
+ uno.invoke(oTextSection, "setPropertyValues",
+ (("FileLink", "LinkRegion"), (oSectionLink, "")))
except Exception:
traceback.print_exc()
def linkSectiontoTemplate(
self, TemplateName, SectionName, oTextSection=None):
try:
- if oTextSection is not None:
+ if not oTextSection:
oTextSection = self.xTextDocument.TextSections.getByName(
SectionName)
oSectionLink = \
uno.createUnoStruct('com.sun.star.text.SectionFileLink')
oSectionLink.FileURL = TemplateName
- oTextSection.FileLink = oSectionLink
- oTextSection.LinkRegion = SectionName
+ uno.invoke(oTextSection, "setPropertyValues",
+ (("FileLink", "LinkRegion"), (oSectionLink, SectionName)))
+
NewSectionName = oTextSection.Name
if NewSectionName is not SectionName:
oTextSection.Name = SectionName