diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-26 11:27:22 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-27 11:16:11 +0200 |
commit | b3a8056a499ca2a5cb809fcec52aebddd4e17f23 (patch) | |
tree | 176da629cc41ffba02616c8b8caf919da77eb9da /fpicker | |
parent | b3c860acf3a9e0806f2e4451a6f8ceb74565f57d (diff) |
Related: fdo#38838 remove UniString::SearchBackward
Change-Id: Ia474ee07b1bd411eae8cd1ddd55c4fa83dbd5f47
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index cf8d179b1ebf..c26bd0ba05d9 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -837,13 +837,13 @@ sal_Bool SvtFileDialog::createNewUserFilter( const String& _rNewFilter, sal_Bool // if the former is not allowed (_bAllowUserDefExt = <FALSE/>), we have to use the ext of the current filter // (if possible) sal_Bool bUseCurFilterExt = sal_True; - String sUserFilter = _pImp->_pUserFilter->GetType(); - xub_StrLen nSepPos = sUserFilter.SearchBackward( '.' ); - if ( STRING_NOTFOUND != nSepPos ) + OUString sUserFilter = _pImp->_pUserFilter->GetType(); + sal_Int32 nSepPos = sUserFilter.lastIndexOf( '.' ); + if ( nSepPos != -1 ) { - String sUserExt = sUserFilter.Copy( nSepPos + 1 ); - if ( ( STRING_NOTFOUND == sUserExt.Search( '*' ) ) - && ( STRING_NOTFOUND == sUserExt.Search( '?' ) ) + OUString sUserExt = sUserFilter.copy( nSepPos + 1 ); + if ( ( -1 == sUserExt.indexOf( '*' ) ) + && ( -1 == sUserExt.indexOf( '?' ) ) ) bUseCurFilterExt = sal_False; } |