diff options
Diffstat (limited to 'ucb/source/inc/regexpmap.hxx')
-rw-r--r-- | ucb/source/inc/regexpmap.hxx | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index bf74e2aa959b..b8e6bced97ef 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -378,10 +378,9 @@ public: RegexpMap & operator =(RegexpMap const & rOther); - void add(OUString const & rKey, Val const & rValue, bool bOverwrite, - OUString * pReverse = nullptr); + void add(OUString const & rKey, Val const & rValue, bool bOverwrite); - iterator find(OUString const & rKey, OUString * pReverse = nullptr); + iterator find(OUString const & rKey); void erase(iterator const & rPos); @@ -396,7 +395,7 @@ public: size_type size() const; Val const * map(OUString const & rString, - OUString * pTranslation = nullptr, bool * pTranslated = nullptr) + OUString * pTranslation = nullptr) const; private: @@ -428,7 +427,7 @@ RegexpMap< Val > & RegexpMap< Val >::operator =(RegexpMap const & rOther) template< typename Val > void RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, - bool bOverwrite, rtl::OUString * pReverse) + bool bOverwrite) { Regexp aRegexp(Regexp::parse(rKey)); @@ -463,20 +462,13 @@ void RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, rTheList.push_back(Entry< Val >(aRegexp, rValue)); } - - if (pReverse) - *pReverse = aRegexp.getRegexp(true); } template< typename Val > -typename RegexpMap< Val >::iterator RegexpMap< Val >::find(rtl::OUString const & rKey, - rtl::OUString * pReverse) +typename RegexpMap< Val >::iterator RegexpMap< Val >::find(rtl::OUString const & rKey) { Regexp aRegexp(Regexp::parse(rKey)); - if (pReverse) - *pReverse = aRegexp.getRegexp(true); - if (aRegexp.isDefault()) { if (m_pImpl->m_pDefault) @@ -554,8 +546,7 @@ typename RegexpMap< Val >::size_type RegexpMap< Val >::size() const template< typename Val > Val const * RegexpMap< Val >::map(rtl::OUString const & rString, - rtl::OUString * pTranslation, - bool * pTranslated) const + rtl::OUString * pTranslation) const { for (int n = Regexp::KIND_DOMAIN; n >= Regexp::KIND_PREFIX; --n) { @@ -564,12 +555,12 @@ Val const * RegexpMap< Val >::map(rtl::OUString const & rString, 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, pTranslation, pTranslated)) + if (aIt->m_aRegexp.matches(rString, pTranslation, nullptr)) return &aIt->m_aValue; } if (m_pImpl->m_pDefault && m_pImpl->m_pDefault->m_aRegexp.matches(rString, pTranslation, - pTranslated)) + nullptr)) return &m_pImpl->m_pDefault->m_aValue; return 0; } |