summaryrefslogtreecommitdiffstats
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-07 08:49:37 +0200
committerNoel Grandin <noel@peralex.com>2016-09-07 10:04:44 +0200
commitc158c00489d35af7f5f9278b8ee545678d6a42e5 (patch)
treeeab18b26c29210979031ef6b9ef58ce0e0575664 /ucb
parentrtf: throw early on a bad nestrow token (diff)
downloadcore-c158c00489d35af7f5f9278b8ee545678d6a42e5.tar.gz
core-c158c00489d35af7f5f9278b8ee545678d6a42e5.zip
loplugin:constantparam in framework..vbahelper
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
Diffstat (limited to 'ucb')
-rw-r--r--ucb/qa/cppunit/webdav/webdav_propfindcache.cxx2
-rw-r--r--ucb/source/inc/regexp.hxx3
-rw-r--r--ucb/source/inc/regexpmap.hxx4
-rw-r--r--ucb/source/regexp/regexp.cxx28
-rw-r--r--ucb/source/ucp/webdav-neon/PropfindCache.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/PropfindCache.hxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx2
7 files changed, 9 insertions, 36 deletions
diff --git a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
index 074f21d31eef..3dba002e9e5f 100644
--- a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
@@ -114,7 +114,7 @@ namespace
// add the cache an element
aPropsNames.setPropertiesNames( aProps );
- PropCache.addCachePropertyNames( aPropsNames, 10 );
+ PropCache.addCachePropertyNames( aPropsNames );
PropertyNames aRetPropsNames;
//test existence
diff --git a/ucb/source/inc/regexp.hxx b/ucb/source/inc/regexp.hxx
index 18b09a36393f..75b17b59789b 100644
--- a/ucb/source/inc/regexp.hxx
+++ b/ucb/source/inc/regexp.hxx
@@ -42,8 +42,7 @@ public:
inline Kind getKind() const { return m_eKind; }
- bool matches(OUString const & rString, OUString * pTranslation,
- bool * pTranslated) const;
+ bool matches(OUString const & rString) const;
OUString getRegexp() const;
diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx
index 49265e5332ab..6194b187b8dd 100644
--- a/ucb/source/inc/regexpmap.hxx
+++ b/ucb/source/inc/regexpmap.hxx
@@ -543,11 +543,11 @@ Val const * RegexpMap< Val >::map(rtl::OUString const & rString) const
typename List< Val >::const_iterator aEnd(rTheList.end());
for (typename List< Val >::const_iterator aIt(rTheList.begin()); aIt != aEnd;
++aIt)
- if (aIt->m_aRegexp.matches(rString, nullptr, nullptr))
+ if (aIt->m_aRegexp.matches(rString))
return &aIt->m_aValue;
}
if (m_pImpl->m_pDefault
- && m_pImpl->m_pDefault->m_aRegexp.matches(rString, nullptr, nullptr))
+ && m_pImpl->m_pDefault->m_aRegexp.matches(rString))
return &m_pImpl->m_pDefault->m_aValue;
return 0;
}
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index 28e59401856a..11ee8fa85f13 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -77,8 +77,7 @@ bool matchStringIgnoreCase(sal_Unicode const ** pBegin,
}
-bool Regexp::matches(OUString const & rString,
- OUString * pTranslation, bool * pTranslated) const
+bool Regexp::matches(OUString const & rString) const
{
sal_Unicode const * pBegin = rString.getStr();
sal_Unicode const * pEnd = pBegin + rString.getLength();
@@ -88,7 +87,6 @@ bool Regexp::matches(OUString const & rString,
sal_Unicode const * p = pBegin;
if (matchStringIgnoreCase(&p, pEnd, m_aPrefix))
{
- sal_Unicode const * pBlock1Begin = p;
sal_Unicode const * pBlock1End = pEnd;
sal_Unicode const * pBlock2Begin = nullptr;
@@ -133,30 +131,6 @@ bool Regexp::matches(OUString const & rString,
}
break;
}
-
- if (bMatches)
- {
- if (m_bTranslation)
- {
- if (pTranslation)
- {
- OUStringBuffer aBuffer(m_aReversePrefix);
- aBuffer.append(pBlock1Begin, pBlock1End - pBlock1Begin);
- aBuffer.append(m_aInfix);
- aBuffer.append(pBlock2Begin, pBlock2End - pBlock2Begin);
- *pTranslation = aBuffer.makeStringAndClear();
- }
- if (pTranslated)
- *pTranslated = true;
- }
- else
- {
- if (pTranslation)
- *pTranslation = rString;
- if (pTranslated)
- *pTranslated = false;
- }
- }
}
return bMatches;
diff --git a/ucb/source/ucp/webdav-neon/PropfindCache.cxx b/ucb/source/ucp/webdav-neon/PropfindCache.cxx
index 095273a1cd63..b854e6fda323 100644
--- a/ucb/source/ucp/webdav-neon/PropfindCache.cxx
+++ b/ucb/source/ucp/webdav-neon/PropfindCache.cxx
@@ -86,13 +86,13 @@ namespace webdav_ucp
}
}
- void PropertyNamesCache::addCachePropertyNames( PropertyNames& rCacheElement, const sal_uInt32 nLifeTime )
+ void PropertyNamesCache::addCachePropertyNames( PropertyNames& rCacheElement )
{
osl::MutexGuard aGuard( m_aMutex );
OUString aURL( rCacheElement.getURL() );
TimeValue t1;
osl_getSystemTime( &t1 );
- rCacheElement.setStaleTime( t1.Seconds + nLifeTime );
+ rCacheElement.setStaleTime( t1.Seconds + 10 );
m_aTheCache[ aURL ] = rCacheElement;
}
diff --git a/ucb/source/ucp/webdav-neon/PropfindCache.hxx b/ucb/source/ucp/webdav-neon/PropfindCache.hxx
index f01e6522db61..99ca5c65a7d3 100644
--- a/ucb/source/ucp/webdav-neon/PropfindCache.hxx
+++ b/ucb/source/ucp/webdav-neon/PropfindCache.hxx
@@ -73,7 +73,7 @@ namespace webdav_ucp
bool getCachedPropertyNames( const OUString& URL, PropertyNames& rCacheElement );
void removeCachedPropertyNames( const OUString& URL );
- void addCachePropertyNames( PropertyNames& rCacheElement, const sal_uInt32 nLifeTime );
+ void addCachePropertyNames( PropertyNames& rCacheElement );
};
}
diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
index e51fdb50d845..eaa586c7e577 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
@@ -338,7 +338,7 @@ uno::Sequence< beans::Property > Content::getProperties(
xResAccess->PROPFIND( DAVZERO, props, xEnv );
aPropsNames.setPropertiesNames( props );
- aStaticPropertyNamesCache.addCachePropertyNames( aPropsNames, 10 );
+ aStaticPropertyNamesCache.addCachePropertyNames( aPropsNames );
}
else
{