diff options
author | Noel Grandin <noel@peralex.com> | 2013-12-09 12:51:35 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-09 16:50:46 +0000 |
commit | ee107cd95b4e449391da5f1fe9246682bcf1e6ce (patch) | |
tree | 24e2e6e2dcdfc86045f2a3a5dea7a28a0afb0fc3 /vcl | |
parent | 8351eb25302a28c70ef5b2aaa1189db949dcf443 (diff) |
fix equalsAscii conversion. Noticed in fdo#72391
In commit 363cc397172f2b0a94d9c4dc44fc8d95072795a3
"convert equalsAsciiL calls to startWith calls where possible"
I incorrectly converted equalsAsciiL calls to startsWith calls.
This commit fixes those places to use the == OUString operator.
Change-Id: If76993baf73e3d8fb3bbcf6e8314e59fdc1207b6
Reviewed-on: https://gerrit.libreoffice.org/7008
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index fcd5e25e5985..c3b878df4b37 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -167,7 +167,7 @@ rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType ) rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW; OUString aMimeType( rMimeType.toAsciiLowerCase() ); sal_Int32 nIndex = 0; - if( aMimeType.getToken( 0, ';', nIndex ).startsWith( "text/plain" ) ) + if( aMimeType.getToken( 0, ';', nIndex ) == "text/plain" ) { if( aMimeType.getLength() == 10 ) // only "text/plain" aEncoding = RTL_TEXTENCODING_ISO_8859_1; @@ -177,7 +177,7 @@ rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType ) { OUString aToken = aMimeType.getToken( 0, ';', nIndex ); sal_Int32 nPos = 0; - if( aToken.getToken( 0, '=', nPos ).startsWith( "charset" ) ) + if( aToken.getToken( 0, '=', nPos ) == "charset" ) { OString aEncToken = OUStringToOString( aToken.getToken( 0, '=', nPos ), RTL_TEXTENCODING_ISO_8859_1 ); aEncoding = rtl_getTextEncodingFromUnixCharset( aEncToken.getStr() ); @@ -1051,7 +1051,7 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); #endif - if( rType.startsWith( "text/plain;charset=utf-16" ) ) + if( rType == "text/plain;charset=utf-16" ) { // lets see if we have UTF16 else try to find something convertible if( it->second->m_aTypes.getLength() && ! it->second->m_bHaveUTF16 ) @@ -1105,7 +1105,7 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ } } } - else if( rType.startsWith( "image/bmp" ) ) + else if( rType == "image/bmp" ) { // #i83376# try if someone has the data in image/bmp already before // doing the PIXMAP stuff (e.g. the gimp has this) @@ -1350,7 +1350,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor > pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat ); pFlavors->DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); sal_Int32 nIndex = 0; - if( pFlavors->MimeType.getToken( 0, ';', nIndex ).startsWith( "text/plain" ) ) + if( pFlavors->MimeType.getToken( 0, ';', nIndex ) == "text/plain" ) { OUString aToken(pFlavors->MimeType.getToken( 0, ';', nIndex )); // omit text/plain;charset=unicode since it is not well defined |