Kaydet (Commit) c9228985 authored tarafından Noel Grandin's avatar Noel Grandin

convert sw/source/ui/inc/a*.hxx from String to OUString

Change-Id: I6875504bd979addd5df2ece596a4f718ad491581
üst 51a30356
......@@ -66,7 +66,7 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
if(rEvt.GetCharCode())
{
OUString sKey(rEvt.GetCharCode());
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
if( -1 != sForbiddenChars.indexOf(sKey))
bCallParent = false;
}
if(bCallParent)
......@@ -77,9 +77,9 @@ void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
OUString sTemp = GetText();
for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
for(sal_uInt16 i = 0; i < sForbiddenChars.getLength(); i++)
{
sTemp = comphelper::string::remove(sTemp, sForbiddenChars.GetChar(i));
sTemp = comphelper::string::remove(sTemp, sForbiddenChars[i]);
}
sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
if(nDiff)
......
......@@ -46,7 +46,7 @@ public:
* --------------------------------------------------*/
class SW_DLLPUBLIC NoSpaceEdit : public Edit
{
String sForbiddenChars;
OUString sForbiddenChars;
protected:
virtual void KeyInput( const KeyEvent& );
virtual void Modify();
......@@ -54,8 +54,8 @@ protected:
public:
NoSpaceEdit( Window* pParent );
virtual ~NoSpaceEdit();
void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
const String& GetForbiddenChars(){return sForbiddenChars;}
void SetForbiddenChars(const OUString& rSet){sForbiddenChars = rSet;}
const OUString& GetForbiddenChars(){return sForbiddenChars;}
};
/* --------------------------------------------------
......
......@@ -96,12 +96,12 @@ IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
// prevent from pasting illegal characters
sal_uInt16 nLen = sTmp.Len();
String sMsg;
for(sal_uInt16 i = 0; i < pEdit->GetForbiddenChars().Len(); i++)
for(sal_uInt16 i = 0; i < pEdit->GetForbiddenChars().getLength(); i++)
{
sal_uInt16 nTmpLen = sTmp.Len();
sTmp = comphelper::string::remove(sTmp, pEdit->GetForbiddenChars().GetChar(i));
sTmp = comphelper::string::remove(sTmp, pEdit->GetForbiddenChars()[i]);
if(sTmp.Len() != nTmpLen)
sMsg += pEdit->GetForbiddenChars().GetChar(i);
sMsg += pEdit->GetForbiddenChars()[i];
}
if(sTmp.Len() != nLen)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment