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) ...@@ -66,7 +66,7 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
if(rEvt.GetCharCode()) if(rEvt.GetCharCode())
{ {
OUString sKey(rEvt.GetCharCode()); OUString sKey(rEvt.GetCharCode());
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey)) if( -1 != sForbiddenChars.indexOf(sKey))
bCallParent = false; bCallParent = false;
} }
if(bCallParent) if(bCallParent)
...@@ -77,9 +77,9 @@ void NoSpaceEdit::Modify() ...@@ -77,9 +77,9 @@ void NoSpaceEdit::Modify()
{ {
Selection aSel = GetSelection(); Selection aSel = GetSelection();
OUString sTemp = GetText(); 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(); sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
if(nDiff) if(nDiff)
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
* --------------------------------------------------*/ * --------------------------------------------------*/
class SW_DLLPUBLIC NoSpaceEdit : public Edit class SW_DLLPUBLIC NoSpaceEdit : public Edit
{ {
String sForbiddenChars; OUString sForbiddenChars;
protected: protected:
virtual void KeyInput( const KeyEvent& ); virtual void KeyInput( const KeyEvent& );
virtual void Modify(); virtual void Modify();
...@@ -54,8 +54,8 @@ protected: ...@@ -54,8 +54,8 @@ protected:
public: public:
NoSpaceEdit( Window* pParent ); NoSpaceEdit( Window* pParent );
virtual ~NoSpaceEdit(); virtual ~NoSpaceEdit();
void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;} void SetForbiddenChars(const OUString& rSet){sForbiddenChars = rSet;}
const String& GetForbiddenChars(){return sForbiddenChars;} const OUString& GetForbiddenChars(){return sForbiddenChars;}
}; };
/* -------------------------------------------------- /* --------------------------------------------------
......
...@@ -96,12 +96,12 @@ IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit) ...@@ -96,12 +96,12 @@ IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
// prevent from pasting illegal characters // prevent from pasting illegal characters
sal_uInt16 nLen = sTmp.Len(); sal_uInt16 nLen = sTmp.Len();
String sMsg; 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(); 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) if(sTmp.Len() != nTmpLen)
sMsg += pEdit->GetForbiddenChars().GetChar(i); sMsg += pEdit->GetForbiddenChars()[i];
} }
if(sTmp.Len() != nLen) 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