summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-11-24 18:38:56 +0100
committerXisco Fauli <anistenis@gmail.com>2012-11-24 22:20:51 +0100
commite5f040bf7c73104ad472c4fd959dc6f8d96b57c2 (patch)
treece474c56fd35eafdea9b3f47b107d777cb4bef13
parent4fa0236f1ca1af24a16f5edc5698bc14fde0f0d0 (diff)
pyletter: Fix letterhead
Change-Id: I73977b203778dca42ef548b4c24412b794701e5a
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.py5
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py13
2 files changed, 10 insertions, 8 deletions
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py
index 28711ce5f279..ab29f7fa254e 100644
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.py
+++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py
@@ -35,8 +35,6 @@ from com.sun.star.awt.FontWeight import BOLD
class LetterDocument(TextDocument):
- TextDocument = None
-
def __init__(self, xMSF, listener):
super(LetterDocument,self).__init__(xMSF, listener, None,
"WIZARD_LIVE_PREVIEW")
@@ -175,7 +173,8 @@ class LetterDocument(TextDocument):
class BusinessPaperObject(object):
- def __init__(self, FrameText, Width, Height, XPos, YPos):
+ def __init__(self, xTextDocument, FrameText, Width, Height, XPos, YPos):
+ self.xTextDocument = xTextDocument
self.iWidth = Width
self.iHeight = Height
self.iXPos = XPos
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index b4590f1a1777..9e93916aa347 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -454,7 +454,8 @@ class LetterWizardDialogImpl(LetterWizardDialog):
if self.numLogoHeight.Value == 0:
self.numLogoHeight.Value = 0.1
self.BusCompanyLogo = BusinessPaperObject(
- "Company Logo", int(self.numLogoWidth.Value * 1000),
+ self.myLetterDoc.xTextDocument, "Company Logo",
+ int(self.numLogoWidth.Value * 1000),
int(self.numLogoHeight.Value * 1000),
int(self.numLogoX.Value * 1000),
self.numLogoY.Value * 1000)
@@ -506,7 +507,8 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.numAddressHeight.Value = 0.1
self.BusCompanyAddress = BusinessPaperObject(
- "Company Address", int(self.numAddressWidth.Value * 1000),
+ self.myLetterDoc.xTextDocument, "Company Address",
+ int(self.numAddressWidth.Value * 1000),
int(self.numAddressHeight.Value * 1000),
int(self.numAddressX.Value * 1000),
int(self.numAddressY.Value * 1000))
@@ -576,8 +578,8 @@ class LetterWizardDialogImpl(LetterWizardDialog):
xReceiverFrame, "VertOrientPosition"))
iReceiverHeight = int(0.5 * 1000)
self.BusCompanyAddressReceiver = BusinessPaperObject(
- " ", iFrameWidth, iReceiverHeight, iFrameX,
- iFrameY - iReceiverHeight)
+ self.myLetterDoc.xTextDocument, " ", iFrameWidth, iReceiverHeight,
+ iFrameX, iFrameY - iReceiverHeight)
self.setPossibleAddressReceiver(False)
except NoSuchElementException:
traceback.print_exc()
@@ -605,7 +607,8 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.numFooterHeight.Value = 0.1
self.BusFooter = BusinessPaperObject(
- "Footer", self.myLetterDoc.DocSize.Width,
+ self.myLetterDoc.xTextDocument, "Footer",
+ self.myLetterDoc.DocSize.Width,
int(self.numFooterHeight.Value * 1000), 0,
int(self.myLetterDoc.DocSize.Height - \
(self.numFooterHeight.Value * 1000)))