Kaydet (Commit) 30b33676 authored tarafından Andras Timar's avatar Andras Timar

mailmerge: fix salutation list

Previous state: there were two salutation lists, one for men,
one for women. But they contained not only the salutation, but
title, placeholder, and a punctuation merk. Therefore, when the user
composed a Custom Salutation, and selected a pre-defined salutation,
the result was something like for example "Dear Mr. 2, Mr. Lastname,"
instead of "Dear Mr. Lastname,".
Current state: salutation list contains only salutations. There is no
need for two lists, because the Custom Salutation is customizable
separately for men and women and it is not necessary to choose
from the list.

Change-Id: Ibb4e195401f1d01d5e63c9085b99d7acf3ef1229
üst 9e973325
......@@ -63,8 +63,7 @@
#define ST_SALUTATION (RC_DBUI_BEGIN + 13)
#define ST_PUNCTUATION (RC_DBUI_BEGIN + 14)
#define ST_TEXT (RC_DBUI_BEGIN + 15)
#define RA_SALUTATION_MALE (RC_DBUI_BEGIN + 16)
#define RA_SALUTATION_FEMALE (RC_DBUI_BEGIN + 17)
#define RA_SALUTATION (RC_DBUI_BEGIN + 16)
#define RA_PUNCTUATION (RC_DBUI_BEGIN + 18)
#define ST_TITLE_MALE (RC_DBUI_BEGIN + 19)
#define ST_TITLE_FEMALE (RC_DBUI_BEGIN + 20)
......
......@@ -571,8 +571,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
pEntry->SetUserData((void*)(sal_Int32)USER_DATA_PUNCTUATION );
pEntry = m_pAddressElementsLB->InsertEntry(OUString(SW_RES(ST_TEXT )));
pEntry->SetUserData((void*)(sal_Int32)USER_DATA_TEXT );
ResStringArray aSalutArr(SW_RES(
eType == GREETING_MALE ? RA_SALUTATION_MALE : RA_SALUTATION_FEMALE));
ResStringArray aSalutArr(SW_RES(RA_SALUTATION));
sal_uInt16 i;
for(i = 0; i < aSalutArr.Count(); ++i)
m_aSalutations.push_back(aSalutArr.GetString(i));
......
......@@ -230,24 +230,13 @@ String ST_TEXT
{
Text[ en-US ] = "Text";
};
StringArray RA_SALUTATION_MALE
StringArray RA_SALUTATION
{
ItemList [en-US]=
{
< "Dear Mr. <2>," ; > ;
< "Mr. <2>," ; > ;
< "Dear <1>," ; > ;
< "Hello <1>," ; > ;
};
};
StringArray RA_SALUTATION_FEMALE
{
ItemList [en-US]=
{
< "Dear Mrs. <2>," ; > ;
< "Ms. <2>," ; > ;
< "Dear <1>," ; > ;
< "Hello <1>," ; > ;
< "Dear" ; > ;
< "Hello" ; > ;
< "Hi" ; > ;
};
};
StringArray RA_PUNCTUATION
......
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