diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-02 23:08:39 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-10-02 23:31:28 +0200 |
commit | b1c47274ecb01752863b8967e63f2ad7771928e9 (patch) | |
tree | 5eb1aba5a38281eee5d64fe1c6276132dcc626dc /sw | |
parent | 2cf9bc80fb472004c8c30a80a2ac0724089461e5 (diff) |
sw: replace boost::ptr_vector with std::vector
Change-Id: Ib3dbe824bd4e747981b69851c6186fd57402ed23
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/authfld.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/fields/authfld.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/gloshdl.cxx | 3 |
4 files changed, 13 insertions, 7 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index 3cabd5cdeead..845bcc3c032c 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -22,7 +22,6 @@ #include "swdllapi.h" #include <fldbas.hxx> #include <toxe.hxx> -#include <boost/ptr_container/ptr_vector.hpp> #include <sal/log.hxx> #include <memory> @@ -56,7 +55,7 @@ struct SwTOXSortKey }; class SwAuthorityField; -typedef boost::ptr_vector<SwTOXSortKey> SortKeyArr; +typedef std::vector<SwTOXSortKey> SortKeyArr; typedef std::vector<std::unique_ptr<SwAuthEntry>> SwAuthDataArr; class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 365cc6aed2a1..c7df4937877e 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -436,23 +436,23 @@ bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) for(sal_Int32 i = 0; i < aSeq.getLength() && i < USHRT_MAX / 4; i++) { const PropertyValue* pValue = pValues[i].getConstArray(); - SwTOXSortKey* pSortKey = new SwTOXSortKey; + SwTOXSortKey aSortKey; for(sal_Int32 j = 0; j < pValues[i].getLength(); j++) { if(pValue[j].Name == UNO_NAME_SORT_KEY) { sal_Int16 nVal = -1; pValue[j].Value >>= nVal; if(nVal >= 0 && nVal < AUTH_FIELD_END) - pSortKey->eField = (ToxAuthorityField) nVal; + aSortKey.eField = (ToxAuthorityField) nVal; else bRet = false; } else if(pValue[j].Name == UNO_NAME_IS_SORT_ASCENDING) { - pSortKey->bSortAscending = *static_cast<sal_Bool const *>(pValue[j].Value.getValue()); + aSortKey.bSortAscending = *static_cast<sal_Bool const *>(pValue[j].Value.getValue()); } } - m_SortKeyArr.push_back(pSortKey); + m_SortKeyArr.push_back(aSortKey); } } } @@ -488,7 +488,7 @@ void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[ m_SortKeyArr.clear(); for(sal_uInt16 i = 0; i < nKeyCount; i++) if(aKeys[i].eField < AUTH_FIELD_END) - m_SortKeyArr.push_back(new SwTOXSortKey(aKeys[i])); + m_SortKeyArr.push_back(SwTOXSortKey(aKeys[i])); } SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType, diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 19b39c8fed5d..f5ac0fc764e8 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -78,6 +78,10 @@ #include <sfx2/app.hxx> #include <unomid.h> + +#include <boost/ptr_container/ptr_vector.hpp> + + using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index d3d541ce61cf..6050cf665263 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -58,6 +58,9 @@ #include <misc.hrc> #include <IDocumentFieldsAccess.hxx> + +#include <boost/ptr_container/ptr_vector.hpp> + #include <memory> using namespace ::com::sun::star; |