diff options
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; } |