Kaydet (Commit) e5f040bf authored tarafından Xisco Fauli's avatar Xisco Fauli

pyletter: Fix letterhead

Change-Id: I73977b203778dca42ef548b4c24412b794701e5a
üst 4fa0236f
......@@ -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
......
......@@ -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)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment