summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/fax/FaxDocument.py
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-11-13 23:16:01 +0100
committerXisco Fauli <anistenis@gmail.com>2012-11-13 23:17:07 +0100
commit923bcb6ad44812faf78d9d8a34be2bf8cfc625d9 (patch)
tree9aab222f61ab22f6d868a1e063334f746d26dc16 /wizards/com/sun/star/wizards/fax/FaxDocument.py
parent29f0cbffd0001b9df75969b11b0658a80b1f56af (diff)
pywizards: Use local variables
Change-Id: I334244d1729376f25c361327b4103fb59ccc2d09
Diffstat (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py')
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py
index 77ed13870606..c99eb7d92752 100644
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.py
+++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py
@@ -36,7 +36,7 @@ class FaxDocument(TextDocument):
def switchElement(self, sElement, bState):
try:
mySectionHandler = TextSectionHandler(self.xMSF,
- TextDocument.xTextDocument)
+ self.xTextDocument)
oSection = \
mySectionHandler.xTextDocument.TextSections.getByName(sElement)
Helper.setUnoPropertyValue(oSection,"IsVisible",bState)
@@ -45,15 +45,15 @@ class FaxDocument(TextDocument):
def updateDateFields(self):
FH = TextFieldHandler(
- TextDocument.xTextDocument, TextDocument.xTextDocument)
+ self.xTextDocument, self.xTextDocument)
FH.updateDateFields()
def switchFooter(self, sPageStyle, bState, bPageNumber, sText):
- if TextDocument.xTextDocument is not None:
+ if self.xTextDocument is not None:
try:
- TextDocument.xTextDocument.lockControllers()
+ self.xTextDocument.lockControllers()
xPageStyleCollection = \
- TextDocument.xTextDocument.StyleFamilies.getByName("PageStyles")
+ self.xTextDocument.StyleFamilies.getByName("PageStyles")
xPageStyle = xPageStyleCollection.getByName(sPageStyle)
if bState:
@@ -71,7 +71,7 @@ class FaxDocument(TextDocument):
myCursor.setPropertyValue("ParaAdjust", CENTER )
xPageNumberField = \
- TextDocument.xTextDocument.createInstance(
+ self.xTextDocument.createInstance(
"com.sun.star.text.TextField.PageNumber")
xPageNumberField.setPropertyValue("SubType", CURRENT)
xPageNumberField.NumberingType = ARABIC
@@ -81,22 +81,22 @@ class FaxDocument(TextDocument):
Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn",
False)
- TextDocument.xTextDocument.unlockControllers()
+ self.xTextDocument.unlockControllers()
except Exception:
- TextDocument.xTextDocument.lockControllers()
+ self.xTextDocument.lockControllers()
traceback.print_exc()
def hasElement(self, sElement):
- if TextDocument.xTextDocument is not None:
+ if self.xTextDocument is not None:
mySectionHandler = TextSectionHandler(self.xMSF,
- TextDocument.xTextDocument)
+ self.xTextDocument)
return mySectionHandler.hasTextSectionByName(sElement)
else:
return False
def switchUserField(self, sFieldName, sNewContent, bState):
myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
+ self.xMSF, self.xTextDocument)
if bState:
myFieldHandler.changeUserFieldContent(sFieldName, sNewContent)
else:
@@ -104,8 +104,8 @@ class FaxDocument(TextDocument):
def fillSenderWithUserData(self):
try:
- myFieldHandler = TextFieldHandler(TextDocument.xTextDocument,
- TextDocument.xTextDocument)
+ myFieldHandler = TextFieldHandler(self.xTextDocument,
+ self.xTextDocument)
oUserDataAccess = Configuration.getConfigurationRoot(
self.xMSF, "org.openoffice.UserProfile/Data", False)
myFieldHandler.changeUserFieldContent("Company",
@@ -127,20 +127,20 @@ class FaxDocument(TextDocument):
def killEmptyUserFields(self):
myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
+ self.xMSF, self.xTextDocument)
myFieldHandler.removeUserFieldByContent("")
def killEmptyFrames(self):
try:
if not self.keepLogoFrame:
xTF = self.getFrameByName("Company Logo",
- TextDocument.xTextDocument)
+ self.xTextDocument)
if xTF is not None:
xTF.dispose()
if not self.keepTypeFrame:
xTF = self.getFrameByName("Communication Type",
- TextDocument.xTextDocument)
+ self.xTextDocument)
if xTF is not None:
xTF.dispose()