summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/fax/FaxDocument.py
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2011-06-20 14:20:37 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:13:21 +0200
commit11849c7545f8ade7b03e91e44750dd72f683ac29 (patch)
treec5a7ae705ed1bf596be08673addd1c586b6a21a8 /wizards/com/sun/star/wizards/fax/FaxDocument.py
parentaaecc07a4ad2e88fbf727cd979e292b32b9a8cba (diff)
Footer checkbox works correctly now.
Others: - Replace all UnoException by python Exception
Diffstat (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py')
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py
index 8ff2e648b848..581b8e7ee80f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.py
+++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py
@@ -1,6 +1,5 @@
import uno
from text.TextDocument import *
-from com.sun.star.uno import Exception as UnoException
from text.TextSectionHandler import TextSectionHandler
from text.TextFieldHandler import TextFieldHandler
from common.Configuration import Configuration
@@ -26,7 +25,7 @@ class FaxDocument(TextDocument):
oSection = \
mySectionHandler.xTextDocument.TextSections.getByName(sElement)
Helper.setUnoPropertyValue(oSection, "IsVisible", bState)
- except UnoException, exception:
+ except Exception, exception:
traceback.print_exc()
def updateDateFields(self):
@@ -44,7 +43,7 @@ class FaxDocument(TextDocument):
if bState:
xPageStyle.setPropertyValue("FooterIsOn", True)
- xFooterText = propertySet.getPropertyValue("FooterText")
+ xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText")
xFooterText.String = sText
if bPageNumber:
@@ -55,11 +54,11 @@ class FaxDocument(TextDocument):
PARAGRAPH_BREAK, False)
myCursor.setPropertyValue("ParaAdjust", CENTER )
- xPageNumberField = xMSFDoc.createInstance(
+ xPageNumberField = self.xTextDocument.createInstance(
"com.sun.star.text.TextField.PageNumber")
- xPageNumberField.setPropertyValue(
- "NumberingType", uno.Any("short",ARABIC))
xPageNumberField.setPropertyValue("SubType", CURRENT)
+ uno.invoke(xPageNumberField, "setPropertyValue",
+ ("NumberingType", uno.Any("short",ARABIC)))
xFooterText.insertTextContent(xFooterText.End,
xPageNumberField, False)
else:
@@ -67,7 +66,7 @@ class FaxDocument(TextDocument):
False)
self.xTextDocument.unlockControllers()
- except UnoException, exception:
+ except Exception, exception:
traceback.print_exc()
def hasElement(self, sElement):
@@ -105,7 +104,7 @@ class FaxDocument(TextDocument):
myFieldHandler.changeUserFieldContent("Fax",
Helper.getUnoObjectbyName(oUserDataAccess,
"facsimiletelephonenumber"))
- except UnoException, exception:
+ except Exception, exception:
traceback.print_exc()
def killEmptyUserFields(self):
@@ -126,5 +125,5 @@ class FaxDocument(TextDocument):
if xTF is not None:
xTF.dispose()
- except UnoException, e:
+ except Exception, e:
traceback.print_exc()