Kaydet (Commit) b1c47274 authored tarafından Michael Stahl's avatar Michael Stahl

sw: replace boost::ptr_vector with std::vector

Change-Id: Ib3dbe824bd4e747981b69851c6186fd57402ed23
üst 2cf9bc80
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "swdllapi.h" #include "swdllapi.h"
#include <fldbas.hxx> #include <fldbas.hxx>
#include <toxe.hxx> #include <toxe.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <memory> #include <memory>
...@@ -56,7 +55,7 @@ struct SwTOXSortKey ...@@ -56,7 +55,7 @@ struct SwTOXSortKey
}; };
class SwAuthorityField; class SwAuthorityField;
typedef boost::ptr_vector<SwTOXSortKey> SortKeyArr; typedef std::vector<SwTOXSortKey> SortKeyArr;
typedef std::vector<std::unique_ptr<SwAuthEntry>> SwAuthDataArr; typedef std::vector<std::unique_ptr<SwAuthEntry>> SwAuthDataArr;
class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
......
...@@ -436,23 +436,23 @@ bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) ...@@ -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++) for(sal_Int32 i = 0; i < aSeq.getLength() && i < USHRT_MAX / 4; i++)
{ {
const PropertyValue* pValue = pValues[i].getConstArray(); const PropertyValue* pValue = pValues[i].getConstArray();
SwTOXSortKey* pSortKey = new SwTOXSortKey; SwTOXSortKey aSortKey;
for(sal_Int32 j = 0; j < pValues[i].getLength(); j++) for(sal_Int32 j = 0; j < pValues[i].getLength(); j++)
{ {
if(pValue[j].Name == UNO_NAME_SORT_KEY) if(pValue[j].Name == UNO_NAME_SORT_KEY)
{ {
sal_Int16 nVal = -1; pValue[j].Value >>= nVal; sal_Int16 nVal = -1; pValue[j].Value >>= nVal;
if(nVal >= 0 && nVal < AUTH_FIELD_END) if(nVal >= 0 && nVal < AUTH_FIELD_END)
pSortKey->eField = (ToxAuthorityField) nVal; aSortKey.eField = (ToxAuthorityField) nVal;
else else
bRet = false; bRet = false;
} }
else if(pValue[j].Name == UNO_NAME_IS_SORT_ASCENDING) 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[ ...@@ -488,7 +488,7 @@ void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[
m_SortKeyArr.clear(); m_SortKeyArr.clear();
for(sal_uInt16 i = 0; i < nKeyCount; i++) for(sal_uInt16 i = 0; i < nKeyCount; i++)
if(aKeys[i].eField < AUTH_FIELD_END) 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, SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
......
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
#include <unomid.h> #include <unomid.h>
#include <boost/ptr_container/ptr_vector.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
......
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
#include <misc.hrc> #include <misc.hrc>
#include <IDocumentFieldsAccess.hxx> #include <IDocumentFieldsAccess.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory> #include <memory>
using namespace ::com::sun::star; using namespace ::com::sun::star;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment