summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-19 09:39:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-19 11:04:14 +0200
commitfa1d3e093208c9d7a8e645566f538573f31b4762 (patch)
treecd9c73e24e931ad632ff0b17a90c80d95cc4e0fc /cui
parent80062928084abf0cdf506dbe744fb1187006c0ab (diff)
Use explicit OUString::copy(0, 1) rather than odd OUString::getChar
...on a string potentially of length > 1 Change-Id: Ibdb8c3bb6e1630883069ff7dd17161014548ee76
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgenrl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index ad9ed8ba180b..788ce72921e1 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -380,7 +380,8 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
while ((unsigned)sShortName.getLength() < nInits)
sShortName += OUString(' ');
OUString sName = pEdit->GetText();
- OUString sLetter = OUString(sName.getLength() ? sName.toChar() : ' ');
+ OUString sLetter = sName.isEmpty()
+ ? OUString(sal_Unicode(' ')) : sName.copy(0, 1);
rShortName.pEdit->SetText(sShortName.replaceAt(nField, 1, sLetter).trim());
}
return 0;