[Libreoffice-commits] .: cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 25 02:58:45 PDT 2012


 cui/source/options/optgenrl.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 3610d36782ca30aa6478921bcf331dcd7a554efb
Author: Chris Copits <ChrisCDev at live.com>
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 <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

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())
     {


More information about the Libreoffice-commits mailing list