diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-26 10:44:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:02 +0000 |
commit | 48221d6a2bf4c327b6cadcdc65169997f7d7408d (patch) | |
tree | c55de0fd2abb2e2729540d98a02f87dd38b7a526 /vcl | |
parent | afb548ba6962c74ae99350bad0bd2c72c9ddd998 (diff) |
ByteString::GetToken->comphelper::string::getToken
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 7 | ||||
-rw-r--r-- | vcl/generic/print/common_gfx.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index c0d2a5dda168..c04874100e26 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -102,6 +102,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; using namespace com::sun::star::lang; +using ::comphelper::string::getToken; using ::rtl::OUString; using ::rtl::OString; using ::rtl::OStringHash; @@ -2991,8 +2992,8 @@ OUString PrintFontManager::getFontXLFD( fontID nFontID ) const OUString aRet; if( pFont ) { - ByteString aXLFD( getXLFD( pFont ) ); - rtl_TextEncoding aEncoding = aXLFD.GetToken( 6, '-' ).Search( "utf8" ) != STRING_NOTFOUND ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1; + OString aXLFD( getXLFD( pFont ) ); + rtl_TextEncoding aEncoding = getToken(aXLFD, 6, '-').indexOf( "utf8" ) != -1 ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1; aRet = OStringToOUString( aXLFD, aEncoding ); } return aRet; @@ -3383,7 +3384,7 @@ bool PrintFontManager::checkChangeFontPropertiesPossible( fontID /*nFontID*/ ) c bool PrintFontManager::changeFontProperties( fontID nFontID, const ::rtl::OUString& rXLFD ) { ByteString aXLFD( OUStringToOString( rXLFD, RTL_TEXTENCODING_UTF8 ) ); - ByteString aAddStyle = aXLFD.GetToken( '-', 6 ); + ByteString aAddStyle = comphelper::string::getToken(aXLFD, '-', 6); if( aAddStyle.Search( "utf8" ) == STRING_NOTFOUND ) { aAddStyle.Append( aAddStyle.Len() ? ";utf8" : "utf8" ); diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index 6c5525d2e5e7..43c2cbb27c8b 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -30,6 +30,7 @@ #include "psputil.hxx" #include "glyphset.hxx" +#include <comphelper/string.hxx> #include "generic/printergfx.hxx" #include "generic/printerjob.hxx" #include "vcl/fontmanager.hxx" @@ -1205,7 +1206,7 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize { if( aLine.CompareIgnoreCaseToAscii( "%%BoundingBox:", 14 ) == COMPARE_EQUAL ) { - aLine = WhitespaceToSpace( aLine.GetToken( 1, ':' ) ); + aLine = WhitespaceToSpace( comphelper::string::getToken(aLine, 1, ':') ); if( aLine.Len() && aLine.Search( "atend" ) == STRING_NOTFOUND ) { fLeft = StringToDouble( GetCommandLineToken( 0, aLine ) ); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 867cca5edc01..1fde94972895 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -978,7 +978,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines ) if( aCurrentLine.GetChar(1) == '%' ) continue; - ByteString aKey = GetCommandLineToken( 0, aCurrentLine.GetToken( 0, ':' ) ); + ByteString aKey = GetCommandLineToken( 0, comphelper::string::getToken(aCurrentLine, 0, ':') ); int nPos = aKey.Search( '/' ); if( nPos != STRING_NOTFOUND ) aKey.Erase( nPos ); |