diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-07-15 20:41:18 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-07-15 22:28:42 -0500 |
commit | ec243f43411290bb7f56176e29cb92929dab2953 (patch) | |
tree | 78d1e3d4b0e86b1246f035ca60f94b29e5254f84 /tools | |
parent | 578969c51cb7b012fb522d4296c8069a611de29d (diff) |
Revert "tools: replace boost::ptr_vector with std::unordered_map"
This reverts commit 218be53fe00aebed43df0b041de609b30f99ce95.
MacOSX breaker
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/inet/inetmime.cxx | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 88e2cf9876db..bfb06b814dc5 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -257,7 +257,7 @@ bool parseParameters(ParameterList const & rInput, INetContentTypeParameterList * pOutput) { if (pOutput) - pOutput->clear(); + pOutput->Clear(); Parameter * pPrev = 0; for (Parameter * p = rInput.m_pList; p; p = p->m_pNext) @@ -335,14 +335,11 @@ bool parseParameters(ParameterList const & rInput, break; }; } - auto const ret = pOutput->insert(std::make_pair(p->m_aAttribute, - INetContentTypeParameter(p->m_aAttribute, + pOutput->Append(new INetContentTypeParameter(p->m_aAttribute, p->m_aCharset, p->m_aLanguage, aValue, - !bBadEncoding))); - SAL_INFO_IF(!ret.second, "tools", - "INetMIME: dropping duplicate parameter: " << p->m_aAttribute); + !bBadEncoding)); p = pNext; } return true; @@ -3741,4 +3738,24 @@ INetMIMEEncodedWordOutputSink::WriteUInt32(sal_uInt32 nChar) return *this; } +// INetContentTypeParameterList + +void INetContentTypeParameterList::Clear() +{ + maEntries.clear(); +} + +const INetContentTypeParameter * +INetContentTypeParameterList::find(const OString& rAttribute) const +{ + boost::ptr_vector<INetContentTypeParameter>::const_iterator iter; + for (iter = maEntries.begin(); iter != maEntries.end(); ++iter) + { + if (iter->m_sAttribute.equalsIgnoreAsciiCase(rAttribute)) + return &(*iter); + } + + return NULL; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |