summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx')
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index f83e861e9706..183f429e909c 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -399,18 +399,17 @@ void FilterEntry::getSubFilters( css::uno::Sequence< css::beans::StringPair >& _
}
static bool
-isFilterString( const OUString &rFilterString, const char *pMatch )
+isFilterString( std::u16string_view rFilterString, const char *pMatch )
{
sal_Int32 nIndex = 0;
- OUString aToken;
bool bIsFilter = true;
OUString aMatch(OUString::createFromAscii(pMatch));
do
{
- aToken = rFilterString.getToken( 0, ';', nIndex );
- if( !aToken.match( aMatch ) )
+ std::u16string_view aToken = o3tl::getToken(rFilterString, 0, ';', nIndex );
+ if( !o3tl::starts_with(aToken, aMatch) )
{
bIsFilter = false;
break;
@@ -439,11 +438,11 @@ shrinkFilterName( const OUString &rFilterName, bool bAllowNoStar = false )
nBracketLen = nBracketEnd - i;
if( nBracketEnd <= 0 )
continue;
- if( isFilterString( rFilterName.copy( i + 1, nBracketLen - 1 ), "*." ) )
+ if( isFilterString( rFilterName.subView( i + 1, nBracketLen - 1 ), "*." ) )
aRealName = aRealName.replaceAt( i, nBracketLen + 1, u"" );
else if (bAllowNoStar)
{
- if( isFilterString( rFilterName.copy( i + 1, nBracketLen - 1 ), ".") )
+ if( isFilterString( rFilterName.subView( i + 1, nBracketLen - 1 ), ".") )
aRealName = aRealName.replaceAt( i, nBracketLen + 1, u"" );
}
}