cui/source/options/optgenrl.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit ca538f48e866b4eb69b498786d9030639cfe2ebd Author: Ivan Timofeev <timofeev....@gmail.com> Date: Sun Aug 18 21:43:52 2013 +0400 fix updating of initials for the Russians i.e. replace hardcoded "2" by nInits var. For the Russians nInits == 3. Also move the code block to the more appropriate place. Change-Id: I1cbc6b14dc5e4c04516c0d3952920ee060c81afc diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index a3f25e0..5dacdf6 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -361,17 +361,16 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) { if (vFields[rNameRow.nFirstField + i]->pEdit == pEdit) nField = i; - // Since middle names are not supported, clear shortname if it - // contains a middle initial - if (OUString(rShortName.pEdit->GetText()).getLength() > 2) - { - rShortName.pEdit->SetText(OUString()); - } } // updating the initial if (nField < nInits && rShortName.pEdit->IsEnabled()) { OUString sShortName = rShortName.pEdit->GetText(); + // clear short name if it contains more characters than the number of initials + if ((unsigned)sShortName.getLength() > nInits) + { + rShortName.pEdit->SetText(OUString()); + } while ((unsigned)sShortName.getLength() < nInits) sShortName += OUString(' '); OUString sName = pEdit->GetText(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits