[Libreoffice-commits] core.git: fpicker/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 30 07:17:30 UTC 2017
fpicker/source/aqua/FilterHelper.mm | 6 ++----
fpicker/source/aqua/SalAquaFilePicker.mm | 4 +---
2 files changed, 3 insertions(+), 7 deletions(-)
New commits:
commit c1845e4970143e5f8d8d6386c297319c2185d3a4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 30 09:17:06 2017 +0200
loplugin:oncevar
Change-Id: If1f4f8136368349777c6fb616328cfa89efd9e0f
diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm
index 2eb54b0d94b9..f71ea106dcfa 100644
--- a/fpicker/source/aqua/FilterHelper.mm
+++ b/fpicker/source/aqua/FilterHelper.mm
@@ -304,9 +304,8 @@ void SAL_CALL FilterHelper::appendFilterGroup( const ::rtl::OUString& /* sGroupT
// append the filter
if (bPrependSeparator) {
- rtl::OUString dash("-");
OUStringList emptyList;
- m_pFilterList->push_back(FilterEntry(dash, emptyList));
+ m_pFilterList->push_back(FilterEntry("-", emptyList));
}
const css::beans::StringPair* pSubFilters = aFilters.getConstArray();
@@ -347,9 +346,8 @@ bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
{
rtl::OUString aName = [sFilename OUString];
- rtl::OUString allMatcher(".*");
for(OUStringList::iterator iter = suffixList.begin(); iter != suffixList.end(); iter++) {
- if (aName.matchIgnoreAsciiCase(*iter, aName.getLength() - (*iter).getLength()) || ((*iter).equals(allMatcher))) {
+ if (*iter == ".*" || aName.endsWithIgnoreAsciiCase(*iter)) {
return true;
}
}
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index 1e8de0e13113..e576844149e8 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -293,9 +293,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles()
}
#endif
- InfoType info = FULLPATH;
-
- OUString sFileOrDirURL = [url OUStringForInfo:info];
+ OUString sFileOrDirURL = [url OUStringForInfo:FULLPATH];
aSelectedFiles[nIndex] = sFileOrDirURL;
}
More information about the Libreoffice-commits
mailing list