summaryrefslogtreecommitdiff
path: root/sw/source/ui/utlui/swrenamexnameddlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-11 15:14:41 +0200
committerNoel Grandin <noel@peralex.com>2013-10-15 12:25:43 +0200
commit784634377e42d8c5d207e8a510bb7ee64a66ef9e (patch)
tree5d9d26c4c6718adee47fbc005da790bc611148cd /sw/source/ui/utlui/swrenamexnameddlg.cxx
parent511595e3bc2e557ab7a8c57db8f4b4943665edfd (diff)
convert sw/source/ui/utlui/*.cxx from String to OUString
Change-Id: I081439331c63178f8d56c2b56db50b1b1d1e23ba
Diffstat (limited to 'sw/source/ui/utlui/swrenamexnameddlg.cxx')
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 8a99e375b7c8..1fad9cdbf6f9 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -64,10 +64,10 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin,
get(m_pNewNameED, "entry");
get(m_pOk, "ok");
- String sTmp(GetText());
+ OUString sTmp(GetText());
m_pNewNameED->SetText(xNamed->getName());
m_pNewNameED->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
- sTmp += String(xNamed->getName());
+ sTmp += xNamed->getName();
SetText(sTmp);
m_pOk->SetClickHdl(LINK(this, SwRenameXNamedDlg, OkHdl));
@@ -91,30 +91,31 @@ IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl)
IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
{
- String sTmp(pEdit->GetText());
+ OUString sTmp(pEdit->GetText());
// prevent from pasting illegal characters
- sal_uInt16 nLen = sTmp.Len();
- String sMsg;
+ sal_uInt16 nLen = sTmp.getLength();
+ OUString sMsg;
for(sal_uInt16 i = 0; i < pEdit->GetForbiddenChars().getLength(); i++)
{
- sal_uInt16 nTmpLen = sTmp.Len();
+ sal_uInt16 nTmpLen = sTmp.getLength();
sTmp = comphelper::string::remove(sTmp, pEdit->GetForbiddenChars()[i]);
- if(sTmp.Len() != nTmpLen)
- sMsg += pEdit->GetForbiddenChars()[i];
+ if(sTmp.getLength() != nTmpLen)
+ sMsg += OUString(pEdit->GetForbiddenChars()[i]);
}
- if(sTmp.Len() != nLen)
+ if(sTmp.getLength() != nLen)
{
pEdit->SetText(sTmp);
- String sWarning(m_sRemoveWarning);
+ OUString sWarning(m_sRemoveWarning);
sWarning += sMsg;
InfoBox(this, sWarning).Execute();
}
- m_pOk->Enable(sTmp.Len() && !xNameAccess->hasByName(sTmp)
- && (!xSecondAccess.is() || !xSecondAccess->hasByName(sTmp))
- && (!xThirdAccess.is() || !xThirdAccess->hasByName(sTmp))
- );
+ m_pOk->Enable(!sTmp.isEmpty()
+ && !xNameAccess->hasByName(sTmp)
+ && (!xSecondAccess.is() || !xSecondAccess->hasByName(sTmp))
+ && (!xThirdAccess.is() || !xThirdAccess->hasByName(sTmp))
+ );
return 0;
}