Kaydet (Commit) 3610d367 authored tarafından Chris Copits's avatar Chris Copits Kaydeden (comit) Noel Power

fdo#43497 Editing the first or last name clears initials.

Since middle names are not supported, editing the first name or last name will clear the initials if more than two initials are used. Specifically, the change was made to ModifyHdl_Impl() / IMPL_LINK() in optgenrl.cxx.

Change-Id: I067ad4701cee9077c500f4e8b3870db24e158cc3
Reviewed-on: https://gerrit.libreoffice.org/673Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst eebc9748
...@@ -458,6 +458,13 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) ...@@ -458,6 +458,13 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
for (unsigned i = 0; i != nInits; ++i) for (unsigned i = 0; i != nInits; ++i)
if (&vFields[rNameRow.nFirstField + i]->aEdit == pEdit) if (&vFields[rNameRow.nFirstField + i]->aEdit == pEdit)
nField = i; nField = i;
// Since middle names are not supported, clear shortname if it
// contains a middle initial
if (rtl::OUString(rShortName.aEdit.GetText()).getLength() > 2)
{
rtl::OUString sEmptyString;
rShortName.aEdit.SetText(sEmptyString);
}
// updating the initial // updating the initial
if (nField < nInits && rShortName.aEdit.IsEnabled()) if (nField < nInits && rShortName.aEdit.IsEnabled())
{ {
......
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