diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-12-17 23:15:56 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-12-18 12:54:03 +0100 |
commit | 6f1e25133e31dbd8942e669bd658b43869f6dddc (patch) | |
tree | db2c7514c001d6cb6775204fabd85c23fe507fc2 /sc | |
parent | fa90bbb79027c89a6178c21569157ca796b8fff4 (diff) |
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: Id56046d135e7d1acdd7e705b5f0c40f71427c121
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/inc/htmlpars.hxx | 5 |
2 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 36911c3282ea..35a60721593b 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -20,7 +20,6 @@ #include <sal/config.h> #include <comphelper/string.hxx> -#include <o3tl/ptr_container.hxx> #include "scitems.hxx" #include <editeng/eeitem.hxx> @@ -83,19 +82,20 @@ void ScHTMLStyles::add(const char* pElemName, size_t nElemName, const char* pCla if (pClassName) { // Both element and class names given. - ElemsType::iterator itrElem = maElemProps.find(aElem); - if (itrElem == maElemProps.end()) + ElemsType::iterator itrElem = m_ElemProps.find(aElem); + if (itrElem == m_ElemProps.end()) { // new element std::unique_ptr<NamePropsType> p(new NamePropsType); - std::pair<ElemsType::iterator, bool> r = o3tl::ptr_container::insert(maElemProps, aElem, std::move(p)); + std::pair<ElemsType::iterator, bool> r = + m_ElemProps.insert(std::make_pair(aElem, std::move(p))); if (!r.second) // insertion failed. return; itrElem = r.first; } - NamePropsType* pClsProps = itrElem->second; + NamePropsType *const pClsProps = itrElem->second.get(); OUString aClass(pClassName, nClassName, RTL_TEXTENCODING_UTF8); aClass = aClass.toAsciiLowerCase(); insertProp(*pClsProps, aClass, aProp, aValue); @@ -123,10 +123,10 @@ const OUString& ScHTMLStyles::getPropertyValue( { // First, look into the element-class storage. { - ElemsType::const_iterator itr = maElemProps.find(rElem); - if (itr != maElemProps.end()) + auto const itr = m_ElemProps.find(rElem); + if (itr != m_ElemProps.end()) { - const NamePropsType* pClasses = itr->second; + const NamePropsType *const pClasses = itr->second.get(); NamePropsType::const_iterator itr2 = pClasses->find(rClass); if (itr2 != pClasses->end()) { diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 305afda82978..a22be4e5d412 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -27,7 +27,6 @@ #include <unordered_map> #include <vector> #include <o3tl/sorted_vector.hxx> -#include <boost/ptr_container/ptr_map.hpp> #include "rangelst.hxx" #include "eeparser.hxx" @@ -50,11 +49,11 @@ class ScHTMLStyles { typedef std::unordered_map<OUString, OUString, OUStringHash> PropsType; typedef ::std::map<OUString, std::unique_ptr<PropsType>> NamePropsType; - typedef ::boost::ptr_map<OUString, NamePropsType> ElemsType; + typedef ::std::map<OUString, std::unique_ptr<NamePropsType>> ElemsType; NamePropsType m_GlobalProps; /// global properties (for a given class for all elements) NamePropsType m_ElemGlobalProps; /// element global properties (no class specified) - ElemsType maElemProps; /// element to class to properties (both element and class are given) + ElemsType m_ElemProps; /// element to class to properties (both element and class are given) const OUString maEmpty; /// just a persistent empty string. public: ScHTMLStyles(); |