summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-09 09:50:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-09 13:17:27 +0100
commit5089bdb234a93bcb62b597c18b8ab66048246b13 (patch)
tree0983967d89d9662b8484c88d2590cfdd7362fa43 /sw/source/ui/fldui
parent0ba03a38f022ca8d3705ae1370bb1d739e1e973f (diff)
Related: fdo#38838 remove UniString::EqualsAscii
Change-Id: I55c85c1c44452c7fb6ac40591aea7177d054affe
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r--sw/source/ui/fldui/changedb.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index aba46b36483e..e71e3988135b 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -253,19 +253,12 @@ IMPL_LINK_NOARG(SwChangeDBDlg, TreeSelectHdl)
--------------------------------------------------------------------*/
void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
{
- String sTmp(rDBData.sDataSource);
- String sName;
- sTmp += '.';
- sTmp += (String)rDBData.sCommand;
+ OUString sTmp(rDBData.sDataSource);
+ sTmp += ".";
+ sTmp += rDBData.sCommand;
- for (sal_uInt16 i = 0; i < sTmp.Len(); i++)
- {
- sName += sTmp.GetChar(i);
- if (sTmp.GetChar(i) == '~')
- sName += '~';
- }
-
- if (sName.EqualsAscii(".")) //empty
+ OUString sName(sTmp.replaceAll("~", "~~"));
+ if (sName == ".") //empty
sName = SW_RESSTR(SW_STR_NONE);
m_pDocDBNameFT->SetText(sName);