summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpicker/source/office/contentenumeration.cxx4
-rw-r--r--fpicker/source/office/contentenumeration.hxx2
-rw-r--r--fpicker/source/office/iodlg.cxx10
3 files changed, 8 insertions, 8 deletions
diff --git a/fpicker/source/office/contentenumeration.cxx b/fpicker/source/office/contentenumeration.cxx
index 737808e10b62..5b74719a3f6e 100644
--- a/fpicker/source/office/contentenumeration.cxx
+++ b/fpicker/source/office/contentenumeration.cxx
@@ -306,9 +306,9 @@ namespace svt
}
- bool FileViewContentEnumerator::URLOnDenyList ( const OUString& sRealURL )
+ bool FileViewContentEnumerator::URLOnDenyList ( std::u16string_view sRealURL )
{
- OUString entryName = sRealURL.copy( sRealURL.lastIndexOf( '/' ) + 1 );
+ std::u16string_view entryName = sRealURL.substr( sRealURL.rfind( '/' ) + 1 );
return comphelper::findValue(m_rDenyList, entryName) != -1;
}
diff --git a/fpicker/source/office/contentenumeration.hxx b/fpicker/source/office/contentenumeration.hxx
index bc2180c53c47..68277e6a4830 100644
--- a/fpicker/source/office/contentenumeration.hxx
+++ b/fpicker/source/office/contentenumeration.hxx
@@ -172,7 +172,7 @@ namespace svt
css::uno::Sequence< OUString > m_rDenyList;
- bool URLOnDenyList ( const OUString& sRealURL );
+ bool URLOnDenyList ( std::u16string_view sRealURL );
public:
/** constructs an enumerator instance
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 4090189a3cf6..d41bbab8b252 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -127,18 +127,18 @@ namespace
}
- OUString GetFsysExtension_Impl( const OUString& rFile, const OUString& rLastFilterExt )
+ OUString GetFsysExtension_Impl( std::u16string_view rFile, const OUString& rLastFilterExt )
{
- sal_Int32 nDotPos = rFile.lastIndexOf( '.' );
- if ( nDotPos != -1 )
+ size_t nDotPos = rFile.rfind( '.' );
+ if ( nDotPos != std::u16string_view::npos )
{
if ( !rLastFilterExt.isEmpty() )
{
- if ( o3tl::equalsIgnoreAsciiCase(rFile.subView( nDotPos + 1 ), rLastFilterExt ) )
+ if ( o3tl::equalsIgnoreAsciiCase(rFile.substr( nDotPos + 1 ), rLastFilterExt ) )
return rLastFilterExt;
}
else
- return rFile.copy( nDotPos );
+ return OUString(rFile.substr( nDotPos ));
}
return OUString();
}