cui/source/options/optgenrl.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 3610d36782ca30aa6478921bcf331dcd7a554efb Author: Chris Copits <[email protected]> Date: Tue Sep 18 21:11:52 2012 -0400 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/673 Reviewed-by: Noel Power <[email protected]> Tested-by: Noel Power <[email protected]> diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index c82c45c..1337f4f 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -458,6 +458,13 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) for (unsigned i = 0; i != nInits; ++i) if (&vFields[rNameRow.nFirstField + i]->aEdit == pEdit) 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 if (nField < nInits && rShortName.aEdit.IsEnabled()) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
