diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-30 22:59:14 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-02 11:43:13 +0100 |
commit | de1a1e4bec9934c1f4ce5da45cebaa1d6c342c79 (patch) | |
tree | 8c88034b568c1c80ed3e752af7505c12f9e2f90b | |
parent | 7c5d52999a0424e4980d48caa59005c197102abf (diff) |
xmloff: replace boost::ptr_vector with std::vector
Change-Id: I6aacf764513b8f789d925db2943f4bf6f0039674
-rw-r--r-- | xmloff/inc/pch/precompiled_xo.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 23 |
2 files changed, 11 insertions, 13 deletions
diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index f11c370fab0a..00da3efa3291 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -33,7 +33,6 @@ #include <basegfx/vector/b3dvector.hxx> #include <boost/iterator_adaptors.hpp> #include <boost/noncopyable.hpp> -#include <boost/ptr_container/ptr_vector.hpp> #include <memory> #include <cassert> #include <com/sun/star/animations/AnimationAdditiveMode.hpp> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 67921406658a..eca9301e83c5 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -44,7 +44,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/languagetagodf.hxx> -#include <boost/ptr_container/ptr_vector.hpp> +#include <vector> using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -69,7 +69,7 @@ class SvXMLNumImpData SvXMLTokenMap* pStyleAttrTokenMap; SvXMLTokenMap* pStyleElemAttrTokenMap; LocaleDataWrapper* pLocaleData; - boost::ptr_vector<SvXMLNumFmtEntry> aNameEntries; + std::vector<SvXMLNumFmtEntry> m_NameEntries; uno::Reference< uno::XComponentContext > m_xContext; @@ -382,10 +382,10 @@ SvXMLNumImpData::~SvXMLNumImpData() sal_uInt32 SvXMLNumImpData::GetKeyForName( const OUString& rName ) { - sal_uInt16 nCount = aNameEntries.size(); + sal_uInt16 nCount = m_NameEntries.size(); for (sal_uInt16 i=0; i<nCount; i++) { - const SvXMLNumFmtEntry* pObj = &aNameEntries[i]; + const SvXMLNumFmtEntry *const pObj = &m_NameEntries[i]; if ( pObj->aName == rName ) return pObj->nKey; // found } @@ -399,10 +399,10 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemo // if there is already an entry for this key without the bRemoveAfterUse flag, // clear the flag for this entry, too - sal_uInt16 nCount = aNameEntries.size(); + sal_uInt16 nCount = m_NameEntries.size(); for (sal_uInt16 i=0; i<nCount; i++) { - SvXMLNumFmtEntry* pObj = &aNameEntries[i]; + SvXMLNumFmtEntry *const pObj = &m_NameEntries[i]; if ( pObj->nKey == nKey && !pObj->bRemoveAfterUse ) { bRemoveAfterUse = false; // clear flag for new entry @@ -416,16 +416,15 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemo SetUsed( nKey ); } - SvXMLNumFmtEntry* pObj = new SvXMLNumFmtEntry( rName, nKey, bRemoveAfterUse ); - aNameEntries.push_back( pObj ); + m_NameEntries.push_back(SvXMLNumFmtEntry(rName, nKey, bRemoveAfterUse)); } void SvXMLNumImpData::SetUsed( sal_uInt32 nKey ) { - sal_uInt16 nCount = aNameEntries.size(); + sal_uInt16 nCount = m_NameEntries.size(); for (sal_uInt16 i=0; i<nCount; i++) { - SvXMLNumFmtEntry* pObj = &aNameEntries[i]; + SvXMLNumFmtEntry *const pObj = &m_NameEntries[i]; if ( pObj->nKey == nKey ) { pObj->bRemoveAfterUse = false; // used -> don't remove @@ -446,10 +445,10 @@ void SvXMLNumImpData::RemoveVolatileFormats() if ( !pFormatter ) return; - sal_uInt16 nCount = aNameEntries.size(); + sal_uInt16 nCount = m_NameEntries.size(); for (sal_uInt16 i=0; i<nCount; i++) { - const SvXMLNumFmtEntry* pObj = &aNameEntries[i]; + const SvXMLNumFmtEntry *const pObj = &m_NameEntries[i]; if ( pObj->bRemoveAfterUse ) { const SvNumberformat* pFormat = pFormatter->GetEntry(pObj->nKey); |