summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-09-11 15:59:57 +0200
committerMichael Stahl <mstahl@redhat.com>2015-09-11 17:44:28 +0200
commita0c41f53cd13f12d6e122c92e530bd0bd9c14d79 (patch)
treec409e17e4348e2fe2da030a980fc47c559b23253 /sw
parentd5ffcba07acb4dd5bd68373d40f07af825f07fba (diff)
sw: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I5316874cb8abe191da4fd385b281599d422a23ee
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/modcfg.hxx8
-rw-r--r--sw/source/uibase/config/modcfg.cxx6
2 files changed, 8 insertions, 6 deletions
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 02d0a18c0093..80e43f868b7e 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SW_INC_MODCFG_HXX
#define INCLUDED_SW_INC_MODCFG_HXX
-#include <boost/ptr_container/ptr_vector.hpp>
#include <tools/wintypes.hxx>
#include <vcl/field.hxx>
#include <unotools/configitem.hxx>
@@ -32,6 +31,9 @@
#include <editeng/svxenum.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <vector>
+#include <memory>
+
class SwModuleOptions;
class InsCaptionOpt;
@@ -53,8 +55,8 @@ namespace o3tl
class InsCaptionOptArr
{
private:
- typedef boost::ptr_vector<InsCaptionOpt> InsCapOptArr;
- InsCapOptArr m_aInsCapOptArr;
+ typedef std::vector<std::unique_ptr<InsCaptionOpt>> InsCapOptArr;
+ InsCapOptArr m_InsCapOptArr;
public:
InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0);
void Insert(InsCaptionOpt* pObj);
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index 0121f723dd62..be274b9747de 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -49,9 +49,9 @@ using namespace com::sun::star::uno;
InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId)
{
- for (InsCapOptArr::iterator aI = m_aInsCapOptArr.begin(); aI != m_aInsCapOptArr.end(); ++aI)
+ for (auto const& it : m_InsCapOptArr)
{
- InsCaptionOpt &rObj = *aI;
+ InsCaptionOpt &rObj = *it;
if (rObj.GetObjType() == eType && (eType != OLE_CAP || (pOleId && rObj.GetOleId() == *pOleId)))
return &rObj;
}
@@ -61,7 +61,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
void InsCaptionOptArr::Insert(InsCaptionOpt* pObj)
{
- m_aInsCapOptArr.push_back(pObj); //takes ownership
+ m_InsCapOptArr.push_back(std::unique_ptr<InsCaptionOpt>(pObj)); //takes ownership
}
const InsCaptionOpt* SwModuleOptions::GetCapOption(