summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
authorChris Copits <ChrisCDev@live.com>2012-09-18 21:11:52 -0400
committerNoel Power <noel.power@suse.com>2012-09-25 09:58:25 +0000
commit3610d36782ca30aa6478921bcf331dcd7a554efb (patch)
treed75264dc93e613ea2ee6d298031cf07adfb39ab7 /cui/source/options
parenteebc9748d2ea26a7b5af246dba115103d6bb15db (diff)
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/source/options')
-rw-r--r--cui/source/options/optgenrl.cxx7
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())
{