Ask Your Question
1

Change address in letter template for Writer [closed]

asked 2013-01-30 16:54:53 +0100

chausel gravatar image

updated 2015-10-21 04:29:43 +0100

Alex Kemp gravatar image

Hello!

I need your help in how to change the address fields in writer. I don't seem to understand the way LO want's this to be handled. It actually drives me nuts.

So:

  • I open File/Wizards/letter
  • next
  • next
  • now I am at Step number 4, Recipient and Sender
    • I choose new sender Address (and fill it in)
  • next
  • Finish

I now expect a letter with the new address to be generated. Instead my old address (the information that you find under /Tools/options/user data) is filled in.

Even if I choose to save the template in an .ott file and open it I get the same results.

I don't get it. Is this really the way it is meant to be? This seems so wrong!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-21 04:30:26.735018

4 Answers

Sort by » oldest newest most voted
0

answered 2013-02-03 18:28:54 +0100

chausel gravatar image

Hi,

there is already a Bug open for this. [ https://bugs.freedesktop.org/show_bug... ] I posted the content of my last post here.

Lets see what will happen (this maybe trivial bug is open since 2011.06 ...)

edit flag offensive delete link more

Comments

For the record: this bug has been fixed by now.

nighthome gravatar imagenighthome ( 2014-02-16 13:27:22 +0100 )edit
0

answered 2013-01-31 22:20:08 +0100

chausel gravatar image

Hi!

i just looked a little bit further and found this code inside the file LetterWizardDialogImpl.py (look at end of post). It looks to me like there could be an error in the function txtSenderNameTextChanged(self). There a field "Company" is changed when the "Name" should be changed. At least it doesn't look as the other functions work. Look at "Street" and "City". Maybe that causes the generated document not to change the address as it should.

def txtSenderNameTextChanged(self):
    myFieldHandler = TextFieldHandler(
        self.myLetterDoc.xMSF, TextDocument.xTextDocument)
    myFieldHandler.changeUserFieldContent(
        "Company", self.txtSenderName.Text)

def txtSenderStreetTextChanged(self):
    myFieldHandler = TextFieldHandler(
        self.myLetterDoc.xMSF, TextDocument.xTextDocument)
    myFieldHandler.changeUserFieldContent(
        "Street", self.txtSenderStreet.Text)

def txtSenderCityTextChanged(self):
    myFieldHandler = TextFieldHandler(
        self.myLetterDoc.xMSF, TextDocument.xTextDocument)
    myFieldHandler.changeUserFieldContent(
        "City", self.txtSenderCity.Text)
edit flag offensive delete link more
0

answered 2013-01-31 21:34:14 +0100

chausel gravatar image

Hi Mariosv,

thank you for your reply. My version is Version 3.6.4.3 (Build ID: 2ef5aff) running on Ubuntu 12.04.1 with a OpenJDK Runtime Environment (IcedTea7 2.3.4).

I checked out your template and it works for me too.

I use(d) the "Formal personal letter" design and there just the "Name" field isn't updated correctly. I was misled in my observation that "my address under /Tools/options/user" was filled in because I wrote a letter for my daughter (and she lives at the same address). It have overseen the fact that I had filled out the fields for Street etc. by myself.

So the only error I see so far is that the "Name" field isn't updated.

Maybe the cause is somewhere in the sourcecode, but I am not able to really understand whats going on there (If it is the right place I have found: /libreoffice-core-3.6.5.2/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py:

def buildStep4(self):
    self.optSenderPlaceholder = self.insertRadioButton(
        "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
        (PropertyNames.PROPERTY_HEIGHT,
            PropertyNames.PROPERTY_HELPURL,
            PropertyNames.PROPERTY_LABEL,
            PropertyNames.PROPERTY_NAME,
            PropertyNames.PROPERTY_POSITION_X,
            PropertyNames.PROPERTY_POSITION_Y,
            PropertyNames.PROPERTY_STEP,
            PropertyNames.PROPERTY_TABINDEX,
            PropertyNames.PROPERTY_WIDTH),
        (8, HelpIds.getHelpIdString(HID + 32),
            self.resources.resoptSenderPlaceholder_value,
            "optSenderPlaceholder", 104, 42, 4, 32, 149), self)
    self.optSenderDefine = self.insertRadioButton(
        "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
        (PropertyNames.PROPERTY_HEIGHT,
            PropertyNames.PROPERTY_HELPURL,
            PropertyNames.PROPERTY_LABEL,
            PropertyNames.PROPERTY_NAME,
            PropertyNames.PROPERTY_POSITION_X,
            PropertyNames.PROPERTY_POSITION_Y,
            PropertyNames.PROPERTY_STEP,
            PropertyNames.PROPERTY_TABINDEX,
            PropertyNames.PROPERTY_WIDTH),
        (8, HelpIds.getHelpIdString(HID + 33),
            self.resources.resoptSenderDefine_value,
            "optSenderDefine", 104, 54, 4, 33, 149), self)
    self.txtSenderName = self.insertTextField(
        "txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
        (PropertyNames.PROPERTY_HEIGHT,
            PropertyNames.PROPERTY_HELPURL,
            PropertyNames.PROPERTY_NAME,
            PropertyNames.PROPERTY_POSITION_X,
            PropertyNames.PROPERTY_POSITION_Y,
            PropertyNames.PROPERTY_STEP,
            PropertyNames.PROPERTY_TABINDEX,
            PropertyNames.PROPERTY_WIDTH),
        (12, HelpIds.getHelpIdString(HID + 34),
            "txtSenderName", 182, 67, 4, 34, 119), self)
    self.txtSenderStreet = self.insertTextField(
        "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
        (PropertyNames.PROPERTY_HEIGHT,
            PropertyNames.PROPERTY_HELPURL,
            PropertyNames.PROPERTY_NAME,
            PropertyNames.PROPERTY_POSITION_X,
            PropertyNames.PROPERTY_POSITION_Y,
            PropertyNames.PROPERTY_STEP,
            PropertyNames.PROPERTY_TABINDEX,
            PropertyNames.PROPERTY_WIDTH),
        (12, HelpIds.getHelpIdString(HID + 35),
            "txtSenderStreet", 182, 81, 4, 35, 119), self)
edit flag offensive delete link more
0

answered 2013-01-30 22:28:10 +0100

m.a.riosv gravatar image

Hi chausel, I can not see this issue. What is you Operating System and you LibreOffice version. This is what I get with LibreOffice 3.6.5.2 Win7x64 image description

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-30 16:54:53 +0100

Seen: 431 times

Last updated: Feb 03 '13