diff options
author | Xisco Fauli <anistenis@gmail.com> | 2013-01-19 22:12:42 +0100 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2013-01-20 21:07:53 +0100 |
commit | 93bed66a1de719a7b2fb59445ff6847aaae6f1a9 (patch) | |
tree | 5253253b5a7d8fe2e82a697ff5791f0f21c46800 /wizards/com/sun/star/wizards/text | |
parent | c71a811bbddcb33f5296a2b21598cee2ea36e6f5 (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.py | 11 |
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 |