diff options
author | Chris Copits <ChrisCDev@live.com> | 2012-09-18 21:11:52 -0400 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-25 09:58:25 +0000 |
commit | 3610d36782ca30aa6478921bcf331dcd7a554efb (patch) | |
tree | d75264dc93e613ea2ee6d298031cf07adfb39ab7 /cui | |
parent | Fix MSVC build: #undef EXPLICIT (which gets defined as 'explicit' somewhere) (diff) | |
download | core-3610d36782ca30aa6478921bcf331dcd7a554efb.tar.gz core-3610d36782ca30aa6478921bcf331dcd7a554efb.zip |
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 <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index c82c45c300f5..1337f4f21144 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()) { |