summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-28 00:17:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-29 09:56:06 +0100
commit14d2a60053e30dcb7e6956637fe8d57d18563e3f (patch)
treea395e8185afde2031fa255094ee9b0d23f11afe9 /sfx2
parent65302eb1bed16db8f06cbb048d03ba6d644b3fb6 (diff)
remove ByteString::IsAlphaNumericAscii and refactor a bit
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appdde.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index cb3f03a00321..1c93a6336e97 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -52,19 +52,22 @@
#include <sfx2/sfxsids.hrc>
#include "helper.hxx"
#include <sfx2/docfile.hxx>
+#include <comphelper/string.hxx>
//========================================================================
String SfxDdeServiceName_Impl( const String& sIn )
{
- ByteString sTemp = U2S( sIn );
- ByteString sReturn;
+ String sReturn;
- for ( sal_uInt16 n = sTemp.Len(); n; --n )
- if ( sTemp.Copy( n-1, 1 ).IsAlphaNumericAscii() )
- sReturn += sTemp.GetChar(n-1);
+ for ( sal_uInt16 n = sIn.Len(); n; --n )
+ {
+ sal_Unicode cChar = sIn.GetChar(n-1);
+ if (comphelper::string::isalnumAscii(cChar))
+ sReturn += cChar;
+ }
- return S2U( sReturn );
+ return sReturn;
}