diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-05 16:24:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-12 11:56:41 +0200 |
commit | ff7ac85d4b657da2cd28b878325fd7c290b5c63b (patch) | |
tree | 1f7ecb1e8d7ba03b1add65df83b6ab4be4a36812 | |
parent | 298772b637b8dc8d2a1582e3ef9e6bfa4ce61997 (diff) |
convert vcl/strhelper.hxx from String to OUString
Change-Id: I1d54431dbd8c562703879a81540f62b3513e9dc9
-rw-r--r-- | include/vcl/strhelper.hxx | 6 | ||||
-rw-r--r-- | vcl/source/helper/strhelper.cxx | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/vcl/strhelper.hxx b/include/vcl/strhelper.hxx index 155e0d46d40b..078f176fdec0 100644 --- a/include/vcl/strhelper.hxx +++ b/include/vcl/strhelper.hxx @@ -28,7 +28,7 @@ namespace psp { - VCL_DLLPUBLIC String GetCommandLineToken( int, const String& ); + VCL_DLLPUBLIC OUString GetCommandLineToken( int, const OUString& ); VCL_DLLPUBLIC OString GetCommandLineToken(int, const OString&); // gets one token of a unix command line style string // doublequote, singlequote and singleleftquote protect their respective @@ -37,7 +37,7 @@ namespace psp VCL_DLLPUBLIC int GetCommandLineTokenCount(const OUString&); // returns number of tokens (zero if empty or whitespace only) - VCL_DLLPUBLIC String WhitespaceToSpace( const String&, bool bProtect = true ); + VCL_DLLPUBLIC OUString WhitespaceToSpace( const OUString&, bool bProtect = true ); VCL_DLLPUBLIC OString WhitespaceToSpace(const OString&, bool bProtect = true); // returns a string with multiple adjacent occurrences of whitespace // converted to a single space. if bProtect is sal_True (nonzero), then @@ -46,7 +46,7 @@ namespace psp // parses the first double in the string; decimal is '.' only - VCL_DLLPUBLIC inline double StringToDouble( const String& rStr ) + VCL_DLLPUBLIC inline double StringToDouble( const OUString& rStr ) { return rtl::math::stringToDouble(rStr, sal_Unicode('.'), sal_Unicode(0)); } diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 156aa00c35b9..41e82929d24a 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -111,15 +111,15 @@ inline void CopyUntil( sal_Unicode*& pTo, const sal_Unicode*& pFrom, sal_Unicode pFrom++; } -String GetCommandLineToken( int nToken, const String& rLine ) +OUString GetCommandLineToken( int nToken, const OUString& rLine ) { - int nLen = rLine.Len(); + sal_Int32 nLen = rLine.getLength(); if( ! nLen ) - return String(); + return OUString(); int nActualToken = 0; sal_Unicode* pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*( nLen + 1 ) ); - const sal_Unicode* pRun = rLine.GetBuffer(); + const sal_Unicode* pRun = rLine.getStr(); sal_Unicode* pLeap = NULL; while( *pRun && nActualToken <= nToken ) @@ -261,14 +261,14 @@ int GetCommandLineTokenCount(const OUString& rLine) return nTokenCount; } -String WhitespaceToSpace( const String& rLine, bool bProtect ) +OUString WhitespaceToSpace( const OUString& rLine, bool bProtect ) { - int nLen = rLine.Len(); + sal_Int32 nLen = rLine.getLength(); if( ! nLen ) - return String(); + return OUString(); sal_Unicode *pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*(nLen + 1) ); - const sal_Unicode *pRun = rLine.GetBuffer(); + const sal_Unicode *pRun = rLine.getStr(); sal_Unicode *pLeap = pBuffer; while( *pRun ) |